diff
stringlengths
41
2.03M
msg
stringlengths
1
1.5k
repo
stringlengths
5
40
sha
stringlengths
40
40
time
stringlengths
20
20
deleted file mode 100644 <nl> index 70450ac68b . . 0000000000 <nl> mmm a / GameHunt . cryproject <nl> ppp / dev / null <nl> <nl> - { <nl> - " version " : 3 , <nl> - " type " : " CRYENGINE Project " , <nl> - " info " : { " name " : " HUNT " , " guid " : " 8c593d2d - 28a9 - 7a36 - d1a9 - 251d521ddd58 " } , <nl> - " content " : { <nl> - " assets " : [ " game_hunt " ] , <nl> - " code " : [ " " ] , <nl> - " libs " : [ <nl> - { <nl> - " name " : " HUNT " , <nl> - " shared " : { " any " : " GameHunt " , " win_x64 " : " " , " win_x86 " : " " } <nl> - } <nl> - ] <nl> - } , <nl> - " require " : { <nl> - " engine " : " engine - 5 . 4 " , <nl> - " plugins " : [ <nl> - { " type " : " EPluginType : : Native " , " path " : " CryDefaultEntities " } , <nl> - { " type " : " EPluginType : : Native " , " path " : " CryUQS_Core " } , <nl> - { " type " : " EPluginType : : Native " , " path " : " CryGamePlatform " } , <nl> - { " type " : " EPluginType : : Native " , " path " : " CryLobby " } <nl> - ] <nl> - } , <nl> - " console_variables " : [ <nl> - { " name " : " sys_archive_host_xml_version " , " value " : " 1 " } , <nl> - { " name " : " sys_localization_folder " , " value " : " Localization " } , <nl> - { " name " : " sys_target_platforms " , " value " : " pc , ps4 , xboxone " } , <nl> - { " name " : " sc_LogToFile " , " value " : " 2 " } , <nl> - { " name " : " sc_LogFileStreams " , " value " : " Default System Game AI AI_Nav " } , <nl> - <nl> - { " name " : " net_availableBandwidthClient " , " value " : " 512 " } , <nl> - { " name " : " net_availableBandwidthServer " , " value " : " 8192 " } , <nl> - { " name " : " net_numNetIDHighBitBits " , " value " : " 13 " } , <nl> - { " name " : " net_sim_loadprofiles " , " value " : " SimProfiles_HUNT . xml " } , <nl> - <nl> - { " name " : " ca_PreloadAllCAFs " , " value " : " 1 " } , <nl> - { " name " : " ca_SampleQuatHemisphereFromCurrentPose " , " value " : " 1 " } , <nl> - { " name " : " ca_useIMG_CAF " , " value " : " 0 " } , <nl> - <nl> - { " name " : " cl_AISystem " , " value " : " 1 " } , <nl> - { " name " : " cl_initClientActor " , " value " : " 0 " } , <nl> - <nl> - { " name " : " r_HDREyeAdaptationMode " , " value " : " 1 " } , <nl> - { " name " : " e_svoTI_VoxelizeUnderTerrain " , " value " : " 1 " } , <nl> - { " name " : " s_OcclusionMaxDistance " , " value " : " 200 " } , <nl> - { " name " : " g_hideHuntHud " , " value " : " 1 " } , <nl> - { " name " : " g_hunt_telemetry_enable " , " value " : " 1 " } , <nl> - { " name " : " g_PlayerSilhouettes " , " value " : " 0 " } , <nl> - <nl> - { " name " : " e_LodFaceAreaTargetSize " , " value " : " 0 . 01 " } <nl> - ] , <nl> - " console_commands " : [ { " name " : " sys_ignore_asserts_from_module " , " value " : " CryGame " } ] <nl> - } <nl> \ No newline at end of file <nl>
! D Delete some unnecesary files
CRYTEK/CRYENGINE
ae6254f7fe450d94cc1ed80e7604b13ce0b5607a
2017-11-27T16:54:46Z
mmm a / lib / Basics / WorkMonitor . cpp <nl> ppp b / lib / Basics / WorkMonitor . cpp <nl> static void deleteWorkDescription ( WorkDescription * desc , bool stopped ) { <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> # undef SHOW_RESULTS <nl> - # define SHOW_RESULTS " hund " <nl> / / TODO ( fc ) use vpackWorkDescription <nl> # ifdef SHOW_RESULTS <nl> # include < iostream > <nl>
turn off debug output
arangodb/arangodb
a04993b4e441c56bf9674823d65b3116f31ddec1
2016-01-04T18:12:34Z
mmm a / js / common / tests / shell - foxx - manager - install - spec . js <nl> ppp b / js / common / tests / shell - foxx - manager - install - spec . js <nl> <nl> / * jshint globalstrict : true * / <nl> - / * global module , require , describe , beforeEach , afterEach , it , expect , fail , before * / <nl> + / * global module , require , describe , beforeEach , afterEach , it , expect * / <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ brief Spec for foxx manager <nl> mmm a / js / server / modules / org / arangodb / foxx / internals . js <nl> ppp b / js / server / modules / org / arangodb / foxx / internals . js <nl> <nl> <nl> var _ = require ( " underscore " ) , <nl> is = require ( " org / arangodb / is " ) , <nl> - actions = require ( " org / arangodb / actions " ) , <nl> constructUrlObject , <nl> constructNickname , <nl> constructRoute , <nl> mmm a / js / server / tests / shell - foxx - manager - spec . js <nl> ppp b / js / server / tests / shell - foxx - manager - spec . js <nl> <nl> / * jshint globalstrict : true * / <nl> - / * global require , describe , before , it , expect * / <nl> + / * global require , describe , beforeEach , it , expect * / <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ brief Spec for foxx manager <nl>
JSLint fixes
arangodb/arangodb
808d658ff852998ff0b4f58cab2ea512683be39f
2015-02-16T13:12:34Z
mmm a / atom / common / node_bindings_win . cc <nl> ppp b / atom / common / node_bindings_win . cc <nl> NodeBindingsWin : : ~ NodeBindingsWin ( ) { <nl> } <nl> <nl> void NodeBindingsWin : : PollEvents ( ) { <nl> - / / Unlike Unix , in which we can just rely on one backend fd to determine <nl> - / / whether we should iterate libuv loop , on Window , IOCP is just one part <nl> - / / of the libuv loop , we should also check whether we have other types of <nl> - / / events . <nl> - bool block = uv_loop_ - > idle_handles = = NULL & & <nl> - uv_loop_ - > pending_reqs_tail = = NULL & & <nl> - uv_loop_ - > endgame_handles = = NULL & & <nl> - ! uv_loop_ - > stop_flag & & <nl> - ( uv_loop_ - > active_handles > 0 | | <nl> - ! QUEUE_EMPTY ( & uv_loop_ - > active_reqs ) ) ; <nl> - <nl> - / / When there is no other types of events , we block on the IOCP . <nl> - if ( block ) { <nl> - DWORD bytes , timeout ; <nl> - ULONG_PTR key ; <nl> - OVERLAPPED * overlapped ; <nl> - <nl> - timeout = uv_backend_timeout ( uv_loop_ ) ; <nl> - GetQueuedCompletionStatus ( uv_loop_ - > iocp , <nl> - & bytes , <nl> - & key , <nl> - & overlapped , <nl> - timeout ) ; <nl> - <nl> - / / Give the event back so libuv can deal with it . <nl> - if ( overlapped ! = NULL ) <nl> - PostQueuedCompletionStatus ( uv_loop_ - > iocp , <nl> - bytes , <nl> - key , <nl> - overlapped ) ; <nl> - } <nl> + / / If there are other kinds of events pending , uv_backend_timeout will <nl> + / / instruct us not to wait . <nl> + DWORD bytes , timeout ; <nl> + ULONG_PTR key ; <nl> + OVERLAPPED * overlapped ; <nl> + <nl> + timeout = uv_backend_timeout ( uv_loop_ ) ; <nl> + <nl> + GetQueuedCompletionStatus ( uv_loop_ - > iocp , <nl> + & bytes , <nl> + & key , <nl> + & overlapped , <nl> + timeout ) ; <nl> + <nl> + / / Give the event back so libuv can deal with it . <nl> + if ( overlapped ! = NULL ) <nl> + PostQueuedCompletionStatus ( uv_loop_ - > iocp , <nl> + bytes , <nl> + key , <nl> + overlapped ) ; <nl> } <nl> <nl> / / static <nl>
Merge pull request from mmastrac / master
electron/electron
b4da15bba8f03f3dadb036bbeb12b3a6abbec4a1
2015-08-21T03:33:43Z
mmm a / src / compiler / ppc / code - generator - ppc . cc <nl> ppp b / src / compiler / ppc / code - generator - ppc . cc <nl> class PPCOperandConverter final : public InstructionOperandConverter { <nl> RCBit OutputRCBit ( ) const { <nl> switch ( instr_ - > flags_mode ( ) ) { <nl> case kFlags_branch : <nl> + case kFlags_deoptimize : <nl> case kFlags_set : <nl> return SetRC ; <nl> case kFlags_none : <nl> void CodeGenerator : : AssembleDeoptimizerCall ( <nl> int deoptimization_id , Deoptimizer : : BailoutType bailout_type ) { <nl> Address deopt_entry = Deoptimizer : : GetDeoptimizationEntry ( <nl> isolate ( ) , deoptimization_id , bailout_type ) ; <nl> + / / TODO ( turbofan ) : We should be able to generate better code by sharing the <nl> + / / actual final call site and just bl ' ing to it here , similar to what we do <nl> + / / in the lithium backend . <nl> __ Call ( deopt_entry , RelocInfo : : RUNTIME_ENTRY ) ; <nl> } <nl> <nl> mmm a / src / compiler / ppc / instruction - selector - ppc . cc <nl> ppp b / src / compiler / ppc / instruction - selector - ppc . cc <nl> void VisitBinop ( InstructionSelector * selector , Node * node , <nl> DCHECK_GE ( arraysize ( inputs ) , input_count ) ; <nl> DCHECK_GE ( arraysize ( outputs ) , output_count ) ; <nl> <nl> - selector - > Emit ( cont - > Encode ( opcode ) , output_count , outputs , input_count , <nl> - inputs ) ; <nl> + opcode = cont - > Encode ( opcode ) ; <nl> + if ( cont - > IsDeoptimize ( ) ) { <nl> + selector - > EmitDeoptimize ( opcode , output_count , outputs , input_count , inputs , <nl> + cont - > frame_state ( ) ) ; <nl> + } else { <nl> + selector - > Emit ( opcode , output_count , outputs , input_count , inputs ) ; <nl> + } <nl> } <nl> <nl> <nl> void InstructionSelector : : VisitFloat64RoundTiesEven ( Node * node ) { <nl> <nl> void InstructionSelector : : VisitInt32AddWithOverflow ( Node * node ) { <nl> if ( Node * ovf = NodeProperties : : FindProjection ( node , 1 ) ) { <nl> - FlagsContinuation cont ( kOverflow , ovf ) ; <nl> + FlagsContinuation cont = FlagsContinuation : : ForSet ( kOverflow , ovf ) ; <nl> return VisitBinop < Int32BinopMatcher > ( this , node , kPPC_AddWithOverflow32 , <nl> kInt16Imm , & cont ) ; <nl> } <nl> void InstructionSelector : : VisitInt32AddWithOverflow ( Node * node ) { <nl> <nl> void InstructionSelector : : VisitInt32SubWithOverflow ( Node * node ) { <nl> if ( Node * ovf = NodeProperties : : FindProjection ( node , 1 ) ) { <nl> - FlagsContinuation cont ( kOverflow , ovf ) ; <nl> + FlagsContinuation cont = FlagsContinuation : : ForSet ( kOverflow , ovf ) ; <nl> return VisitBinop < Int32BinopMatcher > ( this , node , kPPC_SubWithOverflow32 , <nl> kInt16Imm_Negate , & cont ) ; <nl> } <nl> void InstructionSelector : : VisitInt32SubWithOverflow ( Node * node ) { <nl> # if V8_TARGET_ARCH_PPC64 <nl> void InstructionSelector : : VisitInt64AddWithOverflow ( Node * node ) { <nl> if ( Node * ovf = NodeProperties : : FindProjection ( node , 1 ) ) { <nl> - FlagsContinuation cont ( kOverflow , ovf ) ; <nl> + FlagsContinuation cont = FlagsContinuation : : ForSet ( kOverflow , ovf ) ; <nl> return VisitBinop < Int64BinopMatcher > ( this , node , kPPC_Add , kInt16Imm , <nl> & cont ) ; <nl> } <nl> void InstructionSelector : : VisitInt64AddWithOverflow ( Node * node ) { <nl> <nl> void InstructionSelector : : VisitInt64SubWithOverflow ( Node * node ) { <nl> if ( Node * ovf = NodeProperties : : FindProjection ( node , 1 ) ) { <nl> - FlagsContinuation cont ( kOverflow , ovf ) ; <nl> + FlagsContinuation cont = FlagsContinuation : : ForSet ( kOverflow , ovf ) ; <nl> return VisitBinop < Int64BinopMatcher > ( this , node , kPPC_Sub , kInt16Imm_Negate , <nl> & cont ) ; <nl> } <nl> void VisitCompare ( InstructionSelector * selector , InstructionCode opcode , <nl> if ( cont - > IsBranch ( ) ) { <nl> selector - > Emit ( opcode , g . NoOutput ( ) , left , right , <nl> g . Label ( cont - > true_block ( ) ) , g . Label ( cont - > false_block ( ) ) ) ; <nl> + } else if ( cont - > IsDeoptimize ( ) ) { <nl> + selector - > EmitDeoptimize ( opcode , g . NoOutput ( ) , left , right , <nl> + cont - > frame_state ( ) ) ; <nl> } else { <nl> DCHECK ( cont - > IsSet ( ) ) ; <nl> selector - > Emit ( opcode , g . DefineAsRegister ( cont - > result ( ) ) , left , right ) ; <nl> void InstructionSelector : : VisitBranch ( Node * branch , BasicBlock * tbranch , <nl> VisitWord32CompareZero ( this , branch , branch - > InputAt ( 0 ) , & cont ) ; <nl> } <nl> <nl> + void InstructionSelector : : VisitDeoptimizeIf ( Node * node ) { <nl> + FlagsContinuation cont = <nl> + FlagsContinuation : : ForDeoptimize ( kNotEqual , node - > InputAt ( 1 ) ) ; <nl> + VisitWord32CompareZero ( this , node , node - > InputAt ( 0 ) , & cont ) ; <nl> + } <nl> + <nl> + void InstructionSelector : : VisitDeoptimizeUnless ( Node * node ) { <nl> + FlagsContinuation cont = <nl> + FlagsContinuation : : ForDeoptimize ( kEqual , node - > InputAt ( 1 ) ) ; <nl> + VisitWord32CompareZero ( this , node , node - > InputAt ( 0 ) , & cont ) ; <nl> + } <nl> <nl> void InstructionSelector : : VisitSwitch ( Node * node , const SwitchInfo & sw ) { <nl> PPCOperandGenerator g ( this ) ; <nl> void InstructionSelector : : VisitSwitch ( Node * node , const SwitchInfo & sw ) { <nl> <nl> <nl> void InstructionSelector : : VisitWord32Equal ( Node * const node ) { <nl> - FlagsContinuation cont ( kEqual , node ) ; <nl> + FlagsContinuation cont = FlagsContinuation : : ForSet ( kEqual , node ) ; <nl> Int32BinopMatcher m ( node ) ; <nl> if ( m . right ( ) . Is ( 0 ) ) { <nl> return VisitWord32CompareZero ( this , m . node ( ) , m . left ( ) . node ( ) , & cont ) ; <nl> void InstructionSelector : : VisitWord32Equal ( Node * const node ) { <nl> <nl> <nl> void InstructionSelector : : VisitInt32LessThan ( Node * node ) { <nl> - FlagsContinuation cont ( kSignedLessThan , node ) ; <nl> + FlagsContinuation cont = FlagsContinuation : : ForSet ( kSignedLessThan , node ) ; <nl> VisitWord32Compare ( this , node , & cont ) ; <nl> } <nl> <nl> <nl> void InstructionSelector : : VisitInt32LessThanOrEqual ( Node * node ) { <nl> - FlagsContinuation cont ( kSignedLessThanOrEqual , node ) ; <nl> + FlagsContinuation cont = <nl> + FlagsContinuation : : ForSet ( kSignedLessThanOrEqual , node ) ; <nl> VisitWord32Compare ( this , node , & cont ) ; <nl> } <nl> <nl> <nl> void InstructionSelector : : VisitUint32LessThan ( Node * node ) { <nl> - FlagsContinuation cont ( kUnsignedLessThan , node ) ; <nl> + FlagsContinuation cont = FlagsContinuation : : ForSet ( kUnsignedLessThan , node ) ; <nl> VisitWord32Compare ( this , node , & cont ) ; <nl> } <nl> <nl> <nl> void InstructionSelector : : VisitUint32LessThanOrEqual ( Node * node ) { <nl> - FlagsContinuation cont ( kUnsignedLessThanOrEqual , node ) ; <nl> + FlagsContinuation cont = <nl> + FlagsContinuation : : ForSet ( kUnsignedLessThanOrEqual , node ) ; <nl> VisitWord32Compare ( this , node , & cont ) ; <nl> } <nl> <nl> <nl> # if V8_TARGET_ARCH_PPC64 <nl> void InstructionSelector : : VisitWord64Equal ( Node * const node ) { <nl> - FlagsContinuation cont ( kEqual , node ) ; <nl> + FlagsContinuation cont = FlagsContinuation : : ForSet ( kEqual , node ) ; <nl> Int64BinopMatcher m ( node ) ; <nl> if ( m . right ( ) . Is ( 0 ) ) { <nl> return VisitWord64CompareZero ( this , m . node ( ) , m . left ( ) . node ( ) , & cont ) ; <nl> void InstructionSelector : : VisitWord64Equal ( Node * const node ) { <nl> <nl> <nl> void InstructionSelector : : VisitInt64LessThan ( Node * node ) { <nl> - FlagsContinuation cont ( kSignedLessThan , node ) ; <nl> + FlagsContinuation cont = FlagsContinuation : : ForSet ( kSignedLessThan , node ) ; <nl> VisitWord64Compare ( this , node , & cont ) ; <nl> } <nl> <nl> <nl> void InstructionSelector : : VisitInt64LessThanOrEqual ( Node * node ) { <nl> - FlagsContinuation cont ( kSignedLessThanOrEqual , node ) ; <nl> + FlagsContinuation cont = <nl> + FlagsContinuation : : ForSet ( kSignedLessThanOrEqual , node ) ; <nl> VisitWord64Compare ( this , node , & cont ) ; <nl> } <nl> <nl> <nl> void InstructionSelector : : VisitUint64LessThan ( Node * node ) { <nl> - FlagsContinuation cont ( kUnsignedLessThan , node ) ; <nl> + FlagsContinuation cont = FlagsContinuation : : ForSet ( kUnsignedLessThan , node ) ; <nl> VisitWord64Compare ( this , node , & cont ) ; <nl> } <nl> <nl> <nl> void InstructionSelector : : VisitUint64LessThanOrEqual ( Node * node ) { <nl> - FlagsContinuation cont ( kUnsignedLessThanOrEqual , node ) ; <nl> + FlagsContinuation cont = <nl> + FlagsContinuation : : ForSet ( kUnsignedLessThanOrEqual , node ) ; <nl> VisitWord64Compare ( this , node , & cont ) ; <nl> } <nl> # endif <nl> <nl> <nl> void InstructionSelector : : VisitFloat32Equal ( Node * node ) { <nl> - FlagsContinuation cont ( kEqual , node ) ; <nl> + FlagsContinuation cont = FlagsContinuation : : ForSet ( kEqual , node ) ; <nl> VisitFloat32Compare ( this , node , & cont ) ; <nl> } <nl> <nl> <nl> void InstructionSelector : : VisitFloat32LessThan ( Node * node ) { <nl> - FlagsContinuation cont ( kUnsignedLessThan , node ) ; <nl> + FlagsContinuation cont = FlagsContinuation : : ForSet ( kUnsignedLessThan , node ) ; <nl> VisitFloat32Compare ( this , node , & cont ) ; <nl> } <nl> <nl> <nl> void InstructionSelector : : VisitFloat32LessThanOrEqual ( Node * node ) { <nl> - FlagsContinuation cont ( kUnsignedLessThanOrEqual , node ) ; <nl> + FlagsContinuation cont = <nl> + FlagsContinuation : : ForSet ( kUnsignedLessThanOrEqual , node ) ; <nl> VisitFloat32Compare ( this , node , & cont ) ; <nl> } <nl> <nl> <nl> void InstructionSelector : : VisitFloat64Equal ( Node * node ) { <nl> - FlagsContinuation cont ( kEqual , node ) ; <nl> + FlagsContinuation cont = FlagsContinuation : : ForSet ( kEqual , node ) ; <nl> VisitFloat64Compare ( this , node , & cont ) ; <nl> } <nl> <nl> <nl> void InstructionSelector : : VisitFloat64LessThan ( Node * node ) { <nl> - FlagsContinuation cont ( kUnsignedLessThan , node ) ; <nl> + FlagsContinuation cont = FlagsContinuation : : ForSet ( kUnsignedLessThan , node ) ; <nl> VisitFloat64Compare ( this , node , & cont ) ; <nl> } <nl> <nl> <nl> void InstructionSelector : : VisitFloat64LessThanOrEqual ( Node * node ) { <nl> - FlagsContinuation cont ( kUnsignedLessThanOrEqual , node ) ; <nl> + FlagsContinuation cont = <nl> + FlagsContinuation : : ForSet ( kUnsignedLessThanOrEqual , node ) ; <nl> VisitFloat64Compare ( this , node , & cont ) ; <nl> } <nl> <nl>
PPC : [ turbofan ] Introduce DeoptimizeIf And DeoptimizeUnless common operators .
v8/v8
e1bed4f9369164351852d0fe70c4fb1e7f78cbec
2016-02-24T22:38:18Z
mmm a / . gitignore <nl> ppp b / . gitignore <nl> tests / cpp - tests / Resources / audio <nl> ! / tools / framework - compile / bin / <nl> <nl> # generated by framework - compile <nl> + / prebuilt / <nl> / * / prebuilt - mk / Android . mk <nl> / * / * / prebuilt - mk / Android . mk <nl> / * / * / * / prebuilt - mk / Android . mk <nl> new file mode 100755 <nl> index 000000000000 . . 5f5c8ae69fa9 <nl> mmm / dev / null <nl> ppp b / tools / framework - compile / bin / custom_error . py <nl> <nl> + # ! / usr / bin / python <nl> + <nl> + import sys <nl> + <nl> + # It ' s defined for raising custom errors . <nl> + class CustomError ( Exception ) : <nl> + ERROR_WRONG_ARGS = 11 # wrong arguments <nl> + ERROR_PATH_NOT_FOUND = 12 # path not found <nl> + ERROR_BUILD_FAILED = 13 # build failed <nl> + ERROR_RUNNING_CMD = 14 # error when running command <nl> + ERROR_CMD_NOT_FOUND = 15 # command not found <nl> + ERROR_ENV_VAR_NOT_FOUND = 16 # environment variable not found <nl> + ERROR_TOOLS_NOT_FOUND = 17 # depend on tools not found <nl> + ERROR_PARSE_FILE = 18 # error when parse files <nl> + ERROR_WRONG_CONFIG = 19 # configuration is wrong <nl> + <nl> + def __init__ ( self , err_args , err_no = 1 ) : <nl> + super ( CustomError , self ) . __init__ ( err_args ) <nl> + self . error_no = err_no <nl> + <nl> + def get_error_no ( self ) : <nl> + return self . error_no <nl> + <nl> + <nl> + class Logging : <nl> + # TODO maybe the right way to do this is to use something like colorama ? <nl> + RED = ' \ 033 [ 31m ' <nl> + GREEN = ' \ 033 [ 32m ' <nl> + YELLOW = ' \ 033 [ 33m ' <nl> + MAGENTA = ' \ 033 [ 35m ' <nl> + RESET = ' \ 033 [ 0m ' <nl> + <nl> + @ staticmethod <nl> + def _print ( s , color = None ) : <nl> + if color and sys . stdout . isatty ( ) and sys . platform ! = ' win32 ' : <nl> + print ( color + s + Logging . RESET ) <nl> + else : <nl> + print ( s ) <nl> + <nl> + @ staticmethod <nl> + def debug ( s ) : <nl> + Logging . _print ( s , Logging . MAGENTA ) <nl> + <nl> + @ staticmethod <nl> + def info ( s ) : <nl> + Logging . _print ( s , Logging . GREEN ) <nl> + <nl> + @ staticmethod <nl> + def warning ( s ) : <nl> + Logging . _print ( s , Logging . YELLOW ) <nl> + <nl> + @ staticmethod <nl> + def error ( s ) : <nl> + Logging . _print ( s , Logging . RED ) <nl> mmm a / tools / framework - compile / bin / gen_cocos_binary_template . py <nl> ppp b / tools / framework - compile / bin / gen_cocos_binary_template . py <nl> def __init__ ( self , args ) : <nl> self . is_for_package = False <nl> try : <nl> self . is_for_package = args . is_for_package <nl> - except Exception , e : <nl> + except Exception as e : <nl> print ( " [ Warn ] % s " % e ) <nl> <nl> def generate ( self ) : <nl> def generate ( self ) : <nl> excopy . copy_files_in_dir ( self . template_dir , os . path . join ( self . repo_x , " templates " ) ) <nl> <nl> def clean_template ( self ) : <nl> - import shutil <nl> rmdir ( self . template_dir ) <nl> rmdir ( os . path . join ( self . repo_x , " templates " , " cpp - template - binary " ) ) <nl> rmdir ( os . path . join ( self . repo_x , " templates " , " lua - template - binary " ) ) <nl> mmm a / tools / framework - compile / bin / gen_cocos_libs . py <nl> ppp b / tools / framework - compile / bin / gen_cocos_libs . py <nl> <nl> import time <nl> import shutil <nl> import excopy <nl> + import json <nl> + from custom_error import CustomError <nl> + from custom_error import Logging <nl> from utils_cocos import rmdir <nl> from argparse import ArgumentParser <nl> <nl> def execute_command ( cmdstring , cwd = None , timeout = None , shell = True ) : <nl> sub = None <nl> try : <nl> sub = subprocess . Popen ( cmdstring_list , cwd = cwd , stdin = subprocess . PIPE , shell = shell , bufsize = 4096 ) <nl> - except Exception , e : <nl> + except Exception as e : <nl> print ( " execute command fail : % s " % cmdstring ) <nl> raise e <nl> <nl> def execute_command ( cmdstring , cwd = None , timeout = None , shell = True ) : <nl> <nl> <nl> class CocosLibsCompiler ( object ) : <nl> + CFG_FILE = ' gen_libs_config . json ' <nl> + <nl> + KEY_LIBS_OUTPUT = ' libs_output_dir ' <nl> + KEY_XCODE_PROJS_INFO = ' xcode_projs_info ' <nl> + KEY_VS_PROJS_INFO = ' vs_projs_info ' <nl> + CHECK_KEYS = [ <nl> + KEY_LIBS_OUTPUT , <nl> + KEY_XCODE_PROJS_INFO , <nl> + KEY_VS_PROJS_INFO <nl> + ] <nl> + <nl> + KEY_XCODE_TARGETS = ' targets ' <nl> + KEY_VS_BUILD_TARGETS = ' build_targets ' <nl> + KEY_VS_RENAME_TARGETS = ' rename_targets ' <nl> <nl> def __init__ ( self , args ) : <nl> print ( " Compiler init function " ) <nl> + self . cur_dir = os . path . realpath ( os . path . dirname ( __file__ ) ) <nl> + self . cfg_file_path = os . path . join ( self . cur_dir , CocosLibsCompiler . CFG_FILE ) <nl> + self . parse_config ( ) <nl> <nl> - # argsments check and set <nl> + # arguments check and set <nl> self . clean = args . clean <nl> self . build_win = args . win <nl> self . build_mac = args . mac <nl> def __init__ ( self , args ) : <nl> self . build_mac = True <nl> self . build_android = True <nl> <nl> - self . cur_dir = os . path . realpath ( os . path . dirname ( __file__ ) ) <nl> self . repo_x = os . path . realpath ( self . repo_x ) <nl> - self . lib_dir = os . path . realpath ( os . path . join ( self . cur_dir , os . path . pardir , " libs " ) ) <nl> + self . lib_dir = os . path . normpath ( os . path . join ( self . repo_x , self . cfg_info [ CocosLibsCompiler . KEY_LIBS_OUTPUT ] ) ) <nl> + <nl> + def parse_config ( self ) : <nl> + if not os . path . isfile ( self . cfg_file_path ) : <nl> + raise CustomError ( ' % s is not a valid config file . ' % self . cfg_file_path , CustomError . ERROR_PATH_NOT_FOUND ) <nl> + <nl> + try : <nl> + f = open ( self . cfg_file_path ) <nl> + self . cfg_info = json . load ( f ) <nl> + f . close ( ) <nl> + except : <nl> + raise CustomError ( ' Parse % s failed . ' % self . cfg_file_path , CustomError . ERROR_PARSE_FILE ) <nl> + <nl> + for k in CocosLibsCompiler . CHECK_KEYS : <nl> + if k not in self . cfg_info . keys ( ) : <nl> + raise CustomError ( ' % s is not found in % s ' % ( k , self . cfg_file_path ) , CustomError . ERROR_WRONG_CONFIG ) <nl> <nl> def compile ( self ) : <nl> print ( " compile function " ) <nl> def compile_win ( self ) : <nl> print ( " this is not win platform , needn ' t compile " ) <nl> return <nl> <nl> - win32_proj_info = { <nl> - " build / cocos2d - win32 . sln " : { <nl> - " outputdir " : self . lib_dir , <nl> - " build_targets " : [ <nl> - " libluacocos2d " <nl> - ] , <nl> - " rename_targets " : [ <nl> - # " libcocos2d " , " libluacocos2d " , " libSpine " , " libbox2d " <nl> - ] <nl> - } , <nl> - " build / cocos2d - js - win32 . sln " : { <nl> - " outputdir " : self . lib_dir , <nl> - " build_targets " : [ <nl> - " libjscocos2d " <nl> - ] , <nl> - " rename_targets " : [ <nl> - # " libjscocos2d " <nl> - ] <nl> - } , <nl> - " tools / simulator / frameworks / runtime - src / proj . win32 / simulator . sln " : { <nl> - " outputdir " : self . lib_dir , <nl> - " build_targets " : [ <nl> - " libsimulator " <nl> - ] , <nl> - " rename_targets " : [ <nl> - # " libsimulator " <nl> - ] <nl> - } <nl> - } <nl> + win32_proj_info = self . cfg_info [ CocosLibsCompiler . KEY_VS_PROJS_INFO ] <nl> <nl> import _winreg <nl> from utils_cocos import get_vs_cmd_path <nl> def compile_win ( self ) : <nl> raise Exception ( message ) <nl> <nl> for key in win32_proj_info . keys ( ) : <nl> - output_dir = os . path . join ( win32_proj_info [ key ] [ " outputdir " ] , " windows " ) <nl> + output_dir = os . path . join ( self . lib_dir , " win32 " ) <nl> <nl> proj_path = os . path . join ( self . repo_x , key ) <nl> <nl> def compile_win ( self ) : <nl> ] ) <nl> execute_command ( build_cmd ) <nl> else : <nl> - for proj_name in win32_proj_info [ key ] [ " build_targets " ] : <nl> + for proj_name in win32_proj_info [ key ] [ CocosLibsCompiler . KEY_VS_BUILD_TARGETS ] : <nl> # build the projects <nl> self . build_win32_proj ( vs_command , proj_path , proj_name , " build " ) <nl> <nl> def compile_win ( self ) : <nl> shutil . copy ( file_path , win32_output_dir ) <nl> <nl> suffix = " " <nl> - for proj_name in win32_proj_info [ key ] [ " rename_targets " ] : <nl> + for proj_name in win32_proj_info [ key ] [ CocosLibsCompiler . KEY_VS_RENAME_TARGETS ] : <nl> src_name = os . path . join ( win32_output_dir , " % s . lib " % proj_name ) <nl> dst_name = os . path . join ( win32_output_dir , " % s % s . lib " % ( proj_name , suffix ) ) <nl> if os . path . exists ( src_name ) : <nl> def compile_mac_ios ( self ) : <nl> return <nl> print ( " to compile mac " ) <nl> <nl> - xcode_proj_info = { <nl> - " build / cocos2d_libs . xcodeproj " : { <nl> - " outputdir " : self . lib_dir , <nl> - " targets " : " libcocos2d " , <nl> - } , <nl> - " cocos / scripting / lua - bindings / proj . ios_mac / cocos2d_lua_bindings . xcodeproj " : { <nl> - " outputdir " : self . lib_dir , <nl> - " targets " : " libluacocos2d " , <nl> - } , <nl> - " cocos / scripting / js - bindings / proj . ios_mac / cocos2d_js_bindings . xcodeproj " : { <nl> - " outputdir " : self . lib_dir , <nl> - " targets " : " libjscocos2d " , <nl> - } , <nl> - " tools / simulator / libsimulator / proj . ios_mac / libsimulator . xcodeproj " : { <nl> - " outputdir " : self . lib_dir , <nl> - " targets " : " libsimulator " , <nl> - } <nl> - } <nl> + xcode_proj_info = self . cfg_info [ CocosLibsCompiler . KEY_XCODE_PROJS_INFO ] <nl> <nl> XCODE_CMD_FMT = " xcodebuild - project \ " % s \ " - configuration Release - target \ " % s \ " % s CONFIGURATION_BUILD_DIR = % s " <nl> for key in xcode_proj_info . keys ( ) : <nl> - output_dir = xcode_proj_info [ key ] [ " outputdir " ] <nl> proj_path = os . path . join ( self . repo_x , key ) <nl> - ios_out_dir = os . path . join ( output_dir , " ios " ) <nl> - mac_out_dir = os . path . join ( output_dir , " mac " ) <nl> + ios_out_dir = os . path . join ( self . lib_dir , " ios " ) <nl> + mac_out_dir = os . path . join ( self . lib_dir , " mac " ) <nl> ios_sim_libs_dir = os . path . join ( ios_out_dir , " simulator " ) <nl> ios_dev_libs_dir = os . path . join ( ios_out_dir , " device " ) <nl> <nl> - target = xcode_proj_info [ key ] [ " targets " ] <nl> + target = xcode_proj_info [ key ] [ CocosLibsCompiler . KEY_XCODE_TARGETS ] <nl> <nl> # compile ios simulator <nl> build_cmd = XCODE_CMD_FMT % ( proj_path , " % s iOS " % target , " - sdk iphonesimulator ARCHS = \ " i386 x86_64 \ " VALID_ARCHS = \ " i386 x86_64 \ " " , ios_sim_libs_dir ) <nl> def compile_android ( self , language ) : <nl> def trip_libs ( self , strip_cmd , folder ) : <nl> if os_is_win32 ( ) : <nl> for name in os . listdir ( folder ) : <nl> - if name [ - 2 : ] ! = " . a " : <nl> - pass <nl> - full_name = os . path . join ( folder , name ) <nl> - command = " % s - S % s " % ( strip_cmd , full_name ) <nl> - execute_command ( command ) <nl> + basename , ext = os . path . splitext ( name ) <nl> + if ext = = " . a " : <nl> + full_name = os . path . join ( folder , name ) <nl> + command = " % s - S % s " % ( strip_cmd , full_name ) <nl> + execute_command ( command ) <nl> else : <nl> strip_cmd = " % s - S % s / * . a " % ( strip_cmd , folder ) <nl> execute_command ( strip_cmd ) <nl> def clean_libs ( self ) : <nl> parser . add_argument ( ' - - mac ' , dest = ' mac ' , action = " store_true " , help = ' compile mac platform ' ) <nl> parser . add_argument ( ' - - android ' , dest = ' android ' , action = " store_true " , help = ' complile android platform ' ) <nl> parser . add_argument ( ' - - dis - strip ' , " - - disable - strip " , dest = ' disable_strip ' , action = " store_true " , help = ' Disable the strip of the generated libs . ' ) <nl> - parser . add_argument ( ' - - repo - x ' , dest = ' repo_x ' , help = ' Set the repo path of cocos2d - x . ' ) <nl> parser . add_argument ( ' - - vs ' , dest = ' vs_version ' , help = ' visual studio version , such as 2013 . ' , default = 2013 ) <nl> <nl> ( args , unknown ) = parser . parse_known_args ( ) <nl> def clean_libs ( self ) : <nl> if len ( unknown ) > 0 : <nl> print ( " unknown arguments : % s " % unknown ) <nl> <nl> - if args . repo_x is None : <nl> - print ( " ERROR ! must set repo of cocos2d - x " ) <nl> - exit ( 1 ) <nl> + # Get the engine path <nl> + cur_dir = os . path . realpath ( os . path . dirname ( __file__ ) ) <nl> + args . repo_x = os . path . normpath ( os . path . join ( cur_dir , os . pardir , os . pardir , os . pardir ) ) <nl> + <nl> if not args . win and not args . mac and not args . android : <nl> args . all = True <nl> <nl> beginSecond = time . time ( ) <nl> print ( " > > > Bgein Compile at % s " % time . strftime ( ' % Y - % m - % d % H : % M : % S ' , time . localtime ( beginSecond ) ) ) <nl> <nl> - compiler = CocosLibsCompiler ( args ) <nl> - compiler . compile ( ) <nl> - <nl> - endSecond = time . time ( ) <nl> - print ( " > > > Bgein Compile at % s " % time . strftime ( ' % Y - % m - % d % H : % M : % S ' , time . localtime ( beginSecond ) ) ) <nl> - print ( " > > > End Compile at % s " % time . strftime ( ' % Y - % m - % d % H : % M : % S ' , time . localtime ( endSecond ) ) ) <nl> - interSecond = endSecond - beginSecond <nl> - interSecond = int ( interSecond ) <nl> - print ( " > > > Use Second % d " % interSecond ) <nl> - houre = interSecond / ( 60 * 60 ) <nl> - interSecond = interSecond % ( 60 * 60 ) <nl> - minute = interSecond / 60 <nl> - second = interSecond % 60 <nl> - print ( " > > > Use Time % d : % d : % d " % ( houre , minute , second ) ) <nl> - <nl> + try : <nl> + compiler = CocosLibsCompiler ( args ) <nl> + compiler . compile ( ) <nl> + except Exception as e : <nl> + if isinstance ( e , CustomError ) : <nl> + Logging . error ( ' ' . join ( e . args ) ) <nl> + err_no = e . get_error_no ( ) <nl> + sys . exit ( err_no ) <nl> + else : <nl> + raise <nl> + finally : <nl> + endSecond = time . time ( ) <nl> + print ( " > > > Bgein Compile at % s " % time . strftime ( ' % Y - % m - % d % H : % M : % S ' , time . localtime ( beginSecond ) ) ) <nl> + print ( " > > > End Compile at % s " % time . strftime ( ' % Y - % m - % d % H : % M : % S ' , time . localtime ( endSecond ) ) ) <nl> + interSecond = endSecond - beginSecond <nl> + interSecond = int ( interSecond ) <nl> + print ( " > > > Use Second % d " % interSecond ) <nl> + houre = interSecond / ( 60 * 60 ) <nl> + interSecond = interSecond % ( 60 * 60 ) <nl> + minute = interSecond / 60 <nl> + second = interSecond % 60 <nl> + print ( " > > > Use Time % d : % d : % d " % ( houre , minute , second ) ) <nl> new file mode 100755 <nl> index 000000000000 . . e11a621831a7 <nl> mmm / dev / null <nl> ppp b / tools / framework - compile / bin / gen_libs_config . json <nl> <nl> + { <nl> + " libs_output_dir " : " prebuilt " , <nl> + " xcode_projs_info " : { <nl> + " build / cocos2d_libs . xcodeproj " : { <nl> + " targets " : " libcocos2d " <nl> + } , <nl> + " cocos / scripting / lua - bindings / proj . ios_mac / cocos2d_lua_bindings . xcodeproj " : { <nl> + " targets " : " libluacocos2d " <nl> + } , <nl> + " cocos / scripting / js - bindings / proj . ios_mac / cocos2d_js_bindings . xcodeproj " : { <nl> + " targets " : " libjscocos2d " <nl> + } , <nl> + " tools / simulator / libsimulator / proj . ios_mac / libsimulator . xcodeproj " : { <nl> + " targets " : " libsimulator " <nl> + } <nl> + } , <nl> + " vs_projs_info " : { <nl> + " build / cocos2d - win32 . sln " : { <nl> + " build_targets " : [ <nl> + " libluacocos2d " <nl> + ] , <nl> + " rename_targets " : [ <nl> + " libcocos2d " , " libluacocos2d " , " libSpine " , " libbox2d " <nl> + ] <nl> + } , <nl> + " build / cocos2d - js - win32 . sln " : { <nl> + " build_targets " : [ <nl> + " libjscocos2d " <nl> + ] , <nl> + " rename_targets " : [ <nl> + " libjscocos2d " <nl> + ] <nl> + } , <nl> + " tools / simulator / frameworks / runtime - src / proj . win32 / simulator . sln " : { <nl> + " build_targets " : [ <nl> + " libsimulator " <nl> + ] , <nl> + " rename_targets " : [ <nl> + " libsimulator " <nl> + ] <nl> + } <nl> + } <nl> + } <nl> mmm a / tools / framework - compile / bin / utils_cocos . py <nl> ppp b / tools / framework - compile / bin / utils_cocos . py <nl> def execute_command ( cmdstring , cwd = None , timeout = None , shell = True ) : <nl> sub = None <nl> try : <nl> sub = subprocess . Popen ( cmdstring_list , cwd = cwd , stdin = subprocess . PIPE , shell = shell , bufsize = 4096 ) <nl> - except Exception , e : <nl> + except Exception as e : <nl> print ( " execute command fail : % s " % cmdstring ) <nl> raise e <nl> <nl>
Add a config file for generating prebuilt libs .
cocos2d/cocos2d-x
cd159bd12ceda1b237cc2969009fbb184c5ffef0
2015-06-19T05:42:48Z
new file mode 100644 <nl> index 00000000000 . . c154fe17e6b <nl> mmm / dev / null <nl> ppp b / dbms / include / DB / Functions / FunctionFactory . h <nl> <nl> + # pragma once <nl> + <nl> + # include < Poco / SharedPtr . h > <nl> + <nl> + # include < DB / Functions / IFunction . h > <nl> + <nl> + <nl> + namespace DB <nl> + { <nl> + <nl> + class Context ; <nl> + <nl> + <nl> + / * * Позволяет получить функцию по имени . <nl> + * Функция при создании также может использовать для инициализации ( например , захватить SharedPtr ) <nl> + * какие - нибудь справочники , находящиеся в Context - е . <nl> + * / <nl> + class FunctionFactory <nl> + { <nl> + public : <nl> + FunctionPtr get ( <nl> + const String & name , <nl> + const Context & context ) const ; <nl> + } ; <nl> + <nl> + } <nl> deleted file mode 100644 <nl> index 3d1b5578e24 . . 00000000000 <nl> mmm a / dbms / include / DB / Functions / FunctionsLibrary . h <nl> ppp / dev / null <nl> <nl> - # pragma once <nl> - <nl> - # include < Poco / SharedPtr . h > <nl> - <nl> - # include < DB / Functions / IFunction . h > <nl> - <nl> - <nl> - namespace DB <nl> - { <nl> - <nl> - / / / имя функции - > функция <nl> - typedef std : : map < String , FunctionPtr > Functions ; <nl> - <nl> - <nl> - / / / Библиотека обычных функций . <nl> - namespace FunctionsLibrary <nl> - { <nl> - / / / Получить все функции . <nl> - Functions get ( ) ; <nl> - } ; <nl> - <nl> - } <nl> mmm a / dbms / include / DB / Interpreters / Context . h <nl> ppp b / dbms / include / DB / Interpreters / Context . h <nl> <nl> # include < DB / Core / NamesAndTypes . h > <nl> # include < DB / DataStreams / FormatFactory . h > <nl> # include < DB / Storages / IStorage . h > <nl> - # include < DB / Functions / FunctionsLibrary . h > <nl> + # include < DB / Functions / FunctionFactory . h > <nl> # include < DB / AggregateFunctions / AggregateFunctionFactory . h > <nl> # include < DB / DataTypes / DataTypeFactory . h > <nl> # include < DB / Storages / StorageFactory . h > <nl> struct ContextShared <nl> { <nl> String path ; / / / Путь к директории с данными , со слешем на конце . <nl> Databases databases ; / / / Список БД и таблиц в них . <nl> - Functions functions ; / / / Обычные функции . <nl> + FunctionFactory function_factory ; / / / Обычные функции . <nl> AggregateFunctionFactory aggregate_function_factory ; / / / Агрегатные функции . <nl> DataTypeFactory data_type_factory ; / / / Типы данных . <nl> StorageFactory storage_factory ; / / / Движки таблиц . <nl> struct ContextShared <nl> <nl> mutable Poco : : Mutex mutex ; / / / Для доступа и модификации разделяемых объектов . <nl> <nl> - ContextShared ( ) : functions ( FunctionsLibrary : : get ( ) ) , log ( & Logger : : get ( " Context " ) ) { } ; <nl> + ContextShared ( ) : log ( & Logger : : get ( " Context " ) ) { } ; <nl> } ; <nl> <nl> <nl> class Context <nl> / / / Установить настройку по имени . <nl> void setSetting ( const String & name , const Field & value ) ; <nl> <nl> - const Functions & getFunctions ( ) const { return shared - > functions ; } <nl> - const AggregateFunctionFactory & getAggregateFunctionsFactory ( ) const { return shared - > aggregate_function_factory ; } <nl> + const FunctionFactory & getFunctionFactory ( ) const { return shared - > function_factory ; } <nl> + const AggregateFunctionFactory & getAggregateFunctionFactory ( ) const { return shared - > aggregate_function_factory ; } <nl> const DataTypeFactory & getDataTypeFactory ( ) const { return shared - > data_type_factory ; } <nl> const StorageFactory & getStorageFactory ( ) const { return shared - > storage_factory ; } <nl> const FormatFactory & getFormatFactory ( ) const { return shared - > format_factory ; } <nl> mmm a / dbms / src / DataStreams / tests / expression_stream . cpp <nl> ppp b / dbms / src / DataStreams / tests / expression_stream . cpp <nl> <nl> <nl> # include < DB / DataTypes / DataTypesNumberFixed . h > <nl> <nl> - # include < DB / Functions / FunctionsLibrary . h > <nl> - <nl> # include < DB / Parsers / ParserSelectQuery . h > <nl> <nl> <nl> mmm a / dbms / src / DataStreams / tests / filter_stream . cpp <nl> ppp b / dbms / src / DataStreams / tests / filter_stream . cpp <nl> <nl> <nl> # include < DB / DataTypes / DataTypesNumberFixed . h > <nl> <nl> - # include < DB / Functions / FunctionsLibrary . h > <nl> - <nl> # include < DB / Parsers / ParserSelectQuery . h > <nl> # include < DB / Parsers / formatAST . h > <nl> <nl> mmm a / dbms / src / DataStreams / tests / filter_stream_hitlog . cpp <nl> ppp b / dbms / src / DataStreams / tests / filter_stream_hitlog . cpp <nl> <nl> # include < DB / DataTypes / DataTypeDate . h > <nl> # include < DB / DataTypes / DataTypeDateTime . h > <nl> <nl> - # include < DB / Functions / FunctionsLibrary . h > <nl> - <nl> # include < DB / Parsers / ParserSelectQuery . h > <nl> # include < DB / Parsers / formatAST . h > <nl> <nl> new file mode 100644 <nl> index 00000000000 . . 4b9b2e18132 <nl> mmm / dev / null <nl> ppp b / dbms / src / Functions / FunctionFactory . cpp <nl> <nl> + # include < boost / assign / list_inserter . hpp > <nl> + <nl> + # include < DB / Functions / FunctionsArithmetic . h > <nl> + # include < DB / Functions / FunctionsComparison . h > <nl> + # include < DB / Functions / FunctionsLogical . h > <nl> + # include < DB / Functions / FunctionsString . h > <nl> + # include < DB / Functions / FunctionsConversion . h > <nl> + # include < DB / Functions / FunctionsDateTime . h > <nl> + # include < DB / Functions / FunctionsStringSearch . h > <nl> + # include < DB / Functions / FunctionsHashing . h > <nl> + # include < DB / Functions / FunctionsRandom . h > <nl> + # include < DB / Functions / FunctionsURL . h > <nl> + # include < DB / Functions / FunctionsArray . h > <nl> + # include < DB / Functions / FunctionsStringArray . h > <nl> + # include < DB / Functions / FunctionsConditional . h > <nl> + # include < DB / Functions / FunctionsMiscellaneous . h > <nl> + <nl> + # include < DB / Functions / FunctionFactory . h > <nl> + <nl> + <nl> + namespace DB <nl> + { <nl> + <nl> + <nl> + FunctionPtr FunctionFactory : : get ( <nl> + const String & name , <nl> + const Context & context ) const <nl> + { <nl> + / / / Немного неоптимально . <nl> + <nl> + if ( name = = " plus " ) return new FunctionPlus ; <nl> + else if ( name = = " minus " ) return new FunctionMinus ; <nl> + else if ( name = = " multiply " ) return new FunctionMultiply ; <nl> + else if ( name = = " divide " ) return new FunctionDivideFloating ; <nl> + else if ( name = = " intDiv " ) return new FunctionDivideIntegral ; <nl> + else if ( name = = " modulo " ) return new FunctionModulo ; <nl> + else if ( name = = " negate " ) return new FunctionNegate ; <nl> + <nl> + else if ( name = = " equals " ) return new FunctionEquals ; <nl> + else if ( name = = " notEquals " ) return new FunctionNotEquals ; <nl> + else if ( name = = " less " ) return new FunctionLess ; <nl> + else if ( name = = " greater " ) return new FunctionGreater ; <nl> + else if ( name = = " lessOrEquals " ) return new FunctionLessOrEquals ; <nl> + else if ( name = = " greaterOrEquals " ) return new FunctionGreaterOrEquals ; <nl> + <nl> + else if ( name = = " and " ) return new FunctionAnd ; <nl> + else if ( name = = " or " ) return new FunctionOr ; <nl> + else if ( name = = " xor " ) return new FunctionXor ; <nl> + else if ( name = = " not " ) return new FunctionNot ; <nl> + <nl> + else if ( name = = " empty " ) return new FunctionEmpty ; <nl> + else if ( name = = " notEmpty " ) return new FunctionNotEmpty ; <nl> + else if ( name = = " length " ) return new FunctionLength ; <nl> + else if ( name = = " lengthUTF8 " ) return new FunctionLengthUTF8 ; <nl> + else if ( name = = " lower " ) return new FunctionLower ; <nl> + else if ( name = = " upper " ) return new FunctionUpper ; <nl> + else if ( name = = " lowerUTF8 " ) return new FunctionLowerUTF8 ; <nl> + else if ( name = = " upperUTF8 " ) return new FunctionUpperUTF8 ; <nl> + else if ( name = = " reverse " ) return new FunctionReverse ; <nl> + else if ( name = = " reverseUTF8 " ) return new FunctionReverseUTF8 ; <nl> + else if ( name = = " concat " ) return new FunctionConcat ; <nl> + else if ( name = = " substring " ) return new FunctionSubstring ; <nl> + else if ( name = = " substringUTF8 " ) return new FunctionSubstringUTF8 ; <nl> + <nl> + else if ( name = = " toUInt8 " ) return new FunctionToUInt8 ; <nl> + else if ( name = = " toUInt16 " ) return new FunctionToUInt16 ; <nl> + else if ( name = = " toUInt32 " ) return new FunctionToUInt32 ; <nl> + else if ( name = = " toUInt64 " ) return new FunctionToUInt64 ; <nl> + else if ( name = = " toInt8 " ) return new FunctionToInt8 ; <nl> + else if ( name = = " toInt16 " ) return new FunctionToInt16 ; <nl> + else if ( name = = " toInt32 " ) return new FunctionToInt32 ; <nl> + else if ( name = = " toInt64 " ) return new FunctionToInt64 ; <nl> + else if ( name = = " toFloat32 " ) return new FunctionToFloat32 ; <nl> + else if ( name = = " toFloat64 " ) return new FunctionToFloat64 ; <nl> + else if ( name = = " toDate " ) return new FunctionToDate ; <nl> + else if ( name = = " toDateTime " ) return new FunctionToDateTime ; <nl> + else if ( name = = " toString " ) return new FunctionToString ; <nl> + <nl> + else if ( name = = " toYear " ) return new FunctionToYear ; <nl> + else if ( name = = " toMonth " ) return new FunctionToMonth ; <nl> + else if ( name = = " toDayOfMonth " ) return new FunctionToDayOfMonth ; <nl> + else if ( name = = " toDayOfWeek " ) return new FunctionToDayOfWeek ; <nl> + else if ( name = = " toHour " ) return new FunctionToHour ; <nl> + else if ( name = = " toMinute " ) return new FunctionToMinute ; <nl> + else if ( name = = " toSecond " ) return new FunctionToSecond ; <nl> + else if ( name = = " toMonday " ) return new FunctionToMonday ; <nl> + else if ( name = = " toStartOfMonth " ) return new FunctionToStartOfMonth ; <nl> + else if ( name = = " toStartOfYear " ) return new FunctionToStartOfYear ; <nl> + else if ( name = = " toStartOfMinute " ) return new FunctionToStartOfMinute ; <nl> + else if ( name = = " toStartOfHour " ) return new FunctionToStartOfHour ; <nl> + else if ( name = = " toTime " ) return new FunctionToTime ; <nl> + else if ( name = = " now " ) return new FunctionNow ; <nl> + else if ( name = = " timeSlot " ) return new FunctionTimeSlot ; <nl> + else if ( name = = " timeSlots " ) return new FunctionTimeSlots ; <nl> + <nl> + else if ( name = = " position " ) return new FunctionPosition ; <nl> + else if ( name = = " positionUTF8 " ) return new FunctionPositionUTF8 ; <nl> + else if ( name = = " match " ) return new FunctionMatch ; <nl> + else if ( name = = " like " ) return new FunctionLike ; <nl> + else if ( name = = " notLike " ) return new FunctionNotLike ; <nl> + <nl> + else if ( name = = " halfMD5 " ) return new FunctionHalfMD5 ; <nl> + else if ( name = = " cityHash64 " ) return new FunctionCityHash64 ; <nl> + else if ( name = = " intHash32 " ) return new FunctionIntHash32 ; <nl> + <nl> + else if ( name = = " rand " ) return new FunctionRand ; <nl> + else if ( name = = " rand64 " ) return new FunctionRand64 ; <nl> + <nl> + else if ( name = = " protocol " ) return new FunctionProtocol ; <nl> + else if ( name = = " domain " ) return new FunctionDomain ; <nl> + else if ( name = = " domainWithoutWWW " ) return new FunctionDomainWithoutWWW ; <nl> + else if ( name = = " topLevelDomain " ) return new FunctionTopLevelDomain ; <nl> + else if ( name = = " path " ) return new FunctionPath ; <nl> + else if ( name = = " queryString " ) return new FunctionQueryString ; <nl> + else if ( name = = " fragment " ) return new FunctionFragment ; <nl> + else if ( name = = " queryStringAndFragment " ) return new FunctionQueryStringAndFragment ; <nl> + else if ( name = = " cutWWW " ) return new FunctionCutWWW ; <nl> + else if ( name = = " cutQueryString " ) return new FunctionCutQueryString ; <nl> + else if ( name = = " cutFragment " ) return new FunctionCutFragment ; <nl> + else if ( name = = " cutQueryStringAndFragment " ) return new FunctionCutQueryStringAndFragment ; <nl> + <nl> + else if ( name = = " visibleWidth " ) return new FunctionVisibleWidth ; <nl> + else if ( name = = " toTypeName " ) return new FunctionToTypeName ; <nl> + else if ( name = = " blockSize " ) return new FunctionBlockSize ; <nl> + else if ( name = = " materialize " ) return new FunctionMaterialize ; <nl> + else if ( name = = " ignore " ) return new FunctionIgnore ; <nl> + else if ( name = = " arrayJoin " ) return new FunctionArrayJoin ; <nl> + <nl> + else if ( name = = " tuple " ) return new FunctionTuple ; <nl> + else if ( name = = " tupleElement " ) return new FunctionTupleElement ; <nl> + else if ( name = = " in " ) return new FunctionIn ; <nl> + else if ( name = = " notIn " ) return new FunctionIn ( true ) ; <nl> + <nl> + else if ( name = = " array " ) return new FunctionArray ; <nl> + else if ( name = = " arrayElement " ) return new FunctionArrayElement ; <nl> + else if ( name = = " has " ) return new FunctionHas ; <nl> + else if ( name = = " indexOf " ) return new FunctionIndexOf ; <nl> + <nl> + else if ( name = = " alphaTokens " ) return new FunctionAlphaTokens ; <nl> + else if ( name = = " splitByChar " ) return new FunctionSplitByChar ; <nl> + else if ( name = = " splitByString " ) return new FunctionSplitByString ; <nl> + <nl> + else if ( name = = " if " ) return new FunctionIf ; <nl> + <nl> + else <nl> + throw Exception ( " Unknown function " + name , ErrorCodes : : UNKNOWN_FUNCTION ) ; <nl> + } <nl> + <nl> + } <nl> deleted file mode 100644 <nl> index 342132c8e95 . . 00000000000 <nl> mmm a / dbms / src / Functions / FunctionsLibrary . cpp <nl> ppp / dev / null <nl> <nl> - # include < boost / assign / list_inserter . hpp > <nl> - <nl> - # include < DB / Functions / FunctionsArithmetic . h > <nl> - # include < DB / Functions / FunctionsComparison . h > <nl> - # include < DB / Functions / FunctionsLogical . h > <nl> - # include < DB / Functions / FunctionsString . h > <nl> - # include < DB / Functions / FunctionsConversion . h > <nl> - # include < DB / Functions / FunctionsDateTime . h > <nl> - # include < DB / Functions / FunctionsStringSearch . h > <nl> - # include < DB / Functions / FunctionsHashing . h > <nl> - # include < DB / Functions / FunctionsRandom . h > <nl> - # include < DB / Functions / FunctionsURL . h > <nl> - # include < DB / Functions / FunctionsArray . h > <nl> - # include < DB / Functions / FunctionsStringArray . h > <nl> - # include < DB / Functions / FunctionsConditional . h > <nl> - # include < DB / Functions / FunctionsMiscellaneous . h > <nl> - <nl> - # include < DB / Functions / FunctionsLibrary . h > <nl> - <nl> - <nl> - namespace DB <nl> - { <nl> - <nl> - namespace FunctionsLibrary <nl> - { <nl> - Functions get ( ) <nl> - { <nl> - Functions res ; <nl> - <nl> - boost : : assign : : insert ( res ) <nl> - ( " plus " , new FunctionPlus ) <nl> - ( " minus " , new FunctionMinus ) <nl> - ( " multiply " , new FunctionMultiply ) <nl> - ( " divide " , new FunctionDivideFloating ) <nl> - ( " intDiv " , new FunctionDivideIntegral ) <nl> - ( " modulo " , new FunctionModulo ) <nl> - ( " negate " , new FunctionNegate ) <nl> - <nl> - ( " equals " , new FunctionEquals ) <nl> - ( " notEquals " , new FunctionNotEquals ) <nl> - ( " less " , new FunctionLess ) <nl> - ( " greater " , new FunctionGreater ) <nl> - ( " lessOrEquals " , new FunctionLessOrEquals ) <nl> - ( " greaterOrEquals " , new FunctionGreaterOrEquals ) <nl> - <nl> - ( " and " , new FunctionAnd ) <nl> - ( " or " , new FunctionOr ) <nl> - ( " xor " , new FunctionXor ) <nl> - ( " not " , new FunctionNot ) <nl> - <nl> - ( " empty " , new FunctionEmpty ) <nl> - ( " notEmpty " , new FunctionNotEmpty ) <nl> - ( " length " , new FunctionLength ) <nl> - ( " lengthUTF8 " , new FunctionLengthUTF8 ) <nl> - ( " lower " , new FunctionLower ) <nl> - ( " upper " , new FunctionUpper ) <nl> - ( " lowerUTF8 " , new FunctionLowerUTF8 ) <nl> - ( " upperUTF8 " , new FunctionUpperUTF8 ) <nl> - ( " reverse " , new FunctionReverse ) <nl> - ( " reverseUTF8 " , new FunctionReverseUTF8 ) <nl> - ( " concat " , new FunctionConcat ) <nl> - ( " substring " , new FunctionSubstring ) <nl> - ( " substringUTF8 " , new FunctionSubstringUTF8 ) <nl> - <nl> - ( " toUInt8 " , new FunctionToUInt8 ) <nl> - ( " toUInt16 " , new FunctionToUInt16 ) <nl> - ( " toUInt32 " , new FunctionToUInt32 ) <nl> - ( " toUInt64 " , new FunctionToUInt64 ) <nl> - ( " toInt8 " , new FunctionToInt8 ) <nl> - ( " toInt16 " , new FunctionToInt16 ) <nl> - ( " toInt32 " , new FunctionToInt32 ) <nl> - ( " toInt64 " , new FunctionToInt64 ) <nl> - ( " toFloat32 " , new FunctionToFloat32 ) <nl> - ( " toFloat64 " , new FunctionToFloat64 ) <nl> - ( " toDate " , new FunctionToDate ) <nl> - ( " toDateTime " , new FunctionToDateTime ) <nl> - ( " toString " , new FunctionToString ) <nl> - <nl> - ( " toYear " , new FunctionToYear ) <nl> - ( " toMonth " , new FunctionToMonth ) <nl> - ( " toDayOfMonth " , new FunctionToDayOfMonth ) <nl> - ( " toDayOfWeek " , new FunctionToDayOfWeek ) <nl> - ( " toHour " , new FunctionToHour ) <nl> - ( " toMinute " , new FunctionToMinute ) <nl> - ( " toSecond " , new FunctionToSecond ) <nl> - ( " toMonday " , new FunctionToMonday ) <nl> - ( " toStartOfMonth " , new FunctionToStartOfMonth ) <nl> - ( " toStartOfYear " , new FunctionToStartOfYear ) <nl> - ( " toStartOfMinute " , new FunctionToStartOfMinute ) <nl> - ( " toStartOfHour " , new FunctionToStartOfHour ) <nl> - ( " toTime " , new FunctionToTime ) <nl> - ( " now " , new FunctionNow ) <nl> - ( " timeSlot " , new FunctionTimeSlot ) <nl> - ( " timeSlots " , new FunctionTimeSlots ) <nl> - <nl> - ( " position " , new FunctionPosition ) <nl> - ( " positionUTF8 " , new FunctionPositionUTF8 ) <nl> - ( " match " , new FunctionMatch ) <nl> - ( " like " , new FunctionLike ) <nl> - ( " notLike " , new FunctionNotLike ) <nl> - <nl> - ( " halfMD5 " , new FunctionHalfMD5 ) <nl> - ( " cityHash64 " , new FunctionCityHash64 ) <nl> - ( " intHash32 " , new FunctionIntHash32 ) <nl> - <nl> - ( " rand " , new FunctionRand ) <nl> - ( " rand64 " , new FunctionRand64 ) <nl> - <nl> - ( " protocol " , new FunctionProtocol ) <nl> - ( " domain " , new FunctionDomain ) <nl> - ( " domainWithoutWWW " , new FunctionDomainWithoutWWW ) <nl> - ( " topLevelDomain " , new FunctionTopLevelDomain ) <nl> - ( " path " , new FunctionPath ) <nl> - ( " queryString " , new FunctionQueryString ) <nl> - ( " fragment " , new FunctionFragment ) <nl> - ( " queryStringAndFragment " , new FunctionQueryStringAndFragment ) <nl> - ( " cutWWW " , new FunctionCutWWW ) <nl> - ( " cutQueryString " , new FunctionCutQueryString ) <nl> - ( " cutFragment " , new FunctionCutFragment ) <nl> - ( " cutQueryStringAndFragment " , new FunctionCutQueryStringAndFragment ) <nl> - <nl> - ( " visibleWidth " , new FunctionVisibleWidth ) <nl> - ( " toTypeName " , new FunctionToTypeName ) <nl> - ( " blockSize " , new FunctionBlockSize ) <nl> - ( " materialize " , new FunctionMaterialize ) <nl> - ( " ignore " , new FunctionIgnore ) <nl> - ( " arrayJoin " , new FunctionArrayJoin ) <nl> - <nl> - ( " tuple " , new FunctionTuple ) <nl> - ( " tupleElement " , new FunctionTupleElement ) <nl> - ( " in " , new FunctionIn ) <nl> - ( " notIn " , new FunctionIn ( true ) ) <nl> - <nl> - ( " array " , new FunctionArray ) <nl> - ( " arrayElement " , new FunctionArrayElement ) <nl> - ( " has " , new FunctionHas ) <nl> - ( " indexOf " , new FunctionIndexOf ) <nl> - <nl> - ( " alphaTokens " , new FunctionAlphaTokens ) <nl> - ( " splitByChar " , new FunctionSplitByChar ) <nl> - ( " splitByString " , new FunctionSplitByString ) <nl> - <nl> - ( " if " , new FunctionIf ) <nl> - ; <nl> - <nl> - return res ; <nl> - } <nl> - } ; <nl> - <nl> - } <nl> mmm a / dbms / src / Interpreters / Expression . cpp <nl> ppp b / dbms / src / Interpreters / Expression . cpp <nl> void Expression : : addSemantic ( ASTPtr & ast ) <nl> } <nl> else if ( ASTFunction * node = dynamic_cast < ASTFunction * > ( & * ast ) ) <nl> { <nl> - Functions : : const_iterator it = context . getFunctions ( ) . find ( node - > name ) ; <nl> - <nl> / / / Типы аргументов <nl> DataTypes argument_types ; <nl> ASTs & arguments = dynamic_cast < ASTExpressionList & > ( * node - > arguments ) . children ; <nl> void Expression : : addSemantic ( ASTPtr & ast ) <nl> for ( ASTs : : iterator it = arguments . begin ( ) ; it ! = arguments . end ( ) ; + + it ) <nl> argument_types . push_back ( getType ( * it ) ) ; <nl> <nl> - node - > aggregate_function = context . getAggregateFunctionsFactory ( ) . tryGet ( node - > name , argument_types ) ; <nl> - if ( it = = context . getFunctions ( ) . end ( ) & & node - > aggregate_function . isNull ( ) ) <nl> - throw Exception ( " Unknown function " + node - > name , ErrorCodes : : UNKNOWN_FUNCTION ) ; <nl> - if ( it ! = context . getFunctions ( ) . end ( ) ) <nl> - node - > function = it - > second ; <nl> + node - > aggregate_function = context . getAggregateFunctionFactory ( ) . tryGet ( node - > name , argument_types ) ; <nl> + if ( node - > aggregate_function . isNull ( ) ) <nl> + node - > function = context . getFunctionFactory ( ) . get ( node - > name , context ) ; <nl> <nl> / / / Получаем типы результата <nl> if ( node - > aggregate_function ) <nl> mmm a / dbms / src / Interpreters / tests / expression . cpp <nl> ppp b / dbms / src / Interpreters / tests / expression . cpp <nl> <nl> # include < DB / DataTypes / DataTypesNumberFixed . h > <nl> # include < DB / DataTypes / DataTypeString . h > <nl> <nl> - # include < DB / Functions / FunctionsLibrary . h > <nl> - <nl> # include < DB / Parsers / ASTSelectQuery . h > <nl> # include < DB / Parsers / ParserSelectQuery . h > <nl> # include < DB / Parsers / formatAST . h > <nl> mmm a / dbms / src / Interpreters / tests / select_query . cpp <nl> ppp b / dbms / src / Interpreters / tests / select_query . cpp <nl> <nl> # include < DB / Storages / StorageSystemOne . h > <nl> # include < DB / Storages / StorageFactory . h > <nl> <nl> - # include < DB / Functions / FunctionsLibrary . h > <nl> - <nl> # include < DB / Interpreters / loadMetadata . h > <nl> # include < DB / Interpreters / executeQuery . h > <nl> <nl> mmm a / dbms / src / Server / Server . cpp <nl> ppp b / dbms / src / Server / Server . cpp <nl> <nl> <nl> # include < Yandex / ApplicationServerExt . h > <nl> <nl> - # include < DB / Functions / FunctionsLibrary . h > <nl> # include < DB / Interpreters / loadMetadata . h > <nl> # include < DB / Storages / StorageSystemNumbers . h > <nl> # include < DB / Storages / StorageSystemTables . h > <nl>
dbms : prepared to use functions with dictionaries [ # CONV - 2944 ] .
ClickHouse/ClickHouse
3f92ee522999f5c602283c65945ab622dd0923a1
2012-12-18T20:06:36Z
mmm a / src / http / json / cJSON . cc <nl> ppp b / src / http / json / cJSON . cc <nl> static char * print_number ( cJSON * item ) <nl> { <nl> char * str ; <nl> double d = item - > valuedouble ; <nl> - rassert_unreviewed ( isfinite ( d ) ) ; <nl> + guarantee_reviewed ( isfinite ( d ) ) ; <nl> if ( fabs ( ( ( double ) item - > valueint ) - d ) < = DBL_EPSILON & & d < = INT_MAX & & d > = INT_MIN ) <nl> { <nl> str = ( char * ) cJSON_malloc ( 21 ) ; / * 2 ^ 64 + 1 can be represented in 21 chars . * / <nl> bool cJSON_Equal ( cJSON * x , cJSON * y ) { <nl> break ; <nl> case cJSON_Number : <nl> if ( x - > valuedouble = = y - > valuedouble ) { <nl> - rassert_unreviewed ( x - > valueint = = y - > valueint ) ; <nl> + rassert_reviewed ( x - > valueint = = y - > valueint ) ; <nl> return true ; <nl> } else { <nl> return false ; <nl> mmm a / src / http / json / json_adapter . hpp <nl> ppp b / src / http / json / json_adapter . hpp <nl> <nl> # include " http / json . hpp " <nl> <nl> / * A note about json adapter exceptions : When an operation throws an exception <nl> - * there is no guarantee_unreviewed that the target object has been left in tact . <nl> + * there is no guarantee that the target object has been left in tact . <nl> * Generally this is okay because we first apply changes and then join them in <nl> * to semilattice metadata . Generally once a particular object has thrown one <nl> * of these exceptions it should probably not be used anymore . * / <nl> mmm a / src / http / json / json_adapter . tcc <nl> ppp b / src / http / json / json_adapter . tcc <nl> void json_adapter_with_inserter_t < container_t > : : reset_impl ( ) { <nl> <nl> template < class container_t > <nl> json_adapter_if_t : : json_adapter_map_t json_adapter_with_inserter_t < container_t > : : get_subfields_impl ( ) { <nl> - json_adapter_map_t res = get_json_subfields ( target ) ; <nl> - rassert_unreviewed ( res . find ( inserter_key ) = = res . end ( ) , " Error , inserter_key % s conflicts with another field of the target , ( you probably want to change the value of inserter_key ) . " , inserter_key . c_str ( ) ) ; <nl> - res [ inserter_key ] = boost : : shared_ptr < json_adapter_if_t > ( new json_map_inserter_t < container_t > ( target , generator , initial_value ) ) ; <nl> + std : : map < std : : string , boost : : shared_ptr < json_adapter_if_t > > res = get_json_subfields ( target ) ; <nl> + std : : pair < std : : map < std : : string , boost : : shared_ptr < json_adapter_if_t > > : : iterator , bool > insertion_res <nl> + = res . insert ( std : : make_pair ( inserter_key , boost : : shared_ptr < json_adapter_if_t > ( new json_map_inserter_t < container_t > ( target , generator , initial_value ) ) ) ) ; <nl> + guarantee_reviewed ( insertion_res . second ) ; <nl> <nl> return res ; <nl> } <nl> void json_ctx_adapter_with_inserter_t < container_t , ctx_t > : : reset_impl ( ) { <nl> <nl> template < class container_t , class ctx_t > <nl> json_adapter_if_t : : json_adapter_map_t json_ctx_adapter_with_inserter_t < container_t , ctx_t > : : get_subfields_impl ( ) { <nl> - json_adapter_map_t res = with_ctx_get_json_subfields ( target , ctx ) ; <nl> - rassert_unreviewed ( res . find ( inserter_key ) = = res . end ( ) , " Error , inserter_key % s conflicts with another field of the target , ( you probably want to change the value of inserter_key ) . " , inserter_key . c_str ( ) ) ; <nl> - res [ inserter_key ] = boost : : shared_ptr < json_adapter_if_t > ( new json_ctx_map_inserter_t < container_t , ctx_t > ( target , generator , ctx , initial_value ) ) ; <nl> + std : : map < std : : string , boost : : shared_ptr < json_adapter_if_t > > res = with_ctx_get_json_subfields ( target , ctx ) ; <nl> + std : : pair < std : : map < std : : string , boost : : shared_ptr < json_adapter_if_t > > : : iterator , bool > insertion_res <nl> + = res . insert ( std : : make_pair ( inserter_key , boost : : shared_ptr < json_adapter_if_t > ( new json_ctx_map_inserter_t < container_t , ctx_t > ( target , generator , ctx , initial_value ) ) ) ) ; <nl> + guarantee_reviewed ( insertion_res . second ) ; <nl> <nl> return res ; <nl> } <nl>
Reviewed assertions in cJSON . cc .
rethinkdb/rethinkdb
cedc240c879e95e59abebfecd9798c96a9d53922
2012-09-25T01:05:39Z
mmm a / Source / CNTKv2LibraryDll / Function . cpp <nl> ppp b / Source / CNTKv2LibraryDll / Function . cpp <nl> namespace CNTK <nl> <nl> MBLayoutPtr layout = CNTKMatrixAndMBLayout . second ; <nl> <nl> + # if 1 <nl> + auto & nodeData = computationNode - > As < ComputationNode < ElementType > > ( ) - > Value ( ) ; <nl> + <nl> / / Switch the node matrix to the right matrix type <nl> + nodeData . AssignValuesOf ( * CNTKMatrixAndMBLayout . first ) ; <nl> + # else / / Use this for debugging if you need to test in double precision with readers that only produce floats . <nl> computationNode - > ValuePtr ( ) - > CastAssignValuesOf ( * CNTKMatrixAndMBLayout . first ) ; <nl> + # endif <nl> computationNode - > GetMBLayout ( ) - > CopyFrom ( layout ) ; <nl> } <nl> <nl> mmm a / Source / ComputationNetworkLib / ComputationNode . h <nl> ppp b / Source / ComputationNetworkLib / ComputationNode . h <nl> protected : <nl> using Base : : InputUsedInComputingInputNodesGradients ; \ <nl> using Base : : InvalidateMissingGradientColumns ; \ <nl> using Base : : InvalidateMissingValueColumns ; \ <nl> + using Base : : Is ; \ <nl> using Base : : IsLeaf ; \ <nl> using Base : : IsOutOfDateWrtInputs ; \ <nl> using Base : : IsPartOfLoop ; \ <nl>
made gcc happy ; addressed Amit ' s feedback
microsoft/CNTK
5212f6e58f626f9b0127ae51822b7724d2c61d79
2016-11-05T21:41:25Z
mmm a / fdbserver / IPager . h <nl> ppp b / fdbserver / IPager . h <nl> <nl> # include " flow / flow . h " <nl> # include " fdbclient / FDBTypes . h " <nl> <nl> + # define REDWOOD_DEBUG <nl> + <nl> typedef uint32_t LogicalPageID ; / / uint64_t ? <nl> <nl> class IPage { <nl> mmm a / fdbserver / IndirectShadowPager . actor . cpp <nl> ppp b / fdbserver / IndirectShadowPager . actor . cpp <nl> <nl> <nl> # include " flow / UnitTest . h " <nl> <nl> + # ifdef REDWOOD_DEBUG <nl> + # define debug_printf printf <nl> + # else <nl> + # define debug_printf ( . . . ) <nl> + # endif <nl> + <nl> IndirectShadowPage : : IndirectShadowPage ( ) : allocated ( true ) { <nl> data = ( uint8_t * ) FastAllocator < 4096 > : : allocate ( ) ; <nl> } <nl> ACTOR Future < Void > recover ( IndirectShadowPager * pager ) { <nl> pr > > pagesAllocated ; <nl> pager - > pagerFile . init ( fileSize , pagesAllocated ) ; <nl> <nl> - fprintf ( stderr , " Recovered pages allocated : % d \ n " , pager - > pagerFile . pagesAllocated ) ; <nl> + debug_printf ( " Recovered pages allocated : % d \ n " , pager - > pagerFile . pagesAllocated ) ; <nl> ASSERT ( pager - > pagerFile . pagesAllocated ! = PagerFile : : INVALID_PAGE ) ; <nl> <nl> Optional < Value > latestVersionValue = wait ( pager - > pageTableLog - > readValue ( IndirectShadowPager : : LATEST_VERSION_KEY ) ) ; <nl> ACTOR Future < Void > recover ( IndirectShadowPager * pager ) { <nl> vr > > pager - > oldestVersion ; <nl> } <nl> <nl> - fprintf ( stderr , " Recovered version info : % d - % d \ n " , pager - > oldestVersion , pager - > latestVersion ) ; <nl> + debug_printf ( " Recovered version info : % d - % d \ n " , pager - > oldestVersion , pager - > latestVersion ) ; <nl> pager - > committedVersion = pager - > latestVersion ; <nl> <nl> Standalone < VectorRef < KeyValueRef > > tableEntries = wait ( pager - > pageTableLog - > readRange ( KeyRangeRef ( IndirectShadowPager : : TABLE_ENTRY_PREFIX , strinc ( IndirectShadowPager : : TABLE_ENTRY_PREFIX ) ) ) ) ; <nl> ACTOR Future < Void > recover ( IndirectShadowPager * pager ) { <nl> <nl> LogicalPageID pageTableSize = std : : max < LogicalPageID > ( logicalPageID + 1 , SERVER_KNOBS - > PAGER_RESERVED_PAGES ) ; <nl> pager - > pageTable . resize ( pageTableSize ) ; <nl> - fprintf ( stderr , " Recovered page table size : % d \ n " , pageTableSize ) ; <nl> + debug_printf ( " Recovered page table size : % d \ n " , pageTableSize ) ; <nl> } <nl> else { <nl> - fprintf ( stderr , " Recovered no page table entries \ n " ) ; <nl> + debug_printf ( " Recovered no page table entries \ n " ) ; <nl> } <nl> <nl> LogicalPageID nextPageID = SERVER_KNOBS - > PAGER_RESERVED_PAGES ; <nl> ACTOR Future < Void > recover ( IndirectShadowPager * pager ) { <nl> + + nextPageID ; <nl> } <nl> <nl> - fprintf ( stderr , " Recovered page table entry % d - > ( % d , % d ) \ n " , logicalPageID , version , physicalPageID ) ; <nl> + debug_printf ( " Recovered page table entry % d - > ( % d , % d ) \ n " , logicalPageID , version , physicalPageID ) ; <nl> } <nl> <nl> - fprintf ( stderr , " Building physical free list \ n " ) ; <nl> + debug_printf ( " Building physical free list \ n " ) ; <nl> / / TODO : can we do this better ? does it require storing extra info in the log ? <nl> PhysicalPageID nextPhysicalPageID = 0 ; <nl> for ( auto itr = allocatedPhysicalPages . begin ( ) ; itr ! = allocatedPhysicalPages . end ( ) ; + + itr ) { <nl> ACTOR Future < Void > recover ( IndirectShadowPager * pager ) { <nl> pager - > pagerFile . finishedMarkingPages ( ) ; <nl> pager - > pagerFile . startVacuuming ( ) ; <nl> <nl> - fprintf ( stderr , " Finished recovery \ n " , pager - > oldestVersion ) ; <nl> + debug_printf ( " Finished recovery \ n " , pager - > oldestVersion ) ; <nl> TraceEvent ( " PagerFinishedRecovery " ) ; <nl> } <nl> catch ( Error & e ) { <nl> ACTOR Future < Void > housekeeper ( IndirectShadowPager * pager ) { <nl> pager - > freePhysicalPageID ( prev - > second ) ; <nl> } <nl> if ( itr = = pageVersionMap . end ( ) | | itr - > first > = pager - > oldestVersion ) { <nl> - / / fprintf ( stderr , " Updating oldest version for logical page % d : % d \ n " , pageID , pager - > oldestVersion ) ; <nl> + / / debug_printf ( " Updating oldest version for logical page % d : % d \ n " , pageID , pager - > oldestVersion ) ; <nl> pager - > logPageTableClear ( pageID , 0 , pager - > oldestVersion ) ; <nl> <nl> if ( itr ! = pageVersionMap . end ( ) & & itr - > first > pager - > oldestVersion ) { <nl> - / / fprintf ( stderr , " Erasing pages to prev from pageVersionMap for % d ( itr = % d , prev = % d ) \ n " , pageID , itr - > first , prev - > first ) ; <nl> + / / debug_printf ( " Erasing pages to prev from pageVersionMap for % d ( itr = % d , prev = % d ) \ n " , pageID , itr - > first , prev - > first ) ; <nl> prev - > first = pager - > oldestVersion ; <nl> pager - > logPageTableUpdate ( pageID , pager - > oldestVersion , prev - > second ) ; <nl> itr = pageVersionMap . erase ( pageVersionMap . begin ( ) , prev ) ; <nl> } <nl> else { <nl> - / / fprintf ( stderr , " Erasing pages to itr from pageVersionMap for % d ( % d ) ( itr = % d , prev = % d ) \ n " , pageID , itr = = pageVersionMap . end ( ) , itr = = pageVersionMap . end ( ) ? - 1 : itr - > first , prev - > first ) ; <nl> + / / debug_printf ( " Erasing pages to itr from pageVersionMap for % d ( % d ) ( itr = % d , prev = % d ) \ n " , pageID , itr = = pageVersionMap . end ( ) , itr = = pageVersionMap . end ( ) ? - 1 : itr - > first , prev - > first ) ; <nl> itr = pageVersionMap . erase ( pageVersionMap . begin ( ) , itr ) ; <nl> } <nl> } <nl> void IndirectShadowPager : : freeLogicalPage ( LogicalPageID pageID , Version version ) <nl> } <nl> <nl> if ( itr ! = pageVersionMap . end ( ) ) { <nl> - / / fprintf ( stderr , " Clearing newest versions for logical page % d : % d \ n " , pageID , version ) ; <nl> + / / debug_printf ( " Clearing newest versions for logical page % d : % d \ n " , pageID , version ) ; <nl> logPageTableClearToEnd ( pageID , version ) ; <nl> pageVersionMap . erase ( itr , pageVersionMap . end ( ) ) ; <nl> } <nl> <nl> if ( pageVersionMap . size ( ) = = 0 ) { <nl> - fprintf ( stderr , " Freeing logical page % d ( freeLogicalPage ) \ n " , pageID ) ; <nl> + debug_printf ( " Freeing logical page % d ( freeLogicalPage ) \ n " , pageID ) ; <nl> logicalFreeList . push_back ( pageID ) ; <nl> } <nl> else if ( pageVersionMap . back ( ) . second ! = PagerFile : : INVALID_PAGE ) { <nl> ACTOR Future < Void > waitAndFreePhysicalPageID ( IndirectShadowPager * pager , Physica <nl> / / TODO : we need to be more careful about making sure the action that caused the page to be freed is durable before freeing the page <nl> / / Otherwise , the page could be rewritten prematurely . <nl> void IndirectShadowPager : : freePhysicalPageID ( PhysicalPageID pageID ) { <nl> - fprintf ( stderr , " Freeing physical page : % u \ n " , pageID ) ; <nl> + debug_printf ( " Freeing physical page : % u \ n " , pageID ) ; <nl> auto itr = readCounts . find ( pageID ) ; <nl> if ( itr ! = readCounts . end ( ) ) { <nl> operations . add ( waitAndFreePhysicalPageID ( this , pageID , itr - > second . second . getFuture ( ) ) ) ; <nl> ACTOR Future < Reference < const IPage > > getPageImpl ( IndirectShadowPager * pager , Ref <nl> - - itr ; <nl> <nl> state PhysicalPageID physicalPageID = itr - > second ; <nl> - fprintf ( stderr , " Reading % d at v % d from % d \ n " , pageID , version , physicalPageID ) ; <nl> + debug_printf ( " Reading % d at v % d from % d \ n " , pageID , version , physicalPageID ) ; <nl> <nl> ASSERT ( physicalPageID ! = PagerFile : : INVALID_PAGE ) ; <nl> + + pager - > readCounts [ physicalPageID ] . first ; <nl> PageVersionMap : : iterator IndirectShadowPager : : pageVersionMapUpperBound ( PageVersi <nl> <nl> void IndirectShadowPager : : freeLogicalPageID ( LogicalPageID pageID ) { <nl> if ( pageID > = SERVER_KNOBS - > PAGER_RESERVED_PAGES ) { <nl> - fprintf ( stderr , " Freeing logical page : % u \ n " , pageID ) ; <nl> + debug_printf ( " Freeing logical page : % u \ n " , pageID ) ; <nl> logicalFreeList . push_back ( pageID ) ; <nl> } <nl> } <nl> ACTOR Future < Void > vacuumer ( IndirectShadowPager * pager , PagerFile * pagerFile ) { <nl> if ( ! pagerFile - > vacuumQueue . empty ( ) ) { <nl> state PhysicalPageID lastUsedPage = pagerFile - > vacuumQueue . rbegin ( ) - > first ; <nl> PhysicalPageID lastFreePage = * pagerFile - > freePages . rbegin ( ) ; <nl> - / / fprintf ( stderr , " Vacuuming : evaluating ( free list size = % u , lastFreePage = % u , lastUsedPage = % u , pagesAllocated = % u ) \ n " , pagerFile - > freePages . size ( ) , lastFreePage , lastUsedPage , pagerFile - > pagesAllocated ) ; <nl> + / / debug_printf ( " Vacuuming : evaluating ( free list size = % u , lastFreePage = % u , lastUsedPage = % u , pagesAllocated = % u ) \ n " , pagerFile - > freePages . size ( ) , lastFreePage , lastUsedPage , pagerFile - > pagesAllocated ) ; <nl> ASSERT ( lastFreePage < pagerFile - > pagesAllocated ) ; <nl> ASSERT ( lastUsedPage < pagerFile - > pagesAllocated ) ; <nl> ASSERT ( lastFreePage ! = lastUsedPage ) ; <nl> ACTOR Future < Void > vacuumer ( IndirectShadowPager * pager , PagerFile * pagerFile ) { <nl> state std : : pair < LogicalPageID , Version > logicalPageInfo = pagerFile - > vacuumQueue [ lastUsedPage ] ; <nl> state PhysicalPageID newPage = pagerFile - > allocatePage ( logicalPageInfo . first , logicalPageInfo . second ) ; <nl> <nl> - fprintf ( stderr , " Vacuuming : copying page % u to % u \ n " , lastUsedPage , newPage ) ; <nl> + debug_printf ( " Vacuuming : copying page % u to % u \ n " , lastUsedPage , newPage ) ; <nl> Void _ = wait ( copyPage ( pager , page , lastUsedPage , newPage ) ) ; <nl> <nl> auto & pageVersionMap = pager - > pageTable [ logicalPageInfo . first ] ; <nl> ACTOR Future < Void > vacuumer ( IndirectShadowPager * pager , PagerFile * pagerFile ) { <nl> pagesToErase = std : : min < uint64_t > ( pagerFile - > freePages . size ( ) - SERVER_KNOBS - > FREE_PAGE_VACUUM_THRESHOLD + 1 , pagerFile - > pagesAllocated - firstFreePage ) ; <nl> } <nl> <nl> - / / fprintf ( stderr , " Vacuuming : got % u pages to erase ( freePages = % u , pagesAllocated = % u , vacuumQueueEmpty = % u , minVacuumQueuePage = % u , firstFreePage = % u ) \ n " , pagesToErase , pagerFile - > freePages . size ( ) , pagerFile - > pagesAllocated , pagerFile - > vacuumQueue . empty ( ) , pagerFile - > minVacuumQueuePage , firstFreePage ) ; <nl> + / / debug_printf ( " Vacuuming : got % u pages to erase ( freePages = % u , pagesAllocated = % u , vacuumQueueEmpty = % u , minVacuumQueuePage = % u , firstFreePage = % u ) \ n " , pagesToErase , pagerFile - > freePages . size ( ) , pagerFile - > pagesAllocated , pagerFile - > vacuumQueue . empty ( ) , pagerFile - > minVacuumQueuePage , firstFreePage ) ; <nl> <nl> if ( pagesToErase > 0 ) { <nl> PhysicalPageID eraseStartPage = pagerFile - > pagesAllocated - pagesToErase ; <nl> - fprintf ( stderr , " Vacuuming : truncating last % u pages starting at % u \ n " , pagesToErase , eraseStartPage ) ; <nl> + debug_printf ( " Vacuuming : truncating last % u pages starting at % u \ n " , pagesToErase , eraseStartPage ) ; <nl> <nl> ASSERT ( pagesToErase < = pagerFile - > pagesAllocated ) ; <nl> <nl> PhysicalPageID PagerFile : : allocatePage ( LogicalPageID logicalPageID , Version vers <nl> <nl> markPageAllocated ( logicalPageID , version , allocatedPage ) ; <nl> <nl> - fprintf ( stderr , " Allocated physical page % u \ n " , allocatedPage ) ; <nl> + debug_printf ( " Allocated physical page % u \ n " , allocatedPage ) ; <nl> return allocatedPage ; <nl> } <nl> <nl> bool PagerFile : : canVacuum ( ) { <nl> | | minVacuumQueuePage > = pagesAllocated / / We finished processing all pages in the vacuum queue <nl> | | ! vacuumQueueReady ) / / Populating vacuum queue <nl> { <nl> - / / fprintf ( stderr , " Vacuuming : waiting for vacuumable pages ( free list size = % u , minVacuumQueuePage = % u , pages allocated = % u , vacuumQueueReady = % d ) \ n " , freePages . size ( ) , minVacuumQueuePage , pagesAllocated , vacuumQueueReady ) ; <nl> + / / debug_printf ( " Vacuuming : waiting for vacuumable pages ( free list size = % u , minVacuumQueuePage = % u , pages allocated = % u , vacuumQueueReady = % d ) \ n " , freePages . size ( ) , minVacuumQueuePage , pagesAllocated , vacuumQueueReady ) ; <nl> return false ; <nl> } <nl> <nl> mmm a / fdbserver / VersionedBTree . actor . cpp <nl> ppp b / fdbserver / VersionedBTree . actor . cpp <nl> <nl> <nl> # define INTERNAL_PAGES_HAVE_TUPLES 1 <nl> <nl> - # define debug_printf ( . . . ) <nl> + # ifdef REDWOOD_DEBUG <nl> + # define debug_printf printf <nl> + # else <nl> + # define debug_printf ( . . . ) <nl> + # endif <nl> <nl> struct SimpleFixedSizeMapRef { <nl> typedef std : : vector < std : : pair < std : : string , std : : string > > KVPairsT ; <nl> class VersionedBTree : public IVersionedStore { <nl> } <nl> <nl> ACTOR static Future < Void > init ( VersionedBTree * self ) { <nl> - / / TODO : don ' t just create a new root , load the existing one <nl> - Version latest = wait ( self - > m_pager - > getLatestVersion ( ) ) ; <nl> - self - > m_root = self - > m_pager - > allocateLogicalPage ( ) ; <nl> - Version v = latest + 1 ; <nl> - IPager * pager = self - > m_pager ; <nl> - self - > writePage ( self - > m_root , FixedSizeMap : : emptyPage ( EPageFlags : : IS_LEAF , [ pager ] ( ) { return pager - > newPageBuffer ( ) ; } ) , v ) ; <nl> - self - > m_pager - > setLatestVersion ( v ) ; <nl> - Void _ = wait ( self - > m_pager - > commit ( ) ) ; <nl> + self - > m_root = 0 ; <nl> + state Version latest = wait ( self - > m_pager - > getLatestVersion ( ) ) ; <nl> + if ( latest = = 0 ) { <nl> + IPager * pager = self - > m_pager ; <nl> + self - > writePage ( self - > m_root , FixedSizeMap : : emptyPage ( EPageFlags : : IS_LEAF , [ pager ] ( ) { return pager - > newPageBuffer ( ) ; } ) , 1 ) ; <nl> + self - > m_pager - > setLatestVersion ( 1 ) ; <nl> + Void _ = wait ( self - > m_pager - > commit ( ) ) ; <nl> + } <nl> + printf ( " latest % lld \ n " , latest ) ; <nl> return Void ( ) ; <nl> } <nl> <nl> class VersionedBTree : public IVersionedStore { <nl> state KeyRef tupleKey = t . pack ( ) ; <nl> <nl> loop { <nl> + debug_printf ( " findEqual : Reading page % d \ n " , pageNumber ) ; <nl> Reference < const IPage > rawPage = wait ( self - > m_pager - > getPhysicalPage ( pageNumber ) ) ; <nl> FixedSizeMap map = FixedSizeMap : : decode ( StringRef ( rawPage - > begin ( ) , rawPage - > size ( ) ) ) ; <nl> - / / debug_printf ( " Read page % d @ % lld : % s \ n " , pageNumber , self - > m_version , map . toString ( ) . c_str ( ) ) ; <nl> + debug_printf ( " Read page % d @ % lld : % s \ n " , pageNumber , self - > m_version , map . toString ( ) . c_str ( ) ) ; <nl> <nl> / / Special case of empty page ( which should only happen for root ) <nl> if ( map . entries . empty ( ) ) { <nl> TEST_CASE ( " / redwood / correctness / memory / set " ) { <nl> else <nl> pager = createMemoryPager ( ) ; <nl> <nl> - state VersionedBTree * btree = new VersionedBTree ( pager , g_random - > randomInt ( 50 , 200 ) ) ; <nl> + state int pageSize = g_random - > coinflip ( ) ? - 1 : g_random - > randomInt ( 50 , 200 ) ; <nl> + <nl> + state VersionedBTree * btree = new VersionedBTree ( pager , pageSize ) ; <nl> + <nl> Void _ = wait ( btree - > init ( ) ) ; <nl> <nl> state std : : map < std : : pair < std : : string , Version > , std : : string > written ; <nl> TEST_CASE ( " / redwood / correctness / memory / set " ) { <nl> <nl> pager = new IndirectShadowPager ( " pagerfile " ) ; <nl> <nl> - btree = new VersionedBTree ( pager , g_random - > randomInt ( 50 , 200 ) ) ; <nl> + btree = new VersionedBTree ( pager , pageSize ) ; <nl> Void _ = wait ( btree - > init ( ) ) ; <nl> <nl> Version lastVer = wait ( btree - > getLatestVersion ( ) ) ; <nl> TEST_CASE ( " / redwood / performance / set " ) { <nl> <nl> state int nodeCount = 100000 ; <nl> state int maxChangesPerVersion = 5 ; <nl> - state int versions = 4 ; <nl> + state int versions = 1000 ; <nl> int maxKeySize = 100 ; <nl> int maxValueSize = 500 ; <nl> <nl>
Bug fixes . Btree now uses page 0 as root and will write initial page only if necessary . Added debug printf macro .
apple/foundationdb
fc0557252bdebc4bf5a6a03153bb80a6bc511d68
2017-07-14T18:36:49Z
mmm a / ios / sdk / WeexSDK / Sources / Component / WXTextComponent . m <nl> ppp b / ios / sdk / WeexSDK / Sources / Component / WXTextComponent . m <nl> - ( void ) repaintText : ( NSNotification * ) notification <nl> <nl> - ( NSMutableAttributedString * ) buildCTAttributeString <nl> { <nl> - NSString * string = [ NSString stringWithFormat : @ " % @ " , [ self text ] ? : @ " " ] ; <nl> - NSMutableAttributedString * attributedString = [ [ NSMutableAttributedString alloc ] initWithString : string ] ; <nl> + NSString * string = [ self text ] ; <nl> + if ( ! [ string isKindOfClass : [ NSString class ] ] ) { <nl> + WXLogError ( @ " text % @ is invalid " , [ self text ] ) ; <nl> + string = @ " " ; <nl> + } <nl> + NSMutableAttributedString * attributedString = [ [ NSMutableAttributedString alloc ] initWithString : string ] ; <nl> if ( _color ) { <nl> [ attributedString addAttribute : NSForegroundColorAttributeName value : _color range : NSMakeRange ( 0 , string . length ) ] ; <nl> } <nl>
* [ ios ] try to fix text init crash
apache/incubator-weex
9fe39ad707e6c433cb5ce40e8c2126c2d5a1faac
2017-09-25T07:29:08Z
mmm a / hphp / runtime / vm / bytecode . cpp <nl> ppp b / hphp / runtime / vm / bytecode . cpp <nl> Unit * VMExecutionContext : : compileEvalString ( StringData * code ) { <nl> } <nl> <nl> CStrRef VMExecutionContext : : createFunction ( CStrRef args , CStrRef code ) { <nl> + VMRegAnchor _ ; <nl> / / It doesn ' t matter if there ' s a user function named __lambda_func ; we only <nl> / / use this name during parsing , and then change it to an impossible name <nl> / / with a NUL byte before we merge it into the request ' s func map . This also <nl> CStrRef VMExecutionContext : : createFunction ( CStrRef args , CStrRef code ) { <nl> TypedValue retval ; <nl> invokeFunc ( & retval , unit - > getMain ( ) , Array : : Create ( ) ) ; <nl> <nl> - return unit - > getLambda ( ) - > nameRef ( ) ; <nl> + / / __lambda_func will be the only hoistable function . <nl> + / / Any functions or closures defined in it will not be hoistable . <nl> + Func * lambda = unit - > firstHoistable ( ) ; <nl> + return lambda - > nameRef ( ) ; <nl> } <nl> <nl> void VMExecutionContext : : evalPHPDebugger ( TypedValue * retval , StringData * code , <nl> mmm a / hphp / runtime / vm / unit . h <nl> ppp b / hphp / runtime / vm / unit . h <nl> struct Unit { <nl> MutableFuncRange hoistableFuncs ( ) const { <nl> return m_mergeInfo - > hoistableFuncs ( ) ; <nl> } <nl> - Func * getLambda ( ) const { <nl> - assert ( m_mergeInfo - > m_firstHoistableFunc = = 1 ) ; <nl> - assert ( m_mergeInfo - > m_firstHoistablePreClass = = 2 ) ; <nl> - return m_mergeInfo - > funcBegin ( ) [ 1 ] ; <nl> - } <nl> void renameFunc ( const StringData * oldName , const StringData * newName ) ; <nl> void mergeFuncs ( ) const ; <nl> static void loadFunc ( const Func * func ) ; <nl> new file mode 100644 <nl> index 00000000000 . . 4538dab2f42 <nl> mmm / dev / null <nl> ppp b / hphp / test / vm / zend_closure_025 . php <nl> <nl> + < ? php <nl> + <nl> + $ a = create_function ( ' $ x ' , ' return function ( $ y ) use ( $ x ) { return $ x * $ y ; } ; ' ) ; <nl> + <nl> + var_dump ( $ a ( 2 ) - > __invoke ( 4 ) ) ; <nl> + <nl> + ? > <nl> \ No newline at end of file <nl> new file mode 100644 <nl> index 00000000000 . . d110ab2bc17 <nl> mmm / dev / null <nl> ppp b / hphp / test / vm / zend_closure_025 . php . exp <nl> @ @ - 0 , 0 + 1 @ @ <nl> + int ( 8 ) <nl>
handle create_function with a closure in it
facebook/hhvm
ea782cbd3eb82f289531f7bb8c2e4f0acb5399df
2013-03-09T21:26:15Z
mmm a / PythonClient / eventcamera_sim / test_event_sim . py <nl> ppp b / PythonClient / eventcamera_sim / test_event_sim . py <nl> <nl> import time <nl> import cv2 <nl> import matplotlib . pyplot as plt <nl> - <nl> + import argparse <nl> + import sys , signal <nl> from event_simulator import * <nl> <nl> + parser = argparse . ArgumentParser ( description = " Simulate event data from AirSim " ) <nl> + parser . add_argument ( " - - debug " , action = " store_true " ) <nl> + parser . add_argument ( " - - height " , type = int , default = 144 ) <nl> + parser . add_argument ( " - - width " , type = int , default = 256 ) <nl> + <nl> <nl> class AirSimEventGen : <nl> def __init__ ( self , W , H , debug = False ) : <nl> def convert_event_img_rgb ( self , image ) : <nl> return out <nl> <nl> <nl> + def _stop_event_gen ( signal , frame ) : <nl> + print ( " \ nCtrl + C received . Stopping event sim . . . " ) <nl> + sys . exit ( 0 ) <nl> + <nl> + <nl> if __name__ = = " __main__ " : <nl> - event_generator = AirSimEventGen ( 256 , 144 , debug = True ) <nl> + args = parser . parse_args ( ) <nl> + <nl> + event_generator = AirSimEventGen ( args . W , args . H , debug = args . debug ) <nl> i = 0 <nl> start_time = 0 <nl> t_start = time . time ( ) <nl> <nl> + signal . signal ( signal . SIGINT , event_generator . _stop_gen ) <nl> + <nl> while True : <nl> image_request = airsim . ImageRequest ( " 0 " , airsim . ImageType . Scene , False , False ) <nl> <nl> def convert_event_img_rgb ( self , image ) : <nl> <nl> if events is not None and events . shape [ 0 ] > 0 : <nl> bytestream = events . tolist ( ) <nl> - print ( len ( bytestream ) ) <nl> - <nl> - event_generator . visualize_events ( event_img ) <nl> <nl> + if event_generator . debug : <nl> + print ( len ( bytestream ) ) <nl> + event_generator . visualize_events ( event_img ) <nl>
Some additions
microsoft/AirSim
2d61b5036f327b94c3707a0324d4aec1ef081cae
2020-12-15T02:45:13Z
mmm a / hphp / doc / extension . new_functions <nl> ppp b / hphp / doc / extension . new_functions <nl> testing and some alternative PHP implementation . <nl> - fb_serialize <nl> - fb_unserialize <nl> - fb_intercept <nl> - - fb_stubout_intercept_handler <nl> - - fb_rpc_intercept_handler <nl> - - fb_renamed_functions <nl> - fb_rename_function <nl> - fb_get_code_coverage <nl> - fb_utf8ize <nl> mmm a / hphp / system / idl / fb . idl . json <nl> ppp b / hphp / system / idl / fb . idl . json <nl> <nl> " args " : [ <nl> ] <nl> } , <nl> + { <nl> + " name " : " fb_lazy_lstat " , <nl> + " desc " : " Gathers the statistics of the file named by filename , like lstat ( ) , except uses cached information from an internal inotify - based mechanism that may not be updated during the duration of a request . " , <nl> + " flags " : [ <nl> + " HasDocComment " <nl> + ] , <nl> + " return " : { <nl> + " type " : " Variant " , <nl> + " desc " : " Same format as the normal php lstat ( ) function . " <nl> + } , <nl> + " args " : [ <nl> + { <nl> + " name " : " filename " , <nl> + " type " : " String " , <nl> + " desc " : " Path to a file or a symbolic link . " <nl> + } <nl> + ] <nl> + } , <nl> { <nl> " name " : " fb_lazy_realpath " , <nl> " desc " : " Returns a canonicalized version of the input path that contains no symbolic links , like realpath ( ) , except uses cached information from an internal inotify - based mechanism that may not be updated during the duration of a request . " , <nl>
put fb_lazy_lstat back in the JSON
facebook/hhvm
1845ed29b8a38275fa7a158a54e07568d6a5e137
2013-07-24T17:35:41Z
mmm a / vendor / node <nl> ppp b / vendor / node <nl> @ @ - 1 + 1 @ @ <nl> - Subproject commit 5cc0df3db8bee63a6c735e456add25ad94cab42b <nl> + Subproject commit dc8fe9d390b1deb32ae2601357a90679cbcc757e <nl>
Merge pull request from electron / another - async - crash
electron/electron
346a4bee0b6e70768d7c30be69b94e5f44d8ace5
2017-08-30T08:42:03Z
new file mode 100644 <nl> index 00000000000 . . 03a7ff88dd8 <nl> mmm / dev / null <nl> ppp b / folly / container / detail / F14Mask . h <nl> <nl> + / * <nl> + * Copyright 2017 - present Facebook , Inc . <nl> + * <nl> + * Licensed under the Apache License , Version 2 . 0 ( the " License " ) ; <nl> + * you may not use this file except in compliance with the License . <nl> + * You may obtain a copy of the License at <nl> + * <nl> + * http : / / www . apache . org / licenses / LICENSE - 2 . 0 <nl> + * <nl> + * Unless required by applicable law or agreed to in writing , software <nl> + * distributed under the License is distributed on an " AS IS " BASIS , <nl> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . <nl> + * See the License for the specific language governing permissions and <nl> + * limitations under the License . <nl> + * / <nl> + <nl> + # pragma once <nl> + <nl> + # include < algorithm > <nl> + # include < cstdint > <nl> + <nl> + # include < folly / Bits . h > <nl> + # include < folly / ConstexprMath . h > <nl> + # include < folly / Likely . h > <nl> + # include < folly / Portability . h > <nl> + # include < folly / lang / Assume . h > <nl> + # include < folly / lang / SafeAssert . h > <nl> + <nl> + # if ( FOLLY_SSE > = 2 | | ( FOLLY_NEON & & FOLLY_AARCH64 ) ) & & ! FOLLY_MOBILE <nl> + <nl> + namespace folly { <nl> + namespace f14 { <nl> + namespace detail { <nl> + <nl> + template < typename T > <nl> + FOLLY_ALWAYS_INLINE static unsigned findFirstSetNonZero ( T mask ) { <nl> + assume ( mask ! = 0 ) ; <nl> + if ( sizeof ( mask ) = = sizeof ( unsigned ) ) { <nl> + return __builtin_ctz ( static_cast < unsigned > ( mask ) ) ; <nl> + } else { <nl> + return __builtin_ctzll ( mask ) ; <nl> + } <nl> + } <nl> + <nl> + # if FOLLY_NEON <nl> + using MaskType = uint64_t ; <nl> + <nl> + constexpr unsigned kMaskSpacing = 4 ; <nl> + # else / / SSE2 <nl> + using MaskType = uint32_t ; <nl> + <nl> + constexpr unsigned kMaskSpacing = 1 ; <nl> + # endif <nl> + <nl> + template < unsigned BitCount > <nl> + struct FullMask { <nl> + static constexpr MaskType value = <nl> + ( FullMask < BitCount - 1 > : : value < < kMaskSpacing ) + 1 ; <nl> + } ; <nl> + <nl> + template < > <nl> + struct FullMask < 1 > : std : : integral_constant < MaskType , 1 > { } ; <nl> + <nl> + # if FOLLY_ARM <nl> + / / Mask iteration is different for ARM because that is the only platform <nl> + / / for which the mask is bigger than a register . <nl> + <nl> + / / Iterates a mask , optimized for the case that only a few bits are set <nl> + class SparseMaskIter { <nl> + static_assert ( kMaskSpacing = = 4 , " " ) ; <nl> + <nl> + uint32_t interleavedMask_ ; <nl> + <nl> + public : <nl> + explicit SparseMaskIter ( MaskType mask ) <nl> + : interleavedMask_ { static_cast < uint32_t > ( ( ( mask > > 32 ) < < 2 ) | mask ) } { } <nl> + <nl> + bool hasNext ( ) { <nl> + return interleavedMask_ ! = 0 ; <nl> + } <nl> + <nl> + unsigned next ( ) { <nl> + FOLLY_SAFE_DCHECK ( hasNext ( ) , " " ) ; <nl> + unsigned i = findFirstSetNonZero ( interleavedMask_ ) ; <nl> + interleavedMask_ & = ( interleavedMask_ - 1 ) ; <nl> + return ( ( i > > 2 ) | ( i < < 2 ) ) & 0xf ; <nl> + } <nl> + } ; <nl> + <nl> + / / Iterates a mask , optimized for the case that most bits are set <nl> + class DenseMaskIter { <nl> + static_assert ( kMaskSpacing = = 4 , " " ) ; <nl> + <nl> + std : : size_t count_ ; <nl> + unsigned index_ ; <nl> + uint8_t const * tags_ ; <nl> + <nl> + public : <nl> + explicit DenseMaskIter ( uint8_t const * tags , MaskType mask ) { <nl> + if ( mask = = 0 ) { <nl> + count_ = 0 ; <nl> + } else { <nl> + count_ = popcount ( static_cast < uint32_t > ( ( ( mask > > 32 ) < < 2 ) | mask ) ) ; <nl> + if ( LIKELY ( ( mask & 1 ) ! = 0 ) ) { <nl> + index_ = 0 ; <nl> + } else { <nl> + index_ = findFirstSetNonZero ( mask ) / kMaskSpacing ; <nl> + } <nl> + tags_ = tags ; <nl> + } <nl> + } <nl> + <nl> + bool hasNext ( ) { <nl> + return count_ > 0 ; <nl> + } <nl> + <nl> + unsigned next ( ) { <nl> + auto rv = index_ ; <nl> + - - count_ ; <nl> + if ( count_ > 0 ) { <nl> + do { <nl> + + + index_ ; <nl> + } while ( ( tags_ [ index_ ] & 0x80 ) = = 0 ) ; <nl> + } <nl> + FOLLY_SAFE_DCHECK ( index_ < 16 , " " ) ; <nl> + return rv ; <nl> + } <nl> + } ; <nl> + <nl> + # else <nl> + / / Iterates a mask , optimized for the case that only a few bits are set <nl> + class SparseMaskIter { <nl> + MaskType mask_ ; <nl> + <nl> + public : <nl> + explicit SparseMaskIter ( MaskType mask ) : mask_ { mask } { } <nl> + <nl> + bool hasNext ( ) { <nl> + return mask_ ! = 0 ; <nl> + } <nl> + <nl> + unsigned next ( ) { <nl> + FOLLY_SAFE_DCHECK ( hasNext ( ) , " " ) ; <nl> + unsigned i = findFirstSetNonZero ( mask_ ) ; <nl> + mask_ & = ( mask_ - 1 ) ; <nl> + return i / kMaskSpacing ; <nl> + } <nl> + } ; <nl> + <nl> + / / Iterates a mask , optimized for the case that most bits are set <nl> + class DenseMaskIter { <nl> + MaskType mask_ ; <nl> + unsigned index_ { 0 } ; <nl> + <nl> + public : <nl> + explicit DenseMaskIter ( uint8_t const * , MaskType mask ) : mask_ { mask } { } <nl> + <nl> + bool hasNext ( ) { <nl> + return mask_ ! = 0 ; <nl> + } <nl> + <nl> + unsigned next ( ) { <nl> + FOLLY_SAFE_DCHECK ( hasNext ( ) , " " ) ; <nl> + if ( LIKELY ( ( mask_ & 1 ) ! = 0 ) ) { <nl> + mask_ > > = kMaskSpacing ; <nl> + return index_ + + ; <nl> + } else { <nl> + unsigned s = findFirstSetNonZero ( mask_ ) ; <nl> + unsigned rv = index_ + ( s / kMaskSpacing ) ; <nl> + mask_ > > = ( s + kMaskSpacing ) ; <nl> + index_ = rv + 1 ; <nl> + return rv ; <nl> + } <nl> + } <nl> + } ; <nl> + # endif <nl> + <nl> + / / Iterates a mask , returning pairs of [ begin , end ) index covering blocks <nl> + / / of set bits <nl> + class MaskRangeIter { <nl> + MaskType mask_ ; <nl> + unsigned shift_ { 0 } ; <nl> + <nl> + public : <nl> + explicit MaskRangeIter ( MaskType mask ) { <nl> + / / If kMaskSpacing is > 1 then there will be empty bits even for <nl> + / / contiguous ranges . Fill them in . <nl> + mask_ = mask * ( ( 1 < < kMaskSpacing ) - 1 ) ; <nl> + } <nl> + <nl> + bool hasNext ( ) { <nl> + return mask_ ! = 0 ; <nl> + } <nl> + <nl> + std : : pair < unsigned , unsigned > next ( ) { <nl> + FOLLY_SAFE_DCHECK ( hasNext ( ) , " " ) ; <nl> + auto s = shift_ ; <nl> + unsigned b = findFirstSetNonZero ( mask_ ) ; <nl> + unsigned e = findFirstSetNonZero ( ~ ( mask_ | ( mask_ - 1 ) ) ) ; <nl> + mask_ > > = e ; <nl> + shift_ = s + e ; <nl> + return std : : make_pair ( ( s + b ) / kMaskSpacing , ( s + e ) / kMaskSpacing ) ; <nl> + } <nl> + } ; <nl> + <nl> + / / Holds the result of an index query that has an optional result , <nl> + / / interpreting a mask of 0 to be the empty answer and the index of the <nl> + / / last set bit to be the non - empty answer <nl> + class LastOccupiedInMask { <nl> + MaskType mask_ ; <nl> + <nl> + public : <nl> + explicit LastOccupiedInMask ( MaskType mask ) : mask_ { mask } { } <nl> + <nl> + bool hasIndex ( ) const { <nl> + return mask_ ! = 0 ; <nl> + } <nl> + <nl> + unsigned index ( ) const { <nl> + assume ( mask_ ! = 0 ) ; <nl> + return ( findLastSet ( mask_ ) - 1 ) / kMaskSpacing ; <nl> + } <nl> + } ; <nl> + <nl> + / / Holds the result of an index query that has an optional result , <nl> + / / interpreting a mask of 0 to be the empty answer and the index of the <nl> + / / first set bit to be the non - empty answer <nl> + class FirstEmptyInMask { <nl> + MaskType mask_ ; <nl> + <nl> + public : <nl> + explicit FirstEmptyInMask ( MaskType mask ) : mask_ { mask } { } <nl> + <nl> + bool hasIndex ( ) const { <nl> + return mask_ ! = 0 ; <nl> + } <nl> + <nl> + unsigned index ( ) const { <nl> + FOLLY_SAFE_DCHECK ( mask_ ! = 0 , " " ) ; <nl> + return findFirstSetNonZero ( mask_ ) / kMaskSpacing ; <nl> + } <nl> + } ; <nl> + <nl> + } / / namespace detail <nl> + } / / namespace f14 <nl> + } / / namespace folly <nl> + <nl> + # endif <nl> mmm a / folly / container / detail / F14Table . h <nl> ppp b / folly / container / detail / F14Table . h <nl> <nl> # include < folly / container / HeterogeneousAccess . h > <nl> # include < folly / container / detail / F14Defaults . h > <nl> # include < folly / container / detail / F14IntrinsicsAvailability . h > <nl> + # include < folly / container / detail / F14Mask . h > <nl> <nl> # if FOLLY_ASAN_ENABLED & & defined ( FOLLY_TLS ) <nl> # define FOLLY_F14_TLS_IF_ASAN FOLLY_TLS <nl> class F14HashToken final { <nl> <nl> namespace f14 { <nl> namespace detail { <nl> - / / / / Defaults should be selected using void <nl> <nl> + / / / / Defaults should be selected using void <nl> template < typename Arg , typename Default > <nl> using VoidDefault = <nl> std : : conditional_t < std : : is_same < Arg , Default > : : value , void , Arg > ; <nl> FOLLY_ALWAYS_INLINE static void prefetchAddr ( T const * ptr ) { <nl> # endif <nl> } <nl> <nl> - template < typename T > <nl> - FOLLY_ALWAYS_INLINE static unsigned findFirstSetNonZero ( T mask ) { <nl> - assume ( mask ! = 0 ) ; <nl> - if ( sizeof ( mask ) = = sizeof ( unsigned ) ) { <nl> - return __builtin_ctz ( static_cast < unsigned > ( mask ) ) ; <nl> - } else { <nl> - return __builtin_ctzll ( mask ) ; <nl> - } <nl> - } <nl> - <nl> # if FOLLY_NEON <nl> using TagVector = uint8x16_t ; <nl> - <nl> - using MaskType = uint64_t ; <nl> - <nl> - constexpr unsigned kMaskSpacing = 4 ; <nl> # else / / SSE2 <nl> using TagVector = __m128i ; <nl> - <nl> - using MaskType = uint32_t ; <nl> - <nl> - constexpr unsigned kMaskSpacing = 1 ; <nl> # endif <nl> <nl> / / We could use unaligned loads to relax this requirement , but that <nl> using EmptyTagVectorType = std : : aligned_storage_t < <nl> <nl> extern EmptyTagVectorType kEmptyTagVector ; <nl> <nl> - template < unsigned BitCount > <nl> - struct FullMask { <nl> - static constexpr MaskType value = <nl> - ( FullMask < BitCount - 1 > : : value < < kMaskSpacing ) + 1 ; <nl> - } ; <nl> - <nl> - template < > <nl> - struct FullMask < 1 > : std : : integral_constant < MaskType , 1 > { } ; <nl> - <nl> - # if FOLLY_ARM <nl> - / / Mask iteration is different for ARM because that is the only platform <nl> - / / for which the mask is bigger than a register . <nl> - <nl> - / / Iterates a mask , optimized for the case that only a few bits are set <nl> - class SparseMaskIter { <nl> - static_assert ( kMaskSpacing = = 4 , " " ) ; <nl> - <nl> - uint32_t interleavedMask_ ; <nl> - <nl> - public : <nl> - explicit SparseMaskIter ( MaskType mask ) <nl> - : interleavedMask_ { static_cast < uint32_t > ( ( ( mask > > 32 ) < < 2 ) | mask ) } { } <nl> - <nl> - bool hasNext ( ) { <nl> - return interleavedMask_ ! = 0 ; <nl> - } <nl> - <nl> - unsigned next ( ) { <nl> - FOLLY_SAFE_DCHECK ( hasNext ( ) , " " ) ; <nl> - unsigned i = findFirstSetNonZero ( interleavedMask_ ) ; <nl> - interleavedMask_ & = ( interleavedMask_ - 1 ) ; <nl> - return ( ( i > > 2 ) | ( i < < 2 ) ) & 0xf ; <nl> - } <nl> - } ; <nl> - <nl> - / / Iterates a mask , optimized for the case that most bits are set <nl> - class DenseMaskIter { <nl> - static_assert ( kMaskSpacing = = 4 , " " ) ; <nl> - <nl> - std : : size_t count_ ; <nl> - unsigned index_ ; <nl> - uint8_t const * tags_ ; <nl> - <nl> - public : <nl> - explicit DenseMaskIter ( uint8_t const * tags , MaskType mask ) { <nl> - if ( mask = = 0 ) { <nl> - count_ = 0 ; <nl> - } else { <nl> - count_ = popcount ( static_cast < uint32_t > ( ( ( mask > > 32 ) < < 2 ) | mask ) ) ; <nl> - if ( LIKELY ( ( mask & 1 ) ! = 0 ) ) { <nl> - index_ = 0 ; <nl> - } else { <nl> - index_ = findFirstSetNonZero ( mask ) / kMaskSpacing ; <nl> - } <nl> - tags_ = tags ; <nl> - } <nl> - } <nl> - <nl> - bool hasNext ( ) { <nl> - return count_ > 0 ; <nl> - } <nl> - <nl> - unsigned next ( ) { <nl> - auto rv = index_ ; <nl> - - - count_ ; <nl> - if ( count_ > 0 ) { <nl> - do { <nl> - + + index_ ; <nl> - } while ( ( tags_ [ index_ ] & 0x80 ) = = 0 ) ; <nl> - } <nl> - FOLLY_SAFE_DCHECK ( index_ < 16 , " " ) ; <nl> - return rv ; <nl> - } <nl> - } ; <nl> - <nl> - # else <nl> - / / Iterates a mask , optimized for the case that only a few bits are set <nl> - class SparseMaskIter { <nl> - MaskType mask_ ; <nl> - <nl> - public : <nl> - explicit SparseMaskIter ( MaskType mask ) : mask_ { mask } { } <nl> - <nl> - bool hasNext ( ) { <nl> - return mask_ ! = 0 ; <nl> - } <nl> - <nl> - unsigned next ( ) { <nl> - FOLLY_SAFE_DCHECK ( hasNext ( ) , " " ) ; <nl> - unsigned i = findFirstSetNonZero ( mask_ ) ; <nl> - mask_ & = ( mask_ - 1 ) ; <nl> - return i / kMaskSpacing ; <nl> - } <nl> - } ; <nl> - <nl> - / / Iterates a mask , optimized for the case that most bits are set <nl> - class DenseMaskIter { <nl> - MaskType mask_ ; <nl> - unsigned index_ { 0 } ; <nl> - <nl> - public : <nl> - explicit DenseMaskIter ( uint8_t const * , MaskType mask ) : mask_ { mask } { } <nl> - <nl> - bool hasNext ( ) { <nl> - return mask_ ! = 0 ; <nl> - } <nl> - <nl> - unsigned next ( ) { <nl> - FOLLY_SAFE_DCHECK ( hasNext ( ) , " " ) ; <nl> - if ( LIKELY ( ( mask_ & 1 ) ! = 0 ) ) { <nl> - mask_ > > = kMaskSpacing ; <nl> - return index_ + + ; <nl> - } else { <nl> - unsigned s = findFirstSetNonZero ( mask_ ) ; <nl> - unsigned rv = index_ + ( s / kMaskSpacing ) ; <nl> - mask_ > > = ( s + kMaskSpacing ) ; <nl> - index_ = rv + 1 ; <nl> - return rv ; <nl> - } <nl> - } <nl> - } ; <nl> - # endif <nl> - <nl> - / / Iterates a mask , returning pairs of [ begin , end ) index covering blocks <nl> - / / of set bits <nl> - class MaskRangeIter { <nl> - MaskType mask_ ; <nl> - unsigned shift_ { 0 } ; <nl> - <nl> - public : <nl> - explicit MaskRangeIter ( MaskType mask ) { <nl> - / / If kMaskSpacing is > 1 then there will be empty bits even for <nl> - / / contiguous ranges . Fill them in . <nl> - mask_ = mask * ( ( 1 < < kMaskSpacing ) - 1 ) ; <nl> - } <nl> - <nl> - bool hasNext ( ) { <nl> - return mask_ ! = 0 ; <nl> - } <nl> - <nl> - std : : pair < unsigned , unsigned > next ( ) { <nl> - FOLLY_SAFE_DCHECK ( hasNext ( ) , " " ) ; <nl> - auto s = shift_ ; <nl> - unsigned b = findFirstSetNonZero ( mask_ ) ; <nl> - unsigned e = findFirstSetNonZero ( ~ ( mask_ | ( mask_ - 1 ) ) ) ; <nl> - mask_ > > = e ; <nl> - shift_ = s + e ; <nl> - return std : : make_pair ( ( s + b ) / kMaskSpacing , ( s + e ) / kMaskSpacing ) ; <nl> - } <nl> - } ; <nl> - <nl> - / / Holds the result of an index query that has an optional result , <nl> - / / interpreting a mask of 0 to be the empty answer and the index of the <nl> - / / last set bit to be the non - empty answer <nl> - class LastOccupiedInMask { <nl> - MaskType mask_ ; <nl> - <nl> - public : <nl> - explicit LastOccupiedInMask ( MaskType mask ) : mask_ { mask } { } <nl> - <nl> - bool hasIndex ( ) const { <nl> - return mask_ ! = 0 ; <nl> - } <nl> - <nl> - unsigned index ( ) const { <nl> - assume ( mask_ ! = 0 ) ; <nl> - return ( findLastSet ( mask_ ) - 1 ) / kMaskSpacing ; <nl> - } <nl> - } ; <nl> - <nl> - / / Holds the result of an index query that has an optional result , <nl> - / / interpreting a mask of 0 to be the empty answer and the index of the <nl> - / / first set bit to be the non - empty answer <nl> - class FirstEmptyInMask { <nl> - MaskType mask_ ; <nl> - <nl> - public : <nl> - explicit FirstEmptyInMask ( MaskType mask ) : mask_ { mask } { } <nl> - <nl> - bool hasIndex ( ) const { <nl> - return mask_ ! = 0 ; <nl> - } <nl> - <nl> - unsigned index ( ) const { <nl> - FOLLY_SAFE_DCHECK ( mask_ ! = 0 , " " ) ; <nl> - return findFirstSetNonZero ( mask_ ) / kMaskSpacing ; <nl> - } <nl> - } ; <nl> - <nl> template < typename ItemType > <nl> struct alignas ( kRequiredVectorAlignment ) F14Chunk { <nl> using Item = ItemType ; <nl>
folly : Move reusable f14 code into F14Mask . h
facebook/folly
9bcd9d4445b0cecf479c13a83d8247a0f7c0878e
2019-04-09T15:30:26Z
deleted file mode 100644 <nl> index 26f416446d4c . . 000000000000 <nl> mmm a / test / IDE / Inputs / custom - modules / foo_helper_module . h <nl> ppp / dev / null <nl> @ @ - 1 + 0 , 0 @ @ <nl> - int fooHelperFunc1 ( int a ) ; <nl>
Code completion tests : remove an extra file that is not actually used
apple/swift
f8e0e31144ffa57eee64ff0699aadf9c58f0c050
2013-08-06T21:20:22Z
mmm a / doc / aria2c . 1 . asciidoc <nl> ppp b / doc / aria2c . 1 . asciidoc <nl> Basic Options <nl> usage for the options whose name includes that word . <nl> Available Values : ' # basic ' , ' # advanced ' , ' # http ' , ' # https ' , ' # ftp ' , <nl> ' # metalink ' , ' # bittorrent ' , ' # cookie ' , ' # hook ' , ' # file ' , <nl> - ' # rpc ' , ' # experimental ' , ' # all ' <nl> + ' # rpc ' , ' # experimental ' , ' # deprecated ' , ' # help ' , ' # all ' <nl> Default : ' # basic ' <nl> <nl> HTTP / FTP Options <nl> Advanced Options <nl> option will be ignored when * < < aria2_optref_async_dns , - - async - dns > > * = ' false ' . <nl> Default : ' false ' <nl> <nl> - [ [ aria2_optref_enable_direct_io ] ] * - - enable - direct - io * [ = ' true ' | ' false ' ] : : <nl> - Enable directI / O , which lowers cpu usage while allocating / checking files . <nl> - Turn off if you encounter any error . <nl> - Default : ' true ' <nl> - <nl> [ [ aria2_optref_event_poll ] ] * - - event - poll * = POLL : : <nl> <nl> Specify the method for polling events . The possible values are <nl>
Removed - - enable - direct - io option .
aria2/aria2
f1bfd0ed76d9d757bff98b9273de5b5bf552424b
2011-07-16T07:18:22Z
mmm a / cocos / scripting / js - bindings / script / jsb_cocos2d . js <nl> ppp b / cocos / scripting / js - bindings / script / jsb_cocos2d . js <nl> cc . affineTransformConcat = function ( t1 , t2 ) { <nl> ty : t1 . tx * t2 . b + t1 . ty * t2 . d + t2 . ty } ; / / ty <nl> } ; <nl> <nl> + / * * <nl> + * Concatenate a transform matrix to another < br / > <nl> + * The results are reflected in the first matrix . < br / > <nl> + * t ' = t1 * t2 <nl> + * @ function <nl> + * @ param { cc . AffineTransform } t1 The first transform object <nl> + * @ param { cc . AffineTransform } t2 The transform object to concatenate <nl> + * @ return { cc . AffineTransform } The result of concatenation <nl> + * / <nl> + cc . affineTransformConcatIn = function ( t1 , t2 ) { <nl> + var a = t1 . a , b = t1 . b , c = t1 . c , d = t1 . d , tx = t1 . tx , ty = t1 . ty ; <nl> + t1 . a = a * t2 . a + b * t2 . c ; <nl> + t1 . b = a * t2 . b + b * t2 . d ; <nl> + t1 . c = c * t2 . a + d * t2 . c ; <nl> + t1 . d = c * t2 . b + d * t2 . d ; <nl> + t1 . tx = tx * t2 . a + ty * t2 . c + t2 . tx ; <nl> + t1 . ty = tx * t2 . b + ty * t2 . d + t2 . ty ; <nl> + return t1 ; <nl> + } ; <nl> + <nl> / * * <nl> * Return true if ` t1 ' and ` t2 ' are equal , false otherwise . <nl> * @ memberOf cc <nl>
Add cc . affineTransformConcatIn
cocos2d/cocos2d-x
1496224c6d75ff21302cc39a98c160929fb38e19
2015-07-22T07:21:13Z
mmm a / src / mongo / executor / network_interface_tl . cpp <nl> ppp b / src / mongo / executor / network_interface_tl . cpp <nl> void NetworkInterfaceTL : : RequestState : : resolve ( Future < RemoteCommandResponse > fut <nl> <nl> returnConnection ( status ) ; <nl> <nl> - auto commandStatus = getStatusFromCommandResult ( response . data ) ; <nl> - / / Ignore maxTimeMS expiration errors for hedged reads without triggering the finish <nl> - / / line . <nl> - if ( isHedge & & commandStatus = = ErrorCodes : : MaxTimeMSExpired ) { <nl> - LOGV2_DEBUG ( 4660701 , <nl> - 2 , <nl> - " Hedged request returned status " , <nl> - " requestId " _attr = request - > id , <nl> - " target " _attr = request - > target , <nl> - " status " _attr = commandStatus ) ; <nl> - return ; <nl> + const auto commandStatus = getStatusFromCommandResult ( response . data ) ; <nl> + if ( isHedge ) { <nl> + / / Ignore maxTimeMS expiration , StaleDbVersion or any error belonging to <nl> + / / StaleShardVersionError <nl> + / / error category for hedged reads without triggering the finish line . <nl> + if ( commandStatus = = ErrorCodes : : MaxTimeMSExpired | | <nl> + commandStatus = = ErrorCodes : : StaleDbVersion | | <nl> + ErrorCodes : : isStaleShardVersionError ( commandStatus ) ) { <nl> + LOGV2_DEBUG ( 4660701 , <nl> + 2 , <nl> + " Hedged request returned status " , <nl> + " requestId " _attr = request - > id , <nl> + " target " _attr = request - > target , <nl> + " status " _attr = commandStatus ) ; <nl> + return ; <nl> + } <nl> } <nl> <nl> if ( ! cmdState - > finishLine . arriveStrongly ( ) ) { <nl>
SERVER - 52676 Hedged reads should ignore stale errors
mongodb/mongo
a62abb0614bbcff329a89ba76fe42d2d3d4e2d3c
2020-12-16T08:18:14Z
mmm a / src / rpc / mining . cpp <nl> ppp b / src / rpc / mining . cpp <nl> static UniValue estimatesmartfee ( const JSONRPCRequest & request ) <nl> RPCResult : : Type : : OBJ , " " , " " , <nl> { <nl> { RPCResult : : Type : : NUM , " feerate " , / * optional * / true , " estimate fee rate in " + CURRENCY_UNIT + " / kB ( only present if no errors were encountered ) " } , <nl> - { RPCResult : : Type : : ARR , " errors " , " Errors encountered during processing " , <nl> + { RPCResult : : Type : : ARR , " errors " , / * optional * / true , " Errors encountered during processing ( if there are any ) " , <nl> { <nl> { RPCResult : : Type : : STR , " " , " error " } , <nl> } } , <nl> static UniValue estimaterawfee ( const JSONRPCRequest & request ) <nl> { <nl> { RPCResult : : Type : : ELISION , " " , " " } , <nl> } } , <nl> - { RPCResult : : Type : : ARR , " errors " , / * optional * / true , " Errors encountered during processing " , <nl> + { RPCResult : : Type : : ARR , " errors " , / * optional * / true , " Errors encountered during processing ( if there are any ) " , <nl> { <nl> { RPCResult : : Type : : STR , " error " , " " } , <nl> } } , <nl> mmm a / src / rpc / rawtransaction . cpp <nl> ppp b / src / rpc / rawtransaction . cpp <nl> static UniValue signrawtransactionwithkey ( const JSONRPCRequest & request ) <nl> { <nl> { RPCResult : : Type : : STR_HEX , " hex " , " The hex - encoded raw transaction with signature ( s ) " } , <nl> { RPCResult : : Type : : BOOL , " complete " , " If the transaction has a complete set of signatures " } , <nl> - { RPCResult : : Type : : ARR , " errors " , " Script verification errors ( if there are any ) " , <nl> + { RPCResult : : Type : : ARR , " errors " , / * optional * / true , " Script verification errors ( if there are any ) " , <nl> { <nl> { RPCResult : : Type : : OBJ , " " , " " , <nl> { <nl> UniValue analyzepsbt ( const JSONRPCRequest & request ) <nl> { RPCResult : : Type : : STR_AMOUNT , " estimated_feerate " , / * optional * / true , " Estimated feerate of the final signed transaction in " + CURRENCY_UNIT + " / kB . Shown only if all UTXO slots in the PSBT have been filled " } , <nl> { RPCResult : : Type : : STR_AMOUNT , " fee " , / * optional * / true , " The transaction fee paid . Shown only if all UTXO slots in the PSBT have been filled " } , <nl> { RPCResult : : Type : : STR , " next " , " Role of the next person that this psbt needs to go to " } , <nl> - { RPCResult : : Type : : STR , " error " , " Error message if there is one " } , <nl> + { RPCResult : : Type : : STR , " error " , / * optional * / true , " Error message ( if there is one ) " } , <nl> } <nl> } , <nl> RPCExamples { <nl> mmm a / src / wallet / rpcwallet . cpp <nl> ppp b / src / wallet / rpcwallet . cpp <nl> UniValue signrawtransactionwithwallet ( const JSONRPCRequest & request ) <nl> { <nl> { RPCResult : : Type : : STR_HEX , " hex " , " The hex - encoded raw transaction with signature ( s ) " } , <nl> { RPCResult : : Type : : BOOL , " complete " , " If the transaction has a complete set of signatures " } , <nl> - { RPCResult : : Type : : ARR , " errors " , " Script verification errors ( if there are any ) " , <nl> + { RPCResult : : Type : : ARR , " errors " , / * optional * / true , " Script verification errors ( if there are any ) " , <nl> { <nl> { RPCResult : : Type : : OBJ , " " , " " , <nl> { <nl>
rpc : document returned error fields as optional if applicable
bitcoin/bitcoin
f110b7c722eb150816a26cab161ac2b8c0f58609
2020-08-02T16:44:41Z
mmm a / lib / Sema / BuilderTransform . cpp <nl> ppp b / lib / Sema / BuilderTransform . cpp <nl> class BuilderClosureVisitor <nl> } <nl> <nl> bool found = false ; <nl> - for ( auto decl : builder - > lookupDirect ( fnName ) ) { <nl> + SmallVector < ValueDecl * , 4 > foundDecls ; <nl> + dc - > lookupQualified ( <nl> + builderType , DeclNameRef ( fnName ) , <nl> + NL_QualifiedDefault | NL_ProtocolMembers , foundDecls ) ; <nl> + for ( auto decl : foundDecls ) { <nl> if ( auto func = dyn_cast < FuncDecl > ( decl ) ) { <nl> / / Function must be static . <nl> if ( ! func - > isStatic ( ) ) <nl> mmm a / test / Constraints / function_builder . swift <nl> ppp b / test / Constraints / function_builder . swift <nl> tuplify ( true ) { c in <nl> } <nl> } <nl> <nl> + / / Test the use of function builders partly implemented through a protocol . <nl> + indirect enum FunctionBuilder < Expression > { <nl> + case expression ( Expression ) <nl> + case block ( [ FunctionBuilder ] ) <nl> + case either ( Either < FunctionBuilder , FunctionBuilder > ) <nl> + case optional ( FunctionBuilder ? ) <nl> + } <nl> + <nl> + protocol FunctionBuilderProtocol { <nl> + associatedtype Expression <nl> + typealias Component = FunctionBuilder < Expression > <nl> + associatedtype Return <nl> + <nl> + static func buildExpression ( _ expression : Expression ) - > Component <nl> + static func buildBlock ( _ components : Component . . . ) - > Component <nl> + static func buildDo ( _ components : Component . . . ) - > Component <nl> + static func buildOptional ( _ optional : Component ? ) - > Component <nl> + static func buildArray ( _ components : [ Component ] ) - > Component <nl> + static func buildLimitedAvailability ( _ component : Component ) - > Component <nl> + <nl> + static func buildFinalResult ( _ components : Component ) - > Return <nl> + } <nl> + <nl> + extension FunctionBuilderProtocol { <nl> + static func buildExpression ( _ expression : Expression ) - > Component { . expression ( expression ) } <nl> + static func buildBlock ( _ components : Component . . . ) - > Component { . block ( components ) } <nl> + static func buildDo ( _ components : Component . . . ) - > Component { . block ( components ) } <nl> + static func buildOptional ( _ optional : Component ? ) - > Component { . optional ( optional ) } <nl> + static func buildArray ( _ components : [ Component ] ) - > Component { . block ( components ) } <nl> + static func buildLimitedAvailability ( _ component : Component ) - > Component { component } <nl> + } <nl> + <nl> + @ _functionBuilder <nl> + enum ArrayBuilder < E > : FunctionBuilderProtocol { <nl> + typealias Expression = E <nl> + typealias Component = FunctionBuilder < E > <nl> + typealias Return = [ E ] <nl> + <nl> + static func buildFinalResult ( _ components : Component ) - > Return { <nl> + switch components { <nl> + case . expression ( let e ) : return [ e ] <nl> + case . block ( let children ) : return children . flatMap ( buildFinalResult ) <nl> + case . either ( . first ( let child ) ) : return buildFinalResult ( child ) <nl> + case . either ( . second ( let child ) ) : return buildFinalResult ( child ) <nl> + case . optional ( let child ? ) : return buildFinalResult ( child ) <nl> + case . optional ( nil ) : return [ ] <nl> + } <nl> + } <nl> + } <nl> + <nl> + <nl> + func buildArray ( @ ArrayBuilder < String > build : ( ) - > [ String ] ) - > [ String ] { <nl> + return build ( ) <nl> + } <nl> <nl> <nl> + let a = buildArray { <nl> + " 1 " <nl> + " 2 " <nl> + if Bool . random ( ) { <nl> + " maybe 3 " <nl> + } <nl> + } <nl> + / / CHECK : [ " 1 " , " 2 " <nl> + print ( a ) <nl> + <nl>
[ Function builders ] Allow ` build ` functions to be declared elsewhere .
apple/swift
9ef0fce7b0d3a42d1320f21d67062ca98d65f7e8
2020-08-17T22:41:33Z
mmm a / buildscripts / idl / idl / generator . py <nl> ppp b / buildscripts / idl / idl / generator . py <nl> def gen_comparison_operators_declarations ( self , struct ) : <nl> " " " Generate comparison operators declarations for the type . " " " <nl> # pylint : disable = invalid - name <nl> <nl> - template_params = { ' class_name ' : common . title_case ( struct . name ) } <nl> - <nl> - with self . _with_template ( template_params ) : <nl> - self . _writer . write_template ( <nl> - ' friend bool operator = = ( const $ { class_name } & left , const $ { class_name } & right ) ; ' ) <nl> - self . _writer . write_template ( <nl> - ' friend bool operator ! = ( const $ { class_name } & left , const $ { class_name } & right ) ; ' ) <nl> - self . _writer . write_template ( <nl> - ' friend bool operator < ( const $ { class_name } & left , const $ { class_name } & right ) ; ' ) <nl> - <nl> - self . write_empty_line ( ) <nl> - <nl> - def gen_comparison_operators_definitions ( self , struct ) : <nl> - # type : ( ast . Struct ) - > None <nl> - " " " Generate comparison operators definitions for the type . " " " <nl> - # pylint : disable = invalid - name <nl> - <nl> sorted_fields = sorted ( [ <nl> field for field in struct . fields if ( not field . ignore ) and field . comparison_order ! = - 1 <nl> ] , key = lambda f : f . comparison_order ) <nl> fields = [ _get_field_member_name ( field ) for field in sorted_fields ] <nl> <nl> - for rel_op in [ ' = = ' , ' ! = ' , ' < ' ] : <nl> + with self . _block ( " auto relationalTie ( ) const { " , " } " ) : <nl> + self . _writer . write_line ( ' return std : : tie ( % s ) ; ' % ( ' , ' . join ( fields ) ) ) <nl> + <nl> + for rel_op in [ ' = = ' , ' ! = ' , ' < ' , ' > ' , ' < = ' , ' > = ' ] : <nl> + self . write_empty_line ( ) <nl> decl = common . template_args ( <nl> - " inline bool operator $ { rel_op } ( const $ { class_name } & left , const $ { class_name } & right ) { " , <nl> + " friend bool operator $ { rel_op } ( const $ { class_name } & left , const $ { class_name } & right ) { " , <nl> rel_op = rel_op , class_name = common . title_case ( struct . name ) ) <nl> <nl> with self . _block ( decl , " } " ) : <nl> - self . _writer . write_line ( ' return std : : tie ( % s ) % s std : : tie ( % s ) ; ' % <nl> - ( ' , ' . join ( [ " left . % s " % ( field ) for field in fields ] ) , <nl> - rel_op , <nl> - ' , ' . join ( [ " right . % s " % ( field ) for field in fields ] ) ) ) <nl> - <nl> - self . write_empty_line ( ) <nl> + self . _writer . write_line ( ' return left . relationalTie ( ) % s right . relationalTie ( ) ; ' % <nl> + ( rel_op ) ) <nl> <nl> self . write_empty_line ( ) <nl> <nl> def generate ( self , spec ) : <nl> ' boost / optional . hpp ' , <nl> ' cstdint ' , <nl> ' string ' , <nl> + ' tuple ' , <nl> ' vector ' , <nl> ] <nl> <nl> def generate ( self , spec ) : <nl> <nl> self . write_empty_line ( ) <nl> <nl> - if struct . generate_comparison_operators : <nl> - self . gen_comparison_operators_definitions ( struct ) <nl> - <nl> <nl> class _CppSourceFileWriter ( _CppFileWriterBase ) : <nl> " " " C + + . cpp File writer . " " " <nl>
SERVER - 31705 idl refactor relops , generate all 6 .
mongodb/mongo
170a620d2987553a218e98de1070813f32e773aa
2018-04-05T20:13:27Z
mmm a / jstests / replsets / sync1 . js <nl> ppp b / jstests / replsets / sync1 . js <nl> <nl> / / FAILING TEST <nl> - / / replication is never synced <nl> + / / replication is not rolled back <nl> <nl> doTest = function ( signal ) { <nl> + <nl> var replTest = new ReplSetTest ( { name : ' testSet ' , nodes : 3 } ) ; <nl> - var nodes = replTest . startSet ( ) ; <nl> + var nodes = replTest . startSet ( { oplogSize : " 40 " } ) ; <nl> <nl> sleep ( 5000 ) ; <nl> <nl> doTest = function ( signal ) { <nl> max1 = dbs [ 1 ] . bar . find ( ) . sort ( { z : - 1 } ) . limit ( 1 ) . next ( ) ; <nl> max2 = dbs [ 2 ] . bar . find ( ) . sort ( { z : - 1 } ) . limit ( 1 ) . next ( ) ; <nl> <nl> - print ( " sync1 . js : WAITING FOR MATCH " + Date ( ) + " z [ 1 ] : " + max1 . z + " z [ 2 ] : " + max2 . z ) ; <nl> + print ( count + " sync1 . js : WAITING FOR MATCH " + Date ( ) + " z [ 1 ] : " + max1 . z + " z [ 2 ] : " + max2 . z ) ; <nl> <nl> / / printjson ( max1 ) ; <nl> / / printjson ( max2 ) ; <nl> doTest = function ( signal ) { <nl> count + + ; <nl> if ( count = = 100 ) { <nl> assert ( false , " replsets / sync1 . js fails timing out " ) ; <nl> - break ; <nl> + replTest . stopSet ( signal ) ; <nl> + return ; <nl> } <nl> } while ( max1 . z ! = max2 . z ) ; <nl> <nl> - / / FAILS ! <nl> - / / if db1 & db2 are at different points in replication , they never get back in sync <nl> - assert ( max1 . z = = max2 . z , " replication caught up ( or test timed out ) " ) ; <nl> + / / okay , now they ' re caught up . We have a max : <nl> + var max = max1 . z ; <nl> + <nl> + / / now , let ' s see if rollback works <nl> + var result = dbs [ 0 ] . runCommand ( { replSetTest : 1 , blind : false } ) ; <nl> + <nl> + / / FAIL ! This never resyncs <nl> + / / now this should resync <nl> + var max0 ; <nl> + count = 0 ; <nl> + do { <nl> + max0 = dbs [ 0 ] . bar . find ( ) . sort ( { z : - 1 } ) . limit ( 1 ) . next ( ) ; <nl> + <nl> + print ( count + " sync1 . js : WAITING FOR MATCH " + Date ( ) + " z [ 0 ] : " + max0 . z + " z : " + max ) ; <nl> + <nl> + sleep ( 2000 ) ; <nl> + <nl> + count + + ; <nl> + if ( count = = 100 ) { <nl> + assert ( false , " replsets / sync1 . js fails timing out " ) ; <nl> + replTest . stopSet ( signal ) ; <nl> + return ; <nl> + } <nl> + } while ( max0 . z ! = max ) ; <nl> <nl> replTest . stopSet ( signal ) ; <nl> } <nl> <nl> - doTest ( 15 ) ; <nl> + / / doTest ( 15 ) ; <nl> mmm a / shell / servers . js <nl> ppp b / shell / servers . js <nl> ReplSetTest . prototype . getOptions = function ( n , extra , putBinaryFirst ) { <nl> return a ; <nl> } <nl> <nl> - ReplSetTest . prototype . startSet = function ( ) { <nl> + ReplSetTest . prototype . startSet = function ( options ) { <nl> var nodes = [ ] ; <nl> print ( " Starting Set " ) ; <nl> <nl> for ( n = 0 ; n < this . ports . length ; n + + ) { <nl> - node = this . start ( n ) ; <nl> + node = this . start ( n , options ) ; <nl> nodes . push ( node ) ; <nl> } <nl> <nl>
increased oplog size and added rollback test
mongodb/mongo
ee8252f22fb8f0a927b84d7519715b0067d8e156
2010-07-30T17:26:53Z
mmm a / test / stdlib / NSStringAPI . swift <nl> ppp b / test / stdlib / NSStringAPI . swift <nl> NSStringAPIs . test ( " rangeOfCharacterFromSet ( _ : options : range : ) " ) { <nl> if true { <nl> expectEmpty ( " клмн " . rangeOfCharacterFromSet ( charset ) ) <nl> } <nl> + if true { <nl> + let s = " абвклмнабвклмн " <nl> + let r = s . rangeOfCharacterFromSet ( charset , <nl> + options : . BackwardsSearch ) ! <nl> + expectEqual ( advance ( s . startIndex , 9 ) , r . startIndex ) <nl> + expectEqual ( advance ( s . startIndex , 10 ) , r . endIndex ) <nl> + } <nl> + if true { <nl> + let s = " абвклмнабв " <nl> + let r = s . rangeOfCharacterFromSet ( charset , <nl> + range : advance ( s . startIndex , 3 ) . . s . endIndex ) ! <nl> + dump ( r . startIndex . _utf16Index ) <nl> + expectEqual ( advance ( s . startIndex , 7 ) , r . startIndex ) <nl> + expectEqual ( advance ( s . startIndex , 8 ) , r . endIndex ) <nl> + } <nl> } <nl> <nl> if true { <nl> NSStringAPIs . test ( " rangeOfCharacterFromSet ( _ : options : range : ) " ) { <nl> } <nl> <nl> NSStringAPIs . test ( " rangeOfComposedCharacterSequenceAtIndex ( _ : ) " ) { <nl> - / / FIXME <nl> + let s = " \ U0001F601abc \ u305f \ u3099 def " <nl> + expectEqual ( " \ U0001F601 " , s [ s . rangeOfComposedCharacterSequenceAtIndex ( <nl> + s . startIndex ) ] ) <nl> + expectEqual ( " a " , s [ s . rangeOfComposedCharacterSequenceAtIndex ( <nl> + advance ( s . startIndex , 1 ) ) ] ) <nl> + expectEqual ( " \ u305f \ u3099 " , s [ s . rangeOfComposedCharacterSequenceAtIndex ( <nl> + advance ( s . startIndex , 5 ) ) ] ) <nl> + expectEqual ( " \ u305f \ u3099 " , s [ s . rangeOfComposedCharacterSequenceAtIndex ( <nl> + advance ( s . startIndex , 6 ) ) ] ) <nl> } <nl> <nl> NSStringAPIs . test ( " rangeOfComposedCharacterSequencesForRange ( _ : ) " ) { <nl> - / / FIXME <nl> + let s = " \ U0001F601abc さ \ u3099し \ u3099す \ u3099せ \ u3099そ \ u3099 " <nl> + <nl> + expectEqual ( " \ U0001F601a " , s [ s . rangeOfComposedCharacterSequencesForRange ( <nl> + s . startIndex . . advance ( s . startIndex , 2 ) ) ] ) <nl> + expectEqual ( " し \ u3099す \ u3099 " , s [ s . rangeOfComposedCharacterSequencesForRange ( <nl> + advance ( s . startIndex , 8 ) . . advance ( s . startIndex , 10 ) ) ] ) <nl> } <nl> <nl> NSStringAPIs . test ( " rangeOfString ( _ : options : range : locale : ) " ) { <nl>
stdlib / NSString APIs on String : add more tests
apple/swift
5649360b8fe270e6f821896668ed734572f2df5f
2014-05-30T23:49:22Z
mmm a / jstests / concurrency / fsm_workloads / agg_out . js <nl> ppp b / jstests / concurrency / fsm_workloads / agg_out . js <nl> <nl> * Unfortunately , there aren ' t very many assertions we can make here , so this is mostly to test that <nl> * the server doesn ' t deadlock or crash . <nl> * <nl> - * @ tags : [ requires_capped ] <nl> + * @ tags : [ requires_capped , requires_fcv_44 ] <nl> * / <nl> load ( ' jstests / concurrency / fsm_libs / extend_workload . js ' ) ; / / for extendWorkload <nl> load ( ' jstests / concurrency / fsm_workloads / agg_base . js ' ) ; / / for $ config <nl>
SERVER - 44990 Add requires_fcv_44 flag to agg_out . js to address failure in concurrency_sharded_replication_multiversion
mongodb/mongo
58f5a6381c2552f8f9d6b62298036f5f4702e2d2
2019-12-06T18:32:08Z
mmm a / tensorflow / opensource_only . files <nl> ppp b / tensorflow / opensource_only . files <nl> tensorflow / tools / ci_build / release / ubuntu_16 / gpu_py37_full / nonpip . sh <nl> tensorflow / tools / ci_build / release / ubuntu_16 / gpu_py37_full / nonpip_v1 . sh <nl> tensorflow / tools / ci_build / release / ubuntu_16 / gpu_py37_full / pip . sh <nl> tensorflow / tools / ci_build / release / ubuntu_16 / gpu_py37_full / pip_v1 . sh <nl> + tensorflow / tools / ci_build / release / ubuntu_16 / gpu_py38_full / nightly_release . sh <nl> + tensorflow / tools / ci_build / release / ubuntu_16 / gpu_py38_full / nonpip . sh <nl> + tensorflow / tools / ci_build / release / ubuntu_16 / gpu_py38_full / pip . sh <nl> tensorflow / tools / ci_build / release / ubuntu_16 / sanity / build . sh <nl> tensorflow / tools / ci_build / release / ubuntu_16 / tpu_py37_full / nonpip . sh <nl> tensorflow / tools / ci_build / release / windows / cpu_libtensorflow / nightly . bat <nl> new file mode 100644 <nl> index 0000000000000 . . 98c54c228ba5f <nl> mmm / dev / null <nl> ppp b / tensorflow / tools / ci_build / release / ubuntu_16 / gpu_py38_full / nightly_release . sh <nl> <nl> + # ! / bin / bash <nl> + # Copyright 2019 The TensorFlow Authors . All Rights Reserved . <nl> + # <nl> + # Licensed under the Apache License , Version 2 . 0 ( the " License " ) ; <nl> + # you may not use this file except in compliance with the License . <nl> + # You may obtain a copy of the License at <nl> + # <nl> + # http : / / www . apache . org / licenses / LICENSE - 2 . 0 <nl> + # <nl> + # Unless required by applicable law or agreed to in writing , software <nl> + # distributed under the License is distributed on an " AS IS " BASIS , <nl> + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . <nl> + # See the License for the specific language governing permissions and <nl> + # limitations under the License . <nl> + # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> + set - e <nl> + set - x <nl> + <nl> + source tensorflow / tools / ci_build / release / common . sh <nl> + <nl> + set_bazel_outdir <nl> + <nl> + install_ubuntu_16_pip_deps pip3 . 8 <nl> + <nl> + pip3 . 7 install - - upgrade auditwheel - - user <nl> + <nl> + update_bazel_linux <nl> + <nl> + python2 . 7 tensorflow / tools / ci_build / update_version . py - - nightly <nl> + <nl> + # Run configure . <nl> + export TF_NEED_GCP = 1 <nl> + export TF_NEED_HDFS = 1 <nl> + export TF_NEED_S3 = 1 <nl> + export TF_NEED_CUDA = 1 <nl> + export TF_CUDA_VERSION = 10 <nl> + export TF_CUDNN_VERSION = 7 <nl> + export TF_CUDA_COMPUTE_CAPABILITIES = 3 . 5 , 3 . 7 , 5 . 2 , 6 . 0 , 6 . 1 , 7 . 0 <nl> + export TF_NEED_TENSORRT = 1 <nl> + export TENSORRT_INSTALL_PATH = / usr / local / tensorrt <nl> + export CC_OPT_FLAGS = ' - mavx ' <nl> + export PYTHON_BIN_PATH = $ ( which python3 . 8 ) <nl> + yes " " | " $ PYTHON_BIN_PATH " configure . py <nl> + <nl> + # Build the pip package <nl> + bazel build - - config = opt - - config = v2 \ <nl> + - - crosstool_top = / / third_party / toolchains / preconfig / ubuntu16 . 04 / gcc7_manylinux2010 - nvcc - cuda10 . 1 : toolchain \ <nl> + tensorflow / tools / pip_package : build_pip_package <nl> + <nl> + . / bazel - bin / tensorflow / tools / pip_package / build_pip_package pip_pkg - - nightly_flag <nl> + . / bazel - bin / tensorflow / tools / pip_package / build_pip_package pip_pkg - - gpu - - nightly_flag <nl> + <nl> + # Upload the built packages to pypi . <nl> + for WHL_PATH in $ ( ls pip_pkg / tf_nightly * dev * . whl ) ; do <nl> + <nl> + WHL_DIR = $ ( dirname " $ { WHL_PATH } " ) <nl> + WHL_BASE_NAME = $ ( basename " $ { WHL_PATH } " ) <nl> + AUDITED_WHL_NAME = " $ { WHL_DIR } " / $ ( echo " $ { WHL_BASE_NAME / / linux / manylinux2010 } " ) <nl> + <nl> + # Copy and rename for gpu manylinux as we do not want auditwheel to package in libcudart . so <nl> + WHL_PATH = $ { AUDITED_WHL_NAME } <nl> + cp " $ { WHL_DIR } " / " $ { WHL_BASE_NAME } " " $ { WHL_PATH } " <nl> + echo " Copied manylinux2010 wheel file at : $ { WHL_PATH } " <nl> + <nl> + # test the whl pip package <nl> + chmod + x tensorflow / tools / ci_build / builds / nightly_release_smoke_test . sh <nl> + . / tensorflow / tools / ci_build / builds / nightly_release_smoke_test . sh $ { AUDITED_WHL_NAME } <nl> + RETVAL = $ ? <nl> + <nl> + # Upload the PIP package if whl test passes . <nl> + if [ $ { RETVAL } - eq 0 ] ; then <nl> + echo " Basic PIP test PASSED , Uploading package : $ { AUDITED_WHL_NAME } " <nl> + twine upload - r pypi - warehouse " $ { AUDITED_WHL_NAME } " | | echo <nl> + else <nl> + echo " Basic PIP test FAILED , will not upload $ { AUDITED_WHL_NAME } package " <nl> + return 1 <nl> + fi <nl> + done <nl> new file mode 100644 <nl> index 0000000000000 . . 639ba9edb5ae3 <nl> mmm / dev / null <nl> ppp b / tensorflow / tools / ci_build / release / ubuntu_16 / gpu_py38_full / nonpip . sh <nl> <nl> + # ! / bin / bash <nl> + # Copyright 2019 The TensorFlow Authors . All Rights Reserved . <nl> + # <nl> + # Licensed under the Apache License , Version 2 . 0 ( the " License " ) ; <nl> + # you may not use this file except in compliance with the License . <nl> + # You may obtain a copy of the License at <nl> + # <nl> + # http : / / www . apache . org / licenses / LICENSE - 2 . 0 <nl> + # <nl> + # Unless required by applicable law or agreed to in writing , software <nl> + # distributed under the License is distributed on an " AS IS " BASIS , <nl> + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . <nl> + # See the License for the specific language governing permissions and <nl> + # limitations under the License . <nl> + # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> + set - e <nl> + set - x <nl> + <nl> + source tensorflow / tools / ci_build / release / common . sh <nl> + <nl> + install_ubuntu_16_pip_deps pip3 . 8 <nl> + # Update bazel <nl> + update_bazel_linux <nl> + <nl> + # Run configure . <nl> + export TF_NEED_GCP = 1 <nl> + export TF_NEED_HDFS = 1 <nl> + export TF_NEED_S3 = 1 <nl> + export TF_NEED_CUDA = 1 <nl> + export TF_CUDA_VERSION = 10 <nl> + export TF_CUDNN_VERSION = 7 <nl> + export TF_NEED_TENSORRT = 1 <nl> + export TENSORRT_INSTALL_PATH = / usr / local / tensorrt <nl> + export CC_OPT_FLAGS = ' - mavx ' <nl> + export PYTHON_BIN_PATH = $ ( which python3 . 8 ) <nl> + export TF2_BEHAVIOR = 1 <nl> + export PROJECT_NAME = " tensorflow_gpu " <nl> + export LD_LIBRARY_PATH = " / usr / local / cuda : / usr / local / cuda / lib64 : / usr / local / cuda / extras / CUPTI / lib64 : $ TENSORRT_INSTALL_PATH / lib " <nl> + export TF_CUDA_COMPUTE_CAPABILITIES = 3 . 5 , 3 . 7 , 5 . 2 , 6 . 0 , 6 . 1 , 7 . 0 <nl> + <nl> + yes " " | " $ PYTHON_BIN_PATH " configure . py <nl> + <nl> + # Get the default test targets for bazel . <nl> + source tensorflow / tools / ci_build / build_scripts / PRESUBMIT_BUILD_TARGETS . sh <nl> + <nl> + tag_filters = " gpu , requires - gpu , - no_gpu , - no_oss , - oss_serial , - no_oss_py38 " <nl> + <nl> + bazel test - - config = cuda - - config = opt \ <nl> + - - crosstool_top = / / third_party / toolchains / preconfig / ubuntu16 . 04 / gcc7_manylinux2010 - nvcc - cuda10 . 1 : toolchain \ <nl> + - - linkopt = - lrt \ <nl> + - - action_env = TF2_BEHAVIOR = " $ { TF2_BEHAVIOR } " \ <nl> + - - test_lang_filters = py \ <nl> + - - build_tag_filters = $ { tag_filters } \ <nl> + - - test_tag_filters = $ { tag_filters } \ <nl> + - - test_timeout = " 300 , 450 , 1200 , 3600 " - - local_test_jobs = 4 \ <nl> + - - test_output = errors - - verbose_failures = true - - keep_going \ <nl> + - - run_under = / / tensorflow / tools / ci_build / gpu_build : parallel_gpu_execute \ <nl> + - - $ { DEFAULT_BAZEL_TARGETS } - / / tensorflow / lite / . . . <nl> new file mode 100644 <nl> index 0000000000000 . . 28b633c390e11 <nl> mmm / dev / null <nl> ppp b / tensorflow / tools / ci_build / release / ubuntu_16 / gpu_py38_full / pip . sh <nl> <nl> + # ! / bin / bash <nl> + # Copyright 2019 The TensorFlow Authors . All Rights Reserved . <nl> + # <nl> + # Licensed under the Apache License , Version 2 . 0 ( the " License " ) ; <nl> + # you may not use this file except in compliance with the License . <nl> + # You may obtain a copy of the License at <nl> + # <nl> + # http : / / www . apache . org / licenses / LICENSE - 2 . 0 <nl> + # <nl> + # Unless required by applicable law or agreed to in writing , software <nl> + # distributed under the License is distributed on an " AS IS " BASIS , <nl> + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . <nl> + # See the License for the specific language governing permissions and <nl> + # limitations under the License . <nl> + # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> + set - e <nl> + set - x <nl> + <nl> + source tensorflow / tools / ci_build / release / common . sh <nl> + <nl> + install_ubuntu_16_pip_deps pip3 . 8 <nl> + # Update bazel <nl> + update_bazel_linux <nl> + <nl> + # Export required variables for running pip . sh <nl> + export OS_TYPE = " UBUNTU " <nl> + export CONTAINER_TYPE = " GPU " <nl> + export TF_PYTHON_VERSION = ' python3 . 8 ' <nl> + <nl> + # Run configure . <nl> + export TF_NEED_GCP = 1 <nl> + export TF_NEED_HDFS = 1 <nl> + export TF_NEED_S3 = 1 <nl> + export TF_NEED_CUDA = 1 <nl> + export TF_CUDA_VERSION = 10 <nl> + export TF_CUDNN_VERSION = 7 <nl> + export TF_NEED_TENSORRT = 1 <nl> + export TENSORRT_INSTALL_PATH = / usr / local / tensorrt <nl> + export CC_OPT_FLAGS = ' - mavx ' <nl> + export PYTHON_BIN_PATH = $ ( which $ { TF_PYTHON_VERSION } ) <nl> + export PROJECT_NAME = " tensorflow_gpu " <nl> + export LD_LIBRARY_PATH = " / usr / local / cuda : / usr / local / cuda / lib64 : / usr / local / cuda / extras / CUPTI / lib64 : $ TENSORRT_INSTALL_PATH / lib " <nl> + export TF_CUDA_COMPUTE_CAPABILITIES = 3 . 5 , 3 . 7 , 5 . 2 , 6 . 0 , 6 . 1 , 7 . 0 <nl> + <nl> + yes " " | " $ PYTHON_BIN_PATH " configure . py <nl> + <nl> + # Get the default test targets for bazel . <nl> + source tensorflow / tools / ci_build / build_scripts / PRESUBMIT_BUILD_TARGETS . sh <nl> + <nl> + # Export optional variables for running pip . sh <nl> + export TF_TEST_FILTER_TAGS = ' gpu , requires - gpu , - no_gpu , - no_oss , - oss_serial , - no_oss_py38 ' <nl> + export TF_BUILD_FLAGS = " - - config = opt - - config = v2 - - config = cuda - - distinct_host_configuration = false \ <nl> + - - action_env = TF_CUDA_VERSION - - action_env = TF_CUDNN_VERSION - - crosstool_top = / / third_party / toolchains / preconfig / ubuntu16 . 04 / gcc7_manylinux2010 - nvcc - cuda10 . 1 : toolchain " <nl> + export TF_TEST_FLAGS = " - - test_tag_filters = $ { TF_TEST_FILTER_TAGS } - - build_tag_filters = $ { TF_TEST_FILTER_TAGS } \ <nl> + - - distinct_host_configuration = false \ <nl> + - - action_env = TF_CUDA_VERSION - - action_env = TF_CUDNN_VERSION - - test_env = TF2_BEHAVIOR = 1 \ <nl> + - - config = cuda - - test_output = errors - - local_test_jobs = 4 - - test_lang_filters = py \ <nl> + - - verbose_failures = true - - keep_going - - define = no_tensorflow_py_deps = true \ <nl> + - - run_under = / / tensorflow / tools / ci_build / gpu_build : parallel_gpu_execute " <nl> + export TF_TEST_TARGETS = " $ { DEFAULT_BAZEL_TARGETS } - / / tensorflow / lite / . . . " <nl> + export TF_PIP_TESTS = " test_pip_virtualenv_non_clean test_pip_virtualenv_clean " <nl> + export IS_NIGHTLY = 0 # Not nightly <nl> + export TF_PROJECT_NAME = $ { PROJECT_NAME } <nl> + export TF_PIP_TEST_ROOT = " pip_test " <nl> + <nl> + # To build both tensorflow and tensorflow - gpu pip packages <nl> + export TF_BUILD_BOTH_GPU_PACKAGES = 1 <nl> + <nl> + . / tensorflow / tools / ci_build / builds / pip_new . sh <nl>
Add Ubuntu 16 gpu py38 nightly and release builds .
tensorflow/tensorflow
4e3e368ae6d61d70ac980532ad30314c7d49a7cd
2020-02-22T00:18:51Z
mmm a / include / swift / SILOptimizer / Analysis / AliasAnalysis . h <nl> ppp b / include / swift / SILOptimizer / Analysis / AliasAnalysis . h <nl> class SILValue ; <nl> class SILInstruction ; <nl> class ValueBase ; <nl> class SideEffectAnalysis ; <nl> + class EscapeAnalysis ; <nl> <nl> / / / This class is a simple wrapper around an alias analysis cache . This is <nl> / / / needed since we do not have an " analysis " infrastructure . <nl> class AliasAnalysis : public SILAnalysis { <nl> private : <nl> SILModule * Mod ; <nl> SideEffectAnalysis * SEA ; <nl> + EscapeAnalysis * EA ; <nl> <nl> using TBAACacheKey = std : : pair < SILType , SILType > ; <nl> <nl> class AliasAnalysis : public SILAnalysis { <nl> <nl> public : <nl> AliasAnalysis ( SILModule * M ) : <nl> - SILAnalysis ( AnalysisKind : : Alias ) , Mod ( M ) , SEA ( nullptr ) { } <nl> + SILAnalysis ( AnalysisKind : : Alias ) , Mod ( M ) , SEA ( nullptr ) , EA ( nullptr ) { } <nl> <nl> static bool classof ( const SILAnalysis * S ) { <nl> return S - > getKind ( ) = = AnalysisKind : : Alias ; <nl> mmm a / lib / SILOptimizer / Analysis / AliasAnalysis . cpp <nl> ppp b / lib / SILOptimizer / Analysis / AliasAnalysis . cpp <nl> <nl> # include " swift / SILOptimizer / Analysis / AliasAnalysis . h " <nl> # include " swift / SILOptimizer / Analysis / ValueTracking . h " <nl> # include " swift / SILOptimizer / Analysis / SideEffectAnalysis . h " <nl> + # include " swift / SILOptimizer / Analysis / EscapeAnalysis . h " <nl> # include " swift / SILOptimizer / Utils / Local . h " <nl> # include " swift / SILOptimizer / PassManager / PassManager . h " <nl> # include " swift / SIL / Projection . h " <nl> static bool isIdentifiedFunctionLocal ( SILValue V ) { <nl> return isa < AllocationInst > ( * V ) | | isNoAliasArgument ( V ) | | isLocalLiteral ( V ) ; <nl> } <nl> <nl> - / / / Returns true if V is a function argument that is not an address implying <nl> - / / / that we do not have the guarantee that it will not alias anything inside the <nl> - / / / function . <nl> - static bool isAliasingFunctionArgument ( SILValue V ) { <nl> - return isFunctionArgument ( V ) & & ! V . getType ( ) . isAddress ( ) ; <nl> - } <nl> - <nl> - / / / Returns true if V is an apply inst that may read or write to memory . <nl> - static bool isReadWriteApplyInst ( SILValue V ) { <nl> - / / See if this is a normal function application . <nl> - if ( auto * AI = dyn_cast < ApplyInst > ( V ) ) { <nl> - return AI - > mayReadOrWriteMemory ( ) ; <nl> - } <nl> - <nl> - / / Next , see if this is a builtin . <nl> - if ( auto * BI = dyn_cast < BuiltinInst > ( V ) ) { <nl> - return BI - > mayReadOrWriteMemory ( ) ; <nl> - } <nl> - <nl> - / / If we fail , bail . . . <nl> - return false ; <nl> - } <nl> - <nl> - / / / Return true if the pointer is one which would have been considered an escape <nl> - / / / by isNonEscapingLocalObject . <nl> - static bool isEscapeSource ( SILValue V ) { <nl> - if ( isReadWriteApplyInst ( V ) ) <nl> - return true ; <nl> - <nl> - if ( isAliasingFunctionArgument ( V ) ) <nl> - return true ; <nl> - <nl> - / / The LoadInst case works since valueMayBeCaptured always assumes stores are <nl> - / / escapes . <nl> - if ( isa < LoadInst > ( * V ) ) <nl> - return true ; <nl> - <nl> - / / We could not prove anything , be conservative and return false . <nl> - return false ; <nl> - } <nl> - <nl> / / / Returns true if we can prove that the two input SILValues which do not equal <nl> / / / can not alias . <nl> static bool aliasUnequalObjects ( SILValue O1 , SILValue O2 ) { <nl> static bool aliasUnequalObjects ( SILValue O1 , SILValue O2 ) { <nl> return true ; <nl> } <nl> <nl> - / / If one pointer is the result of an apply or load and the other is a <nl> - / / non - escaping local object within the same function , then we know the object <nl> - / / couldn ' t escape to a point where the call could return it . <nl> - if ( ( isEscapeSource ( O1 ) & & isNonEscapingLocalObject ( O2 ) ) | | <nl> - ( isEscapeSource ( O2 ) & & isNonEscapingLocalObject ( O1 ) ) ) { <nl> - DEBUG ( llvm : : dbgs ( ) < < " Found unequal escape source and non " <nl> - " escaping local object ! \ n " ) ; <nl> - return true ; <nl> - } <nl> - <nl> / / We failed to prove that the two objects are different . <nl> return false ; <nl> } <nl> AliasResult AliasAnalysis : : aliasInner ( SILValue V1 , SILValue V2 , <nl> if ( O1 ! = O2 & & aliasUnequalObjects ( O1 , O2 ) ) <nl> return AliasResult : : NoAlias ; <nl> <nl> + / / Ask escape analysis . This catches cases where we compare e . g . a <nl> + / / non - escaping pointer with another pointer . <nl> + if ( ! EA - > canPointToSameMemory ( V1 , V2 ) ) { <nl> + DEBUG ( llvm : : dbgs ( ) < < " Found not - aliased objects based on " <nl> + " escape analysis \ n " ) ; <nl> + return AliasResult : : NoAlias ; <nl> + } <nl> + <nl> / / Ok , either O1 , O2 are the same or we could not prove anything based off of <nl> / / their inequality . Now we climb up use - def chains and attempt to do tricks <nl> / / based off of GEPs . <nl> bool swift : : isLetPointer ( SILValue V ) { <nl> <nl> void AliasAnalysis : : initialize ( SILPassManager * PM ) { <nl> SEA = PM - > getAnalysis < SideEffectAnalysis > ( ) ; <nl> + EA = PM - > getAnalysis < EscapeAnalysis > ( ) ; <nl> } <nl> <nl> SILAnalysis * swift : : createAliasAnalysis ( SILModule * M ) { <nl> mmm a / test / SILOptimizer / basic - aa . sil <nl> ppp b / test / SILOptimizer / basic - aa . sil <nl> sil @ use_native_object : $ @ convention ( thin ) ( Builtin . NativeObject ) - > ( ) <nl> / / CHECK : ( 0 ) : % 0 = argument of bb0 : $ * Builtin . NativeObject <nl> / / CHECK : ( 0 ) : % 8 = load % 3 # 1 : $ * Builtin . NativeObject <nl> / / CHECK : NoAlias <nl> - / / CHECK : PAIR # 11 . <nl> - / / CHECK : ( 0 ) : % 0 = argument of bb0 : $ * Builtin . NativeObject <nl> - / / CHECK : ( 0 ) : % 9 = apply % 7 ( % 8 ) : $ @ convention ( thin ) ( Builtin . NativeObject ) - > ( ) <nl> - / / CHECK : NoAlias <nl> <nl> / / Test % 1 ( the aliasing argument ) <nl> <nl> sil @ use_native_object : $ @ convention ( thin ) ( Builtin . NativeObject ) - > ( ) <nl> / / CHECK - NEXT : ( 0 ) : % 3 = alloc_stack $ Builtin . NativeObject <nl> / / CHECK - NEXT : ( 0 ) : % 8 = load % 3 # 1 : $ * Builtin . NativeObject <nl> / / CHECK - NEXT : NoAlias <nl> - / / CHECK : PAIR # 53 . <nl> - / / CHECK - NEXT : ( 0 ) : % 3 = alloc_stack $ Builtin . NativeObject <nl> - / / CHECK - NEXT : ( 0 ) : % 9 = apply % 7 ( % 8 ) : $ @ convention ( thin ) ( Builtin . NativeObject ) - > ( ) <nl> - / / CHECK - NEXT : NoAlias <nl> / / CHECK : PAIR # 57 . <nl> / / CHECK - NEXT : ( 1 ) : % 3 = alloc_stack $ Builtin . NativeObject <nl> / / CHECK - NEXT : ( 0 ) : % 5 = apply % 4 ( ) : $ @ convention ( thin ) ( ) - > Builtin . NativeObject <nl> sil @ use_native_object : $ @ convention ( thin ) ( Builtin . NativeObject ) - > ( ) <nl> / / CHECK - NEXT : ( 1 ) : % 3 = alloc_stack $ Builtin . NativeObject <nl> / / CHECK - NEXT : ( 0 ) : % 8 = load % 3 # 1 : $ * Builtin . NativeObject <nl> / / CHECK - NEXT : NoAlias <nl> - / / CHECK : PAIR # 61 . <nl> - / / CHECK - NEXT : ( 1 ) : % 3 = alloc_stack $ Builtin . NativeObject <nl> - / / CHECK - NEXT : ( 0 ) : % 9 = apply % 7 ( % 8 ) : $ @ convention ( thin ) ( Builtin . NativeObject ) - > ( ) <nl> - / / CHECK - NEXT : NoAlias <nl> <nl> / / Test % 5 ( the read write apply inst ) . <nl> <nl> sil @ use_native_object : $ @ convention ( thin ) ( Builtin . NativeObject ) - > ( ) <nl> / / CHECK - NEXT : ( 0 ) : % 8 = load % 3 # 1 : $ * Builtin . NativeObject <nl> / / CHECK - NEXT : ( 0 ) : % 9 = apply % 7 ( % 8 ) : $ @ convention ( thin ) ( Builtin . NativeObject ) - > ( ) <nl> / / CHECK - NEXT : MayAlias <nl> - sil @ escapesource_functionlocal_test_escapesource_nonescapinglocal : $ @ convention ( thin ) ( @ inout Builtin . NativeObject , Builtin . NativeObject ) - > ( ) { <nl> + sil @ escapesource_functionlocal_test_escapesource_nonescapinglocal : $ @ convention ( thin ) ( @ in Builtin . NativeObject , Builtin . NativeObject ) - > ( ) { <nl> bb0 ( % 0 : $ * Builtin . NativeObject , % 1 : $ Builtin . NativeObject ) : <nl> % 2 = alloc_stack $ Builtin . NativeObject <nl> % 3 = alloc_stack $ Builtin . NativeObject <nl> bb0 ( % 0 : $ C , % 1 : $ C , % 2 : $ Int ) : <nl> return % 2 : $ Int <nl> } <nl> <nl> + / / CHECK - LABEL : @ non_escaping_local_object_does_not_alias_with_unknown <nl> + / / CHECK : PAIR # 7 . <nl> + / / CHECK - NEXT : ( 0 ) : % 1 = alloc_ref $ X / / user : % 3 <nl> + / / CHECK - NEXT : ( 0 ) : % 3 = apply % 2 ( % 1 ) : $ @ convention ( thin ) ( X ) - > X <nl> + / / CHECK - NEXT : NoAlias <nl> + sil @ non_escaping_local_object_does_not_alias_with_unknown : $ @ convention ( thin ) ( X ) - > ( ) { <nl> + bb0 ( % 0 : $ X ) : <nl> + % 1 = alloc_ref $ X <nl> + <nl> + % f = function_ref @ not_escaping : $ @ convention ( thin ) ( X ) - > X <nl> + % 2 = apply % f ( % 1 ) : $ @ convention ( thin ) ( X ) - > X <nl> + <nl> + % 12 = tuple ( ) <nl> + return % 12 : $ ( ) <nl> + } <nl> + <nl> + sil @ not_escaping : $ @ convention ( thin ) ( X ) - > X { <nl> + bb0 ( % 0 : $ X ) : <nl> + % 1 = alloc_ref $ X <nl> + return % 1 : $ X <nl> + } <nl> + <nl>
AliasAnalysis : use escape analysis for some checks .
apple/swift
09c61c61bf3c57b053145e7fdbe43f994ab9e972
2015-12-18T16:02:18Z
mmm a / src / video_core / renderer_opengl / gl_shader_gen . cpp <nl> ppp b / src / video_core / renderer_opengl / gl_shader_gen . cpp <nl> void main ( ) { <nl> / / Viewport can be flipped , which is unsupported by glViewport <nl> position . xy * = viewport_flip . xy ; <nl> gl_Position = position ; <nl> + <nl> + / / TODO ( bunnei ) : This is likely a hack , position . w should be interpolated as 1 . 0 <nl> + / / For now , this is here to bring order in lieu of proper emulation <nl> + position . w = 1 . 0 ; <nl> } <nl> ) " ; <nl> out + = program . first ; <nl>
gl_shader_gen : Set position . w to 1 .
yuzu-emu/yuzu
55c49d5bf49182ad906432f1266a781e4526d772
2018-06-16T00:47:04Z
mmm a / tools / ColorTool / ColorTool / Program . cs <nl> ppp b / tools / ColorTool / ColorTool / Program . cs <nl> static void PrintSchemes ( ) <nl> <nl> private static Color UIntToColor ( uint color ) <nl> { <nl> - byte a = ( byte ) ( color > > 24 ) ; <nl> - byte r = ( byte ) ( color > > 16 ) ; <nl> + byte r = ( byte ) ( color > > 0 ) ; <nl> byte g = ( byte ) ( color > > 8 ) ; <nl> - byte b = ( byte ) ( color > > 0 ) ; <nl> - return Color . FromArgb ( a , r , g , b ) ; <nl> + byte b = ( byte ) ( color > > 16 ) ; <nl> + return Color . FromArgb ( r , g , b ) ; <nl> } <nl> <nl> static bool SetProperties ( ColorScheme colorScheme ) <nl>
Fix UIntTocolor
microsoft/terminal
8dacee626aa027b6aa2cd4d5cc14dc894641f83e
2018-08-19T05:14:29Z
mmm a / tensorflow / contrib / learn / python / learn / io / graph_io . py <nl> ppp b / tensorflow / contrib / learn / python / learn / io / graph_io . py <nl> def read_batch_features ( file_pattern , batch_size , features , reader , <nl> num_epochs = num_epochs , queue_capacity = queue_capacity , <nl> num_threads = reader_num_threads , name = scope ) <nl> <nl> - # Parse features into tensors in many threads and put on the queue . <nl> - features_list = [ ] <nl> - for _ in range ( parser_num_threads ) : <nl> - features_list . append ( parsing_ops . parse_example ( examples , features ) ) <nl> - return input_ops . batch_join ( <nl> - features_list , <nl> - batch_size = batch_size , <nl> - capacity = queue_capacity , <nl> - enqueue_many = True , <nl> - name = ' parse_example_batch_join ' ) <nl> + if parser_num_threads = = 1 : <nl> + # Avoid queue overhead for single thread <nl> + return parsing_ops . parse_example ( examples , features ) <nl> + else : <nl> + # Parse features into tensors in many threads and put on the queue . <nl> + features_list = [ ] <nl> + for _ in range ( parser_num_threads ) : <nl> + features_list . append ( parsing_ops . parse_example ( examples , features ) ) <nl> + return input_ops . batch_join ( <nl> + features_list , <nl> + batch_size = batch_size , <nl> + capacity = queue_capacity , <nl> + enqueue_many = True , <nl> + name = ' parse_example_batch_join ' ) <nl> <nl> <nl> def read_batch_record_features ( file_pattern , batch_size , features , <nl>
Speed up read_batch_features by skipping the parsing queue when there is a single parsing thread .
tensorflow/tensorflow
8a0d7a7e71ef1318cf897fab6a2481c5a776e4c3
2016-06-02T23:48:24Z
mmm a / include / swift / Frontend / Frontend . h <nl> ppp b / include / swift / Frontend / Frontend . h <nl> <nl> # include " swift / Sema / SourceLoader . h " <nl> # include " swift / Serialization / Validation . h " <nl> # include " swift / Subsystems . h " <nl> + # include " swift / TBDGen / TBDGen . h " <nl> # include " llvm / ADT / IntrusiveRefCntPtr . h " <nl> # include " llvm / ADT / SetVector . h " <nl> # include " llvm / Option / ArgList . h " <nl> class CompilerInvocation { <nl> MigratorOptions MigratorOpts ; <nl> SILOptions SILOpts ; <nl> IRGenOptions IRGenOpts ; <nl> + TBDGenOptions TBDGenOpts ; <nl> / / / The \ c SyntaxParsingCache to use when parsing the main file of this <nl> / / / invocation <nl> SyntaxParsingCache * MainFileSyntaxParsingCache = nullptr ; <nl> class CompilerInvocation { <nl> FrontendOptions & getFrontendOptions ( ) { return FrontendOpts ; } <nl> const FrontendOptions & getFrontendOptions ( ) const { return FrontendOpts ; } <nl> <nl> + TBDGenOptions & getTBDGenOptions ( ) { return TBDGenOpts ; } <nl> + const TBDGenOptions & getTBDGenOptions ( ) const { return TBDGenOpts ; } <nl> + <nl> ClangImporterOptions & getClangImporterOptions ( ) { return ClangImporterOpts ; } <nl> const ClangImporterOptions & getClangImporterOptions ( ) const { <nl> return ClangImporterOpts ; <nl> mmm a / include / swift / Frontend / FrontendOptions . h <nl> ppp b / include / swift / Frontend / FrontendOptions . h <nl> class FrontendOptions { <nl> / / / Compare the symbols in the IR against the TBD file we would generate . <nl> TBDValidationMode ValidateTBDAgainstIR = TBDValidationMode : : Default ; <nl> <nl> - / / / The install_name to use in the TBD file . <nl> - std : : string TBDInstallName ; <nl> - <nl> - / / The current project version to use in the generated TBD file . Defaults <nl> - / / to 1 , which matches the default if the DYLIB_CURRENT_VERSION build setting <nl> - / / is not set . <nl> - version : : Version TBDCurrentVersion = { 1 , 0 , 0 } ; <nl> - <nl> - / / The dylib compatibility - version to use in the generated TBD file . Defaults <nl> - / / to 1 , which matches the default if the DYLIB_COMPATIBILITY_VERSION build <nl> - / / setting is not set . <nl> - version : : Version TBDCompatibilityVersion = { 1 , 0 , 0 } ; <nl> - <nl> / / / An enum with different modes for automatically crashing at defined times . <nl> enum class DebugCrashMode { <nl> None , / / / < Don ' t automatically crash . <nl> mmm a / include / swift / TBDGen / TBDGen . h <nl> ppp b / include / swift / TBDGen / TBDGen . h <nl> namespace swift { <nl> class FileUnit ; <nl> class ModuleDecl ; <nl> <nl> - / / / \ brief The current ABI version of Swift , as tapi labels it . <nl> + / / / The current ABI version of Swift , as tapi labels it . <nl> const uint8_t TAPI_SWIFT_ABI_VERSION = 5 ; <nl> <nl> - / / / \ brief Options for controlling the exact set of symbols included in the TBD <nl> + / / / Options for controlling the exact set of symbols included in the TBD <nl> / / / output . <nl> struct TBDGenOptions { <nl> - / / / \ brief Whether this compilation has multiple IRGen instances . <nl> + / / / Whether this compilation has multiple IRGen instances . <nl> bool HasMultipleIGMs ; <nl> - / / / \ brief The install - name used for the compilation . <nl> - llvm : : StringRef InstallName ; <nl> - / / / \ brief The module link name ( for force loading ) . <nl> - llvm : : StringRef ModuleLinkName ; <nl> - / / / \ brief The current project version . <nl> - version : : Version CurrentVersion ; <nl> - / / / \ brief The dylib compatibility version . <nl> - version : : Version CompatibilityVersion ; <nl> + <nl> + / / / The install_name to use in the TBD file . <nl> + std : : string InstallName ; <nl> + <nl> + / / / The module link name ( for force loading ) . <nl> + std : : string ModuleLinkName ; <nl> + <nl> + / / / The current project version to use in the generated TBD file . Defaults <nl> + / / / to 1 , which matches the default if the DYLIB_CURRENT_VERSION build setting <nl> + / / / is not set . <nl> + version : : Version CurrentVersion = { 1 , 0 , 0 } ; <nl> + <nl> + / / / The dylib compatibility - version to use in the generated TBD file . Defaults <nl> + / / / to 1 , which matches the default if the DYLIB_COMPATIBILITY_VERSION build <nl> + / / / setting is not set . <nl> + version : : Version CompatibilityVersion = { 1 , 0 , 0 } ; <nl> } ; <nl> <nl> void enumeratePublicSymbols ( FileUnit * module , llvm : : StringSet < > & symbols , <nl> - TBDGenOptions & opts ) ; <nl> + const TBDGenOptions & opts ) ; <nl> void enumeratePublicSymbols ( ModuleDecl * module , llvm : : StringSet < > & symbols , <nl> - TBDGenOptions & opts ) ; <nl> + const TBDGenOptions & opts ) ; <nl> <nl> - void writeTBDFile ( ModuleDecl * M , llvm : : raw_ostream & os , TBDGenOptions & opts ) ; <nl> + void writeTBDFile ( ModuleDecl * M , llvm : : raw_ostream & os , <nl> + const TBDGenOptions & opts ) ; <nl> <nl> } / / end namespace swift <nl> <nl> mmm a / lib / Frontend / ArgsToFrontendOptionsConverter . cpp <nl> ppp b / lib / Frontend / ArgsToFrontendOptionsConverter . cpp <nl> void ArgsToFrontendOptionsConverter : : computeTBDOptions ( ) { <nl> A - > getOption ( ) . getPrefixedName ( ) , value ) ; <nl> } <nl> } <nl> - if ( const Arg * A = Args . getLastArg ( OPT_tbd_install_name ) ) { <nl> - Opts . TBDInstallName = A - > getValue ( ) ; <nl> - } <nl> - if ( const Arg * A = Args . getLastArg ( OPT_tbd_compatibility_version ) ) { <nl> - if ( auto vers = version : : Version : : parseVersionString ( <nl> - A - > getValue ( ) , SourceLoc ( ) , & Diags ) ) { <nl> - Opts . TBDCompatibilityVersion = * vers ; <nl> - } <nl> - } <nl> - if ( const Arg * A = Args . getLastArg ( OPT_tbd_current_version ) ) { <nl> - if ( auto vers = version : : Version : : parseVersionString ( <nl> - A - > getValue ( ) , SourceLoc ( ) , & Diags ) ) { <nl> - Opts . TBDCurrentVersion = * vers ; <nl> - } <nl> - } <nl> } <nl> <nl> void ArgsToFrontendOptionsConverter : : setUnsignedIntegerArgument ( <nl> mmm a / lib / Frontend / CompilerInvocation . cpp <nl> ppp b / lib / Frontend / CompilerInvocation . cpp <nl> void CompilerInvocation : : buildDebugFlags ( std : : string & Output , <nl> } <nl> } <nl> <nl> + static bool ParseTBDGenArgs ( TBDGenOptions & Opts , ArgList & Args , <nl> + DiagnosticEngine & Diags , <nl> + CompilerInvocation & Invocation ) { <nl> + using namespace options ; <nl> + <nl> + Opts . HasMultipleIGMs = Invocation . getSILOptions ( ) . hasMultipleIGMs ( ) ; <nl> + <nl> + if ( const Arg * A = Args . getLastArg ( OPT_module_link_name ) ) { <nl> + Opts . ModuleLinkName = A - > getValue ( ) ; <nl> + } <nl> + <nl> + if ( const Arg * A = Args . getLastArg ( OPT_tbd_install_name ) ) { <nl> + Opts . InstallName = A - > getValue ( ) ; <nl> + } <nl> + <nl> + if ( const Arg * A = Args . getLastArg ( OPT_tbd_compatibility_version ) ) { <nl> + if ( auto vers = version : : Version : : parseVersionString ( <nl> + A - > getValue ( ) , SourceLoc ( ) , & Diags ) ) { <nl> + Opts . CompatibilityVersion = * vers ; <nl> + } <nl> + } <nl> + if ( const Arg * A = Args . getLastArg ( OPT_tbd_current_version ) ) { <nl> + if ( auto vers = version : : Version : : parseVersionString ( <nl> + A - > getValue ( ) , SourceLoc ( ) , & Diags ) ) { <nl> + Opts . CurrentVersion = * vers ; <nl> + } <nl> + } <nl> + return false ; <nl> + } <nl> + <nl> static bool ParseIRGenArgs ( IRGenOptions & Opts , ArgList & Args , <nl> DiagnosticEngine & Diags , <nl> const FrontendOptions & FrontendOpts , <nl> bool CompilerInvocation : : parseArgs ( <nl> return true ; <nl> } <nl> <nl> + if ( ParseTBDGenArgs ( TBDGenOpts , ParsedArgs , Diags , * this ) ) { <nl> + return true ; <nl> + } <nl> + <nl> if ( ParseDiagnosticArgs ( DiagnosticOpts , ParsedArgs , Diags ) ) { <nl> return true ; <nl> } <nl> mmm a / lib / FrontendTool / FrontendTool . cpp <nl> ppp b / lib / FrontendTool / FrontendTool . cpp <nl> static void emitReferenceDependenciesForAllPrimaryInputsIfNeeded ( <nl> static bool writeTBDIfNeeded ( CompilerInvocation & Invocation , <nl> CompilerInstance & Instance ) { <nl> const auto & frontendOpts = Invocation . getFrontendOptions ( ) ; <nl> + const auto & tbdOpts = Invocation . getTBDGenOptions ( ) ; <nl> if ( ! frontendOpts . InputsAndOutputs . hasTBDPath ( ) ) <nl> return false ; <nl> <nl> static bool writeTBDIfNeeded ( CompilerInvocation & Invocation , <nl> <nl> const std : : string & TBDPath = Invocation . getTBDPathForWholeModule ( ) ; <nl> <nl> - auto installName = frontendOpts . TBDInstallName . empty ( ) <nl> - ? " lib " + Invocation . getModuleName ( ) . str ( ) + " . dylib " <nl> - : frontendOpts . TBDInstallName ; <nl> - <nl> - TBDGenOptions opts ; <nl> - opts . InstallName = installName ; <nl> - opts . HasMultipleIGMs = Invocation . getSILOptions ( ) . hasMultipleIGMs ( ) ; <nl> - opts . ModuleLinkName = frontendOpts . ModuleLinkName ; <nl> - opts . CurrentVersion = frontendOpts . TBDCurrentVersion ; <nl> - opts . CompatibilityVersion = frontendOpts . TBDCompatibilityVersion ; <nl> - <nl> - return writeTBD ( Instance . getMainModule ( ) , TBDPath , opts ) ; <nl> + return writeTBD ( Instance . getMainModule ( ) , TBDPath , tbdOpts ) ; <nl> } <nl> <nl> static std : : deque < PostSILGenInputs > <nl> static bool validateTBDIfNeeded ( CompilerInvocation & Invocation , <nl> case FrontendOptions : : TBDValidationMode : : MissingFromTBD : <nl> break ; <nl> } <nl> - TBDGenOptions opts ; <nl> - opts . HasMultipleIGMs = Invocation . getSILOptions ( ) . hasMultipleIGMs ( ) ; <nl> - opts . ModuleLinkName = frontendOpts . ModuleLinkName ; <nl> <nl> const bool allSymbols = mode = = FrontendOptions : : TBDValidationMode : : All ; <nl> return MSF . is < SourceFile * > ( ) <nl> - ? validateTBD ( MSF . get < SourceFile * > ( ) , IRModule , opts , allSymbols ) <nl> - : validateTBD ( MSF . get < ModuleDecl * > ( ) , IRModule , opts , allSymbols ) ; <nl> + ? validateTBD ( MSF . get < SourceFile * > ( ) , IRModule , <nl> + Invocation . getTBDGenOptions ( ) , allSymbols ) <nl> + : validateTBD ( MSF . get < ModuleDecl * > ( ) , IRModule , <nl> + Invocation . getTBDGenOptions ( ) , allSymbols ) ; <nl> } <nl> <nl> static bool generateCode ( CompilerInvocation & Invocation , <nl> mmm a / lib / FrontendTool / TBD . cpp <nl> ppp b / lib / FrontendTool / TBD . cpp <nl> static std : : vector < StringRef > sortSymbols ( llvm : : StringSet < > & symbols ) { <nl> } <nl> <nl> bool swift : : writeTBD ( ModuleDecl * M , StringRef OutputFilename , <nl> - TBDGenOptions & Opts ) { <nl> + const TBDGenOptions & Opts ) { <nl> std : : error_code EC ; <nl> llvm : : raw_fd_ostream OS ( OutputFilename , EC , llvm : : sys : : fs : : F_None ) ; <nl> if ( EC ) { <nl> static bool validateSymbolSet ( DiagnosticEngine & diags , <nl> } <nl> <nl> bool swift : : validateTBD ( ModuleDecl * M , llvm : : Module & IRModule , <nl> - TBDGenOptions & opts , bool diagnoseExtraSymbolsInTBD ) { <nl> + const TBDGenOptions & opts , <nl> + bool diagnoseExtraSymbolsInTBD ) { <nl> llvm : : StringSet < > symbols ; <nl> enumeratePublicSymbols ( M , symbols , opts ) ; <nl> <nl> bool swift : : validateTBD ( ModuleDecl * M , llvm : : Module & IRModule , <nl> } <nl> <nl> bool swift : : validateTBD ( FileUnit * file , llvm : : Module & IRModule , <nl> - TBDGenOptions & opts , bool diagnoseExtraSymbolsInTBD ) { <nl> + const TBDGenOptions & opts , <nl> + bool diagnoseExtraSymbolsInTBD ) { <nl> llvm : : StringSet < > symbols ; <nl> enumeratePublicSymbols ( file , symbols , opts ) ; <nl> <nl> return validateSymbolSet ( file - > getParentModule ( ) - > getASTContext ( ) . Diags , <nl> - symbols , IRModule , diagnoseExtraSymbolsInTBD ) ; <nl> + symbols , IRModule , <nl> + diagnoseExtraSymbolsInTBD ) ; <nl> } <nl> mmm a / lib / FrontendTool / TBD . h <nl> ppp b / lib / FrontendTool / TBD . h <nl> class FileUnit ; <nl> class FrontendOptions ; <nl> struct TBDGenOptions ; <nl> <nl> - bool writeTBD ( ModuleDecl * M , StringRef OutputFilename , TBDGenOptions & Opts ) ; <nl> + bool writeTBD ( ModuleDecl * M , StringRef OutputFilename , <nl> + const TBDGenOptions & Opts ) ; <nl> bool inputFileKindCanHaveTBDValidated ( InputFileKind kind ) ; <nl> - bool validateTBD ( ModuleDecl * M , llvm : : Module & IRModule , TBDGenOptions & opts , <nl> + bool validateTBD ( ModuleDecl * M , llvm : : Module & IRModule , <nl> + const TBDGenOptions & opts , <nl> bool diagnoseExtraSymbolsInTBD ) ; <nl> - bool validateTBD ( FileUnit * M , llvm : : Module & IRModule , TBDGenOptions & opts , <nl> + bool validateTBD ( FileUnit * M , llvm : : Module & IRModule , <nl> + const TBDGenOptions & opts , <nl> bool diagnoseExtraSymbolsInTBD ) ; <nl> } <nl> <nl> mmm a / lib / TBDGen / TBDGen . cpp <nl> ppp b / lib / TBDGen / TBDGen . cpp <nl> void TBDGenVisitor : : addFirstFileSymbols ( ) { <nl> / / / Converts a version tuple into a packed version , ignoring components beyond <nl> / / / major , minor , and subminor . <nl> static tapi : : internal : : PackedVersion <nl> - convertToPacked ( version : : Version & version ) { <nl> + convertToPacked ( const version : : Version & version ) { <nl> / / FIXME : Warn if version is greater than 3 components ? <nl> unsigned major = 0 , minor = 0 , subminor = 0 ; <nl> if ( version . size ( ) > 0 ) major = version [ 0 ] ; <nl> convertToPacked ( version : : Version & version ) { <nl> static void enumeratePublicSymbolsAndWrite ( ModuleDecl * M , FileUnit * singleFile , <nl> StringSet * symbols , <nl> llvm : : raw_ostream * os , <nl> - TBDGenOptions & opts ) { <nl> + const TBDGenOptions & opts ) { <nl> auto isWholeModule = singleFile = = nullptr ; <nl> const auto & target = M - > getASTContext ( ) . LangOpts . Target ; <nl> UniversalLinkageInfo linkInfo ( target , opts . HasMultipleIGMs , isWholeModule ) ; <nl> static void enumeratePublicSymbolsAndWrite ( ModuleDecl * M , FileUnit * singleFile , <nl> } <nl> <nl> void swift : : enumeratePublicSymbols ( FileUnit * file , StringSet & symbols , <nl> - TBDGenOptions & opts ) { <nl> + const TBDGenOptions & opts ) { <nl> enumeratePublicSymbolsAndWrite ( file - > getParentModule ( ) , file , & symbols , <nl> nullptr , opts ) ; <nl> } <nl> void swift : : enumeratePublicSymbols ( ModuleDecl * M , StringSet & symbols , <nl> - TBDGenOptions & opts ) { <nl> + const TBDGenOptions & opts ) { <nl> enumeratePublicSymbolsAndWrite ( M , nullptr , & symbols , nullptr , opts ) ; <nl> } <nl> void swift : : writeTBDFile ( ModuleDecl * M , llvm : : raw_ostream & os , <nl> - TBDGenOptions & opts ) { <nl> + const TBDGenOptions & opts ) { <nl> enumeratePublicSymbolsAndWrite ( M , nullptr , nullptr , & os , opts ) ; <nl> } <nl> mmm a / lib / TBDGen / TBDGenVisitor . h <nl> ppp b / lib / TBDGen / TBDGenVisitor . h <nl> class TBDGenVisitor : public ASTVisitor < TBDGenVisitor > { <nl> <nl> const UniversalLinkageInfo & UniversalLinkInfo ; <nl> ModuleDecl * SwiftModule ; <nl> - TBDGenOptions & Opts ; <nl> + const TBDGenOptions & Opts ; <nl> <nl> private : <nl> bool FileHasEntryPoint = false ; <nl> class TBDGenVisitor : public ASTVisitor < TBDGenVisitor > { <nl> TBDGenVisitor ( tapi : : internal : : InterfaceFile & symbols , <nl> tapi : : internal : : ArchitectureSet archs , StringSet * stringSymbols , <nl> const UniversalLinkageInfo & universalLinkInfo , <nl> - ModuleDecl * swiftModule , TBDGenOptions & opts ) <nl> + ModuleDecl * swiftModule , const TBDGenOptions & opts ) <nl> : Symbols ( symbols ) , Archs ( archs ) , StringSymbols ( stringSymbols ) , <nl> UniversalLinkInfo ( universalLinkInfo ) , SwiftModule ( swiftModule ) , <nl> Opts ( opts ) { } <nl>
[ TBDGen ] Remove TBD options from FrontendOptions
apple/swift
14a7ae56db24fb16654cb83bc139551bf7c9f969
2018-08-15T21:53:44Z
mmm a / scripts / VcpkgPowershellUtils . ps1 <nl> ppp b / scripts / VcpkgPowershellUtils . ps1 <nl> function vcpkgHasModule ( [ Parameter ( Mandatory = $ true ) ] [ string ] $ moduleName ) <nl> return [ bool ] ( Get - Module - ListAvailable - Name $ moduleName ) <nl> } <nl> <nl> - function vcpkgCreateDirectory ( [ Parameter ( Mandatory = $ true ) ] [ string ] $ dirPath ) <nl> + function vcpkgCreateDirectoryIfNotExists ( [ Parameter ( Mandatory = $ true ) ] [ string ] $ dirPath ) <nl> { <nl> if ( ! ( Test - Path $ dirPath ) ) <nl> { <nl> function vcpkgDownloadFile ( [ Parameter ( Mandatory = $ true ) ] [ string ] $ url , <nl> } <nl> <nl> $ downloadDir = split - path - parent $ downloadPath <nl> - vcpkgCreateDirectory $ downloadDir <nl> + vcpkgCreateDirectoryIfNotExists $ downloadDir <nl> <nl> $ downloadPartPath = " $ downloadPath . part " <nl> vcpkgRemoveFile $ downloadPartPath <nl> function vcpkgExtractFile ( [ Parameter ( Mandatory = $ true ) ] [ string ] $ file , <nl> [ Parameter ( Mandatory = $ true ) ] [ string ] $ destinationDir ) <nl> { <nl> $ parentPath = split - path - parent $ destinationDir <nl> - vcpkgCreateDirectory $ parentPath <nl> + vcpkgCreateDirectoryIfNotExists $ parentPath <nl> $ baseName = ( Get - ChildItem $ file ) . BaseName <nl> $ destinationPartial = " $ destinationDir \ $ baseName - partially_extracted " <nl> <nl> vcpkgRemoveDirectory $ destinationPartial <nl> - vcpkgCreateDirectory $ destinationPartial <nl> + vcpkgCreateDirectoryIfNotExists $ destinationPartial <nl> <nl> if ( vcpkgHasCommand - commandName ' Microsoft . PowerShell . Archive \ Expand - Archive ' ) <nl> { <nl>
vcpkgCreateDirectory - > vcpkgCreateDirectoryIfNotExists
microsoft/vcpkg
8883e40aaadbba91610342fda42d304a4cad0e68
2017-11-26T09:31:58Z
mmm a / Marlin / src / inc / Conditionals_LCD . h <nl> ppp b / Marlin / src / inc / Conditionals_LCD . h <nl> <nl> <nl> / / Einstart OLED has Cardinal nav via pins defined in pins_EINSTART - S . h <nl> # if ENABLED ( U8GLIB_SH1106_EINSTART ) <nl> - # define ULTRA_LCD <nl> # define DOGLCD <nl> # define ULTIPANEL <nl> - # define NEWPANEL <nl> # endif <nl> <nl> / * * <nl> * FSMC / SPI TFT PANELS <nl> * / <nl> # if ENABLED ( MKS_ROBIN_TFT ) <nl> - # define ULTRA_LCD <nl> # define DOGLCD <nl> # define ULTIPANEL <nl> # endif <nl> <nl> # endif <nl> <nl> # if ENABLED ( ULTIPANEL ) <nl> - # define NEWPANEL / / Disable this if you actually have no click - encoder panel <nl> + # define NEWPANEL / / Disable if there ' s actually no click - encoder panel <nl> # define ULTRA_LCD <nl> # endif <nl> <nl> mmm a / Marlin / src / pins / linux / pins_RAMPS_LINUX . h <nl> ppp b / Marlin / src / pins / linux / pins_RAMPS_LINUX . h <nl> <nl> # endif <nl> <nl> # if ENABLED ( CASE_LIGHT_ENABLE ) & & ! defined ( CASE_LIGHT_PIN ) & & ! defined ( SPINDLE_LASER_ENA_PIN ) <nl> - # if NUM_SERVOS < = 1 / / try to use servo connector first <nl> + # if NUM_SERVOS < = 1 / / Prefer the servo connector <nl> # define CASE_LIGHT_PIN 6 / / Hardware PWM <nl> - # elif ! ( BOTH ( ULTRA_LCD , NEWPANEL ) & & ANY ( PANEL_ONE , VIKI2 , miniVIKI , MINIPANEL , REPRAPWORLD_KEYPAD ) ) / / try to use AUX 2 <nl> + # elif HAS_FREE_AUX2_PINS / / try to use AUX 2 <nl> # define CASE_LIGHT_PIN 44 / / Hardware PWM <nl> # endif <nl> # endif <nl> <nl> / / M3 / M4 / M5 - Spindle / Laser Control <nl> / / <nl> # if HAS_CUTTER & & ! PIN_EXISTS ( SPINDLE_LASER_ENA ) <nl> - # if ! defined ( NUM_SERVOS ) | | NUM_SERVOS = = 0 / / try to use servo connector first <nl> + # if ! defined ( NUM_SERVOS ) | | NUM_SERVOS = = 0 / / Prefer the servo connector <nl> # define SPINDLE_LASER_ENA_PIN 4 / / Pullup or pulldown ! <nl> # define SPINDLE_LASER_PWM_PIN 6 / / Hardware PWM <nl> # define SPINDLE_DIR_PIN 5 <nl> - # elif ! ( BOTH ( ULTRA_LCD , NEWPANEL ) & & ANY ( PANEL_ONE , VIKI2 , miniVIKI , MINIPANEL , REPRAPWORLD_KEYPAD ) ) / / try to use AUX 2 <nl> + # elif HAS_FREE_AUX2_PINS / / try to use AUX 2 <nl> # define SPINDLE_LASER_ENA_PIN 40 / / Pullup or pulldown ! <nl> # define SPINDLE_LASER_PWM_PIN 44 / / Hardware PWM <nl> # define SPINDLE_DIR_PIN 65 <nl> mmm a / Marlin / src / pins / pins . h <nl> ppp b / Marlin / src / pins / pins . h <nl> <nl> # define IS_RAMPS_SF <nl> # endif <nl> <nl> + # define HAS_FREE_AUX2_PINS ! ( BOTH ( ULTRA_LCD , NEWPANEL ) & & ANY ( PANEL_ONE , VIKI2 , miniVIKI , MINIPANEL , REPRAPWORLD_KEYPAD ) ) <nl> + <nl> / / <nl> / / RAMPS 1 . 3 / 1 . 4 - ATmega1280 , ATmega2560 <nl> / / <nl> <nl> # endif <nl> # endif <nl> # endif <nl> + <nl> + # undef HAS_FREE_AUX2_PINS <nl> mmm a / Marlin / src / pins / ramps / pins_RAMPS . h <nl> ppp b / Marlin / src / pins / ramps / pins_RAMPS . h <nl> <nl> # define PS_ON_PIN 12 <nl> # endif <nl> <nl> - # define AUX2_PINS_FREE ! ( BOTH ( ULTRA_LCD , NEWPANEL ) & & ANY ( PANEL_ONE , VIKI2 , miniVIKI , MINIPANEL , REPRAPWORLD_KEYPAD ) ) <nl> - <nl> # if ENABLED ( CASE_LIGHT_ENABLE ) & & ! defined ( CASE_LIGHT_PIN ) & & ! defined ( SPINDLE_LASER_ENA_PIN ) <nl> - # if NUM_SERVOS < = 1 / / try to use servo connector first <nl> + # if NUM_SERVOS < = 1 / / Prefer the servo connector <nl> # define CASE_LIGHT_PIN 6 / / Hardware PWM <nl> - # elif AUX2_PINS_FREE <nl> + # elif HAS_FREE_AUX2_PINS <nl> # define CASE_LIGHT_PIN 44 / / Hardware PWM <nl> # endif <nl> # endif <nl> <nl> # define SPINDLE_LASER_ENA_PIN 4 / / Pullup or pulldown ! <nl> # define SPINDLE_LASER_PWM_PIN 6 / / Hardware PWM <nl> # define SPINDLE_DIR_PIN 5 <nl> - # elif AUX2_PINS_FREE <nl> + # elif HAS_FREE_AUX2_PINS <nl> # define SPINDLE_LASER_ENA_PIN 40 / / Pullup or pulldown ! <nl> # define SPINDLE_LASER_PWM_PIN 44 / / Hardware PWM <nl> # define SPINDLE_DIR_PIN 65 <nl> <nl> # endif <nl> # endif <nl> <nl> - # undef AUX2_PINS_FREE <nl> - <nl> / / <nl> / / TMC software SPI <nl> / / <nl> mmm a / Marlin / src / pins / ramps / pins_Z_BOLT_X_SERIES . h <nl> ppp b / Marlin / src / pins / ramps / pins_Z_BOLT_X_SERIES . h <nl> <nl> # define PS_ON_PIN 12 <nl> # endif <nl> <nl> - # define AUX2_PINS_FREE ! ( BOTH ( ULTRA_LCD , NEWPANEL ) & & ANY ( PANEL_ONE , VIKI2 , miniVIKI , MINIPANEL , REPRAPWORLD_KEYPAD ) ) <nl> - <nl> # if ENABLED ( CASE_LIGHT_ENABLE ) & & ! defined ( CASE_LIGHT_PIN ) & & ! defined ( SPINDLE_LASER_ENA_PIN ) <nl> - # if NUM_SERVOS < = 1 / / try to use servo connector first <nl> + # if NUM_SERVOS < = 1 / / Prefer the servo connector <nl> # define CASE_LIGHT_PIN 6 / / Hardware PWM <nl> - # elif AUX2_PINS_FREE <nl> + # elif HAS_FREE_AUX2_PINS <nl> # define CASE_LIGHT_PIN 44 / / Hardware PWM <nl> # endif <nl> # endif <nl> <nl> / / M3 / M4 / M5 - Spindle / Laser Control <nl> / / <nl> # if HAS_CUTTER & & ! PIN_EXISTS ( SPINDLE_LASER_ENA ) <nl> - # if ! defined ( NUM_SERVOS ) | | NUM_SERVOS = = 0 / / try to use servo connector first <nl> + # if ! defined ( NUM_SERVOS ) | | NUM_SERVOS = = 0 / / Prefer the servo connector <nl> # define SPINDLE_LASER_ENA_PIN 4 / / Pullup or pulldown ! <nl> # define SPINDLE_LASER_PWM_PIN 6 / / Hardware PWM <nl> # define SPINDLE_DIR_PIN 5 <nl> - # elif AUX2_PINS_FREE <nl> + # elif HAS_FREE_AUX2_PINS <nl> # define SPINDLE_LASER_ENA_PIN 40 / / Pullup or pulldown ! <nl> # define SPINDLE_LASER_PWM_PIN 44 / / Hardware PWM <nl> # define SPINDLE_DIR_PIN 65 <nl> # endif <nl> # endif <nl> <nl> - # undef AUX2_PINS_FREE <nl> - <nl> / / <nl> / / TMC software SPI <nl> / / <nl>
Clean up some LCD conditions
MarlinFirmware/Marlin
948c3f580b16c53f1f75f480fe7d9c028f94dd23
2019-07-11T11:11:19Z
mmm a / taichi / backends / codegen_llvm . h <nl> ppp b / taichi / backends / codegen_llvm . h <nl> class CodeGenLLVM : public IRVisitor , public ModuleBuilder { <nl> SNodeAttributes & snode_attr ; <nl> int task_counter ; <nl> <nl> + using IRVisitor : : visit ; <nl> using ModuleBuilder : : call ; <nl> <nl> Arch current_arch ( ) { <nl> class CodeGenLLVM : public IRVisitor , public ModuleBuilder { <nl> tlctx = prog - > llvm_context_host . get ( ) ; <nl> } <nl> llvm_context = tlctx - > ctx . get ( ) ; <nl> - builder = new llvm : : IRBuilder < > ( * llvm_context ) ; <nl> + builder = std : : make_unique < llvm : : IRBuilder < > > ( * llvm_context ) ; <nl> } <nl> <nl> llvm : : Function * func ; <nl> class CodeGenLLVM : public IRVisitor , public ModuleBuilder { <nl> void emit_struct_meta_base ( const std : : string & name , <nl> llvm : : Value * node_meta , <nl> SNode * snode ) { <nl> - RuntimeObject common ( " StructMeta " , this , builder , node_meta ) ; <nl> + RuntimeObject common ( " StructMeta " , this , builder . get ( ) , node_meta ) ; <nl> std : : size_t element_size ; <nl> if ( snode - > type = = SNodeType : : dense ) { <nl> auto element_ty = snode_attr [ snode ] . llvm_body_type - > getArrayElementType ( ) ; <nl> class CodeGenLLVM : public IRVisitor , public ModuleBuilder { <nl> std : : unique_ptr < RuntimeObject > emit_struct_meta_object ( SNode * snode ) { <nl> std : : unique_ptr < RuntimeObject > meta ; <nl> if ( snode - > type = = SNodeType : : dense ) { <nl> - meta = std : : make_unique < RuntimeObject > ( " DenseMeta " , this , builder ) ; <nl> + meta = std : : make_unique < RuntimeObject > ( " DenseMeta " , this , builder . get ( ) ) ; <nl> emit_struct_meta_base ( " Dense " , meta - > ptr , snode ) ; <nl> meta - > call ( " set_bitmasked " , tlctx - > get_constant ( snode - > _bitmasked ) ) ; <nl> meta - > call ( " set_morton_dim " , tlctx - > get_constant ( ( int ) snode - > _morton ) ) ; <nl> } else if ( snode - > type = = SNodeType : : pointer ) { <nl> - meta = std : : make_unique < RuntimeObject > ( " pointerMeta " , this , builder ) ; <nl> + meta = std : : make_unique < RuntimeObject > ( " pointerMeta " , this , builder . get ( ) ) ; <nl> emit_struct_meta_base ( " pointer " , meta - > ptr , snode ) ; <nl> } else if ( snode - > type = = SNodeType : : root ) { <nl> - meta = std : : make_unique < RuntimeObject > ( " RootMeta " , this , builder ) ; <nl> + meta = std : : make_unique < RuntimeObject > ( " RootMeta " , this , builder . get ( ) ) ; <nl> emit_struct_meta_base ( " Root " , meta - > ptr , snode ) ; <nl> } else if ( snode - > type = = SNodeType : : dynamic ) { <nl> - meta = std : : make_unique < RuntimeObject > ( " DynamicMeta " , this , builder ) ; <nl> + meta = std : : make_unique < RuntimeObject > ( " DynamicMeta " , this , builder . get ( ) ) ; <nl> emit_struct_meta_base ( " Dynamic " , meta - > ptr , snode ) ; <nl> meta - > call ( " set_chunk_size " , tlctx - > get_constant ( snode - > chunk_size ) ) ; <nl> } else { <nl> class CodeGenLLVM : public IRVisitor , public ModuleBuilder { <nl> } <nl> <nl> void visit ( ArgLoadStmt * stmt ) override { <nl> - auto raw_arg = call ( builder , " Context_get_args " , get_context ( ) , <nl> + auto raw_arg = call ( builder . get ( ) , " Context_get_args " , get_context ( ) , <nl> tlctx - > get_constant ( stmt - > arg_id ) ) ; <nl> <nl> llvm : : Type * dest_ty = nullptr ; <nl> class CodeGenLLVM : public IRVisitor , public ModuleBuilder { <nl> func_arguments . insert ( func_arguments . end ( ) , arguments . begin ( ) , <nl> arguments . end ( ) ) ; <nl> <nl> - return call ( builder , prefix + " _ " + method , func_arguments ) ; <nl> + return call ( builder . get ( ) , prefix + " _ " + method , func_arguments ) ; <nl> } <nl> <nl> void visit ( GetRootStmt * stmt ) override { <nl> class CodeGenLLVM : public IRVisitor , public ModuleBuilder { <nl> <nl> llvm : : Value * threadIdx = nullptr , * blockDim = nullptr ; <nl> <nl> - RuntimeObject element ( " Element " , this , builder , get_arg ( 1 ) ) ; <nl> + RuntimeObject element ( " Element " , this , builder . get ( ) , get_arg ( 1 ) ) ; <nl> auto lower_bound = get_arg ( 2 ) ; <nl> auto upper_bound = get_arg ( 3 ) ; <nl> / / create_print ( " lower " , DataType : : i32 , lower_bound ) ; <nl> class CodeGenLLVM : public IRVisitor , public ModuleBuilder { <nl> auto nonpot_cond = tlctx - > get_constant ( true ) ; <nl> auto snode = stmt - > snode ; <nl> <nl> - auto coord_object = <nl> - RuntimeObject ( " PhysicalCoordinates " , this , builder , new_coordinates ) ; <nl> + auto coord_object = RuntimeObject ( " PhysicalCoordinates " , this , <nl> + builder . get ( ) , new_coordinates ) ; <nl> for ( int i = 0 ; i < snode - > num_active_indices ; i + + ) { <nl> auto j = snode - > physical_index_position [ i ] ; <nl> if ( ! bit : : is_power_of_two ( snode - > extractors [ j ] . num_elements ) ) { <nl> class CodeGenLLVM : public IRVisitor , public ModuleBuilder { <nl> create_call ( stmt - > func_name , { get_context ( ) } ) ; <nl> } <nl> <nl> - / / TODO : move this to CodeGenLLVMX64 <nl> - void visit ( OffloadedStmt * stmt ) override { <nl> - using Type = OffloadedStmt : : TaskType ; <nl> - auto offloaded_task_name = init_offloaded_task_function ( stmt ) ; <nl> - if ( prog - > config . enable_profiler ) { <nl> - call ( <nl> - builder , " Runtime_profiler_start " , <nl> - { get_runtime ( ) , builder - > CreateGlobalStringPtr ( offloaded_task_name ) } ) ; <nl> - } <nl> - if ( stmt - > task_type = = Type : : serial ) { <nl> - stmt - > body - > accept ( this ) ; <nl> - } else if ( stmt - > task_type = = Type : : range_for ) { <nl> - create_offload_range_for ( stmt ) ; <nl> - } else if ( stmt - > task_type = = Type : : struct_for ) { <nl> - stmt - > block_dim = <nl> - std : : min ( stmt - > snode - > parent - > max_num_elements ( ) , stmt - > block_dim ) ; <nl> - create_offload_struct_for ( stmt ) ; <nl> - } else if ( stmt - > task_type = = Type : : clear_list ) { <nl> - emit_clear_list ( stmt ) ; <nl> - } else if ( stmt - > task_type = = Type : : listgen ) { <nl> - emit_list_gen ( stmt ) ; <nl> - } else if ( stmt - > task_type = = Type : : gc ) { <nl> - emit_gc ( stmt ) ; <nl> - } else { <nl> - TI_NOT_IMPLEMENTED <nl> - } <nl> - if ( prog - > config . enable_profiler ) { <nl> - call ( builder , " Runtime_profiler_stop " , { get_runtime ( ) } ) ; <nl> - } <nl> - finalize_offloaded_task_function ( ) ; <nl> - current_task - > end ( ) ; <nl> - current_task = nullptr ; <nl> - } <nl> - <nl> ~ CodeGenLLVM ( ) { <nl> - delete builder ; <nl> } <nl> } ; <nl> <nl> new file mode 100644 <nl> index 00000000000 . . 1a2a286600d <nl> mmm / dev / null <nl> ppp b / taichi / backends / codegen_llvm_cpu . cpp <nl> <nl> + # include < taichi / common / util . h > <nl> + # include < taichi / io / io . h > <nl> + # include " . . / tlang_util . h " <nl> + # include " . . / program . h " <nl> + # include " . . / ir . h " <nl> + # include " codegen_x86 . h " <nl> + # include " codegen_llvm . h " <nl> + <nl> + TLANG_NAMESPACE_BEGIN <nl> + <nl> + using namespace llvm ; <nl> + class CodeGenLLVMCPU : public CodeGenLLVM { <nl> + public : <nl> + using IRVisitor : : visit ; <nl> + <nl> + CodeGenLLVMCPU ( CodeGenBase * codegen_base , Kernel * kernel ) <nl> + : CodeGenLLVM ( codegen_base , kernel ) { <nl> + } <nl> + <nl> + void visit ( OffloadedStmt * stmt ) override { <nl> + using Type = OffloadedStmt : : TaskType ; <nl> + auto offloaded_task_name = init_offloaded_task_function ( stmt ) ; <nl> + if ( prog - > config . enable_profiler ) { <nl> + call ( <nl> + builder . get ( ) , " Runtime_profiler_start " , <nl> + { get_runtime ( ) , builder - > CreateGlobalStringPtr ( offloaded_task_name ) } ) ; <nl> + } <nl> + if ( stmt - > task_type = = Type : : serial ) { <nl> + stmt - > body - > accept ( this ) ; <nl> + } else if ( stmt - > task_type = = Type : : range_for ) { <nl> + create_offload_range_for ( stmt ) ; <nl> + } else if ( stmt - > task_type = = Type : : struct_for ) { <nl> + stmt - > block_dim = <nl> + std : : min ( stmt - > snode - > parent - > max_num_elements ( ) , stmt - > block_dim ) ; <nl> + create_offload_struct_for ( stmt ) ; <nl> + } else if ( stmt - > task_type = = Type : : clear_list ) { <nl> + emit_clear_list ( stmt ) ; <nl> + } else if ( stmt - > task_type = = Type : : listgen ) { <nl> + emit_list_gen ( stmt ) ; <nl> + } else if ( stmt - > task_type = = Type : : gc ) { <nl> + emit_gc ( stmt ) ; <nl> + } else { <nl> + TI_NOT_IMPLEMENTED <nl> + } <nl> + if ( prog - > config . enable_profiler ) { <nl> + call ( builder . get ( ) , " Runtime_profiler_stop " , { get_runtime ( ) } ) ; <nl> + } <nl> + finalize_offloaded_task_function ( ) ; <nl> + current_task - > end ( ) ; <nl> + current_task = nullptr ; <nl> + } <nl> + } ; <nl> + <nl> + FunctionType CPUCodeGen : : codegen_llvm ( ) { <nl> + TI_PROFILER ( " cpu codegen " ) ; <nl> + return CodeGenLLVMCPU ( this , kernel ) . gen ( ) ; <nl> + } <nl> + <nl> + TLANG_NAMESPACE_END <nl> similarity index 99 % <nl> rename from taichi / backends / codegen_llvm_ptx . cpp <nl> rename to taichi / backends / codegen_llvm_cuda . cpp <nl> mmm a / taichi / backends / codegen_llvm_ptx . cpp <nl> ppp b / taichi / backends / codegen_llvm_cuda . cpp <nl> using namespace llvm ; <nl> / / NVVM IR Spec : <nl> / / https : / / docs . nvidia . com / cuda / archive / 10 . 0 / pdf / NVVM_IR_Specification . pdf <nl> <nl> - std : : string compile_module_to_ptx ( std : : unique_ptr < llvm : : Module > & module ) ; <nl> - <nl> class CodeGenLLVMGPU : public CodeGenLLVM { <nl> public : <nl> int kernel_grid_dim ; <nl> class CodeGenLLVMGPU : public CodeGenLLVM { <nl> int max_block_dim ; <nl> int saturating_num_blocks ; <nl> <nl> + using IRVisitor : : visit ; <nl> + <nl> CodeGenLLVMGPU ( CodeGenBase * codegen_base , Kernel * kernel ) <nl> : CodeGenLLVM ( codegen_base , kernel ) { <nl> # if defined ( TI_WITH_CUDA ) <nl> class CodeGenLLVMGPU : public CodeGenLLVM { <nl> auto format_str = " [ debug ] " + stmt - > str + " = " + format + " \ n " ; <nl> <nl> stmt - > value = ModuleBuilder : : call ( <nl> - builder , " vprintf " , <nl> + builder . get ( ) , " vprintf " , <nl> builder - > CreateGlobalStringPtr ( format_str , " format_string " ) , <nl> builder - > CreateBitCast ( values , <nl> llvm : : Type : : getInt8PtrTy ( * llvm_context ) ) ) ; <nl> deleted file mode 100644 <nl> index f83f8867f82 . . 00000000000 <nl> mmm a / taichi / backends / codegen_llvm_x86 . cpp <nl> ppp / dev / null <nl> <nl> - # include < taichi / common / util . h > <nl> - # include < taichi / io / io . h > <nl> - # include " . . / tlang_util . h " <nl> - # include " . . / program . h " <nl> - # include " . . / ir . h " <nl> - # include " codegen_x86 . h " <nl> - # include " codegen_llvm . h " <nl> - <nl> - TLANG_NAMESPACE_BEGIN <nl> - <nl> - using namespace llvm ; <nl> - class CodeGenLLVMCPU : public CodeGenLLVM { <nl> - public : <nl> - CodeGenLLVMCPU ( CodeGenBase * codegen_base , Kernel * kernel ) <nl> - : CodeGenLLVM ( codegen_base , kernel ) { <nl> - } <nl> - } ; <nl> - <nl> - FunctionType CPUCodeGen : : codegen_llvm ( ) { <nl> - TI_PROFILER ( " cpu codegen " ) ; <nl> - return CodeGenLLVMCPU ( this , kernel ) . gen ( ) ; <nl> - } <nl> - <nl> - TLANG_NAMESPACE_END <nl> mmm a / taichi / backends / llvm_codegen_utils . h <nl> ppp b / taichi / backends / llvm_codegen_utils . h <nl> class ModuleBuilder { <nl> public : <nl> std : : unique_ptr < llvm : : Module > module ; <nl> llvm : : BasicBlock * entry_block ; <nl> - llvm : : IRBuilder < > * builder ; <nl> + std : : unique_ptr < llvm : : IRBuilder < > > builder ; <nl> TaichiLLVMContext * tlctx ; <nl> llvm : : LLVMContext * llvm_context ; <nl> <nl> class ModuleBuilder { <nl> <nl> template < typename . . . Args > <nl> llvm : : Value * call ( const std : : string & func_name , Args & & . . . args ) { <nl> - return call ( this - > builder , func_name , std : : forward < Args > ( args ) . . . ) ; <nl> + return call ( this - > builder . get ( ) , func_name , std : : forward < Args > ( args ) . . . ) ; <nl> } <nl> } ; <nl> <nl> mmm a / taichi / jit / jit_arch_cuda . cpp <nl> ppp b / taichi / jit / jit_arch_cuda . cpp <nl> class JITModuleCUDA : public JITModule { <nl> CUmodule module ; <nl> <nl> public : <nl> - JITModuleCUDA ( CUmodule module ) : module ( module ) { <nl> + explicit JITModuleCUDA ( CUmodule module ) : module ( module ) { <nl> } <nl> <nl> virtual void * lookup_function ( const std : : string & name ) { <nl> class JITSessionCUDA : public JITSession { <nl> public : <nl> llvm : : DataLayout DL ; <nl> <nl> - JITSessionCUDA ( llvm : : DataLayout data_layout ) : DL ( data_layout ) { <nl> + explicit JITSessionCUDA ( llvm : : DataLayout data_layout ) : DL ( data_layout ) { <nl> } <nl> <nl> virtual JITModule * add_module ( std : : unique_ptr < llvm : : Module > M ) override { <nl>
refactor codegen
taichi-dev/taichi
0a97f4d4202dfa7d34ac672edfe498b0da1c0267
2020-02-27T06:49:31Z
mmm a / Tools / CryVersionSelector / rc_jobs / game_assets . xml <nl> ppp b / Tools / CryVersionSelector / rc_jobs / game_assets . xml <nl> <nl> < Job Zip = " $ { TargetRoot } / GameData . pak " Input = " Libs / UI / * . * ; config / * . * " Exclude = " $ { CryassetType } " Zip_Compression = " 0 " / > <nl> <nl> < ! - - Pak all files that need to be compressed . - - > <nl> - < Job Zip = " $ { TargetRoot } / Animations . pak " Input = " $ { AnimationTypes } " Exclude = " * . cgf ; $ { DefaultExcludes } " Zip_SizeSplit = " 1 " Zip_MaxSize = " 1900000 " / > <nl> - < Job Zip = " $ { TargetRoot } / Objects . pak " Input = " * . cgf " Exclude = " $ { DefaultExcludes } " Zip_SizeSplit = " 1 " Zip_MaxSize = " 1900000 " / > <nl> - < Job Zip = " $ { TargetRoot } / Textures . pak " Input = " $ { TextureTypes } " Exclude = " $ { DefaultExcludes } " Zip_SizeSplit = " 1 " Zip_MaxSize = " 1900000 " / > <nl> + < Job Zip = " $ { TargetRoot } / Animations . pak " Input = " $ { AnimationTypes } " Exclude = " * . cgf ; $ { DefaultExcludes } " Zip_SizeSplit = " 1 " Zip_MaxSize = " 1900000 " / > <nl> + < Job Zip = " $ { TargetRoot } / Objects . pak " Input = " * . cgf " Exclude = " $ { DefaultExcludes } " Zip_SizeSplit = " 1 " Zip_MaxSize = " 1900000 " / > <nl> + < Job Zip = " $ { TargetRoot } / Textures . pak " Input = " $ { TextureTypes } " Exclude = " $ { CryassetType } " Zip_SizeSplit = " 1 " Zip_MaxSize = " 1900000 " / > <nl> < Job Zip = " $ { TargetRoot } / GameData . pak " Input = " $ { GameDataInputs } " Exclude = " Libs / UI / * . * ; $ { CryassetType } " / > <nl> <nl> < ! - - Startup cache , this is deprecated - - > <nl> <nl> < ! - - Converted loose files from levels , overwrite - - > <nl> < Properties SourceRoot = " $ { TempPath } / $ { DataFolder } _Assets " / > <nl> < If TargetHasEditor = " 1 " > <nl> - < Run Job = " CopySubfolderJob " SubFolder = " Levels " Input = " * . * " Exclude = " * . $ * " Refresh = " 1 " / > <nl> + < Run Job = " CopySubfolderJob " SubFolder = " Levels " Input = " * . * " Exclude = " $ { TextureTypes } ; * . $ * " Refresh = " 1 " / > <nl> < / If > <nl> < IfNot TargetHasEditor = " 1 " > <nl> - < Run Job = " CopySubfolderJob " SubFolder = " Levels " Input = " * . * " Exclude = " $ { EditorOnlyLevelSubFolders } ; * . $ * " Refresh = " 1 " / > <nl> + < Run Job = " CopySubfolderJob " SubFolder = " Levels " Input = " * . * " Exclude = " $ { TextureTypes } ; $ { EditorOnlyLevelSubFolders } ; * . $ * " Refresh = " 1 " / > <nl> < / IfNot > <nl> <nl> < ! - - Also copy some level meta - files into GameData . pak for signing purposes - - > <nl>
! T ( BREAK - 95 ) ( CryVersionSelector ) Store level textures in Textures . pak .
CRYTEK/CRYENGINE
b565adabd58cbd6c847d4cdaa528d23266318262
2018-09-21T12:39:09Z
mmm a / dbms / programs / client / Client . cpp <nl> ppp b / dbms / programs / client / Client . cpp <nl> class Client : public Poco : : Util : : Application <nl> while ( true ) <nl> { <nl> Block block = async_block_input - > read ( ) ; <nl> - / / / Check if server send Exception packet <nl> + <nl> auto packet_type = connection - > checkPacket ( ) ; <nl> + / / / Check if server send Log packet <nl> + if ( packet_type & & * packet_type = = Protocol : : Server : : Log ) <nl> + receiveAndProcessPacket ( ) ; <nl> + <nl> + / / / Check if server send Exception packet <nl> + packet_type = connection - > checkPacket ( ) ; <nl> if ( packet_type & & * packet_type = = Protocol : : Server : : Exception ) <nl> return ; <nl> <nl> connection - > sendData ( block ) ; <nl> processed_rows + = block . rows ( ) ; <nl> <nl> - / / / Check if server send Log packet <nl> - packet_type = connection - > checkPacket ( ) ; <nl> - if ( packet_type & & * packet_type = = Protocol : : Server : : Log ) <nl> - receiveAndProcessPacket ( ) ; <nl> - <nl> if ( ! block ) <nl> break ; <nl> } <nl> new file mode 100644 <nl> index 00000000000 . . f74a124f5cc <nl> mmm / dev / null <nl> ppp b / dbms / tests / queries / 0_stateless / 00995_exception_while_insert . reference <nl> @ @ - 0 , 0 + 1 @ @ <nl> + Got exception on client . <nl> new file mode 100755 <nl> index 00000000000 . . c9a531fafcf <nl> mmm / dev / null <nl> ppp b / dbms / tests / queries / 0_stateless / 00995_exception_while_insert . sh <nl> <nl> + # ! / usr / bin / env bash <nl> + <nl> + CURDIR = $ ( cd " $ ( dirname " $ { BASH_SOURCE [ 0 ] } " ) " & & pwd ) <nl> + . $ CURDIR / . . / shell_config . sh <nl> + <nl> + $ CLICKHOUSE_CLIENT - - query = " DROP TABLE IF EXISTS check ; " <nl> + <nl> + $ CLICKHOUSE_CLIENT - - query = " CREATE TABLE check ( x UInt64 , y UInt64 DEFAULT throwIf ( x > 10000000 ) ) ENGINE = Memory ; " <nl> + <nl> + seq 1 11000000 | $ CLICKHOUSE_CLIENT - - query = " INSERT INTO check ( x ) FORMAT TSV " 2 > & 1 | grep - q " Value passed to ' throwIf ' function is non zero . " & & echo " Got exception on client . " | | : <nl> + <nl> + $ CLICKHOUSE_CLIENT - - query = " DROP TABLE check ; " <nl>
Now send_logs_level won ' t affect catching exception . Test added .
ClickHouse/ClickHouse
4bd79c47dc68f91b3ffd0822a1b315f69aa69d25
2019-08-29T12:36:06Z
mmm a / lib / IRGen / IRGenDebugInfo . cpp <nl> ppp b / lib / IRGen / IRGenDebugInfo . cpp <nl> <nl> # include " llvm / Support / SourceMgr . h " <nl> # include " llvm / IR / Module . h " <nl> # include " GenType . h " <nl> + # include " Linking . h " <nl> <nl> using namespace swift ; <nl> using namespace irgen ; <nl> void IRGenDebugInfo : : emitGlobalVariableDeclaration ( llvm : : GlobalValue * Var , <nl> Var - > hasInternalLinkage ( ) , Var , nullptr ) ; <nl> } <nl> <nl> + / / / Return the mangled name of any nominal type . <nl> + StringRef IRGenDebugInfo : : getMangledName ( CanType CanTy ) { <nl> + llvm : : SmallString < 128 > Buffer ; <nl> + LinkEntity : : forTypeMangling ( CanTy ) . mangle ( Buffer ) ; <nl> + return BumpAllocatedString ( Buffer , DebugInfoNames ) ; <nl> + } <nl> + <nl> / / / Construct a DIType from a DebugTypeInfo object . <nl> / / / <nl> / / / At this point we do not plan to emit full DWARF for all swift <nl> / / / types , the goal is to emit only the name and provenance of the <nl> / / / type , where possible . A consumer would then load the type <nl> / / / definition directly from the " module " the type is specified in . <nl> + / / / <nl> + / / / The final goal , once we forked LLVM , is to emit something like a <nl> + / / / DW_TAG_APPLE_ast_ref_type ( an external reference ) instead of a <nl> + / / / local reference to the type . <nl> llvm : : DIType IRGenDebugInfo : : createType ( DebugTypeInfo Ty , <nl> llvm : : DIDescriptor Scope , <nl> llvm : : DIFile File ) { <nl> llvm : : DIType IRGenDebugInfo : : createType ( DebugTypeInfo Ty , <nl> case TypeKind : : BuiltinInteger : { <nl> auto IntTy = BaseTy - > castTo < BuiltinIntegerType > ( ) ; <nl> Size = IntTy - > getBitWidth ( ) ; <nl> - Name = " Int " ; <nl> + Name = " int " ; <nl> break ; <nl> } <nl> <nl> case TypeKind : : BuiltinFloat : { <nl> auto FloatTy = BaseTy - > castTo < BuiltinFloatType > ( ) ; <nl> Size = FloatTy - > getBitWidth ( ) ; <nl> - Name = " Float " ; <nl> + Name = " float " ; <nl> break ; <nl> } <nl> <nl> llvm : : DIType IRGenDebugInfo : : createType ( DebugTypeInfo Ty , <nl> case TypeKind : : Struct : { <nl> auto StructTy = BaseTy - > castTo < StructType > ( ) ; <nl> if ( auto Decl = StructTy - > getDecl ( ) ) { <nl> - Name = Decl - > getName ( ) . str ( ) ; <nl> Location L = getStartLoc ( SM , Decl ) ; <nl> + Name = getMangledName ( Ty . CanTy ) ; <nl> return DBuilder . createStructType ( Scope , <nl> Name , <nl> getOrCreateFile ( L . Filename ) , <nl> llvm : : DIType IRGenDebugInfo : : createType ( DebugTypeInfo Ty , <nl> / / used to differentiate them from C + + and ObjC classes . <nl> auto ClassTy = BaseTy - > castTo < ClassType > ( ) ; <nl> if ( auto Decl = ClassTy - > getDecl ( ) ) { <nl> - Name = Decl - > getName ( ) . str ( ) ; <nl> + Name = getMangledName ( Ty . CanTy ) ; <nl> Location L = getStartLoc ( SM , Decl ) ; <nl> auto Attrs = Decl - > getAttrs ( ) ; <nl> auto RuntimeLang = Attrs . isObjC ( ) ? DW_LANG_ObjC : DW_LANG_Swift ; <nl> llvm : : DIType IRGenDebugInfo : : createType ( DebugTypeInfo Ty , <nl> / / Handle everything else that is based off NominalType . <nl> case TypeKind : : OneOf : <nl> case TypeKind : : Protocol : { <nl> - auto NominalTy = BaseTy - > castTo < NominalType > ( ) ; <nl> - if ( auto Decl = NominalTy - > getDecl ( ) ) { <nl> - Name = Decl - > getName ( ) . str ( ) ; <nl> - break ; <nl> - } <nl> - return llvm : : DIType ( ) ; <nl> + Name = getMangledName ( Ty . CanTy ) ; <nl> + break ; <nl> } <nl> default : <nl> return llvm : : DIType ( ) ; <nl> mmm a / lib / IRGen / IRGenDebugInfo . h <nl> ppp b / lib / IRGen / IRGenDebugInfo . h <nl> class IRGenDebugInfo { <nl> llvm : : DIFile getOrCreateFile ( const char * Filename ) ; <nl> StringRef getName ( const FuncDecl & FD ) ; <nl> StringRef getName ( SILLocation L ) ; <nl> + StringRef getMangledName ( CanType CanTy ) ; <nl> llvm : : DIArray createParameterTypes ( SILModule & SILMod , <nl> SILType SILTy , <nl> llvm : : FunctionType * IRTy , <nl>
Debug Info : Emit the fully - qualified , mangled name for nominal types .
apple/swift
11e5550847f278320117b7ab9bd6efbc4c5df046
2013-07-19T01:48:45Z
mmm a / CMakeLists . txt <nl> ppp b / CMakeLists . txt <nl> if ( USE_STATIC_LIBRARIES AND HAVE_NO_PIE ) <nl> set ( CMAKE_C_FLAGS " $ { CMAKE_C_FLAGS } $ { FLAG_NO_PIE } " ) <nl> endif ( ) <nl> <nl> - <nl> - set ( CMAKE_EXE_LINKER_FLAGS " $ { CMAKE_EXE_LINKER_FLAGS } - Wl , - - no - undefined " ) <nl> - set ( CMAKE_SHARED_LINKER_FLAGS " $ { CMAKE_SHARED_LINKER_FLAGS } - Wl , - - no - undefined " ) <nl> + if ( NOT SANITIZE ) <nl> + set ( CMAKE_EXE_LINKER_FLAGS " $ { CMAKE_EXE_LINKER_FLAGS } - Wl , - - no - undefined " ) <nl> + set ( CMAKE_SHARED_LINKER_FLAGS " $ { CMAKE_SHARED_LINKER_FLAGS } - Wl , - - no - undefined " ) <nl> + endif ( ) <nl> <nl> include ( cmake / find_unwind . cmake ) <nl> <nl> mmm a / dbms / programs / server / TCPHandler . cpp <nl> ppp b / dbms / programs / server / TCPHandler . cpp <nl> bool TCPHandler : : receiveData ( ) <nl> if ( ! ( storage = query_context - > tryGetExternalTable ( external_table_name ) ) ) <nl> { <nl> NamesAndTypesList columns = block . getNamesAndTypesList ( ) ; <nl> - storage = StorageMemory : : create ( external_table_name , ColumnsDescription { columns } ) ; <nl> + storage = StorageMemory : : create ( " _external " , external_table_name , ColumnsDescription { columns } ) ; <nl> storage - > startup ( ) ; <nl> query_context - > addExternalTable ( external_table_name , storage ) ; <nl> } <nl> mmm a / dbms / src / Core / ExternalTable . cpp <nl> ppp b / dbms / src / Core / ExternalTable . cpp <nl> void ExternalTablesHandler : : handlePart ( const Poco : : Net : : MessageHeader & header , <nl> <nl> / / / Create table <nl> NamesAndTypesList columns = sample_block . getNamesAndTypesList ( ) ; <nl> - StoragePtr storage = StorageMemory : : create ( data . second , ColumnsDescription { columns } ) ; <nl> + StoragePtr storage = StorageMemory : : create ( " _external " , data . second , ColumnsDescription { columns } ) ; <nl> storage - > startup ( ) ; <nl> context . addExternalTable ( data . second , storage ) ; <nl> BlockOutputStreamPtr output = storage - > write ( ASTPtr ( ) , context ) ; <nl> mmm a / dbms / src / Databases / DatabaseDictionary . cpp <nl> ppp b / dbms / src / Databases / DatabaseDictionary . cpp <nl> Tables DatabaseDictionary : : listTables ( const Context & context , const FilterByNam <nl> auto dict_name = dict_ptr - > getName ( ) ; <nl> const DictionaryStructure & dictionary_structure = dict_ptr - > getStructure ( ) ; <nl> auto columns = StorageDictionary : : getNamesAndTypes ( dictionary_structure ) ; <nl> - tables [ dict_name ] = StorageDictionary : : create ( dict_name , ColumnsDescription { columns } , context , true , dict_name ) ; <nl> + tables [ dict_name ] = StorageDictionary : : create ( getDatabaseName ( ) , dict_name , ColumnsDescription { columns } , context , true , dict_name ) ; <nl> } <nl> return tables ; <nl> } <nl> StoragePtr DatabaseDictionary : : tryGetTable ( <nl> { <nl> const DictionaryStructure & dictionary_structure = dict_ptr - > getStructure ( ) ; <nl> auto columns = StorageDictionary : : getNamesAndTypes ( dictionary_structure ) ; <nl> - return StorageDictionary : : create ( table_name , ColumnsDescription { columns } , context , true , table_name ) ; <nl> + return StorageDictionary : : create ( getDatabaseName ( ) , table_name , ColumnsDescription { columns } , context , true , table_name ) ; <nl> } <nl> <nl> return { } ; <nl> mmm a / dbms / src / Databases / DatabaseMySQL . cpp <nl> ppp b / dbms / src / Databases / DatabaseMySQL . cpp <nl> DatabaseMySQL : : MySQLStorageInfo DatabaseMySQL : : createStorageInfo ( <nl> const String & table_name , const NamesAndTypesList & columns_name_and_type , const UInt64 & table_modification_time ) const <nl> { <nl> const auto & mysql_table = StorageMySQL : : create ( <nl> - table_name , std : : move ( mysql_pool ) , mysql_database_name , table_name , <nl> + database_name , table_name , std : : move ( mysql_pool ) , mysql_database_name , table_name , <nl> false , " " , ColumnsDescription { columns_name_and_type } , global_context ) ; <nl> <nl> const auto & create_table_query = std : : make_shared < ASTCreateQuery > ( ) ; <nl> mmm a / dbms / src / Interpreters / GlobalSubqueriesVisitor . h <nl> ppp b / dbms / src / Interpreters / GlobalSubqueriesVisitor . h <nl> class GlobalSubqueriesMatcher <nl> Block sample = interpreter - > getSampleBlock ( ) ; <nl> NamesAndTypesList columns = sample . getNamesAndTypesList ( ) ; <nl> <nl> - StoragePtr external_storage = StorageMemory : : create ( external_table_name , ColumnsDescription { columns } ) ; <nl> + StoragePtr external_storage = StorageMemory : : create ( " _external " , external_table_name , ColumnsDescription { columns } ) ; <nl> external_storage - > startup ( ) ; <nl> <nl> / * * We replace the subquery with the name of the temporary table . <nl> mmm a / dbms / src / Interpreters / tests / in_join_subqueries_preprocessor . cpp <nl> ppp b / dbms / src / Interpreters / tests / in_join_subqueries_preprocessor . cpp <nl> class StorageDistributedFake : public ext : : shared_ptr_helper < StorageDistributedF <nl> std : : string getRemoteTableName ( ) const { return remote_table ; } <nl> <nl> std : : string getTableName ( ) const override { return " " ; } <nl> + std : : string getDatabaseName ( ) const override { return " " ; } <nl> <nl> protected : <nl> StorageDistributedFake ( const std : : string & remote_database_ , const std : : string & remote_table_ , size_t shard_count_ ) <nl> mmm a / dbms / src / Storages / IStorage . h <nl> ppp b / dbms / src / Storages / IStorage . h <nl> class IStorage : public std : : enable_shared_from_this < IStorage > <nl> <nl> / / / The name of the table . <nl> virtual std : : string getTableName ( ) const = 0 ; <nl> - virtual std : : string getDatabaseName ( ) const { return { } ; } / / FIXME : should be an abstract method ! <nl> + virtual std : : string getDatabaseName ( ) const = 0 ; <nl> <nl> / / / Returns true if the storage receives data from a remote server or servers . <nl> virtual bool isRemote ( ) const { return false ; } <nl> mmm a / dbms / src / Storages / MergeTree / StorageFromMergeTreeDataPart . h <nl> ppp b / dbms / src / Storages / MergeTree / StorageFromMergeTreeDataPart . h <nl> class StorageFromMergeTreeDataPart : public ext : : shared_ptr_helper < StorageFromMe <nl> public : <nl> String getName ( ) const override { return " FromMergeTreeDataPart " ; } <nl> String getTableName ( ) const override { return part - > storage . getTableName ( ) + " ( part " + part - > name + " ) " ; } <nl> + String getDatabaseName ( ) const override { return part - > storage . getDatabaseName ( ) ; } <nl> <nl> BlockInputStreams read ( <nl> const Names & column_names , <nl> mmm a / dbms / src / Storages / StorageBuffer . cpp <nl> ppp b / dbms / src / Storages / StorageBuffer . cpp <nl> namespace ErrorCodes <nl> } <nl> <nl> <nl> - StorageBuffer : : StorageBuffer ( const std : : string & name_ , const ColumnsDescription & columns_ , <nl> + StorageBuffer : : StorageBuffer ( const std : : string & database_name_ , const std : : string & table_name_ , const ColumnsDescription & columns_ , <nl> Context & context_ , <nl> size_t num_shards_ , const Thresholds & min_thresholds_ , const Thresholds & max_thresholds_ , <nl> const String & destination_database_ , const String & destination_table_ , bool allow_materialized_ ) <nl> : IStorage { columns_ } , <nl> - name ( name_ ) , global_context ( context_ ) , <nl> + table_name ( table_name_ ) , database_name ( database_name_ ) , global_context ( context_ ) , <nl> num_shards ( num_shards_ ) , buffers ( num_shards_ ) , <nl> min_thresholds ( min_thresholds_ ) , max_thresholds ( max_thresholds_ ) , <nl> destination_database ( destination_database_ ) , destination_table ( destination_table_ ) , <nl> no_destination ( destination_database . empty ( ) & & destination_table . empty ( ) ) , <nl> - allow_materialized ( allow_materialized_ ) , log ( & Logger : : get ( " StorageBuffer ( " + name + " ) " ) ) <nl> + allow_materialized ( allow_materialized_ ) , log ( & Logger : : get ( " StorageBuffer ( " + table_name + " ) " ) ) <nl> { <nl> } <nl> <nl> void StorageBuffer : : flushThread ( ) <nl> } <nl> <nl> <nl> - void StorageBuffer : : alter ( const AlterCommands & params , const String & database_name , const String & table_name , const Context & context , TableStructureWriteLockHolder & table_lock_holder ) <nl> + void StorageBuffer : : alter ( const AlterCommands & params , const String & database_name_ , const String & table_name_ , const Context & context , TableStructureWriteLockHolder & table_lock_holder ) <nl> { <nl> lockStructureExclusively ( table_lock_holder , context . getCurrentQueryId ( ) ) ; <nl> <nl> void StorageBuffer : : alter ( const AlterCommands & params , const String & database_ <nl> auto new_columns = getColumns ( ) ; <nl> auto new_indices = getIndices ( ) ; <nl> params . apply ( new_columns ) ; <nl> - context . getDatabase ( database_name ) - > alterTable ( context , table_name , new_columns , new_indices , { } ) ; <nl> + context . getDatabase ( database_name_ ) - > alterTable ( context , table_name_ , new_columns , new_indices , { } ) ; <nl> setColumns ( std : : move ( new_columns ) ) ; <nl> } <nl> <nl> void registerStorageBuffer ( StorageFactory & factory ) <nl> UInt64 max_bytes = applyVisitor ( FieldVisitorConvertToNumber < UInt64 > ( ) , engine_args [ 8 ] - > as < ASTLiteral & > ( ) . value ) ; <nl> <nl> return StorageBuffer : : create ( <nl> + args . database_name , <nl> args . table_name , args . columns , <nl> args . context , <nl> num_buckets , <nl> mmm a / dbms / src / Storages / StorageBuffer . h <nl> ppp b / dbms / src / Storages / StorageBuffer . h <nl> friend class BufferBlockOutputStream ; <nl> } ; <nl> <nl> std : : string getName ( ) const override { return " Buffer " ; } <nl> - std : : string getTableName ( ) const override { return name ; } <nl> + std : : string getTableName ( ) const override { return table_name ; } <nl> + std : : string getDatabaseName ( ) const override { return database_name ; } <nl> <nl> QueryProcessingStage : : Enum getQueryProcessingStage ( const Context & context ) const override ; <nl> <nl> friend class BufferBlockOutputStream ; <nl> void shutdown ( ) override ; <nl> bool optimize ( const ASTPtr & query , const ASTPtr & partition , bool final , bool deduplicate , const Context & context ) override ; <nl> <nl> - void rename ( const String & / * new_path_to_db * / , const String & / * new_database_name * / , const String & new_table_name ) override { name = new_table_name ; } <nl> + void rename ( const String & / * new_path_to_db * / , const String & new_database_name , const String & new_table_name ) override { table_name = new_table_name ; database_name = new_database_name ; } <nl> <nl> bool supportsSampling ( ) const override { return true ; } <nl> bool supportsPrewhere ( ) const override <nl> friend class BufferBlockOutputStream ; <nl> const Context & context , TableStructureWriteLockHolder & table_lock_holder ) override ; <nl> <nl> private : <nl> - String name ; <nl> + String table_name ; <nl> + String database_name ; <nl> <nl> Context global_context ; <nl> <nl> friend class BufferBlockOutputStream ; <nl> / * * num_shards - the level of internal parallelism ( the number of independent buffers ) <nl> * The buffer is flushed if all minimum thresholds or at least one of the maximum thresholds are exceeded . <nl> * / <nl> - StorageBuffer ( const std : : string & name_ , const ColumnsDescription & columns_ , <nl> + StorageBuffer ( const std : : string & database_name_ , const std : : string & table_name_ , const ColumnsDescription & columns_ , <nl> Context & context_ , <nl> size_t num_shards_ , const Thresholds & min_thresholds_ , const Thresholds & max_thresholds_ , <nl> const String & destination_database_ , const String & destination_table_ , bool allow_materialized_ ) ; <nl> mmm a / dbms / src / Storages / StorageCatBoostPool . cpp <nl> ppp b / dbms / src / Storages / StorageCatBoostPool . cpp <nl> static void checkCreationIsAllowed ( const String & base_path , const String & path <nl> } <nl> <nl> <nl> - StorageCatBoostPool : : StorageCatBoostPool ( const Context & context , <nl> - String column_description_file_name_ , <nl> - String data_description_file_name_ ) <nl> - : column_description_file_name ( std : : move ( column_description_file_name_ ) ) , <nl> - data_description_file_name ( std : : move ( data_description_file_name_ ) ) <nl> + StorageCatBoostPool : : StorageCatBoostPool ( <nl> + const String & database_name_ , <nl> + const String & table_name_ , <nl> + const Context & context , <nl> + String column_description_file_name_ , <nl> + String data_description_file_name_ ) <nl> + : table_name ( table_name_ ) <nl> + , database_name ( database_name_ ) <nl> + , column_description_file_name ( std : : move ( column_description_file_name_ ) ) <nl> + , data_description_file_name ( std : : move ( data_description_file_name_ ) ) <nl> { <nl> auto base_path = canonicalPath ( context . getPath ( ) ) ; <nl> column_description_file_name = resolvePath ( base_path , std : : move ( column_description_file_name ) ) ; <nl> mmm a / dbms / src / Storages / StorageCatBoostPool . h <nl> ppp b / dbms / src / Storages / StorageCatBoostPool . h <nl> class StorageCatBoostPool : public ext : : shared_ptr_helper < StorageCatBoostPool > , <nl> { <nl> public : <nl> std : : string getName ( ) const override { return " CatBoostPool " ; } <nl> - <nl> std : : string getTableName ( ) const override { return table_name ; } <nl> + std : : string getDatabaseName ( ) const override { return database_name ; } <nl> <nl> BlockInputStreams read ( const Names & column_names , <nl> const SelectQueryInfo & query_info , <nl> class StorageCatBoostPool : public ext : : shared_ptr_helper < StorageCatBoostPool > , <nl> <nl> private : <nl> String table_name ; <nl> + String database_name ; <nl> <nl> String column_description_file_name ; <nl> String data_description_file_name ; <nl> class StorageCatBoostPool : public ext : : shared_ptr_helper < StorageCatBoostPool > , <nl> void createSampleBlockAndColumns ( ) ; <nl> <nl> protected : <nl> - StorageCatBoostPool ( const Context & context , String column_description_file_name , String data_description_file_name ) ; <nl> + StorageCatBoostPool ( const String & database_name_ , const String & table_name_ , const Context & context , String column_description_file_name , String data_description_file_name ) ; <nl> } ; <nl> <nl> } <nl> mmm a / dbms / src / Storages / StorageDictionary . cpp <nl> ppp b / dbms / src / Storages / StorageDictionary . cpp <nl> namespace ErrorCodes <nl> <nl> <nl> StorageDictionary : : StorageDictionary ( <nl> + const String & database_name_ , <nl> const String & table_name_ , <nl> const ColumnsDescription & columns_ , <nl> const Context & context , <nl> bool attach , <nl> const String & dictionary_name_ ) <nl> : IStorage { columns_ } , table_name ( table_name_ ) , <nl> + database_name ( database_name_ ) , <nl> dictionary_name ( dictionary_name_ ) , <nl> logger ( & Poco : : Logger : : get ( " StorageDictionary " ) ) <nl> { <nl> void registerStorageDictionary ( StorageFactory & factory ) <nl> String dictionary_name = args . engine_args [ 0 ] - > as < ASTLiteral & > ( ) . value . safeGet < String > ( ) ; <nl> <nl> return StorageDictionary : : create ( <nl> - args . table_name , args . columns , args . context , args . attach , dictionary_name ) ; <nl> + args . database_name , args . table_name , args . columns , args . context , args . attach , dictionary_name ) ; <nl> } ) ; <nl> } <nl> <nl> mmm a / dbms / src / Storages / StorageDictionary . h <nl> ppp b / dbms / src / Storages / StorageDictionary . h <nl> class StorageDictionary : public ext : : shared_ptr_helper < StorageDictionary > , publ <nl> public : <nl> std : : string getName ( ) const override { return " Dictionary " ; } <nl> std : : string getTableName ( ) const override { return table_name ; } <nl> + std : : string getDatabaseName ( ) const override { return database_name ; } <nl> + <nl> BlockInputStreams read ( const Names & column_names , <nl> const SelectQueryInfo & query_info , <nl> const Context & context , <nl> class StorageDictionary : public ext : : shared_ptr_helper < StorageDictionary > , publ <nl> using Ptr = MultiVersion < IDictionaryBase > : : Version ; <nl> <nl> String table_name ; <nl> + String database_name ; <nl> String dictionary_name ; <nl> Poco : : Logger * logger ; <nl> <nl> void checkNamesAndTypesCompatibleWithDictionary ( const DictionaryStructure & dictionary_structure ) const ; <nl> <nl> protected : <nl> - StorageDictionary ( const String & table_name_ , <nl> + StorageDictionary ( <nl> + const String & database_name_ , <nl> + const String & table_name_ , <nl> const ColumnsDescription & columns_ , <nl> const Context & context , <nl> bool attach , <nl> mmm a / dbms / src / Storages / StorageDistributed . cpp <nl> ppp b / dbms / src / Storages / StorageDistributed . cpp <nl> StorageDistributed : : StorageDistributed ( <nl> const ASTPtr & sharding_key_ , <nl> const String & data_path_ , <nl> bool attach ) <nl> - : IStorage { columns_ } , table_name ( table_name ) , <nl> + : IStorage { columns_ } , table_name ( table_name ) , database_name ( database_name ) , <nl> remote_database ( remote_database_ ) , remote_table ( remote_table_ ) , <nl> global_context ( context_ ) , cluster_name ( global_context . getMacros ( ) - > expand ( cluster_name_ ) ) , has_sharding_key ( sharding_key_ ) , <nl> sharding_key_expr ( sharding_key_ ? buildShardingKeyExpression ( sharding_key_ , global_context , getColumns ( ) . getAllPhysical ( ) , false ) : nullptr ) , <nl> BlockOutputStreamPtr StorageDistributed : : write ( const ASTPtr & , const Context & c <nl> <nl> <nl> void StorageDistributed : : alter ( <nl> - const AlterCommands & params , const String & database_name , const String & current_table_name , <nl> + const AlterCommands & params , const String & current_database_name , const String & current_table_name , <nl> const Context & context , TableStructureWriteLockHolder & table_lock_holder ) <nl> { <nl> lockStructureExclusively ( table_lock_holder , context . getCurrentQueryId ( ) ) ; <nl> void StorageDistributed : : alter ( <nl> auto new_columns = getColumns ( ) ; <nl> auto new_indices = getIndices ( ) ; <nl> params . apply ( new_columns ) ; <nl> - context . getDatabase ( database_name ) - > alterTable ( context , current_table_name , new_columns , new_indices , { } ) ; <nl> + context . getDatabase ( current_database_name ) - > alterTable ( context , current_table_name , new_columns , new_indices , { } ) ; <nl> setColumns ( std : : move ( new_columns ) ) ; <nl> } <nl> <nl> mmm a / dbms / src / Storages / StorageDistributed . h <nl> ppp b / dbms / src / Storages / StorageDistributed . h <nl> class StorageDistributed : public ext : : shared_ptr_helper < StorageDistributed > , pu <nl> <nl> std : : string getName ( ) const override { return " Distributed " ; } <nl> std : : string getTableName ( ) const override { return table_name ; } <nl> + std : : string getDatabaseName ( ) const override { return database_name ; } <nl> + <nl> bool supportsSampling ( ) const override { return true ; } <nl> bool supportsFinal ( ) const override { return true ; } <nl> bool supportsPrewhere ( ) const override { return true ; } <nl> class StorageDistributed : public ext : : shared_ptr_helper < StorageDistributed > , pu <nl> / / / Removes temporary data in local filesystem . <nl> void truncate ( const ASTPtr & , const Context & ) override ; <nl> <nl> - void rename ( const String & / * new_path_to_db * / , const String & / * new_database_name * / , const String & new_table_name ) override { table_name = new_table_name ; } <nl> + void rename ( const String & / * new_path_to_db * / , const String & new_database_name , const String & new_table_name ) override { table_name = new_table_name ; database_name = new_database_name ; } <nl> / / / in the sub - tables , you need to manually add and delete columns <nl> / / / the structure of the sub - table is not checked <nl> void alter ( <nl> class StorageDistributed : public ext : : shared_ptr_helper < StorageDistributed > , pu <nl> ActionLock getActionLock ( StorageActionBlockType type ) override ; <nl> <nl> String table_name ; <nl> + String database_name ; <nl> String remote_database ; <nl> String remote_table ; <nl> ASTPtr remote_table_function_ptr ; <nl> mmm a / dbms / src / Storages / StorageFile . cpp <nl> ppp b / dbms / src / Storages / StorageFile . cpp <nl> StorageFile : : StorageFile ( <nl> const std : : string & table_path_ , <nl> int table_fd_ , <nl> const std : : string & db_dir_path , <nl> + const std : : string & database_name_ , <nl> const std : : string & table_name_ , <nl> const std : : string & format_name_ , <nl> const ColumnsDescription & columns_ , <nl> Context & context_ ) <nl> : IStorage ( columns_ ) , <nl> - table_name ( table_name_ ) , format_name ( format_name_ ) , context_global ( context_ ) , table_fd ( table_fd_ ) <nl> + table_name ( table_name_ ) , database_name ( database_name_ ) , format_name ( format_name_ ) , context_global ( context_ ) , table_fd ( table_fd_ ) <nl> { <nl> if ( table_fd < 0 ) / / / Will use file <nl> { <nl> void StorageFile : : drop ( ) <nl> } <nl> <nl> <nl> - void StorageFile : : rename ( const String & new_path_to_db , const String & / * new_database_name * / , const String & new_table_name ) <nl> + void StorageFile : : rename ( const String & new_path_to_db , const String & new_database_name , const String & new_table_name ) <nl> { <nl> if ( ! is_db_table ) <nl> throw Exception ( " Can ' t rename table ' " + table_name + " ' binded to user - defined file ( or FD ) " , ErrorCodes : : DATABASE_ACCESS_DENIED ) ; <nl> void StorageFile : : rename ( const String & new_path_to_db , const String & / * new_dat <nl> Poco : : File ( path ) . renameTo ( path_new ) ; <nl> <nl> path = std : : move ( path_new ) ; <nl> + table_name = new_table_name ; <nl> + database_name = new_database_name ; <nl> } <nl> <nl> <nl> void registerStorageFile ( StorageFactory & factory ) <nl> return StorageFile : : create ( <nl> source_path , source_fd , <nl> args . data_path , <nl> - args . table_name , format_name , args . columns , <nl> + args . database_name , args . table_name , format_name , args . columns , <nl> args . context ) ; <nl> } ) ; <nl> } <nl> mmm a / dbms / src / Storages / StorageFile . h <nl> ppp b / dbms / src / Storages / StorageFile . h <nl> class StorageFileBlockOutputStream ; <nl> class StorageFile : public ext : : shared_ptr_helper < StorageFile > , public IStorage <nl> { <nl> public : <nl> - std : : string getName ( ) const override <nl> - { <nl> - return " File " ; <nl> - } <nl> - <nl> - std : : string getTableName ( ) const override <nl> - { <nl> - return table_name ; <nl> - } <nl> + std : : string getName ( ) const override { return " File " ; } <nl> + std : : string getTableName ( ) const override { return table_name ; } <nl> + std : : string getDatabaseName ( ) const override { return database_name ; } <nl> <nl> BlockInputStreams read ( <nl> const Names & column_names , <nl> class StorageFile : public ext : : shared_ptr_helper < StorageFile > , public IStorage <nl> const std : : string & table_path_ , <nl> int table_fd_ , <nl> const std : : string & db_dir_path , <nl> + const std : : string & database_name_ , <nl> const std : : string & table_name_ , <nl> const std : : string & format_name_ , <nl> const ColumnsDescription & columns_ , <nl> Context & context_ ) ; <nl> <nl> private : <nl> - <nl> std : : string table_name ; <nl> + std : : string database_name ; <nl> std : : string format_name ; <nl> Context & context_global ; <nl> <nl> mmm a / dbms / src / Storages / StorageHDFS . cpp <nl> ppp b / dbms / src / Storages / StorageHDFS . cpp <nl> namespace ErrorCodes <nl> } <nl> <nl> StorageHDFS : : StorageHDFS ( const String & uri_ , <nl> + const std : : string & database_name_ , <nl> const std : : string & table_name_ , <nl> const String & format_name_ , <nl> const ColumnsDescription & columns_ , <nl> StorageHDFS : : StorageHDFS ( const String & uri_ , <nl> , uri ( uri_ ) <nl> , format_name ( format_name_ ) <nl> , table_name ( table_name_ ) <nl> + , database_name ( database_name_ ) <nl> , context ( context_ ) <nl> { <nl> } <nl> BlockInputStreams StorageHDFS : : read ( <nl> max_block_size ) } ; <nl> } <nl> <nl> - void StorageHDFS : : rename ( const String & / * new_path_to_db * / , const String & / * new_database_name * / , const String & / * new_table_name * / ) { } <nl> + void StorageHDFS : : rename ( const String & / * new_path_to_db * / , const String & new_database_name , const String & new_table_name ) <nl> + { <nl> + table_name = new_table_name ; <nl> + database_name = new_database_name ; <nl> + } <nl> <nl> BlockOutputStreamPtr StorageHDFS : : write ( const ASTPtr & / * query * / , const Context & / * context * / ) <nl> { <nl> void registerStorageHDFS ( StorageFactory & factory ) <nl> <nl> String format_name = engine_args [ 1 ] - > as < ASTLiteral & > ( ) . value . safeGet < String > ( ) ; <nl> <nl> - return StorageHDFS : : create ( url , args . table_name , format_name , args . columns , args . context ) ; <nl> + return StorageHDFS : : create ( url , args . database_name , args . table_name , format_name , args . columns , args . context ) ; <nl> } ) ; <nl> } <nl> <nl> mmm a / dbms / src / Storages / StorageHDFS . h <nl> ppp b / dbms / src / Storages / StorageHDFS . h <nl> namespace DB <nl> class StorageHDFS : public ext : : shared_ptr_helper < StorageHDFS > , public IStorage <nl> { <nl> public : <nl> - String getName ( ) const override <nl> - { <nl> - return " HDFS " ; <nl> - } <nl> - <nl> - String getTableName ( ) const override <nl> - { <nl> - return table_name ; <nl> - } <nl> + String getName ( ) const override { return " HDFS " ; } <nl> + String getTableName ( ) const override { return table_name ; } <nl> + String getDatabaseName ( ) const override { return database_name ; } <nl> <nl> BlockInputStreams read ( const Names & column_names , <nl> const SelectQueryInfo & query_info , <nl> class StorageHDFS : public ext : : shared_ptr_helper < StorageHDFS > , public IStorage <nl> <nl> protected : <nl> StorageHDFS ( const String & uri_ , <nl> + const String & database_name_ , <nl> const String & table_name_ , <nl> const String & format_name_ , <nl> const ColumnsDescription & columns_ , <nl> class StorageHDFS : public ext : : shared_ptr_helper < StorageHDFS > , public IStorage <nl> String uri ; <nl> String format_name ; <nl> String table_name ; <nl> + String database_name ; <nl> Context & context ; <nl> <nl> Logger * log = & Logger : : get ( " StorageHDFS " ) ; <nl> mmm a / dbms / src / Storages / StorageJoin . cpp <nl> ppp b / dbms / src / Storages / StorageJoin . cpp <nl> namespace ErrorCodes <nl> <nl> StorageJoin : : StorageJoin ( <nl> const String & path_ , <nl> - const String & name_ , <nl> + const String & database_name_ , <nl> + const String & table_name_ , <nl> const Names & key_names_ , <nl> bool use_nulls_ , <nl> SizeLimits limits_ , <nl> StorageJoin : : StorageJoin ( <nl> ASTTableJoin : : Strictness strictness_ , <nl> const ColumnsDescription & columns_ , <nl> bool overwrite ) <nl> - : StorageSetOrJoinBase { path_ , name_ , columns_ } <nl> + : StorageSetOrJoinBase { path_ , database_name_ , table_name_ , columns_ } <nl> , key_names ( key_names_ ) <nl> , use_nulls ( use_nulls_ ) <nl> , limits ( limits_ ) <nl> void registerStorageJoin ( StorageFactory & factory ) <nl> <nl> return StorageJoin : : create ( <nl> args . data_path , <nl> + args . database_name , <nl> args . table_name , <nl> key_names , <nl> join_use_nulls . value , <nl> mmm a / dbms / src / Storages / StorageJoin . h <nl> ppp b / dbms / src / Storages / StorageJoin . h <nl> class StorageJoin : public ext : : shared_ptr_helper < StorageJoin > , public StorageSe <nl> protected : <nl> StorageJoin ( <nl> const String & path_ , <nl> - const String & name_ , <nl> + const String & database_name_ , <nl> + const String & table_name_ , <nl> const Names & key_names_ , <nl> bool use_nulls_ , <nl> SizeLimits limits_ , <nl> mmm a / dbms / src / Storages / StorageLog . cpp <nl> ppp b / dbms / src / Storages / StorageLog . cpp <nl> Block LogBlockInputStream : : readImpl ( ) <nl> } <nl> catch ( Exception & e ) <nl> { <nl> - e . addMessage ( " while reading column " + name_type . name + " at " + storage . path + escapeForFileName ( storage . name ) ) ; <nl> + e . addMessage ( " while reading column " + name_type . name + " at " + storage . path + escapeForFileName ( storage . table_name ) ) ; <nl> throw ; <nl> } <nl> <nl> void LogBlockOutputStream : : writeMarks ( MarksForColumns & & marks ) <nl> <nl> StorageLog : : StorageLog ( <nl> const std : : string & path_ , <nl> - const std : : string & name_ , <nl> + const std : : string & database_name_ , <nl> + const std : : string & table_name_ , <nl> const ColumnsDescription & columns_ , <nl> size_t max_compress_block_size_ ) <nl> : IStorage { columns_ } , <nl> - path ( path_ ) , name ( name_ ) , <nl> + path ( path_ ) , table_name ( table_name_ ) , database_name ( database_name_ ) , <nl> max_compress_block_size ( max_compress_block_size_ ) , <nl> - file_checker ( path + escapeForFileName ( name ) + ' / ' + " sizes . json " ) <nl> + file_checker ( path + escapeForFileName ( table_name ) + ' / ' + " sizes . json " ) <nl> { <nl> if ( path . empty ( ) ) <nl> throw Exception ( " Storage " + getName ( ) + " requires data path " , ErrorCodes : : INCORRECT_FILE_NAME ) ; <nl> <nl> / / / create files if they do not exist <nl> - Poco : : File ( path + escapeForFileName ( name ) + ' / ' ) . createDirectories ( ) ; <nl> + Poco : : File ( path + escapeForFileName ( table_name ) + ' / ' ) . createDirectories ( ) ; <nl> <nl> for ( const auto & column : getColumns ( ) . getAllPhysical ( ) ) <nl> addFiles ( column . name , * column . type ) ; <nl> <nl> - marks_file = Poco : : File ( path + escapeForFileName ( name ) + ' / ' + DBMS_STORAGE_LOG_MARKS_FILE_NAME ) ; <nl> + marks_file = Poco : : File ( path + escapeForFileName ( table_name ) + ' / ' + DBMS_STORAGE_LOG_MARKS_FILE_NAME ) ; <nl> } <nl> <nl> <nl> void StorageLog : : addFiles ( const String & column_name , const IDataType & type ) <nl> ColumnData & column_data = files [ stream_name ] ; <nl> column_data . column_index = file_count ; <nl> column_data . data_file = Poco : : File { <nl> - path + escapeForFileName ( name ) + ' / ' + stream_name + DBMS_STORAGE_LOG_DATA_FILE_EXTENSION } ; <nl> + path + escapeForFileName ( table_name ) + ' / ' + stream_name + DBMS_STORAGE_LOG_DATA_FILE_EXTENSION } ; <nl> <nl> column_names_by_idx . push_back ( stream_name ) ; <nl> + + file_count ; <nl> void StorageLog : : loadMarks ( ) <nl> } <nl> <nl> <nl> - void StorageLog : : rename ( const String & new_path_to_db , const String & / * new_database_name * / , const String & new_table_name ) <nl> + void StorageLog : : rename ( const String & new_path_to_db , const String & new_database_name , const String & new_table_name ) <nl> { <nl> std : : unique_lock < std : : shared_mutex > lock ( rwlock ) ; <nl> <nl> / / / Rename directory with data . <nl> - Poco : : File ( path + escapeForFileName ( name ) ) . renameTo ( new_path_to_db + escapeForFileName ( new_table_name ) ) ; <nl> + Poco : : File ( path + escapeForFileName ( table_name ) ) . renameTo ( new_path_to_db + escapeForFileName ( new_table_name ) ) ; <nl> <nl> path = new_path_to_db ; <nl> - name = new_table_name ; <nl> - file_checker . setPath ( path + escapeForFileName ( name ) + ' / ' + " sizes . json " ) ; <nl> + table_name = new_table_name ; <nl> + database_name = new_database_name ; <nl> + file_checker . setPath ( path + escapeForFileName ( table_name ) + ' / ' + " sizes . json " ) ; <nl> <nl> for ( auto & file : files ) <nl> - file . second . data_file = Poco : : File ( path + escapeForFileName ( name ) + ' / ' + Poco : : Path ( file . second . data_file . path ( ) ) . getFileName ( ) ) ; <nl> + file . second . data_file = Poco : : File ( path + escapeForFileName ( table_name ) + ' / ' + Poco : : Path ( file . second . data_file . path ( ) ) . getFileName ( ) ) ; <nl> <nl> - marks_file = Poco : : File ( path + escapeForFileName ( name ) + ' / ' + DBMS_STORAGE_LOG_MARKS_FILE_NAME ) ; <nl> + marks_file = Poco : : File ( path + escapeForFileName ( table_name ) + ' / ' + DBMS_STORAGE_LOG_MARKS_FILE_NAME ) ; <nl> } <nl> <nl> void StorageLog : : truncate ( const ASTPtr & , const Context & ) <nl> { <nl> std : : shared_lock < std : : shared_mutex > lock ( rwlock ) ; <nl> <nl> - String table_dir = path + escapeForFileName ( name ) ; <nl> + String table_dir = path + escapeForFileName ( table_name ) ; <nl> <nl> files . clear ( ) ; <nl> file_count = 0 ; <nl> void registerStorageLog ( StorageFactory & factory ) <nl> ErrorCodes : : NUMBER_OF_ARGUMENTS_DOESNT_MATCH ) ; <nl> <nl> return StorageLog : : create ( <nl> - args . data_path , args . table_name , args . columns , <nl> + args . data_path , args . database_name , args . table_name , args . columns , <nl> args . context . getSettings ( ) . max_compress_block_size ) ; <nl> } ) ; <nl> } <nl> mmm a / dbms / src / Storages / StorageLog . h <nl> ppp b / dbms / src / Storages / StorageLog . h <nl> friend class LogBlockOutputStream ; <nl> <nl> public : <nl> std : : string getName ( ) const override { return " Log " ; } <nl> - std : : string getTableName ( ) const override { return name ; } <nl> + std : : string getTableName ( ) const override { return table_name ; } <nl> + std : : string getDatabaseName ( ) const override { return database_name ; } <nl> <nl> BlockInputStreams read ( <nl> const Names & column_names , <nl> friend class LogBlockOutputStream ; <nl> <nl> void truncate ( const ASTPtr & , const Context & ) override ; <nl> <nl> - std : : string full_path ( ) const { return path + escapeForFileName ( name ) + ' / ' ; } <nl> + std : : string full_path ( ) const { return path + escapeForFileName ( table_name ) + ' / ' ; } <nl> <nl> String getDataPath ( ) const override { return full_path ( ) ; } <nl> <nl> friend class LogBlockOutputStream ; <nl> * / <nl> StorageLog ( <nl> const std : : string & path_ , <nl> - const std : : string & name_ , <nl> + const std : : string & database_name_ , <nl> + const std : : string & table_name_ , <nl> const ColumnsDescription & columns_ , <nl> size_t max_compress_block_size_ ) ; <nl> <nl> private : <nl> String path ; <nl> - String name ; <nl> + String table_name ; <nl> + String database_name ; <nl> <nl> mutable std : : shared_mutex rwlock ; <nl> <nl> friend class LogBlockOutputStream ; <nl> * / <nl> const Marks & getMarksWithRealRowCount ( ) const ; <nl> <nl> - std : : string getFullPath ( ) const { return path + escapeForFileName ( name ) + ' / ' ; } <nl> + std : : string getFullPath ( ) const { return path + escapeForFileName ( table_name ) + ' / ' ; } <nl> } ; <nl> <nl> } <nl> mmm a / dbms / src / Storages / StorageMaterializedView . cpp <nl> ppp b / dbms / src / Storages / StorageMaterializedView . cpp <nl> static void executeRenameQuery ( Context & global_context , const String & database <nl> } <nl> <nl> <nl> - void StorageMaterializedView : : rename ( const String & / * new_path_to_db * / , const String & / * new_database_name * / , const String & new_table_name ) <nl> + void StorageMaterializedView : : rename ( const String & / * new_path_to_db * / , const String & new_database_name , const String & new_table_name ) <nl> { <nl> if ( has_inner_table & & tryGetTargetTable ( ) ) <nl> { <nl> void StorageMaterializedView : : rename ( const String & / * new_path_to_db * / , const St <nl> DatabaseAndTableName ( database_name , table_name ) ) ; <nl> <nl> table_name = new_table_name ; <nl> + database_name = new_database_name ; <nl> <nl> global_context . addDependencyUnsafe ( <nl> DatabaseAndTableName ( select_database_name , select_table_name ) , <nl> mmm a / dbms / src / Storages / StorageMaterializedView . h <nl> ppp b / dbms / src / Storages / StorageMaterializedView . h <nl> class StorageMaterializedView : public ext : : shared_ptr_helper < StorageMaterialize <nl> public : <nl> std : : string getName ( ) const override { return " MaterializedView " ; } <nl> std : : string getTableName ( ) const override { return table_name ; } <nl> + std : : string getDatabaseName ( ) const override { return database_name ; } <nl> + <nl> ASTPtr getInnerQuery ( ) const { return inner_query - > clone ( ) ; } <nl> <nl> NameAndTypePair getColumn ( const String & column_name ) const override ; <nl> mmm a / dbms / src / Storages / StorageMemory . cpp <nl> ppp b / dbms / src / Storages / StorageMemory . cpp <nl> class MemoryBlockOutputStream : public IBlockOutputStream <nl> } ; <nl> <nl> <nl> - StorageMemory : : StorageMemory ( String table_name_ , ColumnsDescription columns_description_ ) <nl> - : IStorage { std : : move ( columns_description_ ) } , table_name ( std : : move ( table_name_ ) ) <nl> + StorageMemory : : StorageMemory ( String database_name_ , String table_name_ , ColumnsDescription columns_description_ ) <nl> + : IStorage { std : : move ( columns_description_ ) } , database_name ( std : : move ( database_name_ ) ) , table_name ( std : : move ( table_name_ ) ) <nl> { <nl> } <nl> <nl> void registerStorageMemory ( StorageFactory & factory ) <nl> " Engine " + args . engine_name + " doesn ' t support any arguments ( " + toString ( args . engine_args . size ( ) ) + " given ) " , <nl> ErrorCodes : : NUMBER_OF_ARGUMENTS_DOESNT_MATCH ) ; <nl> <nl> - return StorageMemory : : create ( args . table_name , args . columns ) ; <nl> + return StorageMemory : : create ( args . database_name , args . table_name , args . columns ) ; <nl> } ) ; <nl> } <nl> <nl> mmm a / dbms / src / Storages / StorageMemory . h <nl> ppp b / dbms / src / Storages / StorageMemory . h <nl> friend class MemoryBlockInputStream ; <nl> friend class MemoryBlockOutputStream ; <nl> <nl> public : <nl> - std : : string getName ( ) const override { return " Memory " ; } <nl> - std : : string getTableName ( ) const override { return table_name ; } <nl> + String getName ( ) const override { return " Memory " ; } <nl> + String getTableName ( ) const override { return table_name ; } <nl> + String getDatabaseName ( ) const override { return database_name ; } <nl> <nl> size_t getSize ( ) const { return data . size ( ) ; } <nl> <nl> friend class MemoryBlockOutputStream ; <nl> <nl> void truncate ( const ASTPtr & , const Context & ) override ; <nl> <nl> - void rename ( const String & / * new_path_to_db * / , const String & / * new_database_name * / , const String & new_table_name ) override { table_name = new_table_name ; } <nl> + void rename ( const String & / * new_path_to_db * / , const String & new_database_name , const String & new_table_name ) override { table_name = new_table_name ; database_name = new_database_name ; } <nl> <nl> private : <nl> + String database_name ; <nl> String table_name ; <nl> <nl> / / / The data itself . ` list ` - so that when inserted to the end , the existing iterators are not invalidated . <nl> friend class MemoryBlockOutputStream ; <nl> std : : mutex mutex ; <nl> <nl> protected : <nl> - StorageMemory ( String table_name_ , ColumnsDescription columns_description_ ) ; <nl> + StorageMemory ( String database_name_ , String table_name_ , ColumnsDescription columns_description_ ) ; <nl> } ; <nl> <nl> } <nl> mmm a / dbms / src / Storages / StorageMerge . cpp <nl> ppp b / dbms / src / Storages / StorageMerge . cpp <nl> namespace ErrorCodes <nl> <nl> <nl> StorageMerge : : StorageMerge ( <nl> - const std : : string & name_ , <nl> + const std : : string & database_name_ , <nl> + const std : : string & table_name_ , <nl> const ColumnsDescription & columns_ , <nl> const String & source_database_ , <nl> const String & table_name_regexp_ , <nl> const Context & context_ ) <nl> : IStorage ( columns_ , ColumnsDescription ( { { " _table " , std : : make_shared < DataTypeString > ( ) } } , true ) ) <nl> - , name ( name_ ) <nl> + , table_name ( table_name_ ) <nl> + , database_name ( database_name_ ) <nl> , source_database ( source_database_ ) <nl> , table_name_regexp ( table_name_regexp_ ) <nl> , global_context ( context_ ) <nl> StorageMerge : : StorageListWithLocks StorageMerge : : getSelectedTables ( const ASTPtr <nl> DatabaseIteratorPtr StorageMerge : : getDatabaseIterator ( const Context & context ) const <nl> { <nl> auto database = context . getDatabase ( source_database ) ; <nl> - auto table_name_match = [ this ] ( const String & table_name ) { return table_name_regexp . match ( table_name ) ; } ; <nl> + auto table_name_match = [ this ] ( const String & table_name_ ) { return table_name_regexp . match ( table_name_ ) ; } ; <nl> return database - > getIterator ( global_context , table_name_match ) ; <nl> } <nl> <nl> <nl> void StorageMerge : : alter ( <nl> - const AlterCommands & params , const String & database_name , const String & table_name , <nl> + const AlterCommands & params , const String & database_name_ , const String & table_name_ , <nl> const Context & context , TableStructureWriteLockHolder & table_lock_holder ) <nl> { <nl> lockStructureExclusively ( table_lock_holder , context . getCurrentQueryId ( ) ) ; <nl> void StorageMerge : : alter ( <nl> auto new_columns = getColumns ( ) ; <nl> auto new_indices = getIndices ( ) ; <nl> params . apply ( new_columns ) ; <nl> - context . getDatabase ( database_name ) - > alterTable ( context , table_name , new_columns , new_indices , { } ) ; <nl> + context . getDatabase ( database_name_ ) - > alterTable ( context , table_name_ , new_columns , new_indices , { } ) ; <nl> setColumns ( new_columns ) ; <nl> } <nl> <nl> void registerStorageMerge ( StorageFactory & factory ) <nl> String table_name_regexp = engine_args [ 1 ] - > as < ASTLiteral & > ( ) . value . safeGet < String > ( ) ; <nl> <nl> return StorageMerge : : create ( <nl> - args . table_name , args . columns , <nl> + args . database_name , args . table_name , args . columns , <nl> source_database , table_name_regexp , args . context ) ; <nl> } ) ; <nl> } <nl> mmm a / dbms / src / Storages / StorageMerge . h <nl> ppp b / dbms / src / Storages / StorageMerge . h <nl> class StorageMerge : public ext : : shared_ptr_helper < StorageMerge > , public IStorag <nl> { <nl> public : <nl> std : : string getName ( ) const override { return " Merge " ; } <nl> - std : : string getTableName ( ) const override { return name ; } <nl> + std : : string getTableName ( ) const override { return table_name ; } <nl> + std : : string getDatabaseName ( ) const override { return database_name ; } <nl> <nl> bool isRemote ( ) const override ; <nl> <nl> class StorageMerge : public ext : : shared_ptr_helper < StorageMerge > , public IStorag <nl> unsigned num_streams ) override ; <nl> <nl> void drop ( ) override { } <nl> - void rename ( const String & / * new_path_to_db * / , const String & / * new_database_name * / , const String & new_table_name ) override { name = new_table_name ; } <nl> + void rename ( const String & / * new_path_to_db * / , const String & new_database_name , const String & new_table_name ) override { table_name = new_table_name ; database_name = new_database_name ; } <nl> <nl> / / / you need to add and remove columns in the sub - tables manually <nl> / / / the structure of sub - tables is not checked <nl> class StorageMerge : public ext : : shared_ptr_helper < StorageMerge > , public IStorag <nl> bool mayBenefitFromIndexForIn ( const ASTPtr & left_in_operand , const Context & query_context ) const override ; <nl> <nl> private : <nl> - String name ; <nl> + String table_name ; <nl> + String database_name ; <nl> String source_database ; <nl> OptimizedRegularExpression table_name_regexp ; <nl> Context global_context ; <nl> class StorageMerge : public ext : : shared_ptr_helper < StorageMerge > , public IStorag <nl> <nl> protected : <nl> StorageMerge ( <nl> - const std : : string & name_ , <nl> + const std : : string & database_name_ , <nl> + const std : : string & table_name_ , <nl> const ColumnsDescription & columns_ , <nl> const String & source_database_ , <nl> const String & table_name_regexp_ , <nl> mmm a / dbms / src / Storages / StorageMergeTree . cpp <nl> ppp b / dbms / src / Storages / StorageMergeTree . cpp <nl> void StorageMergeTree : : truncate ( const ASTPtr & , const Context & ) <nl> clearOldPartsFromFilesystem ( ) ; <nl> } <nl> <nl> - void StorageMergeTree : : rename ( const String & new_path_to_db , const String & / * new_database_name * / , const String & new_table_name ) <nl> + void StorageMergeTree : : rename ( const String & new_path_to_db , const String & new_database_name , const String & new_table_name ) <nl> { <nl> std : : string new_full_path = new_path_to_db + escapeForFileName ( new_table_name ) + ' / ' ; <nl> <nl> void StorageMergeTree : : rename ( const String & new_path_to_db , const String & / * ne <nl> <nl> path = new_path_to_db ; <nl> table_name = new_table_name ; <nl> + database_name = new_database_name ; <nl> full_path = new_full_path ; <nl> <nl> / / / NOTE : Logger names are not updated . <nl> mmm a / dbms / src / Storages / StorageMySQL . cpp <nl> ppp b / dbms / src / Storages / StorageMySQL . cpp <nl> String backQuoteMySQL ( const String & x ) <nl> return res ; <nl> } <nl> <nl> - StorageMySQL : : StorageMySQL ( const std : : string & name , <nl> + StorageMySQL : : StorageMySQL ( <nl> + const std : : string & database_name_ , <nl> + const std : : string & table_name_ , <nl> mysqlxx : : Pool & & pool , <nl> const std : : string & remote_database_name , <nl> const std : : string & remote_table_name , <nl> StorageMySQL : : StorageMySQL ( const std : : string & name , <nl> const ColumnsDescription & columns_ , <nl> const Context & context ) <nl> : IStorage { columns_ } <nl> - , name ( name ) <nl> + , table_name ( table_name_ ) <nl> + , database_name ( database_name_ ) <nl> , remote_database_name ( remote_database_name ) <nl> , remote_table_name ( remote_table_name ) <nl> , replace_query { replace_query } <nl> void registerStorageMySQL ( StorageFactory & factory ) <nl> ErrorCodes : : BAD_ARGUMENTS ) ; <nl> <nl> return StorageMySQL : : create ( <nl> + args . database_name , <nl> args . table_name , <nl> std : : move ( pool ) , <nl> remote_database , <nl> mmm a / dbms / src / Storages / StorageMySQL . h <nl> ppp b / dbms / src / Storages / StorageMySQL . h <nl> class StorageMySQL : public ext : : shared_ptr_helper < StorageMySQL > , public IStorag <nl> { <nl> public : <nl> StorageMySQL ( <nl> - const std : : string & name , <nl> + const std : : string & database_name_ , <nl> + const std : : string & table_name_ , <nl> mysqlxx : : Pool & & pool , <nl> const std : : string & remote_database_name , <nl> const std : : string & remote_table_name , <nl> class StorageMySQL : public ext : : shared_ptr_helper < StorageMySQL > , public IStorag <nl> const Context & context ) ; <nl> <nl> std : : string getName ( ) const override { return " MySQL " ; } <nl> - std : : string getTableName ( ) const override { return name ; } <nl> + std : : string getTableName ( ) const override { return table_name ; } <nl> + std : : string getDatabaseName ( ) const override { return database_name ; } <nl> <nl> BlockInputStreams read ( <nl> const Names & column_names , <nl> class StorageMySQL : public ext : : shared_ptr_helper < StorageMySQL > , public IStorag <nl> <nl> private : <nl> friend class StorageMySQLBlockOutputStream ; <nl> - std : : string name ; <nl> + std : : string table_name ; <nl> + std : : string database_name ; <nl> <nl> std : : string remote_database_name ; <nl> std : : string remote_table_name ; <nl> mmm a / dbms / src / Storages / StorageNull . cpp <nl> ppp b / dbms / src / Storages / StorageNull . cpp <nl> void registerStorageNull ( StorageFactory & factory ) <nl> " Engine " + args . engine_name + " doesn ' t support any arguments ( " + toString ( args . engine_args . size ( ) ) + " given ) " , <nl> ErrorCodes : : NUMBER_OF_ARGUMENTS_DOESNT_MATCH ) ; <nl> <nl> - return StorageNull : : create ( args . table_name , args . columns ) ; <nl> + return StorageNull : : create ( args . database_name , args . table_name , args . columns ) ; <nl> } ) ; <nl> } <nl> <nl> mmm a / dbms / src / Storages / StorageNull . h <nl> ppp b / dbms / src / Storages / StorageNull . h <nl> class StorageNull : public ext : : shared_ptr_helper < StorageNull > , public IStorage <nl> public : <nl> std : : string getName ( ) const override { return " Null " ; } <nl> std : : string getTableName ( ) const override { return table_name ; } <nl> + std : : string getDatabaseName ( ) const override { return database_name ; } <nl> <nl> BlockInputStreams read ( <nl> const Names & column_names , <nl> class StorageNull : public ext : : shared_ptr_helper < StorageNull > , public IStorage <nl> return std : : make_shared < NullBlockOutputStream > ( getSampleBlock ( ) ) ; <nl> } <nl> <nl> - void rename ( const String & / * new_path_to_db * / , const String & / * new_database_name * / , const String & new_table_name ) override <nl> + void rename ( const String & / * new_path_to_db * / , const String & new_database_name , const String & new_table_name ) override <nl> { <nl> table_name = new_table_name ; <nl> + database_name = new_database_name ; <nl> } <nl> <nl> void alter ( <nl> class StorageNull : public ext : : shared_ptr_helper < StorageNull > , public IStorage <nl> <nl> private : <nl> String table_name ; <nl> + String database_name ; <nl> <nl> protected : <nl> - StorageNull ( String table_name_ , ColumnsDescription columns_description_ ) <nl> - : IStorage { std : : move ( columns_description_ ) } , table_name ( std : : move ( table_name_ ) ) <nl> + StorageNull ( String database_name_ , String table_name_ , ColumnsDescription columns_description_ ) <nl> + : IStorage { std : : move ( columns_description_ ) } , table_name ( std : : move ( table_name_ ) ) , database_name ( std : : move ( database_name_ ) ) <nl> { <nl> } <nl> } ; <nl> mmm a / dbms / src / Storages / StorageSet . cpp <nl> ppp b / dbms / src / Storages / StorageSet . cpp <nl> BlockOutputStreamPtr StorageSetOrJoinBase : : write ( const ASTPtr & / * query * / , const <nl> <nl> StorageSetOrJoinBase : : StorageSetOrJoinBase ( <nl> const String & path_ , <nl> + const String & database_name_ , <nl> const String & table_name_ , <nl> const ColumnsDescription & columns_ ) <nl> - : IStorage { columns_ } , table_name ( table_name_ ) <nl> + : IStorage { columns_ } , table_name ( table_name_ ) , database_name ( database_name_ ) <nl> { <nl> if ( path_ . empty ( ) ) <nl> throw Exception ( " Join and Set storages require data path " , ErrorCodes : : INCORRECT_FILE_NAME ) ; <nl> StorageSetOrJoinBase : : StorageSetOrJoinBase ( <nl> <nl> StorageSet : : StorageSet ( <nl> const String & path_ , <nl> - const String & name_ , <nl> + const String & database_name_ , <nl> + const String & table_name_ , <nl> const ColumnsDescription & columns_ ) <nl> - : StorageSetOrJoinBase { path_ , name_ , columns_ } , <nl> + : StorageSetOrJoinBase { path_ , database_name_ , table_name_ , columns_ } , <nl> set ( std : : make_shared < Set > ( SizeLimits ( ) , false ) ) <nl> { <nl> Block header = getSampleBlock ( ) ; <nl> void StorageSetOrJoinBase : : restoreFromFile ( const String & file_path ) <nl> } <nl> <nl> <nl> - void StorageSetOrJoinBase : : rename ( const String & new_path_to_db , const String & / * new_database_name * / , const String & new_table_name ) <nl> + void StorageSetOrJoinBase : : rename ( const String & new_path_to_db , const String & new_database_name , const String & new_table_name ) <nl> { <nl> / / / Rename directory with data . <nl> String new_path = new_path_to_db + escapeForFileName ( new_table_name ) ; <nl> void StorageSetOrJoinBase : : rename ( const String & new_path_to_db , const String & <nl> <nl> path = new_path + " / " ; <nl> table_name = new_table_name ; <nl> + database_name = new_database_name ; <nl> } <nl> <nl> <nl> void registerStorageSet ( StorageFactory & factory ) <nl> " Engine " + args . engine_name + " doesn ' t support any arguments ( " + toString ( args . engine_args . size ( ) ) + " given ) " , <nl> ErrorCodes : : NUMBER_OF_ARGUMENTS_DOESNT_MATCH ) ; <nl> <nl> - return StorageSet : : create ( args . data_path , args . table_name , args . columns ) ; <nl> + return StorageSet : : create ( args . data_path , args . database_name , args . table_name , args . columns ) ; <nl> } ) ; <nl> } <nl> <nl> mmm a / dbms / src / Storages / StorageSet . h <nl> ppp b / dbms / src / Storages / StorageSet . h <nl> class StorageSetOrJoinBase : public IStorage <nl> <nl> public : <nl> String getTableName ( ) const override { return table_name ; } <nl> + String getDatabaseName ( ) const override { return database_name ; } <nl> <nl> void rename ( const String & new_path_to_db , const String & new_database_name , const String & new_table_name ) override ; <nl> <nl> class StorageSetOrJoinBase : public IStorage <nl> protected : <nl> StorageSetOrJoinBase ( <nl> const String & path_ , <nl> + const String & database_name_ , <nl> const String & table_name_ , <nl> const ColumnsDescription & columns_ ) ; <nl> <nl> String path ; <nl> String table_name ; <nl> + String database_name ; <nl> <nl> std : : atomic < UInt64 > increment = 0 ; / / / For the backup file names . <nl> <nl> friend struct ext : : shared_ptr_helper < StorageSet > ; <nl> protected : <nl> StorageSet ( <nl> const String & path_ , <nl> - const String & name_ , <nl> + const String & database_name_ , <nl> + const String & table_name_ , <nl> const ColumnsDescription & columns_ ) ; <nl> } ; <nl> <nl> mmm a / dbms / src / Storages / StorageStripeLog . cpp <nl> ppp b / dbms / src / Storages / StorageStripeLog . cpp <nl> class StripeLogBlockOutputStream final : public IBlockOutputStream <nl> <nl> StorageStripeLog : : StorageStripeLog ( <nl> const std : : string & path_ , <nl> - const std : : string & name_ , <nl> + const std : : string & database_name_ , <nl> + const std : : string & table_name_ , <nl> const ColumnsDescription & columns_ , <nl> bool attach , <nl> size_t max_compress_block_size_ ) <nl> : IStorage { columns_ } , <nl> - path ( path_ ) , name ( name_ ) , <nl> + path ( path_ ) , table_name ( table_name_ ) , database_name ( database_name_ ) , <nl> max_compress_block_size ( max_compress_block_size_ ) , <nl> - file_checker ( path + escapeForFileName ( name ) + ' / ' + " sizes . json " ) , <nl> + file_checker ( path + escapeForFileName ( table_name ) + ' / ' + " sizes . json " ) , <nl> log ( & Logger : : get ( " StorageStripeLog " ) ) <nl> { <nl> if ( path . empty ( ) ) <nl> throw Exception ( " Storage " + getName ( ) + " requires data path " , ErrorCodes : : INCORRECT_FILE_NAME ) ; <nl> <nl> - String full_path = path + escapeForFileName ( name ) + ' / ' ; <nl> + String full_path = path + escapeForFileName ( table_name ) + ' / ' ; <nl> if ( ! attach ) <nl> { <nl> / / / create files if they do not exist <nl> StorageStripeLog : : StorageStripeLog ( <nl> } <nl> <nl> <nl> - void StorageStripeLog : : rename ( const String & new_path_to_db , const String & / * new_database_name * / , const String & new_table_name ) <nl> + void StorageStripeLog : : rename ( const String & new_path_to_db , const String & new_database_name , const String & new_table_name ) <nl> { <nl> std : : unique_lock < std : : shared_mutex > lock ( rwlock ) ; <nl> <nl> / / / Rename directory with data . <nl> - Poco : : File ( path + escapeForFileName ( name ) ) . renameTo ( new_path_to_db + escapeForFileName ( new_table_name ) ) ; <nl> + Poco : : File ( path + escapeForFileName ( table_name ) ) . renameTo ( new_path_to_db + escapeForFileName ( new_table_name ) ) ; <nl> <nl> path = new_path_to_db ; <nl> - name = new_table_name ; <nl> - file_checker . setPath ( path + escapeForFileName ( name ) + " / " + " sizes . json " ) ; <nl> + table_name = new_table_name ; <nl> + database_name = new_database_name ; <nl> + file_checker . setPath ( path + escapeForFileName ( table_name ) + " / " + " sizes . json " ) ; <nl> } <nl> <nl> <nl> CheckResults StorageStripeLog : : checkData ( const ASTPtr & / * query * / , const Conte <nl> <nl> void StorageStripeLog : : truncate ( const ASTPtr & , const Context & ) <nl> { <nl> - if ( name . empty ( ) ) <nl> + if ( table_name . empty ( ) ) <nl> throw Exception ( " Logical error : table name is empty " , ErrorCodes : : LOGICAL_ERROR ) ; <nl> <nl> std : : shared_lock < std : : shared_mutex > lock ( rwlock ) ; <nl> <nl> - auto file = Poco : : File ( path + escapeForFileName ( name ) ) ; <nl> + auto file = Poco : : File ( path + escapeForFileName ( table_name ) ) ; <nl> file . remove ( true ) ; <nl> file . createDirectories ( ) ; <nl> <nl> - file_checker = FileChecker { path + escapeForFileName ( name ) + ' / ' + " sizes . json " } ; <nl> + file_checker = FileChecker { path + escapeForFileName ( table_name ) + ' / ' + " sizes . json " } ; <nl> } <nl> <nl> <nl> void registerStorageStripeLog ( StorageFactory & factory ) <nl> ErrorCodes : : NUMBER_OF_ARGUMENTS_DOESNT_MATCH ) ; <nl> <nl> return StorageStripeLog : : create ( <nl> - args . data_path , args . table_name , args . columns , <nl> + args . data_path , args . database_name , args . table_name , args . columns , <nl> args . attach , args . context . getSettings ( ) . max_compress_block_size ) ; <nl> } ) ; <nl> } <nl> mmm a / dbms / src / Storages / StorageStripeLog . h <nl> ppp b / dbms / src / Storages / StorageStripeLog . h <nl> friend class StripeLogBlockOutputStream ; <nl> <nl> public : <nl> std : : string getName ( ) const override { return " StripeLog " ; } <nl> - std : : string getTableName ( ) const override { return name ; } <nl> + std : : string getTableName ( ) const override { return table_name ; } <nl> + std : : string getDatabaseName ( ) const override { return database_name ; } <nl> <nl> BlockInputStreams read ( <nl> const Names & column_names , <nl> friend class StripeLogBlockOutputStream ; <nl> } ; <nl> using Files_t = std : : map < String , ColumnData > ; <nl> <nl> - std : : string full_path ( ) const { return path + escapeForFileName ( name ) + ' / ' ; } <nl> + std : : string full_path ( ) const { return path + escapeForFileName ( table_name ) + ' / ' ; } <nl> <nl> String getDataPath ( ) const override { return full_path ( ) ; } <nl> <nl> friend class StripeLogBlockOutputStream ; <nl> <nl> private : <nl> String path ; <nl> - String name ; <nl> + String table_name ; <nl> + String database_name ; <nl> <nl> size_t max_compress_block_size ; <nl> <nl> friend class StripeLogBlockOutputStream ; <nl> protected : <nl> StorageStripeLog ( <nl> const std : : string & path_ , <nl> - const std : : string & name_ , <nl> + const std : : string & database_name_ , <nl> + const std : : string & table_name_ , <nl> const ColumnsDescription & columns_ , <nl> bool attach , <nl> size_t max_compress_block_size_ ) ; <nl> mmm a / dbms / src / Storages / StorageTinyLog . cpp <nl> ppp b / dbms / src / Storages / StorageTinyLog . cpp <nl> void TinyLogBlockOutputStream : : write ( const Block & block ) <nl> <nl> StorageTinyLog : : StorageTinyLog ( <nl> const std : : string & path_ , <nl> - const std : : string & name_ , <nl> + const std : : string & database_name_ , <nl> + const std : : string & table_name_ , <nl> const ColumnsDescription & columns_ , <nl> bool attach , <nl> size_t max_compress_block_size_ ) <nl> : IStorage { columns_ } , <nl> - path ( path_ ) , name ( name_ ) , <nl> + path ( path_ ) , table_name ( table_name_ ) , database_name ( database_name_ ) , <nl> max_compress_block_size ( max_compress_block_size_ ) , <nl> - file_checker ( path + escapeForFileName ( name ) + ' / ' + " sizes . json " ) , <nl> + file_checker ( path + escapeForFileName ( table_name ) + ' / ' + " sizes . json " ) , <nl> log ( & Logger : : get ( " StorageTinyLog " ) ) <nl> { <nl> if ( path . empty ( ) ) <nl> throw Exception ( " Storage " + getName ( ) + " requires data path " , ErrorCodes : : INCORRECT_FILE_NAME ) ; <nl> <nl> - String full_path = path + escapeForFileName ( name ) + ' / ' ; <nl> + String full_path = path + escapeForFileName ( table_name ) + ' / ' ; <nl> if ( ! attach ) <nl> { <nl> / / / create files if they do not exist <nl> void StorageTinyLog : : addFiles ( const String & column_name , const IDataType & type <nl> ColumnData column_data ; <nl> files . insert ( std : : make_pair ( stream_name , column_data ) ) ; <nl> files [ stream_name ] . data_file = Poco : : File ( <nl> - path + escapeForFileName ( name ) + ' / ' + stream_name + DBMS_STORAGE_LOG_DATA_FILE_EXTENSION ) ; <nl> + path + escapeForFileName ( table_name ) + ' / ' + stream_name + DBMS_STORAGE_LOG_DATA_FILE_EXTENSION ) ; <nl> } <nl> } ; <nl> <nl> void StorageTinyLog : : addFiles ( const String & column_name , const IDataType & type <nl> } <nl> <nl> <nl> - void StorageTinyLog : : rename ( const String & new_path_to_db , const String & / * new_database_name * / , const String & new_table_name ) <nl> + void StorageTinyLog : : rename ( const String & new_path_to_db , const String & new_database_name , const String & new_table_name ) <nl> { <nl> / / / Rename directory with data . <nl> - Poco : : File ( path + escapeForFileName ( name ) ) . renameTo ( new_path_to_db + escapeForFileName ( new_table_name ) ) ; <nl> + Poco : : File ( path + escapeForFileName ( table_name ) ) . renameTo ( new_path_to_db + escapeForFileName ( new_table_name ) ) ; <nl> <nl> path = new_path_to_db ; <nl> - name = new_table_name ; <nl> - file_checker . setPath ( path + escapeForFileName ( name ) + " / " + " sizes . json " ) ; <nl> + table_name = new_table_name ; <nl> + database_name = new_database_name ; <nl> + file_checker . setPath ( path + escapeForFileName ( table_name ) + " / " + " sizes . json " ) ; <nl> <nl> for ( Files_t : : iterator it = files . begin ( ) ; it ! = files . end ( ) ; + + it ) <nl> - it - > second . data_file = Poco : : File ( path + escapeForFileName ( name ) + ' / ' + Poco : : Path ( it - > second . data_file . path ( ) ) . getFileName ( ) ) ; <nl> + it - > second . data_file = Poco : : File ( path + escapeForFileName ( table_name ) + ' / ' + Poco : : Path ( it - > second . data_file . path ( ) ) . getFileName ( ) ) ; <nl> } <nl> <nl> <nl> CheckResults StorageTinyLog : : checkData ( const ASTPtr & / * query * / , const Context <nl> <nl> void StorageTinyLog : : truncate ( const ASTPtr & , const Context & ) <nl> { <nl> - if ( name . empty ( ) ) <nl> + if ( table_name . empty ( ) ) <nl> throw Exception ( " Logical error : table name is empty " , ErrorCodes : : LOGICAL_ERROR ) ; <nl> <nl> - auto file = Poco : : File ( path + escapeForFileName ( name ) ) ; <nl> + auto file = Poco : : File ( path + escapeForFileName ( table_name ) ) ; <nl> file . remove ( true ) ; <nl> file . createDirectories ( ) ; <nl> <nl> files . clear ( ) ; <nl> - file_checker = FileChecker { path + escapeForFileName ( name ) + ' / ' + " sizes . json " } ; <nl> + file_checker = FileChecker { path + escapeForFileName ( table_name ) + ' / ' + " sizes . json " } ; <nl> <nl> for ( const auto & column : getColumns ( ) . getAllPhysical ( ) ) <nl> addFiles ( column . name , * column . type ) ; <nl> void registerStorageTinyLog ( StorageFactory & factory ) <nl> ErrorCodes : : NUMBER_OF_ARGUMENTS_DOESNT_MATCH ) ; <nl> <nl> return StorageTinyLog : : create ( <nl> - args . data_path , args . table_name , args . columns , <nl> + args . data_path , args . database_name , args . table_name , args . columns , <nl> args . attach , args . context . getSettings ( ) . max_compress_block_size ) ; <nl> } ) ; <nl> } <nl> mmm a / dbms / src / Storages / StorageTinyLog . h <nl> ppp b / dbms / src / Storages / StorageTinyLog . h <nl> friend class TinyLogBlockOutputStream ; <nl> <nl> public : <nl> std : : string getName ( ) const override { return " TinyLog " ; } <nl> - std : : string getTableName ( ) const override { return name ; } <nl> + std : : string getTableName ( ) const override { return table_name ; } <nl> + std : : string getDatabaseName ( ) const override { return database_name ; } <nl> <nl> BlockInputStreams read ( <nl> const Names & column_names , <nl> friend class TinyLogBlockOutputStream ; <nl> } ; <nl> using Files_t = std : : map < String , ColumnData > ; <nl> <nl> - std : : string full_path ( ) const { return path + escapeForFileName ( name ) + ' / ' ; } <nl> + std : : string full_path ( ) const { return path + escapeForFileName ( table_name ) + ' / ' ; } <nl> <nl> String getDataPath ( ) const override { return full_path ( ) ; } <nl> <nl> friend class TinyLogBlockOutputStream ; <nl> <nl> private : <nl> String path ; <nl> - String name ; <nl> + String table_name ; <nl> + String database_name ; <nl> <nl> size_t max_compress_block_size ; <nl> <nl> friend class TinyLogBlockOutputStream ; <nl> protected : <nl> StorageTinyLog ( <nl> const std : : string & path_ , <nl> - const std : : string & name_ , <nl> + const std : : string & database_name_ , <nl> + const std : : string & table_name_ , <nl> const ColumnsDescription & columns_ , <nl> bool attach , <nl> size_t max_compress_block_size_ ) ; <nl> mmm a / dbms / src / Storages / StorageURL . cpp <nl> ppp b / dbms / src / Storages / StorageURL . cpp <nl> namespace ErrorCodes <nl> <nl> IStorageURLBase : : IStorageURLBase ( const Poco : : URI & uri_ , <nl> const Context & context_ , <nl> + const std : : string & database_name_ , <nl> const std : : string & table_name_ , <nl> const String & format_name_ , <nl> const ColumnsDescription & columns_ ) <nl> - : IStorage ( columns_ ) , uri ( uri_ ) , context_global ( context_ ) , format_name ( format_name_ ) , table_name ( table_name_ ) <nl> + : IStorage ( columns_ ) , uri ( uri_ ) , context_global ( context_ ) , format_name ( format_name_ ) , table_name ( table_name_ ) , database_name ( database_name_ ) <nl> { <nl> } <nl> <nl> BlockInputStreams IStorageURLBase : : read ( const Names & column_names , <nl> return { std : : make_shared < AddingDefaultsBlockInputStream > ( block_input , column_defaults , context ) } ; <nl> } <nl> <nl> - void IStorageURLBase : : rename ( const String & / * new_path_to_db * / , const String & / * new_database_name * / , const String & / * new_table_name * / ) { } <nl> + void IStorageURLBase : : rename ( const String & / * new_path_to_db * / , const String & new_database_name , const String & new_table_name ) <nl> + { <nl> + table_name = new_table_name ; <nl> + database_name = new_database_name ; <nl> + } <nl> <nl> BlockOutputStreamPtr IStorageURLBase : : write ( const ASTPtr & / * query * / , const Context & / * context * / ) <nl> { <nl> void registerStorageURL ( StorageFactory & factory ) <nl> <nl> String format_name = engine_args [ 1 ] - > as < ASTLiteral & > ( ) . value . safeGet < String > ( ) ; <nl> <nl> - return StorageURL : : create ( uri , args . table_name , format_name , args . columns , args . context ) ; <nl> + return StorageURL : : create ( uri , args . database_name , args . table_name , format_name , args . columns , args . context ) ; <nl> } ) ; <nl> } <nl> } <nl> mmm a / dbms / src / Storages / StorageURL . h <nl> ppp b / dbms / src / Storages / StorageURL . h <nl> namespace DB <nl> class IStorageURLBase : public IStorage <nl> { <nl> public : <nl> - String getTableName ( ) const override <nl> - { <nl> - return table_name ; <nl> - } <nl> + String getTableName ( ) const override { return table_name ; } <nl> + String getDatabaseName ( ) const override { return database_name ; } <nl> <nl> BlockInputStreams read ( const Names & column_names , <nl> const SelectQueryInfo & query_info , <nl> class IStorageURLBase : public IStorage <nl> protected : <nl> IStorageURLBase ( const Poco : : URI & uri_ , <nl> const Context & context_ , <nl> + const std : : string & database_name_ , <nl> const std : : string & table_name_ , <nl> const String & format_name_ , <nl> const ColumnsDescription & columns_ ) ; <nl> class IStorageURLBase : public IStorage <nl> private : <nl> String format_name ; <nl> String table_name ; <nl> + String database_name ; <nl> <nl> virtual std : : string getReadMethod ( ) const ; <nl> <nl> class StorageURL : public ext : : shared_ptr_helper < StorageURL > , public IStorageURL <nl> { <nl> public : <nl> StorageURL ( const Poco : : URI & uri_ , <nl> + const std : : string & database_name_ , <nl> const std : : string & table_name_ , <nl> const String & format_name_ , <nl> const ColumnsDescription & columns_ , <nl> Context & context_ ) <nl> - : IStorageURLBase ( uri_ , context_ , table_name_ , format_name_ , columns_ ) <nl> + : IStorageURLBase ( uri_ , context_ , database_name_ , table_name_ , format_name_ , columns_ ) <nl> { <nl> } <nl> <nl> mmm a / dbms / src / Storages / StorageView . cpp <nl> ppp b / dbms / src / Storages / StorageView . cpp <nl> namespace ErrorCodes <nl> <nl> <nl> StorageView : : StorageView ( <nl> + const String & database_name_ , <nl> const String & table_name_ , <nl> const ASTCreateQuery & query , <nl> const ColumnsDescription & columns_ ) <nl> - : IStorage { columns_ } , table_name ( table_name_ ) <nl> + : IStorage { columns_ } , table_name ( table_name_ ) , database_name ( database_name_ ) <nl> { <nl> if ( ! query . select ) <nl> throw Exception ( " SELECT query is not specified for " + getName ( ) , ErrorCodes : : INCORRECT_QUERY ) ; <nl> void registerStorageView ( StorageFactory & factory ) <nl> if ( args . query . storage ) <nl> throw Exception ( " Specifying ENGINE is not allowed for a View " , ErrorCodes : : INCORRECT_QUERY ) ; <nl> <nl> - return StorageView : : create ( args . table_name , args . query , args . columns ) ; <nl> + return StorageView : : create ( args . database_name , args . table_name , args . query , args . columns ) ; <nl> } ) ; <nl> } <nl> <nl> mmm a / dbms / src / Storages / StorageView . h <nl> ppp b / dbms / src / Storages / StorageView . h <nl> class StorageView : public ext : : shared_ptr_helper < StorageView > , public IStorage <nl> public : <nl> std : : string getName ( ) const override { return " View " ; } <nl> std : : string getTableName ( ) const override { return table_name ; } <nl> + std : : string getDatabaseName ( ) const override { return database_name ; } <nl> <nl> / / / It is passed inside the query and solved at its level . <nl> bool supportsSampling ( ) const override { return true ; } <nl> class StorageView : public ext : : shared_ptr_helper < StorageView > , public IStorage <nl> size_t max_block_size , <nl> unsigned num_streams ) override ; <nl> <nl> - void rename ( const String & / * new_path_to_db * / , const String & / * new_database_name * / , const String & new_table_name ) override <nl> + void rename ( const String & / * new_path_to_db * / , const String & new_database_name , const String & new_table_name ) override <nl> { <nl> table_name = new_table_name ; <nl> + database_name = new_database_name ; <nl> } <nl> <nl> private : <nl> String table_name ; <nl> + String database_name ; <nl> ASTPtr inner_query ; <nl> <nl> void replaceTableNameWithSubquery ( ASTSelectQuery * select_query , ASTPtr & subquery ) ; <nl> <nl> protected : <nl> StorageView ( <nl> + const String & database_name_ , <nl> const String & table_name_ , <nl> const ASTCreateQuery & query , <nl> const ColumnsDescription & columns_ ) ; <nl> mmm a / dbms / src / Storages / StorageXDBC . cpp <nl> ppp b / dbms / src / Storages / StorageXDBC . cpp <nl> namespace ErrorCodes <nl> } <nl> <nl> <nl> - StorageXDBC : : StorageXDBC ( const std : : string & table_name_ , <nl> + StorageXDBC : : StorageXDBC ( <nl> + const std : : string & database_name_ , <nl> + const std : : string & table_name_ , <nl> const std : : string & remote_database_name_ , <nl> const std : : string & remote_table_name_ , <nl> const ColumnsDescription & columns_ , <nl> const Context & context_ , <nl> const BridgeHelperPtr bridge_helper_ ) <nl> - : IStorageURLBase ( Poco : : URI ( ) , context_ , table_name_ , IXDBCBridgeHelper : : DEFAULT_FORMAT , columns_ ) <nl> + : IStorageURLBase ( Poco : : URI ( ) , context_ , database_name_ , table_name_ , IXDBCBridgeHelper : : DEFAULT_FORMAT , columns_ ) <nl> , bridge_helper ( bridge_helper_ ) <nl> , remote_database_name ( remote_database_name_ ) <nl> , remote_table_name ( remote_table_name_ ) <nl> namespace <nl> BridgeHelperPtr bridge_helper = std : : make_shared < XDBCBridgeHelper < BridgeHelperMixin > > ( args . context , <nl> args . context . getSettingsRef ( ) . http_receive_timeout . value , <nl> engine_args [ 0 ] - > as < ASTLiteral & > ( ) . value . safeGet < String > ( ) ) ; <nl> - return std : : make_shared < StorageXDBC > ( args . table_name , <nl> + return std : : make_shared < StorageXDBC > ( args . database_name , args . table_name , <nl> engine_args [ 1 ] - > as < ASTLiteral & > ( ) . value . safeGet < String > ( ) , <nl> engine_args [ 2 ] - > as < ASTLiteral & > ( ) . value . safeGet < String > ( ) , <nl> args . columns , <nl> mmm a / dbms / src / Storages / StorageXDBC . h <nl> ppp b / dbms / src / Storages / StorageXDBC . h <nl> namespace DB <nl> unsigned num_streams ) override ; <nl> <nl> <nl> - StorageXDBC ( const std : : string & table_name_ , <nl> + StorageXDBC ( const std : : string & database_name_ , <nl> + const std : : string & table_name_ , <nl> const std : : string & remote_database_name , <nl> const std : : string & remote_table_name , <nl> const ColumnsDescription & columns_ , <nl> mmm a / dbms / src / Storages / System / IStorageSystemOneBlock . h <nl> ppp b / dbms / src / Storages / System / IStorageSystemOneBlock . h <nl> class IStorageSystemOneBlock : public IStorage <nl> setColumns ( ColumnsDescription ( Self : : getNamesAndTypes ( ) ) ) ; <nl> } <nl> <nl> - std : : string getTableName ( ) const override <nl> - { <nl> - return name ; <nl> - } <nl> + std : : string getTableName ( ) const override { return name ; } <nl> + std : : string getDatabaseName ( ) const override { return " system " ; } <nl> <nl> BlockInputStreams read ( const Names & column_names , <nl> const SelectQueryInfo & query_info , <nl> mmm a / dbms / src / Storages / System / StorageSystemColumns . h <nl> ppp b / dbms / src / Storages / System / StorageSystemColumns . h <nl> class StorageSystemColumns : public ext : : shared_ptr_helper < StorageSystemColumns > <nl> { <nl> public : <nl> std : : string getName ( ) const override { return " SystemColumns " ; } <nl> - <nl> std : : string getTableName ( ) const override { return name ; } <nl> + std : : string getDatabaseName ( ) const override { return " system " ; } <nl> <nl> BlockInputStreams read ( <nl> const Names & column_names , <nl> mmm a / dbms / src / Storages / System / StorageSystemDetachedParts . cpp <nl> ppp b / dbms / src / Storages / System / StorageSystemDetachedParts . cpp <nl> class StorageSystemDetachedParts : <nl> public : <nl> std : : string getName ( ) const override { return " SystemDetachedParts " ; } <nl> std : : string getTableName ( ) const override { return " detached_parts " ; } <nl> + std : : string getDatabaseName ( ) const override { return " system " ; } <nl> <nl> protected : <nl> explicit StorageSystemDetachedParts ( ) <nl> mmm a / dbms / src / Storages / System / StorageSystemNumbers . h <nl> ppp b / dbms / src / Storages / System / StorageSystemNumbers . h <nl> class StorageSystemNumbers : public ext : : shared_ptr_helper < StorageSystemNumbers > <nl> public : <nl> std : : string getName ( ) const override { return " SystemNumbers " ; } <nl> std : : string getTableName ( ) const override { return name ; } <nl> + std : : string getDatabaseName ( ) const override { return " system " ; } <nl> <nl> BlockInputStreams read ( <nl> const Names & column_names , <nl> mmm a / dbms / src / Storages / System / StorageSystemOne . h <nl> ppp b / dbms / src / Storages / System / StorageSystemOne . h <nl> class StorageSystemOne : public ext : : shared_ptr_helper < StorageSystemOne > , public <nl> public : <nl> std : : string getName ( ) const override { return " SystemOne " ; } <nl> std : : string getTableName ( ) const override { return name ; } <nl> + std : : string getDatabaseName ( ) const override { return " system " ; } <nl> <nl> BlockInputStreams read ( <nl> const Names & column_names , <nl> mmm a / dbms / src / Storages / System / StorageSystemPartsBase . h <nl> ppp b / dbms / src / Storages / System / StorageSystemPartsBase . h <nl> class StorageSystemPartsBase : public IStorage <nl> { <nl> public : <nl> std : : string getTableName ( ) const override { return name ; } <nl> + std : : string getDatabaseName ( ) const override { return " system " ; } <nl> <nl> NameAndTypePair getColumn ( const String & column_name ) const override ; <nl> <nl> mmm a / dbms / src / Storages / System / StorageSystemReplicas . h <nl> ppp b / dbms / src / Storages / System / StorageSystemReplicas . h <nl> class StorageSystemReplicas : public ext : : shared_ptr_helper < StorageSystemReplica <nl> public : <nl> std : : string getName ( ) const override { return " SystemReplicas " ; } <nl> std : : string getTableName ( ) const override { return name ; } <nl> + std : : string getDatabaseName ( ) const override { return " system " ; } <nl> <nl> BlockInputStreams read ( <nl> const Names & column_names , <nl> mmm a / dbms / src / Storages / System / StorageSystemTables . h <nl> ppp b / dbms / src / Storages / System / StorageSystemTables . h <nl> class StorageSystemTables : public ext : : shared_ptr_helper < StorageSystemTables > , <nl> public : <nl> std : : string getName ( ) const override { return " SystemTables " ; } <nl> std : : string getTableName ( ) const override { return name ; } <nl> + std : : string getDatabaseName ( ) const override { return " system " ; } <nl> <nl> BlockInputStreams read ( <nl> const Names & column_names , <nl> mmm a / dbms / src / Storages / tests / gtest_transform_query_for_external_database . cpp <nl> ppp b / dbms / src / Storages / tests / gtest_transform_query_for_external_database . cpp <nl> struct State <nl> { <nl> registerFunctions ( ) ; <nl> DatabasePtr database = std : : make_shared < DatabaseMemory > ( " test " ) ; <nl> - database - > attachTable ( " table " , StorageMemory : : create ( " table " , ColumnsDescription { columns } ) ) ; <nl> + database - > attachTable ( " table " , StorageMemory : : create ( " test " , " table " , ColumnsDescription { columns } ) ) ; <nl> context . makeGlobalContext ( ) ; <nl> context . addDatabase ( " test " , database ) ; <nl> context . setCurrentDatabase ( " test " ) ; <nl> mmm a / dbms / src / Storages / tests / storage_log . cpp <nl> ppp b / dbms / src / Storages / tests / storage_log . cpp <nl> try <nl> names_and_types . emplace_back ( " a " , std : : make_shared < DataTypeUInt64 > ( ) ) ; <nl> names_and_types . emplace_back ( " b " , std : : make_shared < DataTypeUInt8 > ( ) ) ; <nl> <nl> - StoragePtr table = StorageLog : : create ( " . / " , " test " , ColumnsDescription { names_and_types } , 1048576 ) ; <nl> + StoragePtr table = StorageLog : : create ( " . / " , " test " , " test " , ColumnsDescription { names_and_types } , 1048576 ) ; <nl> table - > startup ( ) ; <nl> <nl> auto context = Context : : createGlobal ( ) ; <nl> mmm a / dbms / src / TableFunctions / ITableFunction . h <nl> ppp b / dbms / src / TableFunctions / ITableFunction . h <nl> class Context ; <nl> class ITableFunction <nl> { <nl> public : <nl> + static inline std : : string getDatabaseName ( ) { return " _table_function " ; } <nl> + <nl> / / / Get the main function name . <nl> virtual std : : string getName ( ) const = 0 ; <nl> <nl> mmm a / dbms / src / TableFunctions / ITableFunctionXDBC . cpp <nl> ppp b / dbms / src / TableFunctions / ITableFunctionXDBC . cpp <nl> StoragePtr ITableFunctionXDBC : : executeImpl ( const ASTPtr & ast_function , const Co <nl> readStringBinary ( columns_info , buf ) ; <nl> NamesAndTypesList columns = NamesAndTypesList : : parse ( columns_info ) ; <nl> <nl> - auto result = std : : make_shared < StorageXDBC > ( table_name , schema_name , table_name , ColumnsDescription { columns } , context , helper ) ; <nl> + auto result = std : : make_shared < StorageXDBC > ( getDatabaseName ( ) , table_name , schema_name , table_name , ColumnsDescription { columns } , context , helper ) ; <nl> <nl> if ( ! result ) <nl> throw Exception ( " Failed to instantiate storage from table function " + getName ( ) , ErrorCodes : : UNKNOWN_EXCEPTION ) ; <nl> mmm a / dbms / src / TableFunctions / TableFunctionCatBoostPool . cpp <nl> ppp b / dbms / src / TableFunctions / TableFunctionCatBoostPool . cpp <nl> StoragePtr TableFunctionCatBoostPool : : executeImpl ( const ASTPtr & ast_function , c <nl> String column_descriptions_file = getStringLiteral ( * args [ 0 ] , " Column descriptions file " ) ; <nl> String dataset_description_file = getStringLiteral ( * args [ 1 ] , " Dataset description file " ) ; <nl> <nl> - return StorageCatBoostPool : : create ( context , column_descriptions_file , dataset_description_file ) ; <nl> + return StorageCatBoostPool : : create ( getDatabaseName ( ) , getName ( ) , context , column_descriptions_file , dataset_description_file ) ; <nl> } <nl> <nl> void registerTableFunctionCatBoostPool ( TableFunctionFactory & factory ) <nl> mmm a / dbms / src / TableFunctions / TableFunctionFile . cpp <nl> ppp b / dbms / src / TableFunctions / TableFunctionFile . cpp <nl> StoragePtr TableFunctionFile : : getStorage ( <nl> return StorageFile : : create ( source , <nl> - 1 , <nl> global_context . getUserFilesPath ( ) , <nl> + getDatabaseName ( ) , <nl> getName ( ) , <nl> format , <nl> ColumnsDescription { sample_block . getNamesAndTypesList ( ) } , <nl> mmm a / dbms / src / TableFunctions / TableFunctionHDFS . cpp <nl> ppp b / dbms / src / TableFunctions / TableFunctionHDFS . cpp <nl> StoragePtr TableFunctionHDFS : : getStorage ( <nl> const String & source , const String & format , const Block & sample_block , Context & global_context ) const <nl> { <nl> return StorageHDFS : : create ( source , <nl> + getDatabaseName ( ) , <nl> getName ( ) , <nl> format , <nl> ColumnsDescription { sample_block . getNamesAndTypesList ( ) } , <nl> mmm a / dbms / src / TableFunctions / TableFunctionMerge . cpp <nl> ppp b / dbms / src / TableFunctions / TableFunctionMerge . cpp <nl> StoragePtr TableFunctionMerge : : executeImpl ( const ASTPtr & ast_function , const Co <nl> String table_name_regexp = args [ 1 ] - > as < ASTLiteral & > ( ) . value . safeGet < String > ( ) ; <nl> <nl> auto res = StorageMerge : : create ( <nl> + getDatabaseName ( ) , <nl> getName ( ) , <nl> ColumnsDescription { chooseColumns ( source_database , table_name_regexp , context ) } , <nl> source_database , <nl> mmm a / dbms / src / TableFunctions / TableFunctionMySQL . cpp <nl> ppp b / dbms / src / TableFunctions / TableFunctionMySQL . cpp <nl> StoragePtr TableFunctionMySQL : : executeImpl ( const ASTPtr & ast_function , const Co <nl> throw Exception ( " MySQL table " + backQuoteIfNeed ( database_name ) + " . " + backQuoteIfNeed ( table_name ) + " doesn ' t exist . " , ErrorCodes : : UNKNOWN_TABLE ) ; <nl> <nl> auto res = StorageMySQL : : create ( <nl> + getDatabaseName ( ) , <nl> table_name , <nl> std : : move ( pool ) , <nl> database_name , <nl> mmm a / dbms / src / TableFunctions / TableFunctionURL . cpp <nl> ppp b / dbms / src / TableFunctions / TableFunctionURL . cpp <nl> StoragePtr TableFunctionURL : : getStorage ( <nl> const String & source , const String & format , const Block & sample_block , Context & global_context ) const <nl> { <nl> Poco : : URI uri ( source ) ; <nl> - return StorageURL : : create ( uri , getName ( ) , format , ColumnsDescription { sample_block . getNamesAndTypesList ( ) } , global_context ) ; <nl> + return StorageURL : : create ( uri , getDatabaseName ( ) , getName ( ) , format , ColumnsDescription { sample_block . getNamesAndTypesList ( ) } , global_context ) ; <nl> } <nl> <nl> void registerTableFunctionURL ( TableFunctionFactory & factory ) <nl>
Merge pull request from abyss7 / fix - filter - table
ClickHouse/ClickHouse
a93c76837e59045460a12d67adb1ee703f5f06d0
2019-07-12T21:51:39Z
new file mode 100755 <nl> index 00000000000 . . ba3ba772946 <nl> mmm / dev / null <nl> ppp b / build / 3rdParty / jemalloc / v4 . 5 . 0 / configure <nl> <nl> + # ! / bin / sh <nl> + # Guess values for system - dependent variables and create Makefiles . <nl> + # Generated by GNU Autoconf 2 . 69 . <nl> + # <nl> + # <nl> + # Copyright ( C ) 1992 - 1996 , 1998 - 2012 Free Software Foundation , Inc . <nl> + # <nl> + # <nl> + # This configure script is free software ; the Free Software Foundation <nl> + # gives unlimited permission to copy , distribute and modify it . <nl> + # # mmmmmmmmmmmmmmmmmm - - # # <nl> + # # M4sh Initialization . # # <nl> + # # mmmmmmmmmmmmmmmmmm - - # # <nl> + <nl> + # Be more Bourne compatible <nl> + DUALCASE = 1 ; export DUALCASE # for MKS sh <nl> + if test - n " $ { ZSH_VERSION + set } " & & ( emulate sh ) > / dev / null 2 > & 1 ; then : <nl> + emulate sh <nl> + NULLCMD = : <nl> + # Pre - 4 . 2 versions of Zsh do word splitting on $ { 1 + " $ @ " } , which <nl> + # is contrary to our usage . Disable this feature . <nl> + alias - g ' $ { 1 + " $ @ " } ' = ' " $ @ " ' <nl> + setopt NO_GLOB_SUBST <nl> + else <nl> + case ` ( set - o ) 2 > / dev / null ` in # ( <nl> + * posix * ) : <nl> + set - o posix ; ; # ( <nl> + * ) : <nl> + ; ; <nl> + esac <nl> + fi <nl> + <nl> + <nl> + as_nl = ' <nl> + ' <nl> + export as_nl <nl> + # Printing a long string crashes Solaris 7 / usr / bin / printf . <nl> + as_echo = ' \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ' <nl> + as_echo = $ as_echo $ as_echo $ as_echo $ as_echo $ as_echo <nl> + as_echo = $ as_echo $ as_echo $ as_echo $ as_echo $ as_echo $ as_echo <nl> + # Prefer a ksh shell builtin over an external printf program on Solaris , <nl> + # but without wasting forks for bash or zsh . <nl> + if test - z " $ BASH_VERSION $ ZSH_VERSION " \ <nl> + & & ( test " X ` print - r - - $ as_echo ` " = " X $ as_echo " ) 2 > / dev / null ; then <nl> + as_echo = ' print - r - - ' <nl> + as_echo_n = ' print - rn - - ' <nl> + elif ( test " X ` printf % s $ as_echo ` " = " X $ as_echo " ) 2 > / dev / null ; then <nl> + as_echo = ' printf % s \ n ' <nl> + as_echo_n = ' printf % s ' <nl> + else <nl> + if test " X ` ( / usr / ucb / echo - n - n $ as_echo ) 2 > / dev / null ` " = " X - n $ as_echo " ; then <nl> + as_echo_body = ' eval / usr / ucb / echo - n " $ 1 $ as_nl " ' <nl> + as_echo_n = ' / usr / ucb / echo - n ' <nl> + else <nl> + as_echo_body = ' eval expr " X $ 1 " : " X \ \ ( . * \ \ ) " ' <nl> + as_echo_n_body = ' eval <nl> + arg = $ 1 ; <nl> + case $ arg in # ( <nl> + * " $ as_nl " * ) <nl> + expr " X $ arg " : " X \ \ ( . * \ \ ) $ as_nl " ; <nl> + arg = ` expr " X $ arg " : " . * $ as_nl \ \ ( . * \ \ ) " ` ; ; <nl> + esac ; <nl> + expr " X $ arg " : " X \ \ ( . * \ \ ) " | tr - d " $ as_nl " <nl> + ' <nl> + export as_echo_n_body <nl> + as_echo_n = ' sh - c $ as_echo_n_body as_echo ' <nl> + fi <nl> + export as_echo_body <nl> + as_echo = ' sh - c $ as_echo_body as_echo ' <nl> + fi <nl> + <nl> + # The user is always right . <nl> + if test " $ { PATH_SEPARATOR + set } " ! = set ; then <nl> + PATH_SEPARATOR = : <nl> + ( PATH = ' / bin ; / bin ' ; FPATH = $ PATH ; sh - c : ) > / dev / null 2 > & 1 & & { <nl> + ( PATH = ' / bin : / bin ' ; FPATH = $ PATH ; sh - c : ) > / dev / null 2 > & 1 | | <nl> + PATH_SEPARATOR = ' ; ' <nl> + } <nl> + fi <nl> + <nl> + <nl> + # IFS <nl> + # We need space , tab and new line , in precisely that order . Quoting is <nl> + # there to prevent editors from complaining about space - tab . <nl> + # ( If _AS_PATH_WALK were called with IFS unset , it would disable word <nl> + # splitting by setting IFS to empty value . ) <nl> + IFS = " " " $ as_nl " <nl> + <nl> + # Find who we are . Look in the path if we contain no directory separator . <nl> + as_myself = <nl> + case $ 0 in # ( ( <nl> + * [ \ \ / ] * ) as_myself = $ 0 ; ; <nl> + * ) as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + test - r " $ as_dir / $ 0 " & & as_myself = $ as_dir / $ 0 & & break <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + ; ; <nl> + esac <nl> + # We did not find ourselves , most probably we were run as ` sh COMMAND ' <nl> + # in which case we are not to be found in the path . <nl> + if test " x $ as_myself " = x ; then <nl> + as_myself = $ 0 <nl> + fi <nl> + if test ! - f " $ as_myself " ; then <nl> + $ as_echo " $ as_myself : error : cannot find myself ; rerun with an absolute file name " > & 2 <nl> + exit 1 <nl> + fi <nl> + <nl> + # Unset variables that we do not need and which cause bugs ( e . g . in <nl> + # pre - 3 . 0 UWIN ksh ) . But do not cause bugs in bash 2 . 01 ; the " | | exit 1 " <nl> + # suppresses any " Segmentation fault " message there . ' ( ( ' could <nl> + # trigger a bug in pdksh 5 . 2 . 14 . <nl> + for as_var in BASH_ENV ENV MAIL MAILPATH <nl> + do eval test x \ $ { $ as_var + set } = xset \ <nl> + & & ( ( unset $ as_var ) | | exit 1 ) > / dev / null 2 > & 1 & & unset $ as_var | | : <nl> + done <nl> + PS1 = ' $ ' <nl> + PS2 = ' > ' <nl> + PS4 = ' + ' <nl> + <nl> + # NLS nuisances . <nl> + LC_ALL = C <nl> + export LC_ALL <nl> + LANGUAGE = C <nl> + export LANGUAGE <nl> + <nl> + # CDPATH . <nl> + ( unset CDPATH ) > / dev / null 2 > & 1 & & unset CDPATH <nl> + <nl> + # Use a proper internal environment variable to ensure we don ' t fall <nl> + # into an infinite loop , continuously re - executing ourselves . <nl> + if test x " $ { _as_can_reexec } " ! = xno & & test " x $ CONFIG_SHELL " ! = x ; then <nl> + _as_can_reexec = no ; export _as_can_reexec ; <nl> + # We cannot yet assume a decent shell , so we have to provide a <nl> + # neutralization value for shells without unset ; and this also <nl> + # works around shells that cannot unset nonexistent variables . <nl> + # Preserve - v and - x to the replacement shell . <nl> + BASH_ENV = / dev / null <nl> + ENV = / dev / null <nl> + ( unset BASH_ENV ) > / dev / null 2 > & 1 & & unset BASH_ENV ENV <nl> + case $ - in # ( ( ( ( <nl> + * v * x * | * x * v * ) as_opts = - vx ; ; <nl> + * v * ) as_opts = - v ; ; <nl> + * x * ) as_opts = - x ; ; <nl> + * ) as_opts = ; ; <nl> + esac <nl> + exec $ CONFIG_SHELL $ as_opts " $ as_myself " $ { 1 + " $ @ " } <nl> + # Admittedly , this is quite paranoid , since all the known shells bail <nl> + # out after a failed ` exec ' . <nl> + $ as_echo " $ 0 : could not re - execute with $ CONFIG_SHELL " > & 2 <nl> + as_fn_exit 255 <nl> + fi <nl> + # We don ' t want this to propagate to other subprocesses . <nl> + { _as_can_reexec = ; unset _as_can_reexec ; } <nl> + if test " x $ CONFIG_SHELL " = x ; then <nl> + as_bourne_compatible = " if test - n \ " \ $ { ZSH_VERSION + set } \ " & & ( emulate sh ) > / dev / null 2 > & 1 ; then : <nl> + emulate sh <nl> + NULLCMD = : <nl> + # Pre - 4 . 2 versions of Zsh do word splitting on \ $ { 1 + \ " \ $ @ \ " } , which <nl> + # is contrary to our usage . Disable this feature . <nl> + alias - g ' \ $ { 1 + \ " \ $ @ \ " } ' = ' \ " \ $ @ \ " ' <nl> + setopt NO_GLOB_SUBST <nl> + else <nl> + case \ ` ( set - o ) 2 > / dev / null \ ` in # ( <nl> + * posix * ) : <nl> + set - o posix ; ; # ( <nl> + * ) : <nl> + ; ; <nl> + esac <nl> + fi <nl> + " <nl> + as_required = " as_fn_return ( ) { ( exit \ $ 1 ) ; } <nl> + as_fn_success ( ) { as_fn_return 0 ; } <nl> + as_fn_failure ( ) { as_fn_return 1 ; } <nl> + as_fn_ret_success ( ) { return 0 ; } <nl> + as_fn_ret_failure ( ) { return 1 ; } <nl> + <nl> + exitcode = 0 <nl> + as_fn_success | | { exitcode = 1 ; echo as_fn_success failed . ; } <nl> + as_fn_failure & & { exitcode = 1 ; echo as_fn_failure succeeded . ; } <nl> + as_fn_ret_success | | { exitcode = 1 ; echo as_fn_ret_success failed . ; } <nl> + as_fn_ret_failure & & { exitcode = 1 ; echo as_fn_ret_failure succeeded . ; } <nl> + if ( set x ; as_fn_ret_success y & & test x = \ " \ $ 1 \ " ) ; then : <nl> + <nl> + else <nl> + exitcode = 1 ; echo positional parameters were not saved . <nl> + fi <nl> + test x \ $ exitcode = x0 | | exit 1 <nl> + test - x / | | exit 1 " <nl> + as_suggested = " as_lineno_1 = " ; as_suggested = $ as_suggested $ LINENO ; as_suggested = $ as_suggested " as_lineno_1a = \ $ LINENO <nl> + as_lineno_2 = " ; as_suggested = $ as_suggested $ LINENO ; as_suggested = $ as_suggested " as_lineno_2a = \ $ LINENO <nl> + eval ' test \ " x \ $ as_lineno_1 ' \ $ as_run ' \ " ! = \ " x \ $ as_lineno_2 ' \ $ as_run ' \ " & & <nl> + test \ " x \ ` expr \ $ as_lineno_1 ' \ $ as_run ' + 1 \ ` \ " = \ " x \ $ as_lineno_2 ' \ $ as_run ' \ " ' | | exit 1 <nl> + test \ $ ( ( 1 + 1 ) ) = 2 | | exit 1 " <nl> + if ( eval " $ as_required " ) 2 > / dev / null ; then : <nl> + as_have_required = yes <nl> + else <nl> + as_have_required = no <nl> + fi <nl> + if test x $ as_have_required = xyes & & ( eval " $ as_suggested " ) 2 > / dev / null ; then : <nl> + <nl> + else <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + as_found = false <nl> + for as_dir in / bin $ PATH_SEPARATOR / usr / bin $ PATH_SEPARATOR $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + as_found = : <nl> + case $ as_dir in # ( <nl> + / * ) <nl> + for as_base in sh bash ksh sh5 ; do <nl> + # Try only shells that exist , to save several forks . <nl> + as_shell = $ as_dir / $ as_base <nl> + if { test - f " $ as_shell " | | test - f " $ as_shell . exe " ; } & & <nl> + { $ as_echo " $ as_bourne_compatible " " $ as_required " | as_run = a " $ as_shell " ; } 2 > / dev / null ; then : <nl> + CONFIG_SHELL = $ as_shell as_have_required = yes <nl> + if { $ as_echo " $ as_bourne_compatible " " $ as_suggested " | as_run = a " $ as_shell " ; } 2 > / dev / null ; then : <nl> + break 2 <nl> + fi <nl> + fi <nl> + done ; ; <nl> + esac <nl> + as_found = false <nl> + done <nl> + $ as_found | | { if { test - f " $ SHELL " | | test - f " $ SHELL . exe " ; } & & <nl> + { $ as_echo " $ as_bourne_compatible " " $ as_required " | as_run = a " $ SHELL " ; } 2 > / dev / null ; then : <nl> + CONFIG_SHELL = $ SHELL as_have_required = yes <nl> + fi ; } <nl> + IFS = $ as_save_IFS <nl> + <nl> + <nl> + if test " x $ CONFIG_SHELL " ! = x ; then : <nl> + export CONFIG_SHELL <nl> + # We cannot yet assume a decent shell , so we have to provide a <nl> + # neutralization value for shells without unset ; and this also <nl> + # works around shells that cannot unset nonexistent variables . <nl> + # Preserve - v and - x to the replacement shell . <nl> + BASH_ENV = / dev / null <nl> + ENV = / dev / null <nl> + ( unset BASH_ENV ) > / dev / null 2 > & 1 & & unset BASH_ENV ENV <nl> + case $ - in # ( ( ( ( <nl> + * v * x * | * x * v * ) as_opts = - vx ; ; <nl> + * v * ) as_opts = - v ; ; <nl> + * x * ) as_opts = - x ; ; <nl> + * ) as_opts = ; ; <nl> + esac <nl> + exec $ CONFIG_SHELL $ as_opts " $ as_myself " $ { 1 + " $ @ " } <nl> + # Admittedly , this is quite paranoid , since all the known shells bail <nl> + # out after a failed ` exec ' . <nl> + $ as_echo " $ 0 : could not re - execute with $ CONFIG_SHELL " > & 2 <nl> + exit 255 <nl> + fi <nl> + <nl> + if test x $ as_have_required = xno ; then : <nl> + $ as_echo " $ 0 : This script requires a shell more modern than all " <nl> + $ as_echo " $ 0 : the shells that I found on your system . " <nl> + if test x $ { ZSH_VERSION + set } = xset ; then <nl> + $ as_echo " $ 0 : In particular , zsh $ ZSH_VERSION has bugs and should " <nl> + $ as_echo " $ 0 : be upgraded to zsh 4 . 3 . 4 or later . " <nl> + else <nl> + $ as_echo " $ 0 : Please tell bug - autoconf @ gnu . org about your system , <nl> + $ 0 : including any error possibly output before this <nl> + $ 0 : message . Then install a modern shell , or manually run <nl> + $ 0 : the script under such a shell if you do have one . " <nl> + fi <nl> + exit 1 <nl> + fi <nl> + fi <nl> + fi <nl> + SHELL = $ { CONFIG_SHELL - / bin / sh } <nl> + export SHELL <nl> + # Unset more variables known to interfere with behavior of common tools . <nl> + CLICOLOR_FORCE = GREP_OPTIONS = <nl> + unset CLICOLOR_FORCE GREP_OPTIONS <nl> + <nl> + # # mmmmmmmmmmmmmmmmmmmmm # # <nl> + # # M4sh Shell Functions . # # <nl> + # # mmmmmmmmmmmmmmmmmmmmm # # <nl> + # as_fn_unset VAR <nl> + # mmmmmmmmmmmmmmm <nl> + # Portably unset VAR . <nl> + as_fn_unset ( ) <nl> + { <nl> + { eval $ 1 = ; unset $ 1 ; } <nl> + } <nl> + as_unset = as_fn_unset <nl> + <nl> + # as_fn_set_status STATUS <nl> + # mmmmmmmmmmmmmmmmmmmmm - - <nl> + # Set $ ? to STATUS , without forking . <nl> + as_fn_set_status ( ) <nl> + { <nl> + return $ 1 <nl> + } # as_fn_set_status <nl> + <nl> + # as_fn_exit STATUS <nl> + # mmmmmmmmmmmmmmm - - <nl> + # Exit the shell with STATUS , even in a " trap 0 " or " set - e " context . <nl> + as_fn_exit ( ) <nl> + { <nl> + set + e <nl> + as_fn_set_status $ 1 <nl> + exit $ 1 <nl> + } # as_fn_exit <nl> + <nl> + # as_fn_mkdir_p <nl> + # mmmmmmmmmmmm - <nl> + # Create " $ as_dir " as a directory , including parents if necessary . <nl> + as_fn_mkdir_p ( ) <nl> + { <nl> + <nl> + case $ as_dir in # ( <nl> + - * ) as_dir = . / $ as_dir ; ; <nl> + esac <nl> + test - d " $ as_dir " | | eval $ as_mkdir_p | | { <nl> + as_dirs = <nl> + while : ; do <nl> + case $ as_dir in # ( <nl> + * \ ' * ) as_qdir = ` $ as_echo " $ as_dir " | sed " s / ' / ' \ \ \ \ \ \ \ \ ' ' / g " ` ; ; # ' ( <nl> + * ) as_qdir = $ as_dir ; ; <nl> + esac <nl> + as_dirs = " ' $ as_qdir ' $ as_dirs " <nl> + as_dir = ` $ as_dirname - - " $ as_dir " | | <nl> + $ as_expr X " $ as_dir " : ' X \ ( . * [ ^ / ] \ ) / / * [ ^ / ] [ ^ / ] * / * $ ' \ | \ <nl> + X " $ as_dir " : ' X \ ( / / \ ) [ ^ / ] ' \ | \ <nl> + X " $ as_dir " : ' X \ ( / / \ ) $ ' \ | \ <nl> + X " $ as_dir " : ' X \ ( / \ ) ' \ | . 2 > / dev / null | | <nl> + $ as_echo X " $ as_dir " | <nl> + sed ' / ^ X \ ( . * [ ^ / ] \ ) \ / \ / * [ ^ / ] [ ^ / ] * \ / * $ / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + / ^ X \ ( \ / \ / \ ) [ ^ / ] . * / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + / ^ X \ ( \ / \ / \ ) $ / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + / ^ X \ ( \ / \ ) . * / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + s / . * / . / ; q ' ` <nl> + test - d " $ as_dir " & & break <nl> + done <nl> + test - z " $ as_dirs " | | eval " mkdir $ as_dirs " <nl> + } | | test - d " $ as_dir " | | as_fn_error $ ? " cannot create directory $ as_dir " <nl> + <nl> + <nl> + } # as_fn_mkdir_p <nl> + <nl> + # as_fn_executable_p FILE <nl> + # mmmmmmmmmmmmmmmmmmmmm - - <nl> + # Test if FILE is an executable regular file . <nl> + as_fn_executable_p ( ) <nl> + { <nl> + test - f " $ 1 " & & test - x " $ 1 " <nl> + } # as_fn_executable_p <nl> + # as_fn_append VAR VALUE <nl> + # mmmmmmmmmmmmmmmmmmmmm - <nl> + # Append the text in VALUE to the end of the definition contained in VAR . Take <nl> + # advantage of any shell optimizations that allow amortized linear growth over <nl> + # repeated appends , instead of the typical quadratic growth present in naive <nl> + # implementations . <nl> + if ( eval " as_var = 1 ; as_var + = 2 ; test x \ $ as_var = x12 " ) 2 > / dev / null ; then : <nl> + eval ' as_fn_append ( ) <nl> + { <nl> + eval $ 1 + = \ $ 2 <nl> + } ' <nl> + else <nl> + as_fn_append ( ) <nl> + { <nl> + eval $ 1 = \ $ $ 1 \ $ 2 <nl> + } <nl> + fi # as_fn_append <nl> + <nl> + # as_fn_arith ARG . . . <nl> + # mmmmmmmmmmmmmmmmmm <nl> + # Perform arithmetic evaluation on the ARGs , and store the result in the <nl> + # global $ as_val . Take advantage of shells that can avoid forks . The arguments <nl> + # must be portable across $ ( ( ) ) and expr . <nl> + if ( eval " test \ $ ( ( 1 + 1 ) ) = 2 " ) 2 > / dev / null ; then : <nl> + eval ' as_fn_arith ( ) <nl> + { <nl> + as_val = $ ( ( $ * ) ) <nl> + } ' <nl> + else <nl> + as_fn_arith ( ) <nl> + { <nl> + as_val = ` expr " $ @ " | | test $ ? - eq 1 ` <nl> + } <nl> + fi # as_fn_arith <nl> + <nl> + <nl> + # as_fn_error STATUS ERROR [ LINENO LOG_FD ] <nl> + # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> + # Output " ` basename $ 0 ` : error : ERROR " to stderr . If LINENO and LOG_FD are <nl> + # provided , also output the error to LOG_FD , referencing LINENO . Then exit the <nl> + # script with STATUS , using 1 if that was 0 . <nl> + as_fn_error ( ) <nl> + { <nl> + as_status = $ 1 ; test $ as_status - eq 0 & & as_status = 1 <nl> + if test " $ 4 " ; then <nl> + as_lineno = $ { as_lineno - " $ 3 " } as_lineno_stack = as_lineno_stack = $ as_lineno_stack <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : $ 2 " > & $ 4 <nl> + fi <nl> + $ as_echo " $ as_me : error : $ 2 " > & 2 <nl> + as_fn_exit $ as_status <nl> + } # as_fn_error <nl> + <nl> + if expr a : ' \ ( a \ ) ' > / dev / null 2 > & 1 & & <nl> + test " X ` expr 00001 : ' . * \ ( . . . \ ) ' ` " = X001 ; then <nl> + as_expr = expr <nl> + else <nl> + as_expr = false <nl> + fi <nl> + <nl> + if ( basename - - / ) > / dev / null 2 > & 1 & & test " X ` basename - - / 2 > & 1 ` " = " X / " ; then <nl> + as_basename = basename <nl> + else <nl> + as_basename = false <nl> + fi <nl> + <nl> + if ( as_dir = ` dirname - - / ` & & test " X $ as_dir " = X / ) > / dev / null 2 > & 1 ; then <nl> + as_dirname = dirname <nl> + else <nl> + as_dirname = false <nl> + fi <nl> + <nl> + as_me = ` $ as_basename - - " $ 0 " | | <nl> + $ as_expr X / " $ 0 " : ' . * / \ ( [ ^ / ] [ ^ / ] * \ ) / * $ ' \ | \ <nl> + X " $ 0 " : ' X \ ( / / \ ) $ ' \ | \ <nl> + X " $ 0 " : ' X \ ( / \ ) ' \ | . 2 > / dev / null | | <nl> + $ as_echo X / " $ 0 " | <nl> + sed ' / ^ . * \ / \ ( [ ^ / ] [ ^ / ] * \ ) \ / * $ / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + / ^ X \ / \ ( \ / \ / \ ) $ / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + / ^ X \ / \ ( \ / \ ) . * / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + s / . * / . / ; q ' ` <nl> + <nl> + # Avoid depending upon Character Ranges . <nl> + as_cr_letters = ' abcdefghijklmnopqrstuvwxyz ' <nl> + as_cr_LETTERS = ' ABCDEFGHIJKLMNOPQRSTUVWXYZ ' <nl> + as_cr_Letters = $ as_cr_letters $ as_cr_LETTERS <nl> + as_cr_digits = ' 0123456789 ' <nl> + as_cr_alnum = $ as_cr_Letters $ as_cr_digits <nl> + <nl> + <nl> + as_lineno_1 = $ LINENO as_lineno_1a = $ LINENO <nl> + as_lineno_2 = $ LINENO as_lineno_2a = $ LINENO <nl> + eval ' test " x $ as_lineno_1 ' $ as_run ' " ! = " x $ as_lineno_2 ' $ as_run ' " & & <nl> + test " x ` expr $ as_lineno_1 ' $ as_run ' + 1 ` " = " x $ as_lineno_2 ' $ as_run ' " ' | | { <nl> + # Blame Lee E . McMahon ( 1931 - 1989 ) for sed ' s syntax . : - ) <nl> + sed - n ' <nl> + p <nl> + / [ $ ] LINENO / = <nl> + ' < $ as_myself | <nl> + sed ' <nl> + s / [ $ ] LINENO . * / & - / <nl> + t lineno <nl> + b <nl> + : lineno <nl> + N <nl> + : loop <nl> + s / [ $ ] LINENO \ ( [ ^ ' $ as_cr_alnum ' _ ] . * \ n \ ) \ ( . * \ ) / \ 2 \ 1 \ 2 / <nl> + t loop <nl> + s / - \ n . * / / <nl> + ' > $ as_me . lineno & & <nl> + chmod + x " $ as_me . lineno " | | <nl> + { $ as_echo " $ as_me : error : cannot create $ as_me . lineno ; rerun with a POSIX shell " > & 2 ; as_fn_exit 1 ; } <nl> + <nl> + # If we had to re - execute with $ CONFIG_SHELL , we ' re ensured to have <nl> + # already done that , so ensure we don ' t try to do so again and fall <nl> + # in an infinite loop . This has already happened in practice . <nl> + _as_can_reexec = no ; export _as_can_reexec <nl> + # Don ' t try to exec as it changes $ [ 0 ] , causing all sort of problems <nl> + # ( the dirname of $ [ 0 ] is not the place where we might find the <nl> + # original and so on . Autoconf is especially sensitive to this ) . <nl> + . " . / $ as_me . lineno " <nl> + # Exit status is that of the last command . <nl> + exit <nl> + } <nl> + <nl> + ECHO_C = ECHO_N = ECHO_T = <nl> + case ` echo - n x ` in # ( ( ( ( ( <nl> + - n * ) <nl> + case ` echo ' xy \ c ' ` in <nl> + * c * ) ECHO_T = ' ' ; ; # ECHO_T is single tab character . <nl> + xy ) ECHO_C = ' \ c ' ; ; <nl> + * ) echo ` echo ksh88 bug on AIX 6 . 1 ` > / dev / null <nl> + ECHO_T = ' ' ; ; <nl> + esac ; ; <nl> + * ) <nl> + ECHO_N = ' - n ' ; ; <nl> + esac <nl> + <nl> + rm - f conf $ $ conf $ $ . exe conf $ $ . file <nl> + if test - d conf $ $ . dir ; then <nl> + rm - f conf $ $ . dir / conf $ $ . file <nl> + else <nl> + rm - f conf $ $ . dir <nl> + mkdir conf $ $ . dir 2 > / dev / null <nl> + fi <nl> + if ( echo > conf $ $ . file ) 2 > / dev / null ; then <nl> + if ln - s conf $ $ . file conf $ $ 2 > / dev / null ; then <nl> + as_ln_s = ' ln - s ' <nl> + # . . . but there are two gotchas : <nl> + # 1 ) On MSYS , both ` ln - s file dir ' and ` ln file dir ' fail . <nl> + # 2 ) DJGPP < 2 . 04 has no symlinks ; ` ln - s ' creates a wrapper executable . <nl> + # In both cases , we have to default to ` cp - pR ' . <nl> + ln - s conf $ $ . file conf $ $ . dir 2 > / dev / null & & test ! - f conf $ $ . exe | | <nl> + as_ln_s = ' cp - pR ' <nl> + elif ln conf $ $ . file conf $ $ 2 > / dev / null ; then <nl> + as_ln_s = ln <nl> + else <nl> + as_ln_s = ' cp - pR ' <nl> + fi <nl> + else <nl> + as_ln_s = ' cp - pR ' <nl> + fi <nl> + rm - f conf $ $ conf $ $ . exe conf $ $ . dir / conf $ $ . file conf $ $ . file <nl> + rmdir conf $ $ . dir 2 > / dev / null <nl> + <nl> + if mkdir - p . 2 > / dev / null ; then <nl> + as_mkdir_p = ' mkdir - p " $ as_dir " ' <nl> + else <nl> + test - d . / - p & & rmdir . / - p <nl> + as_mkdir_p = false <nl> + fi <nl> + <nl> + as_test_x = ' test - x ' <nl> + as_executable_p = as_fn_executable_p <nl> + <nl> + # Sed expression to map a string onto a valid CPP name . <nl> + as_tr_cpp = " eval sed ' y % * $ as_cr_letters % P $ as_cr_LETTERS % ; s % [ ^ _ $ as_cr_alnum ] % _ % g ' " <nl> + <nl> + # Sed expression to map a string onto a valid variable name . <nl> + as_tr_sh = " eval sed ' y % * + % pp % ; s % [ ^ _ $ as_cr_alnum ] % _ % g ' " <nl> + <nl> + <nl> + test - n " $ DJDIR " | | exec 7 < & 0 < / dev / null <nl> + exec 6 > & 1 <nl> + <nl> + # Name of the host . <nl> + # hostname on some systems ( SVR3 . 2 , old GNU / Linux ) returns a bogus exit status , <nl> + # so uname gets run too . <nl> + ac_hostname = ` ( hostname | | uname - n ) 2 > / dev / null | sed 1q ` <nl> + <nl> + # <nl> + # Initializations . <nl> + # <nl> + ac_default_prefix = / usr / local <nl> + ac_clean_files = <nl> + ac_config_libobj_dir = . <nl> + LIBOBJS = <nl> + cross_compiling = no <nl> + subdirs = <nl> + MFLAGS = <nl> + MAKEFLAGS = <nl> + <nl> + # Identity of this package . <nl> + PACKAGE_NAME = <nl> + PACKAGE_TARNAME = <nl> + PACKAGE_VERSION = <nl> + PACKAGE_STRING = <nl> + PACKAGE_BUGREPORT = <nl> + PACKAGE_URL = <nl> + <nl> + ac_unique_file = " Makefile . in " <nl> + # Factoring default headers for most tests . <nl> + ac_includes_default = " \ <nl> + # include < stdio . h > <nl> + # ifdef HAVE_SYS_TYPES_H <nl> + # include < sys / types . h > <nl> + # endif <nl> + # ifdef HAVE_SYS_STAT_H <nl> + # include < sys / stat . h > <nl> + # endif <nl> + # ifdef STDC_HEADERS <nl> + # include < stdlib . h > <nl> + # include < stddef . h > <nl> + # else <nl> + # ifdef HAVE_STDLIB_H <nl> + # include < stdlib . h > <nl> + # endif <nl> + # endif <nl> + # ifdef HAVE_STRING_H <nl> + # if ! defined STDC_HEADERS & & defined HAVE_MEMORY_H <nl> + # include < memory . h > <nl> + # endif <nl> + # include < string . h > <nl> + # endif <nl> + # ifdef HAVE_STRINGS_H <nl> + # include < strings . h > <nl> + # endif <nl> + # ifdef HAVE_INTTYPES_H <nl> + # include < inttypes . h > <nl> + # endif <nl> + # ifdef HAVE_STDINT_H <nl> + # include < stdint . h > <nl> + # endif <nl> + # ifdef HAVE_UNISTD_H <nl> + # include < unistd . h > <nl> + # endif " <nl> + <nl> + ac_subst_vars = ' LTLIBOBJS <nl> + LIBOBJS <nl> + cfgoutputs_out <nl> + cfgoutputs_in <nl> + cfghdrs_out <nl> + cfghdrs_in <nl> + enable_zone_allocator <nl> + enable_tls <nl> + enable_lazy_lock <nl> + jemalloc_version_gid <nl> + jemalloc_version_nrev <nl> + jemalloc_version_bugfix <nl> + jemalloc_version_minor <nl> + jemalloc_version_major <nl> + jemalloc_version <nl> + enable_cache_oblivious <nl> + enable_xmalloc <nl> + enable_utrace <nl> + enable_fill <nl> + enable_munmap <nl> + enable_tcache <nl> + enable_prof <nl> + enable_stats <nl> + enable_debug <nl> + je_ <nl> + install_suffix <nl> + private_namespace <nl> + JEMALLOC_CPREFIX <nl> + enable_code_coverage <nl> + AUTOCONF <nl> + LD <nl> + RANLIB <nl> + INSTALL_DATA <nl> + INSTALL_SCRIPT <nl> + INSTALL_PROGRAM <nl> + enable_autogen <nl> + RPATH_EXTRA <nl> + LM <nl> + CC_MM <nl> + AROUT <nl> + ARFLAGS <nl> + MKLIB <nl> + TEST_LD_MODE <nl> + LDTARGET <nl> + CTARGET <nl> + PIC_CFLAGS <nl> + SOREV <nl> + EXTRA_LDFLAGS <nl> + DSO_LDFLAGS <nl> + link_whole_archive <nl> + libprefix <nl> + exe <nl> + a <nl> + o <nl> + importlib <nl> + so <nl> + LD_PRELOAD_VAR <nl> + RPATH <nl> + abi <nl> + AR <nl> + host_os <nl> + host_vendor <nl> + host_cpu <nl> + host <nl> + build_os <nl> + build_vendor <nl> + build_cpu <nl> + build <nl> + EGREP <nl> + GREP <nl> + EXTRA_CXXFLAGS <nl> + SPECIFIED_CXXFLAGS <nl> + CONFIGURE_CXXFLAGS <nl> + enable_cxx <nl> + HAVE_CXX14 <nl> + ac_ct_CXX <nl> + CXXFLAGS <nl> + CXX <nl> + CPP <nl> + EXTRA_CFLAGS <nl> + SPECIFIED_CFLAGS <nl> + CONFIGURE_CFLAGS <nl> + OBJEXT <nl> + EXEEXT <nl> + ac_ct_CC <nl> + CPPFLAGS <nl> + LDFLAGS <nl> + CFLAGS <nl> + CC <nl> + XSLROOT <nl> + XSLTPROC <nl> + MANDIR <nl> + DATADIR <nl> + LIBDIR <nl> + INCLUDEDIR <nl> + BINDIR <nl> + PREFIX <nl> + abs_objroot <nl> + objroot <nl> + abs_srcroot <nl> + srcroot <nl> + rev <nl> + CONFIG <nl> + target_alias <nl> + host_alias <nl> + build_alias <nl> + LIBS <nl> + ECHO_T <nl> + ECHO_N <nl> + ECHO_C <nl> + DEFS <nl> + mandir <nl> + localedir <nl> + libdir <nl> + psdir <nl> + pdfdir <nl> + dvidir <nl> + htmldir <nl> + infodir <nl> + docdir <nl> + oldincludedir <nl> + includedir <nl> + runstatedir <nl> + localstatedir <nl> + sharedstatedir <nl> + sysconfdir <nl> + datadir <nl> + datarootdir <nl> + libexecdir <nl> + sbindir <nl> + bindir <nl> + program_transform_name <nl> + prefix <nl> + exec_prefix <nl> + PACKAGE_URL <nl> + PACKAGE_BUGREPORT <nl> + PACKAGE_STRING <nl> + PACKAGE_VERSION <nl> + PACKAGE_TARNAME <nl> + PACKAGE_NAME <nl> + PATH_SEPARATOR <nl> + SHELL ' <nl> + ac_subst_files = ' ' <nl> + ac_user_opts = ' <nl> + enable_option_checking <nl> + with_xslroot <nl> + enable_cxx <nl> + with_rpath <nl> + enable_autogen <nl> + enable_code_coverage <nl> + with_mangling <nl> + with_jemalloc_prefix <nl> + with_export <nl> + with_private_namespace <nl> + with_install_suffix <nl> + with_malloc_conf <nl> + enable_cc_silence <nl> + enable_debug <nl> + enable_ivsalloc <nl> + enable_stats <nl> + enable_prof <nl> + enable_prof_libunwind <nl> + with_static_libunwind <nl> + enable_prof_libgcc <nl> + enable_prof_gcc <nl> + enable_tcache <nl> + enable_munmap <nl> + enable_fill <nl> + enable_utrace <nl> + enable_xmalloc <nl> + enable_cache_oblivious <nl> + with_lg_tiny_min <nl> + with_lg_quantum <nl> + with_lg_page <nl> + with_lg_hugepage <nl> + with_lg_page_sizes <nl> + with_lg_size_class_group <nl> + with_version <nl> + enable_syscall <nl> + enable_lazy_lock <nl> + enable_tls <nl> + enable_zone_allocator <nl> + ' <nl> + ac_precious_vars = ' build_alias <nl> + host_alias <nl> + target_alias <nl> + CC <nl> + CFLAGS <nl> + LDFLAGS <nl> + LIBS <nl> + CPPFLAGS <nl> + CPP <nl> + CXX <nl> + CXXFLAGS <nl> + CCC ' <nl> + <nl> + <nl> + # Initialize some variables set by options . <nl> + ac_init_help = <nl> + ac_init_version = false <nl> + ac_unrecognized_opts = <nl> + ac_unrecognized_sep = <nl> + # The variables have the same names as the options , with <nl> + # dashes changed to underlines . <nl> + cache_file = / dev / null <nl> + exec_prefix = NONE <nl> + no_create = <nl> + no_recursion = <nl> + prefix = NONE <nl> + program_prefix = NONE <nl> + program_suffix = NONE <nl> + program_transform_name = s , x , x , <nl> + silent = <nl> + site = <nl> + srcdir = <nl> + verbose = <nl> + x_includes = NONE <nl> + x_libraries = NONE <nl> + <nl> + # Installation directory options . <nl> + # These are left unexpanded so users can " make install exec_prefix = / foo " <nl> + # and all the variables that are supposed to be based on exec_prefix <nl> + # by default will actually change . <nl> + # Use braces instead of parens because sh , perl , etc . also accept them . <nl> + # ( The list follows the same order as the GNU Coding Standards . ) <nl> + bindir = ' $ { exec_prefix } / bin ' <nl> + sbindir = ' $ { exec_prefix } / sbin ' <nl> + libexecdir = ' $ { exec_prefix } / libexec ' <nl> + datarootdir = ' $ { prefix } / share ' <nl> + datadir = ' $ { datarootdir } ' <nl> + sysconfdir = ' $ { prefix } / etc ' <nl> + sharedstatedir = ' $ { prefix } / com ' <nl> + localstatedir = ' $ { prefix } / var ' <nl> + runstatedir = ' $ { localstatedir } / run ' <nl> + includedir = ' $ { prefix } / include ' <nl> + oldincludedir = ' / usr / include ' <nl> + docdir = ' $ { datarootdir } / doc / $ { PACKAGE } ' <nl> + infodir = ' $ { datarootdir } / info ' <nl> + htmldir = ' $ { docdir } ' <nl> + dvidir = ' $ { docdir } ' <nl> + pdfdir = ' $ { docdir } ' <nl> + psdir = ' $ { docdir } ' <nl> + libdir = ' $ { exec_prefix } / lib ' <nl> + localedir = ' $ { datarootdir } / locale ' <nl> + mandir = ' $ { datarootdir } / man ' <nl> + <nl> + ac_prev = <nl> + ac_dashdash = <nl> + for ac_option <nl> + do <nl> + # If the previous option needs an argument , assign it . <nl> + if test - n " $ ac_prev " ; then <nl> + eval $ ac_prev = \ $ ac_option <nl> + ac_prev = <nl> + continue <nl> + fi <nl> + <nl> + case $ ac_option in <nl> + * = ? * ) ac_optarg = ` expr " X $ ac_option " : ' [ ^ = ] * = \ ( . * \ ) ' ` ; ; <nl> + * = ) ac_optarg = ; ; <nl> + * ) ac_optarg = yes ; ; <nl> + esac <nl> + <nl> + # Accept the important Cygnus configure options , so we can diagnose typos . <nl> + <nl> + case $ ac_dashdash $ ac_option in <nl> + - - ) <nl> + ac_dashdash = yes ; ; <nl> + <nl> + - bindir | - - bindir | - - bindi | - - bind | - - bin | - - bi ) <nl> + ac_prev = bindir ; ; <nl> + - bindir = * | - - bindir = * | - - bindi = * | - - bind = * | - - bin = * | - - bi = * ) <nl> + bindir = $ ac_optarg ; ; <nl> + <nl> + - build | - - build | - - buil | - - bui | - - bu ) <nl> + ac_prev = build_alias ; ; <nl> + - build = * | - - build = * | - - buil = * | - - bui = * | - - bu = * ) <nl> + build_alias = $ ac_optarg ; ; <nl> + <nl> + - cache - file | - - cache - file | - - cache - fil | - - cache - fi \ <nl> + | - - cache - f | - - cache - | - - cache | - - cach | - - cac | - - ca | - - c ) <nl> + ac_prev = cache_file ; ; <nl> + - cache - file = * | - - cache - file = * | - - cache - fil = * | - - cache - fi = * \ <nl> + | - - cache - f = * | - - cache - = * | - - cache = * | - - cach = * | - - cac = * | - - ca = * | - - c = * ) <nl> + cache_file = $ ac_optarg ; ; <nl> + <nl> + - - config - cache | - C ) <nl> + cache_file = config . cache ; ; <nl> + <nl> + - datadir | - - datadir | - - datadi | - - datad ) <nl> + ac_prev = datadir ; ; <nl> + - datadir = * | - - datadir = * | - - datadi = * | - - datad = * ) <nl> + datadir = $ ac_optarg ; ; <nl> + <nl> + - datarootdir | - - datarootdir | - - datarootdi | - - datarootd | - - dataroot \ <nl> + | - - dataroo | - - dataro | - - datar ) <nl> + ac_prev = datarootdir ; ; <nl> + - datarootdir = * | - - datarootdir = * | - - datarootdi = * | - - datarootd = * \ <nl> + | - - dataroot = * | - - dataroo = * | - - dataro = * | - - datar = * ) <nl> + datarootdir = $ ac_optarg ; ; <nl> + <nl> + - disable - * | - - disable - * ) <nl> + ac_useropt = ` expr " x $ ac_option " : ' x - * disable - \ ( . * \ ) ' ` <nl> + # Reject names that are not valid shell variable names . <nl> + expr " x $ ac_useropt " : " . * [ ^ - + . _ $ as_cr_alnum ] " > / dev / null & & <nl> + as_fn_error $ ? " invalid feature name : $ ac_useropt " <nl> + ac_useropt_orig = $ ac_useropt <nl> + ac_useropt = ` $ as_echo " $ ac_useropt " | sed ' s / [ - + . ] / _ / g ' ` <nl> + case $ ac_user_opts in <nl> + * " <nl> + " enable_ $ ac_useropt " <nl> + " * ) ; ; <nl> + * ) ac_unrecognized_opts = " $ ac_unrecognized_opts $ ac_unrecognized_sep - - disable - $ ac_useropt_orig " <nl> + ac_unrecognized_sep = ' , ' ; ; <nl> + esac <nl> + eval enable_ $ ac_useropt = no ; ; <nl> + <nl> + - docdir | - - docdir | - - docdi | - - doc | - - do ) <nl> + ac_prev = docdir ; ; <nl> + - docdir = * | - - docdir = * | - - docdi = * | - - doc = * | - - do = * ) <nl> + docdir = $ ac_optarg ; ; <nl> + <nl> + - dvidir | - - dvidir | - - dvidi | - - dvid | - - dvi | - - dv ) <nl> + ac_prev = dvidir ; ; <nl> + - dvidir = * | - - dvidir = * | - - dvidi = * | - - dvid = * | - - dvi = * | - - dv = * ) <nl> + dvidir = $ ac_optarg ; ; <nl> + <nl> + - enable - * | - - enable - * ) <nl> + ac_useropt = ` expr " x $ ac_option " : ' x - * enable - \ ( [ ^ = ] * \ ) ' ` <nl> + # Reject names that are not valid shell variable names . <nl> + expr " x $ ac_useropt " : " . * [ ^ - + . _ $ as_cr_alnum ] " > / dev / null & & <nl> + as_fn_error $ ? " invalid feature name : $ ac_useropt " <nl> + ac_useropt_orig = $ ac_useropt <nl> + ac_useropt = ` $ as_echo " $ ac_useropt " | sed ' s / [ - + . ] / _ / g ' ` <nl> + case $ ac_user_opts in <nl> + * " <nl> + " enable_ $ ac_useropt " <nl> + " * ) ; ; <nl> + * ) ac_unrecognized_opts = " $ ac_unrecognized_opts $ ac_unrecognized_sep - - enable - $ ac_useropt_orig " <nl> + ac_unrecognized_sep = ' , ' ; ; <nl> + esac <nl> + eval enable_ $ ac_useropt = \ $ ac_optarg ; ; <nl> + <nl> + - exec - prefix | - - exec_prefix | - - exec - prefix | - - exec - prefi \ <nl> + | - - exec - pref | - - exec - pre | - - exec - pr | - - exec - p | - - exec - \ <nl> + | - - exec | - - exe | - - ex ) <nl> + ac_prev = exec_prefix ; ; <nl> + - exec - prefix = * | - - exec_prefix = * | - - exec - prefix = * | - - exec - prefi = * \ <nl> + | - - exec - pref = * | - - exec - pre = * | - - exec - pr = * | - - exec - p = * | - - exec - = * \ <nl> + | - - exec = * | - - exe = * | - - ex = * ) <nl> + exec_prefix = $ ac_optarg ; ; <nl> + <nl> + - gas | - - gas | - - ga | - - g ) <nl> + # Obsolete ; use - - with - gas . <nl> + with_gas = yes ; ; <nl> + <nl> + - help | - - help | - - hel | - - he | - h ) <nl> + ac_init_help = long ; ; <nl> + - help = r * | - - help = r * | - - hel = r * | - - he = r * | - hr * ) <nl> + ac_init_help = recursive ; ; <nl> + - help = s * | - - help = s * | - - hel = s * | - - he = s * | - hs * ) <nl> + ac_init_help = short ; ; <nl> + <nl> + - host | - - host | - - hos | - - ho ) <nl> + ac_prev = host_alias ; ; <nl> + - host = * | - - host = * | - - hos = * | - - ho = * ) <nl> + host_alias = $ ac_optarg ; ; <nl> + <nl> + - htmldir | - - htmldir | - - htmldi | - - htmld | - - html | - - htm | - - ht ) <nl> + ac_prev = htmldir ; ; <nl> + - htmldir = * | - - htmldir = * | - - htmldi = * | - - htmld = * | - - html = * | - - htm = * \ <nl> + | - - ht = * ) <nl> + htmldir = $ ac_optarg ; ; <nl> + <nl> + - includedir | - - includedir | - - includedi | - - included | - - include \ <nl> + | - - includ | - - inclu | - - incl | - - inc ) <nl> + ac_prev = includedir ; ; <nl> + - includedir = * | - - includedir = * | - - includedi = * | - - included = * | - - include = * \ <nl> + | - - includ = * | - - inclu = * | - - incl = * | - - inc = * ) <nl> + includedir = $ ac_optarg ; ; <nl> + <nl> + - infodir | - - infodir | - - infodi | - - infod | - - info | - - inf ) <nl> + ac_prev = infodir ; ; <nl> + - infodir = * | - - infodir = * | - - infodi = * | - - infod = * | - - info = * | - - inf = * ) <nl> + infodir = $ ac_optarg ; ; <nl> + <nl> + - libdir | - - libdir | - - libdi | - - libd ) <nl> + ac_prev = libdir ; ; <nl> + - libdir = * | - - libdir = * | - - libdi = * | - - libd = * ) <nl> + libdir = $ ac_optarg ; ; <nl> + <nl> + - libexecdir | - - libexecdir | - - libexecdi | - - libexecd | - - libexec \ <nl> + | - - libexe | - - libex | - - libe ) <nl> + ac_prev = libexecdir ; ; <nl> + - libexecdir = * | - - libexecdir = * | - - libexecdi = * | - - libexecd = * | - - libexec = * \ <nl> + | - - libexe = * | - - libex = * | - - libe = * ) <nl> + libexecdir = $ ac_optarg ; ; <nl> + <nl> + - localedir | - - localedir | - - localedi | - - localed | - - locale ) <nl> + ac_prev = localedir ; ; <nl> + - localedir = * | - - localedir = * | - - localedi = * | - - localed = * | - - locale = * ) <nl> + localedir = $ ac_optarg ; ; <nl> + <nl> + - localstatedir | - - localstatedir | - - localstatedi | - - localstated \ <nl> + | - - localstate | - - localstat | - - localsta | - - localst | - - locals ) <nl> + ac_prev = localstatedir ; ; <nl> + - localstatedir = * | - - localstatedir = * | - - localstatedi = * | - - localstated = * \ <nl> + | - - localstate = * | - - localstat = * | - - localsta = * | - - localst = * | - - locals = * ) <nl> + localstatedir = $ ac_optarg ; ; <nl> + <nl> + - mandir | - - mandir | - - mandi | - - mand | - - man | - - ma | - - m ) <nl> + ac_prev = mandir ; ; <nl> + - mandir = * | - - mandir = * | - - mandi = * | - - mand = * | - - man = * | - - ma = * | - - m = * ) <nl> + mandir = $ ac_optarg ; ; <nl> + <nl> + - nfp | - - nfp | - - nf ) <nl> + # Obsolete ; use - - without - fp . <nl> + with_fp = no ; ; <nl> + <nl> + - no - create | - - no - create | - - no - creat | - - no - crea | - - no - cre \ <nl> + | - - no - cr | - - no - c | - n ) <nl> + no_create = yes ; ; <nl> + <nl> + - no - recursion | - - no - recursion | - - no - recursio | - - no - recursi \ <nl> + | - - no - recurs | - - no - recur | - - no - recu | - - no - rec | - - no - re | - - no - r ) <nl> + no_recursion = yes ; ; <nl> + <nl> + - oldincludedir | - - oldincludedir | - - oldincludedi | - - oldincluded \ <nl> + | - - oldinclude | - - oldinclud | - - oldinclu | - - oldincl | - - oldinc \ <nl> + | - - oldin | - - oldi | - - old | - - ol | - - o ) <nl> + ac_prev = oldincludedir ; ; <nl> + - oldincludedir = * | - - oldincludedir = * | - - oldincludedi = * | - - oldincluded = * \ <nl> + | - - oldinclude = * | - - oldinclud = * | - - oldinclu = * | - - oldincl = * | - - oldinc = * \ <nl> + | - - oldin = * | - - oldi = * | - - old = * | - - ol = * | - - o = * ) <nl> + oldincludedir = $ ac_optarg ; ; <nl> + <nl> + - prefix | - - prefix | - - prefi | - - pref | - - pre | - - pr | - - p ) <nl> + ac_prev = prefix ; ; <nl> + - prefix = * | - - prefix = * | - - prefi = * | - - pref = * | - - pre = * | - - pr = * | - - p = * ) <nl> + prefix = $ ac_optarg ; ; <nl> + <nl> + - program - prefix | - - program - prefix | - - program - prefi | - - program - pref \ <nl> + | - - program - pre | - - program - pr | - - program - p ) <nl> + ac_prev = program_prefix ; ; <nl> + - program - prefix = * | - - program - prefix = * | - - program - prefi = * \ <nl> + | - - program - pref = * | - - program - pre = * | - - program - pr = * | - - program - p = * ) <nl> + program_prefix = $ ac_optarg ; ; <nl> + <nl> + - program - suffix | - - program - suffix | - - program - suffi | - - program - suff \ <nl> + | - - program - suf | - - program - su | - - program - s ) <nl> + ac_prev = program_suffix ; ; <nl> + - program - suffix = * | - - program - suffix = * | - - program - suffi = * \ <nl> + | - - program - suff = * | - - program - suf = * | - - program - su = * | - - program - s = * ) <nl> + program_suffix = $ ac_optarg ; ; <nl> + <nl> + - program - transform - name | - - program - transform - name \ <nl> + | - - program - transform - nam | - - program - transform - na \ <nl> + | - - program - transform - n | - - program - transform - \ <nl> + | - - program - transform | - - program - transfor \ <nl> + | - - program - transfo | - - program - transf \ <nl> + | - - program - trans | - - program - tran \ <nl> + | - - progr - tra | - - program - tr | - - program - t ) <nl> + ac_prev = program_transform_name ; ; <nl> + - program - transform - name = * | - - program - transform - name = * \ <nl> + | - - program - transform - nam = * | - - program - transform - na = * \ <nl> + | - - program - transform - n = * | - - program - transform - = * \ <nl> + | - - program - transform = * | - - program - transfor = * \ <nl> + | - - program - transfo = * | - - program - transf = * \ <nl> + | - - program - trans = * | - - program - tran = * \ <nl> + | - - progr - tra = * | - - program - tr = * | - - program - t = * ) <nl> + program_transform_name = $ ac_optarg ; ; <nl> + <nl> + - pdfdir | - - pdfdir | - - pdfdi | - - pdfd | - - pdf | - - pd ) <nl> + ac_prev = pdfdir ; ; <nl> + - pdfdir = * | - - pdfdir = * | - - pdfdi = * | - - pdfd = * | - - pdf = * | - - pd = * ) <nl> + pdfdir = $ ac_optarg ; ; <nl> + <nl> + - psdir | - - psdir | - - psdi | - - psd | - - ps ) <nl> + ac_prev = psdir ; ; <nl> + - psdir = * | - - psdir = * | - - psdi = * | - - psd = * | - - ps = * ) <nl> + psdir = $ ac_optarg ; ; <nl> + <nl> + - q | - quiet | - - quiet | - - quie | - - qui | - - qu | - - q \ <nl> + | - silent | - - silent | - - silen | - - sile | - - sil ) <nl> + silent = yes ; ; <nl> + <nl> + - runstatedir | - - runstatedir | - - runstatedi | - - runstated \ <nl> + | - - runstate | - - runstat | - - runsta | - - runst | - - runs \ <nl> + | - - run | - - ru | - - r ) <nl> + ac_prev = runstatedir ; ; <nl> + - runstatedir = * | - - runstatedir = * | - - runstatedi = * | - - runstated = * \ <nl> + | - - runstate = * | - - runstat = * | - - runsta = * | - - runst = * | - - runs = * \ <nl> + | - - run = * | - - ru = * | - - r = * ) <nl> + runstatedir = $ ac_optarg ; ; <nl> + <nl> + - sbindir | - - sbindir | - - sbindi | - - sbind | - - sbin | - - sbi | - - sb ) <nl> + ac_prev = sbindir ; ; <nl> + - sbindir = * | - - sbindir = * | - - sbindi = * | - - sbind = * | - - sbin = * \ <nl> + | - - sbi = * | - - sb = * ) <nl> + sbindir = $ ac_optarg ; ; <nl> + <nl> + - sharedstatedir | - - sharedstatedir | - - sharedstatedi \ <nl> + | - - sharedstated | - - sharedstate | - - sharedstat | - - sharedsta \ <nl> + | - - sharedst | - - shareds | - - shared | - - share | - - shar \ <nl> + | - - sha | - - sh ) <nl> + ac_prev = sharedstatedir ; ; <nl> + - sharedstatedir = * | - - sharedstatedir = * | - - sharedstatedi = * \ <nl> + | - - sharedstated = * | - - sharedstate = * | - - sharedstat = * | - - sharedsta = * \ <nl> + | - - sharedst = * | - - shareds = * | - - shared = * | - - share = * | - - shar = * \ <nl> + | - - sha = * | - - sh = * ) <nl> + sharedstatedir = $ ac_optarg ; ; <nl> + <nl> + - site | - - site | - - sit ) <nl> + ac_prev = site ; ; <nl> + - site = * | - - site = * | - - sit = * ) <nl> + site = $ ac_optarg ; ; <nl> + <nl> + - srcdir | - - srcdir | - - srcdi | - - srcd | - - src | - - sr ) <nl> + ac_prev = srcdir ; ; <nl> + - srcdir = * | - - srcdir = * | - - srcdi = * | - - srcd = * | - - src = * | - - sr = * ) <nl> + srcdir = $ ac_optarg ; ; <nl> + <nl> + - sysconfdir | - - sysconfdir | - - sysconfdi | - - sysconfd | - - sysconf \ <nl> + | - - syscon | - - sysco | - - sysc | - - sys | - - sy ) <nl> + ac_prev = sysconfdir ; ; <nl> + - sysconfdir = * | - - sysconfdir = * | - - sysconfdi = * | - - sysconfd = * | - - sysconf = * \ <nl> + | - - syscon = * | - - sysco = * | - - sysc = * | - - sys = * | - - sy = * ) <nl> + sysconfdir = $ ac_optarg ; ; <nl> + <nl> + - target | - - target | - - targe | - - targ | - - tar | - - ta | - - t ) <nl> + ac_prev = target_alias ; ; <nl> + - target = * | - - target = * | - - targe = * | - - targ = * | - - tar = * | - - ta = * | - - t = * ) <nl> + target_alias = $ ac_optarg ; ; <nl> + <nl> + - v | - verbose | - - verbose | - - verbos | - - verbo | - - verb ) <nl> + verbose = yes ; ; <nl> + <nl> + - version | - - version | - - versio | - - versi | - - vers | - V ) <nl> + ac_init_version = : ; ; <nl> + <nl> + - with - * | - - with - * ) <nl> + ac_useropt = ` expr " x $ ac_option " : ' x - * with - \ ( [ ^ = ] * \ ) ' ` <nl> + # Reject names that are not valid shell variable names . <nl> + expr " x $ ac_useropt " : " . * [ ^ - + . _ $ as_cr_alnum ] " > / dev / null & & <nl> + as_fn_error $ ? " invalid package name : $ ac_useropt " <nl> + ac_useropt_orig = $ ac_useropt <nl> + ac_useropt = ` $ as_echo " $ ac_useropt " | sed ' s / [ - + . ] / _ / g ' ` <nl> + case $ ac_user_opts in <nl> + * " <nl> + " with_ $ ac_useropt " <nl> + " * ) ; ; <nl> + * ) ac_unrecognized_opts = " $ ac_unrecognized_opts $ ac_unrecognized_sep - - with - $ ac_useropt_orig " <nl> + ac_unrecognized_sep = ' , ' ; ; <nl> + esac <nl> + eval with_ $ ac_useropt = \ $ ac_optarg ; ; <nl> + <nl> + - without - * | - - without - * ) <nl> + ac_useropt = ` expr " x $ ac_option " : ' x - * without - \ ( . * \ ) ' ` <nl> + # Reject names that are not valid shell variable names . <nl> + expr " x $ ac_useropt " : " . * [ ^ - + . _ $ as_cr_alnum ] " > / dev / null & & <nl> + as_fn_error $ ? " invalid package name : $ ac_useropt " <nl> + ac_useropt_orig = $ ac_useropt <nl> + ac_useropt = ` $ as_echo " $ ac_useropt " | sed ' s / [ - + . ] / _ / g ' ` <nl> + case $ ac_user_opts in <nl> + * " <nl> + " with_ $ ac_useropt " <nl> + " * ) ; ; <nl> + * ) ac_unrecognized_opts = " $ ac_unrecognized_opts $ ac_unrecognized_sep - - without - $ ac_useropt_orig " <nl> + ac_unrecognized_sep = ' , ' ; ; <nl> + esac <nl> + eval with_ $ ac_useropt = no ; ; <nl> + <nl> + - - x ) <nl> + # Obsolete ; use - - with - x . <nl> + with_x = yes ; ; <nl> + <nl> + - x - includes | - - x - includes | - - x - include | - - x - includ | - - x - inclu \ <nl> + | - - x - incl | - - x - inc | - - x - in | - - x - i ) <nl> + ac_prev = x_includes ; ; <nl> + - x - includes = * | - - x - includes = * | - - x - include = * | - - x - includ = * | - - x - inclu = * \ <nl> + | - - x - incl = * | - - x - inc = * | - - x - in = * | - - x - i = * ) <nl> + x_includes = $ ac_optarg ; ; <nl> + <nl> + - x - libraries | - - x - libraries | - - x - librarie | - - x - librari \ <nl> + | - - x - librar | - - x - libra | - - x - libr | - - x - lib | - - x - li | - - x - l ) <nl> + ac_prev = x_libraries ; ; <nl> + - x - libraries = * | - - x - libraries = * | - - x - librarie = * | - - x - librari = * \ <nl> + | - - x - librar = * | - - x - libra = * | - - x - libr = * | - - x - lib = * | - - x - li = * | - - x - l = * ) <nl> + x_libraries = $ ac_optarg ; ; <nl> + <nl> + - * ) as_fn_error $ ? " unrecognized option : \ ` $ ac_option ' <nl> + Try \ ` $ 0 - - help ' for more information " <nl> + ; ; <nl> + <nl> + * = * ) <nl> + ac_envvar = ` expr " x $ ac_option " : ' x \ ( [ ^ = ] * \ ) = ' ` <nl> + # Reject names that are not valid shell variable names . <nl> + case $ ac_envvar in # ( <nl> + ' ' | [ 0 - 9 ] * | * [ ! _ $ as_cr_alnum ] * ) <nl> + as_fn_error $ ? " invalid variable name : \ ` $ ac_envvar ' " ; ; <nl> + esac <nl> + eval $ ac_envvar = \ $ ac_optarg <nl> + export $ ac_envvar ; ; <nl> + <nl> + * ) <nl> + # FIXME : should be removed in autoconf 3 . 0 . <nl> + $ as_echo " $ as_me : WARNING : you should use - - build , - - host , - - target " > & 2 <nl> + expr " x $ ac_option " : " . * [ ^ - . _ $ as_cr_alnum ] " > / dev / null & & <nl> + $ as_echo " $ as_me : WARNING : invalid host type : $ ac_option " > & 2 <nl> + : " $ { build_alias = $ ac_option } $ { host_alias = $ ac_option } $ { target_alias = $ ac_option } " <nl> + ; ; <nl> + <nl> + esac <nl> + done <nl> + <nl> + if test - n " $ ac_prev " ; then <nl> + ac_option = - - ` echo $ ac_prev | sed ' s / _ / - / g ' ` <nl> + as_fn_error $ ? " missing argument to $ ac_option " <nl> + fi <nl> + <nl> + if test - n " $ ac_unrecognized_opts " ; then <nl> + case $ enable_option_checking in <nl> + no ) ; ; <nl> + fatal ) as_fn_error $ ? " unrecognized options : $ ac_unrecognized_opts " ; ; <nl> + * ) $ as_echo " $ as_me : WARNING : unrecognized options : $ ac_unrecognized_opts " > & 2 ; ; <nl> + esac <nl> + fi <nl> + <nl> + # Check all directory arguments for consistency . <nl> + for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ <nl> + datadir sysconfdir sharedstatedir localstatedir includedir \ <nl> + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ <nl> + libdir localedir mandir runstatedir <nl> + do <nl> + eval ac_val = \ $ $ ac_var <nl> + # Remove trailing slashes . <nl> + case $ ac_val in <nl> + * / ) <nl> + ac_val = ` expr " X $ ac_val " : ' X \ ( . * [ ^ / ] \ ) ' \ | " X $ ac_val " : ' X \ ( . * \ ) ' ` <nl> + eval $ ac_var = \ $ ac_val ; ; <nl> + esac <nl> + # Be sure to have absolute directory names . <nl> + case $ ac_val in <nl> + [ \ \ / $ ] * | ? : [ \ \ / ] * ) continue ; ; <nl> + NONE | ' ' ) case $ ac_var in * prefix ) continue ; ; esac ; ; <nl> + esac <nl> + as_fn_error $ ? " expected an absolute directory name for - - $ ac_var : $ ac_val " <nl> + done <nl> + <nl> + # There might be people who depend on the old broken behavior : ` $ host ' <nl> + # used to hold the argument of - - host etc . <nl> + # FIXME : To remove some day . <nl> + build = $ build_alias <nl> + host = $ host_alias <nl> + target = $ target_alias <nl> + <nl> + # FIXME : To remove some day . <nl> + if test " x $ host_alias " ! = x ; then <nl> + if test " x $ build_alias " = x ; then <nl> + cross_compiling = maybe <nl> + elif test " x $ build_alias " ! = " x $ host_alias " ; then <nl> + cross_compiling = yes <nl> + fi <nl> + fi <nl> + <nl> + ac_tool_prefix = <nl> + test - n " $ host_alias " & & ac_tool_prefix = $ host_alias - <nl> + <nl> + test " $ silent " = yes & & exec 6 > / dev / null <nl> + <nl> + <nl> + ac_pwd = ` pwd ` & & test - n " $ ac_pwd " & & <nl> + ac_ls_di = ` ls - di . ` & & <nl> + ac_pwd_ls_di = ` cd " $ ac_pwd " & & ls - di . ` | | <nl> + as_fn_error $ ? " working directory cannot be determined " <nl> + test " X $ ac_ls_di " = " X $ ac_pwd_ls_di " | | <nl> + as_fn_error $ ? " pwd does not report name of working directory " <nl> + <nl> + <nl> + # Find the source files , if location was not specified . <nl> + if test - z " $ srcdir " ; then <nl> + ac_srcdir_defaulted = yes <nl> + # Try the directory containing this script , then the parent directory . <nl> + ac_confdir = ` $ as_dirname - - " $ as_myself " | | <nl> + $ as_expr X " $ as_myself " : ' X \ ( . * [ ^ / ] \ ) / / * [ ^ / ] [ ^ / ] * / * $ ' \ | \ <nl> + X " $ as_myself " : ' X \ ( / / \ ) [ ^ / ] ' \ | \ <nl> + X " $ as_myself " : ' X \ ( / / \ ) $ ' \ | \ <nl> + X " $ as_myself " : ' X \ ( / \ ) ' \ | . 2 > / dev / null | | <nl> + $ as_echo X " $ as_myself " | <nl> + sed ' / ^ X \ ( . * [ ^ / ] \ ) \ / \ / * [ ^ / ] [ ^ / ] * \ / * $ / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + / ^ X \ ( \ / \ / \ ) [ ^ / ] . * / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + / ^ X \ ( \ / \ / \ ) $ / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + / ^ X \ ( \ / \ ) . * / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + s / . * / . / ; q ' ` <nl> + srcdir = $ ac_confdir <nl> + if test ! - r " $ srcdir / $ ac_unique_file " ; then <nl> + srcdir = . . <nl> + fi <nl> + else <nl> + ac_srcdir_defaulted = no <nl> + fi <nl> + if test ! - r " $ srcdir / $ ac_unique_file " ; then <nl> + test " $ ac_srcdir_defaulted " = yes & & srcdir = " $ ac_confdir or . . " <nl> + as_fn_error $ ? " cannot find sources ( $ ac_unique_file ) in $ srcdir " <nl> + fi <nl> + ac_msg = " sources are in $ srcdir , but \ ` cd $ srcdir ' does not work " <nl> + ac_abs_confdir = ` ( <nl> + cd " $ srcdir " & & test - r " . / $ ac_unique_file " | | as_fn_error $ ? " $ ac_msg " <nl> + pwd ) ` <nl> + # When building in place , set srcdir = . <nl> + if test " $ ac_abs_confdir " = " $ ac_pwd " ; then <nl> + srcdir = . <nl> + fi <nl> + # Remove unnecessary trailing slashes from srcdir . <nl> + # Double slashes in file names in object file debugging info <nl> + # mess up M - x gdb in Emacs . <nl> + case $ srcdir in <nl> + * / ) srcdir = ` expr " X $ srcdir " : ' X \ ( . * [ ^ / ] \ ) ' \ | " X $ srcdir " : ' X \ ( . * \ ) ' ` ; ; <nl> + esac <nl> + for ac_var in $ ac_precious_vars ; do <nl> + eval ac_env_ $ { ac_var } _set = \ $ { $ { ac_var } + set } <nl> + eval ac_env_ $ { ac_var } _value = \ $ $ { ac_var } <nl> + eval ac_cv_env_ $ { ac_var } _set = \ $ { $ { ac_var } + set } <nl> + eval ac_cv_env_ $ { ac_var } _value = \ $ $ { ac_var } <nl> + done <nl> + <nl> + # <nl> + # Report the - - help message . <nl> + # <nl> + if test " $ ac_init_help " = " long " ; then <nl> + # Omit some internal or obsolete options to make the list less imposing . <nl> + # This message is too long to be a string in the A / UX 3 . 1 sh . <nl> + cat < < _ACEOF <nl> + \ ` configure ' configures this package to adapt to many kinds of systems . <nl> + <nl> + Usage : $ 0 [ OPTION ] . . . [ VAR = VALUE ] . . . <nl> + <nl> + To assign environment variables ( e . g . , CC , CFLAGS . . . ) , specify them as <nl> + VAR = VALUE . See below for descriptions of some of the useful variables . <nl> + <nl> + Defaults for the options are specified in brackets . <nl> + <nl> + Configuration : <nl> + - h , - - help display this help and exit <nl> + - - help = short display options specific to this package <nl> + - - help = recursive display the short help of all the included packages <nl> + - V , - - version display version information and exit <nl> + - q , - - quiet , - - silent do not print \ ` checking . . . ' messages <nl> + - - cache - file = FILE cache test results in FILE [ disabled ] <nl> + - C , - - config - cache alias for \ ` - - cache - file = config . cache ' <nl> + - n , - - no - create do not create output files <nl> + - - srcdir = DIR find the sources in DIR [ configure dir or \ ` . . ' ] <nl> + <nl> + Installation directories : <nl> + - - prefix = PREFIX install architecture - independent files in PREFIX <nl> + [ $ ac_default_prefix ] <nl> + - - exec - prefix = EPREFIX install architecture - dependent files in EPREFIX <nl> + [ PREFIX ] <nl> + <nl> + By default , \ ` make install ' will install all the files in <nl> + \ ` $ ac_default_prefix / bin ' , \ ` $ ac_default_prefix / lib ' etc . You can specify <nl> + an installation prefix other than \ ` $ ac_default_prefix ' using \ ` - - prefix ' , <nl> + for instance \ ` - - prefix = \ $ HOME ' . <nl> + <nl> + For better control , use the options below . <nl> + <nl> + Fine tuning of the installation directories : <nl> + - - bindir = DIR user executables [ EPREFIX / bin ] <nl> + - - sbindir = DIR system admin executables [ EPREFIX / sbin ] <nl> + - - libexecdir = DIR program executables [ EPREFIX / libexec ] <nl> + - - sysconfdir = DIR read - only single - machine data [ PREFIX / etc ] <nl> + - - sharedstatedir = DIR modifiable architecture - independent data [ PREFIX / com ] <nl> + - - localstatedir = DIR modifiable single - machine data [ PREFIX / var ] <nl> + - - runstatedir = DIR modifiable per - process data [ LOCALSTATEDIR / run ] <nl> + - - libdir = DIR object code libraries [ EPREFIX / lib ] <nl> + - - includedir = DIR C header files [ PREFIX / include ] <nl> + - - oldincludedir = DIR C header files for non - gcc [ / usr / include ] <nl> + - - datarootdir = DIR read - only arch . - independent data root [ PREFIX / share ] <nl> + - - datadir = DIR read - only architecture - independent data [ DATAROOTDIR ] <nl> + - - infodir = DIR info documentation [ DATAROOTDIR / info ] <nl> + - - localedir = DIR locale - dependent data [ DATAROOTDIR / locale ] <nl> + - - mandir = DIR man documentation [ DATAROOTDIR / man ] <nl> + - - docdir = DIR documentation root [ DATAROOTDIR / doc / PACKAGE ] <nl> + - - htmldir = DIR html documentation [ DOCDIR ] <nl> + - - dvidir = DIR dvi documentation [ DOCDIR ] <nl> + - - pdfdir = DIR pdf documentation [ DOCDIR ] <nl> + - - psdir = DIR ps documentation [ DOCDIR ] <nl> + _ACEOF <nl> + <nl> + cat < < \ _ACEOF <nl> + <nl> + System types : <nl> + - - build = BUILD configure for building on BUILD [ guessed ] <nl> + - - host = HOST cross - compile to build programs to run on HOST [ BUILD ] <nl> + _ACEOF <nl> + fi <nl> + <nl> + if test - n " $ ac_init_help " ; then <nl> + <nl> + cat < < \ _ACEOF <nl> + <nl> + Optional Features : <nl> + - - disable - option - checking ignore unrecognized - - enable / - - with options <nl> + - - disable - FEATURE do not include FEATURE ( same as - - enable - FEATURE = no ) <nl> + - - enable - FEATURE [ = ARG ] include FEATURE [ ARG = yes ] <nl> + - - disable - cxx Disable C + + integration <nl> + - - enable - autogen Automatically regenerate configure output <nl> + - - enable - code - coverage Enable code coverage <nl> + - - disable - cc - silence Do not silence irrelevant compiler warnings <nl> + - - enable - debug Build debugging code ( implies - - enable - ivsalloc ) <nl> + - - enable - ivsalloc Validate pointers passed through the public API <nl> + - - disable - stats Disable statistics calculation / reporting <nl> + - - enable - prof Enable allocation profiling <nl> + - - enable - prof - libunwind Use libunwind for backtracing <nl> + - - disable - prof - libgcc Do not use libgcc for backtracing <nl> + - - disable - prof - gcc Do not use gcc intrinsics for backtracing <nl> + - - disable - tcache Disable per thread caches <nl> + - - disable - munmap Disable VM deallocation via munmap ( 2 ) <nl> + - - disable - fill Disable support for junk / zero filling <nl> + - - enable - utrace Enable utrace ( 2 ) - based tracing <nl> + - - enable - xmalloc Support xmalloc option <nl> + - - disable - cache - oblivious <nl> + Disable support for cache - oblivious allocation <nl> + alignment <nl> + - - disable - syscall Disable use of syscall ( 2 ) <nl> + - - enable - lazy - lock Enable lazy locking ( only lock when multi - threaded ) <nl> + - - disable - tls Disable thread - local storage ( __thread keyword ) <nl> + - - disable - zone - allocator <nl> + Disable zone allocator for Darwin <nl> + <nl> + Optional Packages : <nl> + - - with - PACKAGE [ = ARG ] use PACKAGE [ ARG = yes ] <nl> + - - without - PACKAGE do not use PACKAGE ( same as - - with - PACKAGE = no ) <nl> + - - with - xslroot = < path > XSL stylesheet root path <nl> + - - with - rpath = < rpath > Colon - separated rpath ( ELF systems only ) <nl> + - - with - mangling = < map > Mangle symbols in < map > <nl> + - - with - jemalloc - prefix = < prefix > <nl> + Prefix to prepend to all public APIs <nl> + - - without - export disable exporting jemalloc public APIs <nl> + - - with - private - namespace = < prefix > <nl> + Prefix to prepend to all library - private APIs <nl> + - - with - install - suffix = < suffix > <nl> + Suffix to append to all installed files <nl> + - - with - malloc - conf = < malloc_conf > <nl> + config . malloc_conf options string <nl> + - - with - static - libunwind = < libunwind . a > <nl> + Path to static libunwind library ; use rather than <nl> + dynamically linking <nl> + - - with - lg - tiny - min = < lg - tiny - min > <nl> + Base 2 log of minimum tiny size class to support <nl> + - - with - lg - quantum = < lg - quantum > <nl> + Base 2 log of minimum allocation alignment <nl> + - - with - lg - page = < lg - page > <nl> + Base 2 log of system page size <nl> + - - with - lg - hugepage = < lg - hugepage > <nl> + Base 2 log of sytem huge page size <nl> + - - with - lg - page - sizes = < lg - page - sizes > <nl> + Base 2 logs of system page sizes to support <nl> + - - with - lg - size - class - group = < lg - size - class - group > <nl> + Base 2 log of size classes per doubling <nl> + - - with - version = < major > . < minor > . < bugfix > - < nrev > - g < gid > <nl> + Version string <nl> + <nl> + Some influential environment variables : <nl> + CC C compiler command <nl> + CFLAGS C compiler flags <nl> + LDFLAGS linker flags , e . g . - L < lib dir > if you have libraries in a <nl> + nonstandard directory < lib dir > <nl> + LIBS libraries to pass to the linker , e . g . - l < library > <nl> + CPPFLAGS ( Objective ) C / C + + preprocessor flags , e . g . - I < include dir > if <nl> + you have headers in a nonstandard directory < include dir > <nl> + CPP C preprocessor <nl> + CXX C + + compiler command <nl> + CXXFLAGS C + + compiler flags <nl> + <nl> + Use these variables to override the choices made by ` configure ' or to help <nl> + it to find libraries and programs with nonstandard names / locations . <nl> + <nl> + Report bugs to the package provider . <nl> + _ACEOF <nl> + ac_status = $ ? <nl> + fi <nl> + <nl> + if test " $ ac_init_help " = " recursive " ; then <nl> + # If there are subdirs , report their specific - - help . <nl> + for ac_dir in : $ ac_subdirs_all ; do test " x $ ac_dir " = x : & & continue <nl> + test - d " $ ac_dir " | | <nl> + { cd " $ srcdir " & & ac_pwd = ` pwd ` & & srcdir = . & & test - d " $ ac_dir " ; } | | <nl> + continue <nl> + ac_builddir = . <nl> + <nl> + case " $ ac_dir " in <nl> + . ) ac_dir_suffix = ac_top_builddir_sub = . ac_top_build_prefix = ; ; <nl> + * ) <nl> + ac_dir_suffix = / ` $ as_echo " $ ac_dir " | sed ' s | ^ \ . [ \ \ / ] | | ' ` <nl> + # A " . . " for each directory in $ ac_dir_suffix . <nl> + ac_top_builddir_sub = ` $ as_echo " $ ac_dir_suffix " | sed ' s | / [ ^ \ \ / ] * | / . . | g ; s | / | | ' ` <nl> + case $ ac_top_builddir_sub in <nl> + " " ) ac_top_builddir_sub = . ac_top_build_prefix = ; ; <nl> + * ) ac_top_build_prefix = $ ac_top_builddir_sub / ; ; <nl> + esac ; ; <nl> + esac <nl> + ac_abs_top_builddir = $ ac_pwd <nl> + ac_abs_builddir = $ ac_pwd $ ac_dir_suffix <nl> + # for backward compatibility : <nl> + ac_top_builddir = $ ac_top_build_prefix <nl> + <nl> + case $ srcdir in <nl> + . ) # We are building in place . <nl> + ac_srcdir = . <nl> + ac_top_srcdir = $ ac_top_builddir_sub <nl> + ac_abs_top_srcdir = $ ac_pwd ; ; <nl> + [ \ \ / ] * | ? : [ \ \ / ] * ) # Absolute name . <nl> + ac_srcdir = $ srcdir $ ac_dir_suffix ; <nl> + ac_top_srcdir = $ srcdir <nl> + ac_abs_top_srcdir = $ srcdir ; ; <nl> + * ) # Relative name . <nl> + ac_srcdir = $ ac_top_build_prefix $ srcdir $ ac_dir_suffix <nl> + ac_top_srcdir = $ ac_top_build_prefix $ srcdir <nl> + ac_abs_top_srcdir = $ ac_pwd / $ srcdir ; ; <nl> + esac <nl> + ac_abs_srcdir = $ ac_abs_top_srcdir $ ac_dir_suffix <nl> + <nl> + cd " $ ac_dir " | | { ac_status = $ ? ; continue ; } <nl> + # Check for guested configure . <nl> + if test - f " $ ac_srcdir / configure . gnu " ; then <nl> + echo & & <nl> + $ SHELL " $ ac_srcdir / configure . gnu " - - help = recursive <nl> + elif test - f " $ ac_srcdir / configure " ; then <nl> + echo & & <nl> + $ SHELL " $ ac_srcdir / configure " - - help = recursive <nl> + else <nl> + $ as_echo " $ as_me : WARNING : no configuration information is in $ ac_dir " > & 2 <nl> + fi | | ac_status = $ ? <nl> + cd " $ ac_pwd " | | { ac_status = $ ? ; break ; } <nl> + done <nl> + fi <nl> + <nl> + test - n " $ ac_init_help " & & exit $ ac_status <nl> + if $ ac_init_version ; then <nl> + cat < < \ _ACEOF <nl> + configure <nl> + generated by GNU Autoconf 2 . 69 <nl> + <nl> + Copyright ( C ) 2012 Free Software Foundation , Inc . <nl> + This configure script is free software ; the Free Software Foundation <nl> + gives unlimited permission to copy , distribute and modify it . <nl> + _ACEOF <nl> + exit <nl> + fi <nl> + <nl> + # # mmmmmmmmmmmmmmmmmmmmmmmm # # <nl> + # # Autoconf initialization . # # <nl> + # # mmmmmmmmmmmmmmmmmmmmmmmm # # <nl> + <nl> + # ac_fn_c_try_compile LINENO <nl> + # mmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + # Try to compile conftest . $ ac_ext , and return whether this succeeded . <nl> + ac_fn_c_try_compile ( ) <nl> + { <nl> + as_lineno = $ { as_lineno - " $ 1 " } as_lineno_stack = as_lineno_stack = $ as_lineno_stack <nl> + rm - f conftest . $ ac_objext <nl> + if { { ac_try = " $ ac_compile " <nl> + case " ( ( $ ac_try " in <nl> + * \ " * | * \ ` * | * \ \ * ) ac_try_echo = \ $ ac_try ; ; <nl> + * ) ac_try_echo = $ ac_try ; ; <nl> + esac <nl> + eval ac_try_echo = " \ " \ $ as_me : $ { as_lineno - $ LINENO } : $ ac_try_echo \ " " <nl> + $ as_echo " $ ac_try_echo " ; } > & 5 <nl> + ( eval " $ ac_compile " ) 2 > conftest . err <nl> + ac_status = $ ? <nl> + if test - s conftest . err ; then <nl> + grep - v ' ^ * + ' conftest . err > conftest . er1 <nl> + cat conftest . er1 > & 5 <nl> + mv - f conftest . er1 conftest . err <nl> + fi <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : \ $ ? = $ ac_status " > & 5 <nl> + test $ ac_status = 0 ; } & & { <nl> + test - z " $ ac_c_werror_flag " | | <nl> + test ! - s conftest . err <nl> + } & & test - s conftest . $ ac_objext ; then : <nl> + ac_retval = 0 <nl> + else <nl> + $ as_echo " $ as_me : failed program was : " > & 5 <nl> + sed ' s / ^ / | / ' conftest . $ ac_ext > & 5 <nl> + <nl> + ac_retval = 1 <nl> + fi <nl> + eval $ as_lineno_stack ; $ { as_lineno_stack : + : } unset as_lineno <nl> + as_fn_set_status $ ac_retval <nl> + <nl> + } # ac_fn_c_try_compile <nl> + <nl> + # ac_fn_c_try_cpp LINENO <nl> + # mmmmmmmmmmmmmmmmmmmmm - <nl> + # Try to preprocess conftest . $ ac_ext , and return whether this succeeded . <nl> + ac_fn_c_try_cpp ( ) <nl> + { <nl> + as_lineno = $ { as_lineno - " $ 1 " } as_lineno_stack = as_lineno_stack = $ as_lineno_stack <nl> + if { { ac_try = " $ ac_cpp conftest . $ ac_ext " <nl> + case " ( ( $ ac_try " in <nl> + * \ " * | * \ ` * | * \ \ * ) ac_try_echo = \ $ ac_try ; ; <nl> + * ) ac_try_echo = $ ac_try ; ; <nl> + esac <nl> + eval ac_try_echo = " \ " \ $ as_me : $ { as_lineno - $ LINENO } : $ ac_try_echo \ " " <nl> + $ as_echo " $ ac_try_echo " ; } > & 5 <nl> + ( eval " $ ac_cpp conftest . $ ac_ext " ) 2 > conftest . err <nl> + ac_status = $ ? <nl> + if test - s conftest . err ; then <nl> + grep - v ' ^ * + ' conftest . err > conftest . er1 <nl> + cat conftest . er1 > & 5 <nl> + mv - f conftest . er1 conftest . err <nl> + fi <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : \ $ ? = $ ac_status " > & 5 <nl> + test $ ac_status = 0 ; } > conftest . i & & { <nl> + test - z " $ ac_c_preproc_warn_flag $ ac_c_werror_flag " | | <nl> + test ! - s conftest . err <nl> + } ; then : <nl> + ac_retval = 0 <nl> + else <nl> + $ as_echo " $ as_me : failed program was : " > & 5 <nl> + sed ' s / ^ / | / ' conftest . $ ac_ext > & 5 <nl> + <nl> + ac_retval = 1 <nl> + fi <nl> + eval $ as_lineno_stack ; $ { as_lineno_stack : + : } unset as_lineno <nl> + as_fn_set_status $ ac_retval <nl> + <nl> + } # ac_fn_c_try_cpp <nl> + <nl> + # ac_fn_cxx_try_compile LINENO <nl> + # mmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> + # Try to compile conftest . $ ac_ext , and return whether this succeeded . <nl> + ac_fn_cxx_try_compile ( ) <nl> + { <nl> + as_lineno = $ { as_lineno - " $ 1 " } as_lineno_stack = as_lineno_stack = $ as_lineno_stack <nl> + rm - f conftest . $ ac_objext <nl> + if { { ac_try = " $ ac_compile " <nl> + case " ( ( $ ac_try " in <nl> + * \ " * | * \ ` * | * \ \ * ) ac_try_echo = \ $ ac_try ; ; <nl> + * ) ac_try_echo = $ ac_try ; ; <nl> + esac <nl> + eval ac_try_echo = " \ " \ $ as_me : $ { as_lineno - $ LINENO } : $ ac_try_echo \ " " <nl> + $ as_echo " $ ac_try_echo " ; } > & 5 <nl> + ( eval " $ ac_compile " ) 2 > conftest . err <nl> + ac_status = $ ? <nl> + if test - s conftest . err ; then <nl> + grep - v ' ^ * + ' conftest . err > conftest . er1 <nl> + cat conftest . er1 > & 5 <nl> + mv - f conftest . er1 conftest . err <nl> + fi <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : \ $ ? = $ ac_status " > & 5 <nl> + test $ ac_status = 0 ; } & & { <nl> + test - z " $ ac_cxx_werror_flag " | | <nl> + test ! - s conftest . err <nl> + } & & test - s conftest . $ ac_objext ; then : <nl> + ac_retval = 0 <nl> + else <nl> + $ as_echo " $ as_me : failed program was : " > & 5 <nl> + sed ' s / ^ / | / ' conftest . $ ac_ext > & 5 <nl> + <nl> + ac_retval = 1 <nl> + fi <nl> + eval $ as_lineno_stack ; $ { as_lineno_stack : + : } unset as_lineno <nl> + as_fn_set_status $ ac_retval <nl> + <nl> + } # ac_fn_cxx_try_compile <nl> + <nl> + # ac_fn_c_try_link LINENO <nl> + # mmmmmmmmmmmmmmmmmmmmm - - <nl> + # Try to link conftest . $ ac_ext , and return whether this succeeded . <nl> + ac_fn_c_try_link ( ) <nl> + { <nl> + as_lineno = $ { as_lineno - " $ 1 " } as_lineno_stack = as_lineno_stack = $ as_lineno_stack <nl> + rm - f conftest . $ ac_objext conftest $ ac_exeext <nl> + if { { ac_try = " $ ac_link " <nl> + case " ( ( $ ac_try " in <nl> + * \ " * | * \ ` * | * \ \ * ) ac_try_echo = \ $ ac_try ; ; <nl> + * ) ac_try_echo = $ ac_try ; ; <nl> + esac <nl> + eval ac_try_echo = " \ " \ $ as_me : $ { as_lineno - $ LINENO } : $ ac_try_echo \ " " <nl> + $ as_echo " $ ac_try_echo " ; } > & 5 <nl> + ( eval " $ ac_link " ) 2 > conftest . err <nl> + ac_status = $ ? <nl> + if test - s conftest . err ; then <nl> + grep - v ' ^ * + ' conftest . err > conftest . er1 <nl> + cat conftest . er1 > & 5 <nl> + mv - f conftest . er1 conftest . err <nl> + fi <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : \ $ ? = $ ac_status " > & 5 <nl> + test $ ac_status = 0 ; } & & { <nl> + test - z " $ ac_c_werror_flag " | | <nl> + test ! - s conftest . err <nl> + } & & test - s conftest $ ac_exeext & & { <nl> + test " $ cross_compiling " = yes | | <nl> + test - x conftest $ ac_exeext <nl> + } ; then : <nl> + ac_retval = 0 <nl> + else <nl> + $ as_echo " $ as_me : failed program was : " > & 5 <nl> + sed ' s / ^ / | / ' conftest . $ ac_ext > & 5 <nl> + <nl> + ac_retval = 1 <nl> + fi <nl> + # Delete the IPA / IPO ( Inter Procedural Analysis / Optimization ) information <nl> + # created by the PGI compiler ( conftest_ipa8_conftest . oo ) , as it would <nl> + # interfere with the next link command ; also delete a directory that is <nl> + # left behind by Apple ' s compiler . We do this before executing the actions . <nl> + rm - rf conftest . dSYM conftest_ipa8_conftest . oo <nl> + eval $ as_lineno_stack ; $ { as_lineno_stack : + : } unset as_lineno <nl> + as_fn_set_status $ ac_retval <nl> + <nl> + } # ac_fn_c_try_link <nl> + <nl> + # ac_fn_c_try_run LINENO <nl> + # mmmmmmmmmmmmmmmmmmmmm - <nl> + # Try to link conftest . $ ac_ext , and return whether this succeeded . Assumes <nl> + # that executables * can * be run . <nl> + ac_fn_c_try_run ( ) <nl> + { <nl> + as_lineno = $ { as_lineno - " $ 1 " } as_lineno_stack = as_lineno_stack = $ as_lineno_stack <nl> + if { { ac_try = " $ ac_link " <nl> + case " ( ( $ ac_try " in <nl> + * \ " * | * \ ` * | * \ \ * ) ac_try_echo = \ $ ac_try ; ; <nl> + * ) ac_try_echo = $ ac_try ; ; <nl> + esac <nl> + eval ac_try_echo = " \ " \ $ as_me : $ { as_lineno - $ LINENO } : $ ac_try_echo \ " " <nl> + $ as_echo " $ ac_try_echo " ; } > & 5 <nl> + ( eval " $ ac_link " ) 2 > & 5 <nl> + ac_status = $ ? <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : \ $ ? = $ ac_status " > & 5 <nl> + test $ ac_status = 0 ; } & & { ac_try = ' . / conftest $ ac_exeext ' <nl> + { { case " ( ( $ ac_try " in <nl> + * \ " * | * \ ` * | * \ \ * ) ac_try_echo = \ $ ac_try ; ; <nl> + * ) ac_try_echo = $ ac_try ; ; <nl> + esac <nl> + eval ac_try_echo = " \ " \ $ as_me : $ { as_lineno - $ LINENO } : $ ac_try_echo \ " " <nl> + $ as_echo " $ ac_try_echo " ; } > & 5 <nl> + ( eval " $ ac_try " ) 2 > & 5 <nl> + ac_status = $ ? <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : \ $ ? = $ ac_status " > & 5 <nl> + test $ ac_status = 0 ; } ; } ; then : <nl> + ac_retval = 0 <nl> + else <nl> + $ as_echo " $ as_me : program exited with status $ ac_status " > & 5 <nl> + $ as_echo " $ as_me : failed program was : " > & 5 <nl> + sed ' s / ^ / | / ' conftest . $ ac_ext > & 5 <nl> + <nl> + ac_retval = $ ac_status <nl> + fi <nl> + rm - rf conftest . dSYM conftest_ipa8_conftest . oo <nl> + eval $ as_lineno_stack ; $ { as_lineno_stack : + : } unset as_lineno <nl> + as_fn_set_status $ ac_retval <nl> + <nl> + } # ac_fn_c_try_run <nl> + <nl> + # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES <nl> + # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> + # Tests whether HEADER exists and can be compiled using the include files in <nl> + # INCLUDES , setting the cache variable VAR accordingly . <nl> + ac_fn_c_check_header_compile ( ) <nl> + { <nl> + as_lineno = $ { as_lineno - " $ 1 " } as_lineno_stack = as_lineno_stack = $ as_lineno_stack <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ 2 " > & 5 <nl> + $ as_echo_n " checking for $ 2 . . . " > & 6 ; } <nl> + if eval \ $ { $ 3 + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + $ 4 <nl> + # include < $ 2 > <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + eval " $ 3 = yes " <nl> + else <nl> + eval " $ 3 = no " <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + fi <nl> + eval ac_res = \ $ $ 3 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_res " > & 5 <nl> + $ as_echo " $ ac_res " > & 6 ; } <nl> + eval $ as_lineno_stack ; $ { as_lineno_stack : + : } unset as_lineno <nl> + <nl> + } # ac_fn_c_check_header_compile <nl> + <nl> + # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES <nl> + # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + # Tries to find the compile - time value of EXPR in a program that includes <nl> + # INCLUDES , setting VAR accordingly . Returns whether the value could be <nl> + # computed <nl> + ac_fn_c_compute_int ( ) <nl> + { <nl> + as_lineno = $ { as_lineno - " $ 1 " } as_lineno_stack = as_lineno_stack = $ as_lineno_stack <nl> + if test " $ cross_compiling " = yes ; then <nl> + # Depending upon the size , compute the lo and hi bounds . <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + $ 4 <nl> + int <nl> + main ( ) <nl> + { <nl> + static int test_array [ 1 - 2 * ! ( ( $ 2 ) > = 0 ) ] ; <nl> + test_array [ 0 ] = 0 ; <nl> + return test_array [ 0 ] ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + ac_lo = 0 ac_mid = 0 <nl> + while : ; do <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + $ 4 <nl> + int <nl> + main ( ) <nl> + { <nl> + static int test_array [ 1 - 2 * ! ( ( $ 2 ) < = $ ac_mid ) ] ; <nl> + test_array [ 0 ] = 0 ; <nl> + return test_array [ 0 ] ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + ac_hi = $ ac_mid ; break <nl> + else <nl> + as_fn_arith $ ac_mid + 1 & & ac_lo = $ as_val <nl> + if test $ ac_lo - le $ ac_mid ; then <nl> + ac_lo = ac_hi = <nl> + break <nl> + fi <nl> + as_fn_arith 2 ' * ' $ ac_mid + 1 & & ac_mid = $ as_val <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + done <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + $ 4 <nl> + int <nl> + main ( ) <nl> + { <nl> + static int test_array [ 1 - 2 * ! ( ( $ 2 ) < 0 ) ] ; <nl> + test_array [ 0 ] = 0 ; <nl> + return test_array [ 0 ] ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + ac_hi = - 1 ac_mid = - 1 <nl> + while : ; do <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + $ 4 <nl> + int <nl> + main ( ) <nl> + { <nl> + static int test_array [ 1 - 2 * ! ( ( $ 2 ) > = $ ac_mid ) ] ; <nl> + test_array [ 0 ] = 0 ; <nl> + return test_array [ 0 ] ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + ac_lo = $ ac_mid ; break <nl> + else <nl> + as_fn_arith ' ( ' $ ac_mid ' ) ' - 1 & & ac_hi = $ as_val <nl> + if test $ ac_mid - le $ ac_hi ; then <nl> + ac_lo = ac_hi = <nl> + break <nl> + fi <nl> + as_fn_arith 2 ' * ' $ ac_mid & & ac_mid = $ as_val <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + done <nl> + else <nl> + ac_lo = ac_hi = <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + # Binary search between lo and hi bounds . <nl> + while test " x $ ac_lo " ! = " x $ ac_hi " ; do <nl> + as_fn_arith ' ( ' $ ac_hi - $ ac_lo ' ) ' / 2 + $ ac_lo & & ac_mid = $ as_val <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + $ 4 <nl> + int <nl> + main ( ) <nl> + { <nl> + static int test_array [ 1 - 2 * ! ( ( $ 2 ) < = $ ac_mid ) ] ; <nl> + test_array [ 0 ] = 0 ; <nl> + return test_array [ 0 ] ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + ac_hi = $ ac_mid <nl> + else <nl> + as_fn_arith ' ( ' $ ac_mid ' ) ' + 1 & & ac_lo = $ as_val <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + done <nl> + case $ ac_lo in # ( ( <nl> + ? * ) eval " $ 3 = \ $ ac_lo " ; ac_retval = 0 ; ; <nl> + ' ' ) ac_retval = 1 ; ; <nl> + esac <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + $ 4 <nl> + static long int longval ( ) { return $ 2 ; } <nl> + static unsigned long int ulongval ( ) { return $ 2 ; } <nl> + # include < stdio . h > <nl> + # include < stdlib . h > <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + FILE * f = fopen ( " conftest . val " , " w " ) ; <nl> + if ( ! f ) <nl> + return 1 ; <nl> + if ( ( $ 2 ) < 0 ) <nl> + { <nl> + long int i = longval ( ) ; <nl> + if ( i ! = ( $ 2 ) ) <nl> + return 1 ; <nl> + fprintf ( f , " % ld " , i ) ; <nl> + } <nl> + else <nl> + { <nl> + unsigned long int i = ulongval ( ) ; <nl> + if ( i ! = ( $ 2 ) ) <nl> + return 1 ; <nl> + fprintf ( f , " % lu " , i ) ; <nl> + } <nl> + / * Do not output a trailing newline , as this causes \ r \ n confusion <nl> + on some platforms . * / <nl> + return ferror ( f ) | | fclose ( f ) ! = 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_run " $ LINENO " ; then : <nl> + echo > > conftest . val ; read $ 3 < conftest . val ; ac_retval = 0 <nl> + else <nl> + ac_retval = 1 <nl> + fi <nl> + rm - f core * . core core . conftest . * gmon . out bb . out conftest $ ac_exeext \ <nl> + conftest . $ ac_objext conftest . beam conftest . $ ac_ext <nl> + rm - f conftest . val <nl> + <nl> + fi <nl> + eval $ as_lineno_stack ; $ { as_lineno_stack : + : } unset as_lineno <nl> + as_fn_set_status $ ac_retval <nl> + <nl> + } # ac_fn_c_compute_int <nl> + <nl> + # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES <nl> + # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> + # Tests whether HEADER exists , giving a warning if it cannot be compiled using <nl> + # the include files in INCLUDES and setting the cache variable VAR <nl> + # accordingly . <nl> + ac_fn_c_check_header_mongrel ( ) <nl> + { <nl> + as_lineno = $ { as_lineno - " $ 1 " } as_lineno_stack = as_lineno_stack = $ as_lineno_stack <nl> + if eval \ $ { $ 3 + : } false ; then : <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ 2 " > & 5 <nl> + $ as_echo_n " checking for $ 2 . . . " > & 6 ; } <nl> + if eval \ $ { $ 3 + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + fi <nl> + eval ac_res = \ $ $ 3 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_res " > & 5 <nl> + $ as_echo " $ ac_res " > & 6 ; } <nl> + else <nl> + # Is the header compilable ? <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking $ 2 usability " > & 5 <nl> + $ as_echo_n " checking $ 2 usability . . . " > & 6 ; } <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + $ 4 <nl> + # include < $ 2 > <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + ac_header_compiler = yes <nl> + else <nl> + ac_header_compiler = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_header_compiler " > & 5 <nl> + $ as_echo " $ ac_header_compiler " > & 6 ; } <nl> + <nl> + # Is the header present ? <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking $ 2 presence " > & 5 <nl> + $ as_echo_n " checking $ 2 presence . . . " > & 6 ; } <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # include < $ 2 > <nl> + _ACEOF <nl> + if ac_fn_c_try_cpp " $ LINENO " ; then : <nl> + ac_header_preproc = yes <nl> + else <nl> + ac_header_preproc = no <nl> + fi <nl> + rm - f conftest . err conftest . i conftest . $ ac_ext <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_header_preproc " > & 5 <nl> + $ as_echo " $ ac_header_preproc " > & 6 ; } <nl> + <nl> + # So ? What about this header ? <nl> + case $ ac_header_compiler : $ ac_header_preproc : $ ac_c_preproc_warn_flag in # ( ( <nl> + yes : no : ) <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : $ 2 : accepted by the compiler , rejected by the preprocessor ! " > & 5 <nl> + $ as_echo " $ as_me : WARNING : $ 2 : accepted by the compiler , rejected by the preprocessor ! " > & 2 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : $ 2 : proceeding with the compiler ' s result " > & 5 <nl> + $ as_echo " $ as_me : WARNING : $ 2 : proceeding with the compiler ' s result " > & 2 ; } <nl> + ; ; <nl> + no : yes : * ) <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : $ 2 : present but cannot be compiled " > & 5 <nl> + $ as_echo " $ as_me : WARNING : $ 2 : present but cannot be compiled " > & 2 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : $ 2 : check for missing prerequisite headers ? " > & 5 <nl> + $ as_echo " $ as_me : WARNING : $ 2 : check for missing prerequisite headers ? " > & 2 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : $ 2 : see the Autoconf documentation " > & 5 <nl> + $ as_echo " $ as_me : WARNING : $ 2 : see the Autoconf documentation " > & 2 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : $ 2 : section \ " Present But Cannot Be Compiled \ " " > & 5 <nl> + $ as_echo " $ as_me : WARNING : $ 2 : section \ " Present But Cannot Be Compiled \ " " > & 2 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : $ 2 : proceeding with the compiler ' s result " > & 5 <nl> + $ as_echo " $ as_me : WARNING : $ 2 : proceeding with the compiler ' s result " > & 2 ; } <nl> + ; ; <nl> + esac <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ 2 " > & 5 <nl> + $ as_echo_n " checking for $ 2 . . . " > & 6 ; } <nl> + if eval \ $ { $ 3 + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + eval " $ 3 = \ $ ac_header_compiler " <nl> + fi <nl> + eval ac_res = \ $ $ 3 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_res " > & 5 <nl> + $ as_echo " $ ac_res " > & 6 ; } <nl> + fi <nl> + eval $ as_lineno_stack ; $ { as_lineno_stack : + : } unset as_lineno <nl> + <nl> + } # ac_fn_c_check_header_mongrel <nl> + <nl> + # ac_fn_c_check_func LINENO FUNC VAR <nl> + # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> + # Tests whether FUNC exists , setting the cache variable VAR accordingly <nl> + ac_fn_c_check_func ( ) <nl> + { <nl> + as_lineno = $ { as_lineno - " $ 1 " } as_lineno_stack = as_lineno_stack = $ as_lineno_stack <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ 2 " > & 5 <nl> + $ as_echo_n " checking for $ 2 . . . " > & 6 ; } <nl> + if eval \ $ { $ 3 + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + / * Define $ 2 to an innocuous variant , in case < limits . h > declares $ 2 . <nl> + For example , HP - UX 11i < limits . h > declares gettimeofday . * / <nl> + # define $ 2 innocuous_ $ 2 <nl> + <nl> + / * System header to define __stub macros and hopefully few prototypes , <nl> + which can conflict with char $ 2 ( ) ; below . <nl> + Prefer < limits . h > to < assert . h > if __STDC__ is defined , since <nl> + < limits . h > exists even on freestanding compilers . * / <nl> + <nl> + # ifdef __STDC__ <nl> + # include < limits . h > <nl> + # else <nl> + # include < assert . h > <nl> + # endif <nl> + <nl> + # undef $ 2 <nl> + <nl> + / * Override any GCC internal prototype to avoid an error . <nl> + Use char because int might match the return type of a GCC <nl> + builtin and then its argument prototype would still apply . * / <nl> + # ifdef __cplusplus <nl> + extern " C " <nl> + # endif <nl> + char $ 2 ( ) ; <nl> + / * The GNU C library defines this for functions which it implements <nl> + to always fail with ENOSYS . Some functions are actually named <nl> + something starting with __ and the normal name is an alias . * / <nl> + # if defined __stub_ $ 2 | | defined __stub___ $ 2 <nl> + choke me <nl> + # endif <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + return $ 2 ( ) ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + eval " $ 3 = yes " <nl> + else <nl> + eval " $ 3 = no " <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + eval ac_res = \ $ $ 3 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_res " > & 5 <nl> + $ as_echo " $ ac_res " > & 6 ; } <nl> + eval $ as_lineno_stack ; $ { as_lineno_stack : + : } unset as_lineno <nl> + <nl> + } # ac_fn_c_check_func <nl> + <nl> + # ac_fn_c_check_type LINENO TYPE VAR INCLUDES <nl> + # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> + # Tests whether TYPE exists after having included INCLUDES , setting cache <nl> + # variable VAR accordingly . <nl> + ac_fn_c_check_type ( ) <nl> + { <nl> + as_lineno = $ { as_lineno - " $ 1 " } as_lineno_stack = as_lineno_stack = $ as_lineno_stack <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ 2 " > & 5 <nl> + $ as_echo_n " checking for $ 2 . . . " > & 6 ; } <nl> + if eval \ $ { $ 3 + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + eval " $ 3 = no " <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + $ 4 <nl> + int <nl> + main ( ) <nl> + { <nl> + if ( sizeof ( $ 2 ) ) <nl> + return 0 ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + $ 4 <nl> + int <nl> + main ( ) <nl> + { <nl> + if ( sizeof ( ( $ 2 ) ) ) <nl> + return 0 ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + <nl> + else <nl> + eval " $ 3 = yes " <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + fi <nl> + eval ac_res = \ $ $ 3 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_res " > & 5 <nl> + $ as_echo " $ ac_res " > & 6 ; } <nl> + eval $ as_lineno_stack ; $ { as_lineno_stack : + : } unset as_lineno <nl> + <nl> + } # ac_fn_c_check_type <nl> + cat > config . log < < _ACEOF <nl> + This file contains any messages produced by compilers while <nl> + running configure , to aid debugging if configure makes a mistake . <nl> + <nl> + It was created by $ as_me , which was <nl> + generated by GNU Autoconf 2 . 69 . Invocation command line was <nl> + <nl> + $ $ 0 $ @ <nl> + <nl> + _ACEOF <nl> + exec 5 > > config . log <nl> + { <nl> + cat < < _ASUNAME <nl> + # # mmmmmmmmm # # <nl> + # # Platform . # # <nl> + # # mmmmmmmmm # # <nl> + <nl> + hostname = ` ( hostname | | uname - n ) 2 > / dev / null | sed 1q ` <nl> + uname - m = ` ( uname - m ) 2 > / dev / null | | echo unknown ` <nl> + uname - r = ` ( uname - r ) 2 > / dev / null | | echo unknown ` <nl> + uname - s = ` ( uname - s ) 2 > / dev / null | | echo unknown ` <nl> + uname - v = ` ( uname - v ) 2 > / dev / null | | echo unknown ` <nl> + <nl> + / usr / bin / uname - p = ` ( / usr / bin / uname - p ) 2 > / dev / null | | echo unknown ` <nl> + / bin / uname - X = ` ( / bin / uname - X ) 2 > / dev / null | | echo unknown ` <nl> + <nl> + / bin / arch = ` ( / bin / arch ) 2 > / dev / null | | echo unknown ` <nl> + / usr / bin / arch - k = ` ( / usr / bin / arch - k ) 2 > / dev / null | | echo unknown ` <nl> + / usr / convex / getsysinfo = ` ( / usr / convex / getsysinfo ) 2 > / dev / null | | echo unknown ` <nl> + / usr / bin / hostinfo = ` ( / usr / bin / hostinfo ) 2 > / dev / null | | echo unknown ` <nl> + / bin / machine = ` ( / bin / machine ) 2 > / dev / null | | echo unknown ` <nl> + / usr / bin / oslevel = ` ( / usr / bin / oslevel ) 2 > / dev / null | | echo unknown ` <nl> + / bin / universe = ` ( / bin / universe ) 2 > / dev / null | | echo unknown ` <nl> + <nl> + _ASUNAME <nl> + <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + $ as_echo " PATH : $ as_dir " <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + } > & 5 <nl> + <nl> + cat > & 5 < < _ACEOF <nl> + <nl> + <nl> + # # mmmmmmmmm - - # # <nl> + # # Core tests . # # <nl> + # # mmmmmmmmm - - # # <nl> + <nl> + _ACEOF <nl> + <nl> + <nl> + # Keep a trace of the command line . <nl> + # Strip out - - no - create and - - no - recursion so they do not pile up . <nl> + # Strip out - - silent because we don ' t want to record it for future runs . <nl> + # Also quote any args containing shell meta - characters . <nl> + # Make two passes to allow for proper duplicate - argument suppression . <nl> + ac_configure_args = <nl> + ac_configure_args0 = <nl> + ac_configure_args1 = <nl> + ac_must_keep_next = false <nl> + for ac_pass in 1 2 <nl> + do <nl> + for ac_arg <nl> + do <nl> + case $ ac_arg in <nl> + - no - create | - - no - c * | - n | - no - recursion | - - no - r * ) continue ; ; <nl> + - q | - quiet | - - quiet | - - quie | - - qui | - - qu | - - q \ <nl> + | - silent | - - silent | - - silen | - - sile | - - sil ) <nl> + continue ; ; <nl> + * \ ' * ) <nl> + ac_arg = ` $ as_echo " $ ac_arg " | sed " s / ' / ' \ \ \ \ \ \ \ \ ' ' / g " ` ; ; <nl> + esac <nl> + case $ ac_pass in <nl> + 1 ) as_fn_append ac_configure_args0 " ' $ ac_arg ' " ; ; <nl> + 2 ) <nl> + as_fn_append ac_configure_args1 " ' $ ac_arg ' " <nl> + if test $ ac_must_keep_next = true ; then <nl> + ac_must_keep_next = false # Got value , back to normal . <nl> + else <nl> + case $ ac_arg in <nl> + * = * | - - config - cache | - C | - disable - * | - - disable - * \ <nl> + | - enable - * | - - enable - * | - gas | - - g * | - nfp | - - nf * \ <nl> + | - q | - quiet | - - q * | - silent | - - sil * | - v | - verb * \ <nl> + | - with - * | - - with - * | - without - * | - - without - * | - - x ) <nl> + case " $ ac_configure_args0 " in <nl> + " $ ac_configure_args1 " * " ' $ ac_arg ' " * ) continue ; ; <nl> + esac <nl> + ; ; <nl> + - * ) ac_must_keep_next = true ; ; <nl> + esac <nl> + fi <nl> + as_fn_append ac_configure_args " ' $ ac_arg ' " <nl> + ; ; <nl> + esac <nl> + done <nl> + done <nl> + { ac_configure_args0 = ; unset ac_configure_args0 ; } <nl> + { ac_configure_args1 = ; unset ac_configure_args1 ; } <nl> + <nl> + # When interrupted or exit ' d , cleanup temporary files , and complete <nl> + # config . log . We remove comments because anyway the quotes in there <nl> + # would cause problems or look ugly . <nl> + # WARNING : Use ' \ ' ' to represent an apostrophe within the trap . <nl> + # WARNING : Do not start the trap code with a newline , due to a FreeBSD 4 . 0 bug . <nl> + trap ' exit_status = $ ? <nl> + # Save into config . log some information that might help in debugging . <nl> + { <nl> + echo <nl> + <nl> + $ as_echo " # # mmmmmmmmmmmmmmm - # # <nl> + # # Cache variables . # # <nl> + # # mmmmmmmmmmmmmmm - # # " <nl> + echo <nl> + # The following way of writing the cache mishandles newlines in values , <nl> + ( <nl> + for ac_var in ` ( set ) 2 > & 1 | sed - n ' \ ' ' s / ^ \ ( [ a - zA - Z_ ] [ a - zA - Z0 - 9_ ] * \ ) = . * / \ 1 / p ' \ ' ' ` ; do <nl> + eval ac_val = \ $ $ ac_var <nl> + case $ ac_val in # ( <nl> + * $ { as_nl } * ) <nl> + case $ ac_var in # ( <nl> + * _cv_ * ) { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : cache variable $ ac_var contains a newline " > & 5 <nl> + $ as_echo " $ as_me : WARNING : cache variable $ ac_var contains a newline " > & 2 ; } ; ; <nl> + esac <nl> + case $ ac_var in # ( <nl> + _ | IFS | as_nl ) ; ; # ( <nl> + BASH_ARGV | BASH_SOURCE ) eval $ ac_var = ; ; # ( <nl> + * ) { eval $ ac_var = ; unset $ ac_var ; } ; ; <nl> + esac ; ; <nl> + esac <nl> + done <nl> + ( set ) 2 > & 1 | <nl> + case $ as_nl ` ( ac_space = ' \ ' ' ' \ ' ' ; set ) 2 > & 1 ` in # ( <nl> + * $ { as_nl } ac_space = \ * ) <nl> + sed - n \ <nl> + " s / ' \ ' ' / ' \ ' ' \ \ \ \ ' \ ' ' ' \ ' ' / g ; <nl> + s / ^ \ \ ( [ _ $ as_cr_alnum ] * _cv_ [ _ $ as_cr_alnum ] * \ \ ) = \ \ ( . * \ \ ) / \ \ 1 = ' \ ' ' \ \ 2 ' \ ' ' / p " <nl> + ; ; # ( <nl> + * ) <nl> + sed - n " / ^ [ _ $ as_cr_alnum ] * _cv_ [ _ $ as_cr_alnum ] * = / p " <nl> + ; ; <nl> + esac | <nl> + sort <nl> + ) <nl> + echo <nl> + <nl> + $ as_echo " # # mmmmmmmmmmmmmmm - - # # <nl> + # # Output variables . # # <nl> + # # mmmmmmmmmmmmmmm - - # # " <nl> + echo <nl> + for ac_var in $ ac_subst_vars <nl> + do <nl> + eval ac_val = \ $ $ ac_var <nl> + case $ ac_val in <nl> + * \ ' \ ' ' * ) ac_val = ` $ as_echo " $ ac_val " | sed " s / ' \ ' ' / ' \ ' ' \ \ \ \ \ \ \ \ ' \ ' ' ' \ ' ' / g " ` ; ; <nl> + esac <nl> + $ as_echo " $ ac_var = ' \ ' ' $ ac_val ' \ ' ' " <nl> + done | sort <nl> + echo <nl> + <nl> + if test - n " $ ac_subst_files " ; then <nl> + $ as_echo " # # mmmmmmmmmmmmmmmmmm - # # <nl> + # # File substitutions . # # <nl> + # # mmmmmmmmmmmmmmmmmm - # # " <nl> + echo <nl> + for ac_var in $ ac_subst_files <nl> + do <nl> + eval ac_val = \ $ $ ac_var <nl> + case $ ac_val in <nl> + * \ ' \ ' ' * ) ac_val = ` $ as_echo " $ ac_val " | sed " s / ' \ ' ' / ' \ ' ' \ \ \ \ \ \ \ \ ' \ ' ' ' \ ' ' / g " ` ; ; <nl> + esac <nl> + $ as_echo " $ ac_var = ' \ ' ' $ ac_val ' \ ' ' " <nl> + done | sort <nl> + echo <nl> + fi <nl> + <nl> + if test - s confdefs . h ; then <nl> + $ as_echo " # # mmmmmmmmm - - # # <nl> + # # confdefs . h . # # <nl> + # # mmmmmmmmm - - # # " <nl> + echo <nl> + cat confdefs . h <nl> + echo <nl> + fi <nl> + test " $ ac_signal " ! = 0 & & <nl> + $ as_echo " $ as_me : caught signal $ ac_signal " <nl> + $ as_echo " $ as_me : exit $ exit_status " <nl> + } > & 5 <nl> + rm - f core * . core core . conftest . * & & <nl> + rm - f - r conftest * confdefs * conf $ $ * $ ac_clean_files & & <nl> + exit $ exit_status <nl> + ' 0 <nl> + for ac_signal in 1 2 13 15 ; do <nl> + trap ' ac_signal = ' $ ac_signal ' ; as_fn_exit 1 ' $ ac_signal <nl> + done <nl> + ac_signal = 0 <nl> + <nl> + # confdefs . h avoids OS command line length limits that DEFS can exceed . <nl> + rm - f - r conftest * confdefs . h <nl> + <nl> + $ as_echo " / * confdefs . h * / " > confdefs . h <nl> + <nl> + # Predefined preprocessor variables . <nl> + <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define PACKAGE_NAME " $ PACKAGE_NAME " <nl> + _ACEOF <nl> + <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define PACKAGE_TARNAME " $ PACKAGE_TARNAME " <nl> + _ACEOF <nl> + <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define PACKAGE_VERSION " $ PACKAGE_VERSION " <nl> + _ACEOF <nl> + <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define PACKAGE_STRING " $ PACKAGE_STRING " <nl> + _ACEOF <nl> + <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define PACKAGE_BUGREPORT " $ PACKAGE_BUGREPORT " <nl> + _ACEOF <nl> + <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define PACKAGE_URL " $ PACKAGE_URL " <nl> + _ACEOF <nl> + <nl> + <nl> + # Let the site file select an alternate cache file if it wants to . <nl> + # Prefer an explicitly selected file to automatically selected ones . <nl> + ac_site_file1 = NONE <nl> + ac_site_file2 = NONE <nl> + if test - n " $ CONFIG_SITE " ; then <nl> + # We do not want a PATH search for config . site . <nl> + case $ CONFIG_SITE in # ( ( <nl> + - * ) ac_site_file1 = . / $ CONFIG_SITE ; ; <nl> + * / * ) ac_site_file1 = $ CONFIG_SITE ; ; <nl> + * ) ac_site_file1 = . / $ CONFIG_SITE ; ; <nl> + esac <nl> + elif test " x $ prefix " ! = xNONE ; then <nl> + ac_site_file1 = $ prefix / share / config . site <nl> + ac_site_file2 = $ prefix / etc / config . site <nl> + else <nl> + ac_site_file1 = $ ac_default_prefix / share / config . site <nl> + ac_site_file2 = $ ac_default_prefix / etc / config . site <nl> + fi <nl> + for ac_site_file in " $ ac_site_file1 " " $ ac_site_file2 " <nl> + do <nl> + test " x $ ac_site_file " = xNONE & & continue <nl> + if test / dev / null ! = " $ ac_site_file " & & test - r " $ ac_site_file " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : loading site script $ ac_site_file " > & 5 <nl> + $ as_echo " $ as_me : loading site script $ ac_site_file " > & 6 ; } <nl> + sed ' s / ^ / | / ' " $ ac_site_file " > & 5 <nl> + . " $ ac_site_file " \ <nl> + | | { { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : in \ ` $ ac_pwd ' : " > & 5 <nl> + $ as_echo " $ as_me : error : in \ ` $ ac_pwd ' : " > & 2 ; } <nl> + as_fn_error $ ? " failed to load site script $ ac_site_file <nl> + See \ ` config . log ' for more details " " $ LINENO " 5 ; } <nl> + fi <nl> + done <nl> + <nl> + if test - r " $ cache_file " ; then <nl> + # Some versions of bash will fail to source / dev / null ( special files <nl> + # actually ) , so we avoid doing that . DJGPP emulates it as a regular file . <nl> + if test / dev / null ! = " $ cache_file " & & test - f " $ cache_file " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : loading cache $ cache_file " > & 5 <nl> + $ as_echo " $ as_me : loading cache $ cache_file " > & 6 ; } <nl> + case $ cache_file in <nl> + [ \ \ / ] * | ? : [ \ \ / ] * ) . " $ cache_file " ; ; <nl> + * ) . " . / $ cache_file " ; ; <nl> + esac <nl> + fi <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : creating cache $ cache_file " > & 5 <nl> + $ as_echo " $ as_me : creating cache $ cache_file " > & 6 ; } <nl> + > $ cache_file <nl> + fi <nl> + <nl> + # Check that the precious variables saved in the cache have kept the same <nl> + # value . <nl> + ac_cache_corrupted = false <nl> + for ac_var in $ ac_precious_vars ; do <nl> + eval ac_old_set = \ $ ac_cv_env_ $ { ac_var } _set <nl> + eval ac_new_set = \ $ ac_env_ $ { ac_var } _set <nl> + eval ac_old_val = \ $ ac_cv_env_ $ { ac_var } _value <nl> + eval ac_new_val = \ $ ac_env_ $ { ac_var } _value <nl> + case $ ac_old_set , $ ac_new_set in <nl> + set , ) <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : \ ` $ ac_var ' was set to \ ` $ ac_old_val ' in the previous run " > & 5 <nl> + $ as_echo " $ as_me : error : \ ` $ ac_var ' was set to \ ` $ ac_old_val ' in the previous run " > & 2 ; } <nl> + ac_cache_corrupted = : ; ; <nl> + , set ) <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : \ ` $ ac_var ' was not set in the previous run " > & 5 <nl> + $ as_echo " $ as_me : error : \ ` $ ac_var ' was not set in the previous run " > & 2 ; } <nl> + ac_cache_corrupted = : ; ; <nl> + , ) ; ; <nl> + * ) <nl> + if test " x $ ac_old_val " ! = " x $ ac_new_val " ; then <nl> + # differences in whitespace do not lead to failure . <nl> + ac_old_val_w = ` echo x $ ac_old_val ` <nl> + ac_new_val_w = ` echo x $ ac_new_val ` <nl> + if test " $ ac_old_val_w " ! = " $ ac_new_val_w " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : \ ` $ ac_var ' has changed since the previous run : " > & 5 <nl> + $ as_echo " $ as_me : error : \ ` $ ac_var ' has changed since the previous run : " > & 2 ; } <nl> + ac_cache_corrupted = : <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : warning : ignoring whitespace changes in \ ` $ ac_var ' since the previous run : " > & 5 <nl> + $ as_echo " $ as_me : warning : ignoring whitespace changes in \ ` $ ac_var ' since the previous run : " > & 2 ; } <nl> + eval $ ac_var = \ $ ac_old_val <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : former value : \ ` $ ac_old_val ' " > & 5 <nl> + $ as_echo " $ as_me : former value : \ ` $ ac_old_val ' " > & 2 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : current value : \ ` $ ac_new_val ' " > & 5 <nl> + $ as_echo " $ as_me : current value : \ ` $ ac_new_val ' " > & 2 ; } <nl> + fi ; ; <nl> + esac <nl> + # Pass precious variables to config . status . <nl> + if test " $ ac_new_set " = set ; then <nl> + case $ ac_new_val in <nl> + * \ ' * ) ac_arg = $ ac_var = ` $ as_echo " $ ac_new_val " | sed " s / ' / ' \ \ \ \ \ \ \ \ ' ' / g " ` ; ; <nl> + * ) ac_arg = $ ac_var = $ ac_new_val ; ; <nl> + esac <nl> + case " $ ac_configure_args " in <nl> + * " ' $ ac_arg ' " * ) ; ; # Avoid dups . Use of quotes ensures accuracy . <nl> + * ) as_fn_append ac_configure_args " ' $ ac_arg ' " ; ; <nl> + esac <nl> + fi <nl> + done <nl> + if $ ac_cache_corrupted ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : in \ ` $ ac_pwd ' : " > & 5 <nl> + $ as_echo " $ as_me : error : in \ ` $ ac_pwd ' : " > & 2 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : changes in the environment can compromise the build " > & 5 <nl> + $ as_echo " $ as_me : error : changes in the environment can compromise the build " > & 2 ; } <nl> + as_fn_error $ ? " run \ ` make distclean ' and / or \ ` rm $ cache_file ' and start over " " $ LINENO " 5 <nl> + fi <nl> + # # mmmmmmmmmmmmmmmmmm - - # # <nl> + # # Main body of script . # # <nl> + # # mmmmmmmmmmmmmmmmmm - - # # <nl> + <nl> + ac_ext = c <nl> + ac_cpp = ' $ CPP $ CPPFLAGS ' <nl> + ac_compile = ' $ CC - c $ CFLAGS $ CPPFLAGS conftest . $ ac_ext > & 5 ' <nl> + ac_link = ' $ CC - o conftest $ ac_exeext $ CFLAGS $ CPPFLAGS $ LDFLAGS conftest . $ ac_ext $ LIBS > & 5 ' <nl> + ac_compiler_gnu = $ ac_cv_c_compiler_gnu <nl> + <nl> + <nl> + <nl> + ac_aux_dir = <nl> + for ac_dir in build - aux " $ srcdir " / build - aux ; do <nl> + if test - f " $ ac_dir / install - sh " ; then <nl> + ac_aux_dir = $ ac_dir <nl> + ac_install_sh = " $ ac_aux_dir / install - sh - c " <nl> + break <nl> + elif test - f " $ ac_dir / install . sh " ; then <nl> + ac_aux_dir = $ ac_dir <nl> + ac_install_sh = " $ ac_aux_dir / install . sh - c " <nl> + break <nl> + elif test - f " $ ac_dir / shtool " ; then <nl> + ac_aux_dir = $ ac_dir <nl> + ac_install_sh = " $ ac_aux_dir / shtool install - c " <nl> + break <nl> + fi <nl> + done <nl> + if test - z " $ ac_aux_dir " ; then <nl> + as_fn_error $ ? " cannot find install - sh , install . sh , or shtool in build - aux \ " $ srcdir \ " / build - aux " " $ LINENO " 5 <nl> + fi <nl> + <nl> + # These three variables are undocumented and unsupported , <nl> + # and are intended to be withdrawn in a future Autoconf release . <nl> + # They can cause serious problems if a builder ' s source tree is in a directory <nl> + # whose full name contains unusual characters . <nl> + ac_config_guess = " $ SHELL $ ac_aux_dir / config . guess " # Please don ' t use this var . <nl> + ac_config_sub = " $ SHELL $ ac_aux_dir / config . sub " # Please don ' t use this var . <nl> + ac_configure = " $ SHELL $ ac_aux_dir / configure " # Please don ' t use this var . <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + CONFIGURE_CFLAGS = <nl> + SPECIFIED_CFLAGS = " $ { CFLAGS } " <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + CONFIGURE_CXXFLAGS = <nl> + SPECIFIED_CXXFLAGS = " $ { CXXFLAGS } " <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + CONFIG = ` echo $ { ac_configure_args } | sed - e ' s # ' " ' " ' \ ( [ ^ ] * \ ) ' " ' " ' # \ 1 # g ' ` <nl> + <nl> + <nl> + rev = 2 <nl> + <nl> + <nl> + srcroot = $ srcdir <nl> + if test " x $ { srcroot } " = " x . " ; then <nl> + srcroot = " " <nl> + else <nl> + srcroot = " $ { srcroot } / " <nl> + fi <nl> + <nl> + abs_srcroot = " ` cd \ " $ { srcdir } \ " ; pwd ` / " <nl> + <nl> + <nl> + objroot = " " <nl> + <nl> + abs_objroot = " ` pwd ` / " <nl> + <nl> + <nl> + if test " x $ prefix " = " xNONE " ; then <nl> + prefix = " / usr / local " <nl> + fi <nl> + if test " x $ exec_prefix " = " xNONE " ; then <nl> + exec_prefix = $ prefix <nl> + fi <nl> + PREFIX = $ prefix <nl> + <nl> + BINDIR = ` eval echo $ bindir ` <nl> + BINDIR = ` eval echo $ BINDIR ` <nl> + <nl> + INCLUDEDIR = ` eval echo $ includedir ` <nl> + INCLUDEDIR = ` eval echo $ INCLUDEDIR ` <nl> + <nl> + LIBDIR = ` eval echo $ libdir ` <nl> + LIBDIR = ` eval echo $ LIBDIR ` <nl> + <nl> + DATADIR = ` eval echo $ datadir ` <nl> + DATADIR = ` eval echo $ DATADIR ` <nl> + <nl> + MANDIR = ` eval echo $ mandir ` <nl> + MANDIR = ` eval echo $ MANDIR ` <nl> + <nl> + <nl> + # Extract the first word of " xsltproc " , so it can be a program name with args . <nl> + set dummy xsltproc ; ac_word = $ 2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ ac_word " > & 5 <nl> + $ as_echo_n " checking for $ ac_word . . . " > & 6 ; } <nl> + if $ { ac_cv_path_XSLTPROC + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + case $ XSLTPROC in <nl> + [ \ \ / ] * | ? : [ \ \ / ] * ) <nl> + ac_cv_path_XSLTPROC = " $ XSLTPROC " # Let the user override the test with a path . <nl> + ; ; <nl> + * ) <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + if as_fn_executable_p " $ as_dir / $ ac_word $ ac_exec_ext " ; then <nl> + ac_cv_path_XSLTPROC = " $ as_dir / $ ac_word $ ac_exec_ext " <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : found $ as_dir / $ ac_word $ ac_exec_ext " > & 5 <nl> + break 2 <nl> + fi <nl> + done <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + test - z " $ ac_cv_path_XSLTPROC " & & ac_cv_path_XSLTPROC = " false " <nl> + ; ; <nl> + esac <nl> + fi <nl> + XSLTPROC = $ ac_cv_path_XSLTPROC <nl> + if test - n " $ XSLTPROC " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ XSLTPROC " > & 5 <nl> + $ as_echo " $ XSLTPROC " > & 6 ; } <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + fi <nl> + <nl> + <nl> + if test - d " / usr / share / xml / docbook / stylesheet / docbook - xsl " ; then <nl> + DEFAULT_XSLROOT = " / usr / share / xml / docbook / stylesheet / docbook - xsl " <nl> + elif test - d " / usr / share / sgml / docbook / xsl - stylesheets " ; then <nl> + DEFAULT_XSLROOT = " / usr / share / sgml / docbook / xsl - stylesheets " <nl> + else <nl> + DEFAULT_XSLROOT = " " <nl> + fi <nl> + <nl> + # Check whether - - with - xslroot was given . <nl> + if test " $ { with_xslroot + set } " = set ; then : <nl> + withval = $ with_xslroot ; <nl> + if test " x $ with_xslroot " = " xno " ; then <nl> + XSLROOT = " $ { DEFAULT_XSLROOT } " <nl> + else <nl> + XSLROOT = " $ { with_xslroot } " <nl> + fi <nl> + <nl> + else <nl> + XSLROOT = " $ { DEFAULT_XSLROOT } " <nl> + <nl> + fi <nl> + <nl> + <nl> + <nl> + CFLAGS = $ CFLAGS <nl> + ac_ext = c <nl> + ac_cpp = ' $ CPP $ CPPFLAGS ' <nl> + ac_compile = ' $ CC - c $ CFLAGS $ CPPFLAGS conftest . $ ac_ext > & 5 ' <nl> + ac_link = ' $ CC - o conftest $ ac_exeext $ CFLAGS $ CPPFLAGS $ LDFLAGS conftest . $ ac_ext $ LIBS > & 5 ' <nl> + ac_compiler_gnu = $ ac_cv_c_compiler_gnu <nl> + if test - n " $ ac_tool_prefix " ; then <nl> + # Extract the first word of " $ { ac_tool_prefix } gcc " , so it can be a program name with args . <nl> + set dummy $ { ac_tool_prefix } gcc ; ac_word = $ 2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ ac_word " > & 5 <nl> + $ as_echo_n " checking for $ ac_word . . . " > & 6 ; } <nl> + if $ { ac_cv_prog_CC + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if test - n " $ CC " ; then <nl> + ac_cv_prog_CC = " $ CC " # Let the user override the test . <nl> + else <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + if as_fn_executable_p " $ as_dir / $ ac_word $ ac_exec_ext " ; then <nl> + ac_cv_prog_CC = " $ { ac_tool_prefix } gcc " <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : found $ as_dir / $ ac_word $ ac_exec_ext " > & 5 <nl> + break 2 <nl> + fi <nl> + done <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + fi <nl> + fi <nl> + CC = $ ac_cv_prog_CC <nl> + if test - n " $ CC " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ CC " > & 5 <nl> + $ as_echo " $ CC " > & 6 ; } <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + fi <nl> + <nl> + <nl> + fi <nl> + if test - z " $ ac_cv_prog_CC " ; then <nl> + ac_ct_CC = $ CC <nl> + # Extract the first word of " gcc " , so it can be a program name with args . <nl> + set dummy gcc ; ac_word = $ 2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ ac_word " > & 5 <nl> + $ as_echo_n " checking for $ ac_word . . . " > & 6 ; } <nl> + if $ { ac_cv_prog_ac_ct_CC + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if test - n " $ ac_ct_CC " ; then <nl> + ac_cv_prog_ac_ct_CC = " $ ac_ct_CC " # Let the user override the test . <nl> + else <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + if as_fn_executable_p " $ as_dir / $ ac_word $ ac_exec_ext " ; then <nl> + ac_cv_prog_ac_ct_CC = " gcc " <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : found $ as_dir / $ ac_word $ ac_exec_ext " > & 5 <nl> + break 2 <nl> + fi <nl> + done <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + fi <nl> + fi <nl> + ac_ct_CC = $ ac_cv_prog_ac_ct_CC <nl> + if test - n " $ ac_ct_CC " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_ct_CC " > & 5 <nl> + $ as_echo " $ ac_ct_CC " > & 6 ; } <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + fi <nl> + <nl> + if test " x $ ac_ct_CC " = x ; then <nl> + CC = " " <nl> + else <nl> + case $ cross_compiling : $ ac_tool_warned in <nl> + yes : ) <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : using cross tools not prefixed with host triplet " > & 5 <nl> + $ as_echo " $ as_me : WARNING : using cross tools not prefixed with host triplet " > & 2 ; } <nl> + ac_tool_warned = yes ; ; <nl> + esac <nl> + CC = $ ac_ct_CC <nl> + fi <nl> + else <nl> + CC = " $ ac_cv_prog_CC " <nl> + fi <nl> + <nl> + if test - z " $ CC " ; then <nl> + if test - n " $ ac_tool_prefix " ; then <nl> + # Extract the first word of " $ { ac_tool_prefix } cc " , so it can be a program name with args . <nl> + set dummy $ { ac_tool_prefix } cc ; ac_word = $ 2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ ac_word " > & 5 <nl> + $ as_echo_n " checking for $ ac_word . . . " > & 6 ; } <nl> + if $ { ac_cv_prog_CC + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if test - n " $ CC " ; then <nl> + ac_cv_prog_CC = " $ CC " # Let the user override the test . <nl> + else <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + if as_fn_executable_p " $ as_dir / $ ac_word $ ac_exec_ext " ; then <nl> + ac_cv_prog_CC = " $ { ac_tool_prefix } cc " <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : found $ as_dir / $ ac_word $ ac_exec_ext " > & 5 <nl> + break 2 <nl> + fi <nl> + done <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + fi <nl> + fi <nl> + CC = $ ac_cv_prog_CC <nl> + if test - n " $ CC " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ CC " > & 5 <nl> + $ as_echo " $ CC " > & 6 ; } <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + fi <nl> + <nl> + <nl> + fi <nl> + fi <nl> + if test - z " $ CC " ; then <nl> + # Extract the first word of " cc " , so it can be a program name with args . <nl> + set dummy cc ; ac_word = $ 2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ ac_word " > & 5 <nl> + $ as_echo_n " checking for $ ac_word . . . " > & 6 ; } <nl> + if $ { ac_cv_prog_CC + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if test - n " $ CC " ; then <nl> + ac_cv_prog_CC = " $ CC " # Let the user override the test . <nl> + else <nl> + ac_prog_rejected = no <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + if as_fn_executable_p " $ as_dir / $ ac_word $ ac_exec_ext " ; then <nl> + if test " $ as_dir / $ ac_word $ ac_exec_ext " = " / usr / ucb / cc " ; then <nl> + ac_prog_rejected = yes <nl> + continue <nl> + fi <nl> + ac_cv_prog_CC = " cc " <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : found $ as_dir / $ ac_word $ ac_exec_ext " > & 5 <nl> + break 2 <nl> + fi <nl> + done <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + if test $ ac_prog_rejected = yes ; then <nl> + # We found a bogon in the path , so make sure we never use it . <nl> + set dummy $ ac_cv_prog_CC <nl> + shift <nl> + if test $ # ! = 0 ; then <nl> + # We chose a different compiler from the bogus one . <nl> + # However , it has the same basename , so the bogon will be chosen <nl> + # first if we set CC to just the basename ; use the full file name . <nl> + shift <nl> + ac_cv_prog_CC = " $ as_dir / $ ac_word $ { 1 + ' ' } $ @ " <nl> + fi <nl> + fi <nl> + fi <nl> + fi <nl> + CC = $ ac_cv_prog_CC <nl> + if test - n " $ CC " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ CC " > & 5 <nl> + $ as_echo " $ CC " > & 6 ; } <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + fi <nl> + <nl> + <nl> + fi <nl> + if test - z " $ CC " ; then <nl> + if test - n " $ ac_tool_prefix " ; then <nl> + for ac_prog in cl . exe <nl> + do <nl> + # Extract the first word of " $ ac_tool_prefix $ ac_prog " , so it can be a program name with args . <nl> + set dummy $ ac_tool_prefix $ ac_prog ; ac_word = $ 2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ ac_word " > & 5 <nl> + $ as_echo_n " checking for $ ac_word . . . " > & 6 ; } <nl> + if $ { ac_cv_prog_CC + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if test - n " $ CC " ; then <nl> + ac_cv_prog_CC = " $ CC " # Let the user override the test . <nl> + else <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + if as_fn_executable_p " $ as_dir / $ ac_word $ ac_exec_ext " ; then <nl> + ac_cv_prog_CC = " $ ac_tool_prefix $ ac_prog " <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : found $ as_dir / $ ac_word $ ac_exec_ext " > & 5 <nl> + break 2 <nl> + fi <nl> + done <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + fi <nl> + fi <nl> + CC = $ ac_cv_prog_CC <nl> + if test - n " $ CC " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ CC " > & 5 <nl> + $ as_echo " $ CC " > & 6 ; } <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + fi <nl> + <nl> + <nl> + test - n " $ CC " & & break <nl> + done <nl> + fi <nl> + if test - z " $ CC " ; then <nl> + ac_ct_CC = $ CC <nl> + for ac_prog in cl . exe <nl> + do <nl> + # Extract the first word of " $ ac_prog " , so it can be a program name with args . <nl> + set dummy $ ac_prog ; ac_word = $ 2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ ac_word " > & 5 <nl> + $ as_echo_n " checking for $ ac_word . . . " > & 6 ; } <nl> + if $ { ac_cv_prog_ac_ct_CC + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if test - n " $ ac_ct_CC " ; then <nl> + ac_cv_prog_ac_ct_CC = " $ ac_ct_CC " # Let the user override the test . <nl> + else <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + if as_fn_executable_p " $ as_dir / $ ac_word $ ac_exec_ext " ; then <nl> + ac_cv_prog_ac_ct_CC = " $ ac_prog " <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : found $ as_dir / $ ac_word $ ac_exec_ext " > & 5 <nl> + break 2 <nl> + fi <nl> + done <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + fi <nl> + fi <nl> + ac_ct_CC = $ ac_cv_prog_ac_ct_CC <nl> + if test - n " $ ac_ct_CC " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_ct_CC " > & 5 <nl> + $ as_echo " $ ac_ct_CC " > & 6 ; } <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + fi <nl> + <nl> + <nl> + test - n " $ ac_ct_CC " & & break <nl> + done <nl> + <nl> + if test " x $ ac_ct_CC " = x ; then <nl> + CC = " " <nl> + else <nl> + case $ cross_compiling : $ ac_tool_warned in <nl> + yes : ) <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : using cross tools not prefixed with host triplet " > & 5 <nl> + $ as_echo " $ as_me : WARNING : using cross tools not prefixed with host triplet " > & 2 ; } <nl> + ac_tool_warned = yes ; ; <nl> + esac <nl> + CC = $ ac_ct_CC <nl> + fi <nl> + fi <nl> + <nl> + fi <nl> + <nl> + <nl> + test - z " $ CC " & & { { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : in \ ` $ ac_pwd ' : " > & 5 <nl> + $ as_echo " $ as_me : error : in \ ` $ ac_pwd ' : " > & 2 ; } <nl> + as_fn_error $ ? " no acceptable C compiler found in \ $ PATH <nl> + See \ ` config . log ' for more details " " $ LINENO " 5 ; } <nl> + <nl> + # Provide some information about the compiler . <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for C compiler version " > & 5 <nl> + set X $ ac_compile <nl> + ac_compiler = $ 2 <nl> + for ac_option in - - version - v - V - qversion ; do <nl> + { { ac_try = " $ ac_compiler $ ac_option > & 5 " <nl> + case " ( ( $ ac_try " in <nl> + * \ " * | * \ ` * | * \ \ * ) ac_try_echo = \ $ ac_try ; ; <nl> + * ) ac_try_echo = $ ac_try ; ; <nl> + esac <nl> + eval ac_try_echo = " \ " \ $ as_me : $ { as_lineno - $ LINENO } : $ ac_try_echo \ " " <nl> + $ as_echo " $ ac_try_echo " ; } > & 5 <nl> + ( eval " $ ac_compiler $ ac_option > & 5 " ) 2 > conftest . err <nl> + ac_status = $ ? <nl> + if test - s conftest . err ; then <nl> + sed ' 10a \ <nl> + . . . rest of stderr output deleted . . . <nl> + 10q ' conftest . err > conftest . er1 <nl> + cat conftest . er1 > & 5 <nl> + fi <nl> + rm - f conftest . er1 conftest . err <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : \ $ ? = $ ac_status " > & 5 <nl> + test $ ac_status = 0 ; } <nl> + done <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + ac_clean_files_save = $ ac_clean_files <nl> + ac_clean_files = " $ ac_clean_files a . out a . out . dSYM a . exe b . out " <nl> + # Try to create an executable without - o first , disregard a . out . <nl> + # It will help us diagnose broken compilers , and finding out an intuition <nl> + # of exeext . <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether the C compiler works " > & 5 <nl> + $ as_echo_n " checking whether the C compiler works . . . " > & 6 ; } <nl> + ac_link_default = ` $ as_echo " $ ac_link " | sed ' s / - o * conftest [ ^ ] * / / ' ` <nl> + <nl> + # The possible output files : <nl> + ac_files = " a . out conftest . exe conftest a . exe a_out . exe b . out conftest . * " <nl> + <nl> + ac_rmfiles = <nl> + for ac_file in $ ac_files <nl> + do <nl> + case $ ac_file in <nl> + * . $ ac_ext | * . xcoff | * . tds | * . d | * . pdb | * . xSYM | * . bb | * . bbg | * . map | * . inf | * . dSYM | * . o | * . obj ) ; ; <nl> + * ) ac_rmfiles = " $ ac_rmfiles $ ac_file " ; ; <nl> + esac <nl> + done <nl> + rm - f $ ac_rmfiles <nl> + <nl> + if { { ac_try = " $ ac_link_default " <nl> + case " ( ( $ ac_try " in <nl> + * \ " * | * \ ` * | * \ \ * ) ac_try_echo = \ $ ac_try ; ; <nl> + * ) ac_try_echo = $ ac_try ; ; <nl> + esac <nl> + eval ac_try_echo = " \ " \ $ as_me : $ { as_lineno - $ LINENO } : $ ac_try_echo \ " " <nl> + $ as_echo " $ ac_try_echo " ; } > & 5 <nl> + ( eval " $ ac_link_default " ) 2 > & 5 <nl> + ac_status = $ ? <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : \ $ ? = $ ac_status " > & 5 <nl> + test $ ac_status = 0 ; } ; then : <nl> + # Autoconf - 2 . 13 could set the ac_cv_exeext variable to ` no ' . <nl> + # So ignore a value of ` no ' , otherwise this would lead to ` EXEEXT = no ' <nl> + # in a Makefile . We should not override ac_cv_exeext if it was cached , <nl> + # so that the user can short - circuit this test for compilers unknown to <nl> + # Autoconf . <nl> + for ac_file in $ ac_files ' ' <nl> + do <nl> + test - f " $ ac_file " | | continue <nl> + case $ ac_file in <nl> + * . $ ac_ext | * . xcoff | * . tds | * . d | * . pdb | * . xSYM | * . bb | * . bbg | * . map | * . inf | * . dSYM | * . o | * . obj ) <nl> + ; ; <nl> + [ ab ] . out ) <nl> + # We found the default executable , but exeext = ' ' is most <nl> + # certainly right . <nl> + break ; ; <nl> + * . * ) <nl> + if test " $ { ac_cv_exeext + set } " = set & & test " $ ac_cv_exeext " ! = no ; <nl> + then : ; else <nl> + ac_cv_exeext = ` expr " $ ac_file " : ' [ ^ . ] * \ ( \ . . * \ ) ' ` <nl> + fi <nl> + # We set ac_cv_exeext here because the later test for it is not <nl> + # safe : cross compilers may not add the suffix if given an ` - o ' <nl> + # argument , so we may need to know it at that point already . <nl> + # Even if this section looks crufty : it has the advantage of <nl> + # actually working . <nl> + break ; ; <nl> + * ) <nl> + break ; ; <nl> + esac <nl> + done <nl> + test " $ ac_cv_exeext " = no & & ac_cv_exeext = <nl> + <nl> + else <nl> + ac_file = ' ' <nl> + fi <nl> + if test - z " $ ac_file " ; then : <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + $ as_echo " $ as_me : failed program was : " > & 5 <nl> + sed ' s / ^ / | / ' conftest . $ ac_ext > & 5 <nl> + <nl> + { { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : in \ ` $ ac_pwd ' : " > & 5 <nl> + $ as_echo " $ as_me : error : in \ ` $ ac_pwd ' : " > & 2 ; } <nl> + as_fn_error 77 " C compiler cannot create executables <nl> + See \ ` config . log ' for more details " " $ LINENO " 5 ; } <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for C compiler default output file name " > & 5 <nl> + $ as_echo_n " checking for C compiler default output file name . . . " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_file " > & 5 <nl> + $ as_echo " $ ac_file " > & 6 ; } <nl> + ac_exeext = $ ac_cv_exeext <nl> + <nl> + rm - f - r a . out a . out . dSYM a . exe conftest $ ac_cv_exeext b . out <nl> + ac_clean_files = $ ac_clean_files_save <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for suffix of executables " > & 5 <nl> + $ as_echo_n " checking for suffix of executables . . . " > & 6 ; } <nl> + if { { ac_try = " $ ac_link " <nl> + case " ( ( $ ac_try " in <nl> + * \ " * | * \ ` * | * \ \ * ) ac_try_echo = \ $ ac_try ; ; <nl> + * ) ac_try_echo = $ ac_try ; ; <nl> + esac <nl> + eval ac_try_echo = " \ " \ $ as_me : $ { as_lineno - $ LINENO } : $ ac_try_echo \ " " <nl> + $ as_echo " $ ac_try_echo " ; } > & 5 <nl> + ( eval " $ ac_link " ) 2 > & 5 <nl> + ac_status = $ ? <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : \ $ ? = $ ac_status " > & 5 <nl> + test $ ac_status = 0 ; } ; then : <nl> + # If both ` conftest . exe ' and ` conftest ' are ` present ' ( well , observable ) <nl> + # catch ` conftest . exe ' . For instance with Cygwin , ` ls conftest ' will <nl> + # work properly ( i . e . , refer to ` conftest . exe ' ) , while it won ' t with <nl> + # ` rm ' . <nl> + for ac_file in conftest . exe conftest conftest . * ; do <nl> + test - f " $ ac_file " | | continue <nl> + case $ ac_file in <nl> + * . $ ac_ext | * . xcoff | * . tds | * . d | * . pdb | * . xSYM | * . bb | * . bbg | * . map | * . inf | * . dSYM | * . o | * . obj ) ; ; <nl> + * . * ) ac_cv_exeext = ` expr " $ ac_file " : ' [ ^ . ] * \ ( \ . . * \ ) ' ` <nl> + break ; ; <nl> + * ) break ; ; <nl> + esac <nl> + done <nl> + else <nl> + { { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : in \ ` $ ac_pwd ' : " > & 5 <nl> + $ as_echo " $ as_me : error : in \ ` $ ac_pwd ' : " > & 2 ; } <nl> + as_fn_error $ ? " cannot compute suffix of executables : cannot compile and link <nl> + See \ ` config . log ' for more details " " $ LINENO " 5 ; } <nl> + fi <nl> + rm - f conftest conftest $ ac_cv_exeext <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_exeext " > & 5 <nl> + $ as_echo " $ ac_cv_exeext " > & 6 ; } <nl> + <nl> + rm - f conftest . $ ac_ext <nl> + EXEEXT = $ ac_cv_exeext <nl> + ac_exeext = $ EXEEXT <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # include < stdio . h > <nl> + int <nl> + main ( ) <nl> + { <nl> + FILE * f = fopen ( " conftest . out " , " w " ) ; <nl> + return ferror ( f ) | | fclose ( f ) ! = 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + ac_clean_files = " $ ac_clean_files conftest . out " <nl> + # Check that the compiler produces executables we can run . If not , either <nl> + # the compiler is broken , or we cross compile . <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether we are cross compiling " > & 5 <nl> + $ as_echo_n " checking whether we are cross compiling . . . " > & 6 ; } <nl> + if test " $ cross_compiling " ! = yes ; then <nl> + { { ac_try = " $ ac_link " <nl> + case " ( ( $ ac_try " in <nl> + * \ " * | * \ ` * | * \ \ * ) ac_try_echo = \ $ ac_try ; ; <nl> + * ) ac_try_echo = $ ac_try ; ; <nl> + esac <nl> + eval ac_try_echo = " \ " \ $ as_me : $ { as_lineno - $ LINENO } : $ ac_try_echo \ " " <nl> + $ as_echo " $ ac_try_echo " ; } > & 5 <nl> + ( eval " $ ac_link " ) 2 > & 5 <nl> + ac_status = $ ? <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : \ $ ? = $ ac_status " > & 5 <nl> + test $ ac_status = 0 ; } <nl> + if { ac_try = ' . / conftest $ ac_cv_exeext ' <nl> + { { case " ( ( $ ac_try " in <nl> + * \ " * | * \ ` * | * \ \ * ) ac_try_echo = \ $ ac_try ; ; <nl> + * ) ac_try_echo = $ ac_try ; ; <nl> + esac <nl> + eval ac_try_echo = " \ " \ $ as_me : $ { as_lineno - $ LINENO } : $ ac_try_echo \ " " <nl> + $ as_echo " $ ac_try_echo " ; } > & 5 <nl> + ( eval " $ ac_try " ) 2 > & 5 <nl> + ac_status = $ ? <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : \ $ ? = $ ac_status " > & 5 <nl> + test $ ac_status = 0 ; } ; } ; then <nl> + cross_compiling = no <nl> + else <nl> + if test " $ cross_compiling " = maybe ; then <nl> + cross_compiling = yes <nl> + else <nl> + { { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : in \ ` $ ac_pwd ' : " > & 5 <nl> + $ as_echo " $ as_me : error : in \ ` $ ac_pwd ' : " > & 2 ; } <nl> + as_fn_error $ ? " cannot run C compiled programs . <nl> + If you meant to cross compile , use \ ` - - host ' . <nl> + See \ ` config . log ' for more details " " $ LINENO " 5 ; } <nl> + fi <nl> + fi <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ cross_compiling " > & 5 <nl> + $ as_echo " $ cross_compiling " > & 6 ; } <nl> + <nl> + rm - f conftest . $ ac_ext conftest $ ac_cv_exeext conftest . out <nl> + ac_clean_files = $ ac_clean_files_save <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for suffix of object files " > & 5 <nl> + $ as_echo_n " checking for suffix of object files . . . " > & 6 ; } <nl> + if $ { ac_cv_objext + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + rm - f conftest . o conftest . obj <nl> + if { { ac_try = " $ ac_compile " <nl> + case " ( ( $ ac_try " in <nl> + * \ " * | * \ ` * | * \ \ * ) ac_try_echo = \ $ ac_try ; ; <nl> + * ) ac_try_echo = $ ac_try ; ; <nl> + esac <nl> + eval ac_try_echo = " \ " \ $ as_me : $ { as_lineno - $ LINENO } : $ ac_try_echo \ " " <nl> + $ as_echo " $ ac_try_echo " ; } > & 5 <nl> + ( eval " $ ac_compile " ) 2 > & 5 <nl> + ac_status = $ ? <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : \ $ ? = $ ac_status " > & 5 <nl> + test $ ac_status = 0 ; } ; then : <nl> + for ac_file in conftest . o conftest . obj conftest . * ; do <nl> + test - f " $ ac_file " | | continue ; <nl> + case $ ac_file in <nl> + * . $ ac_ext | * . xcoff | * . tds | * . d | * . pdb | * . xSYM | * . bb | * . bbg | * . map | * . inf | * . dSYM ) ; ; <nl> + * ) ac_cv_objext = ` expr " $ ac_file " : ' . * \ . \ ( . * \ ) ' ` <nl> + break ; ; <nl> + esac <nl> + done <nl> + else <nl> + $ as_echo " $ as_me : failed program was : " > & 5 <nl> + sed ' s / ^ / | / ' conftest . $ ac_ext > & 5 <nl> + <nl> + { { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : in \ ` $ ac_pwd ' : " > & 5 <nl> + $ as_echo " $ as_me : error : in \ ` $ ac_pwd ' : " > & 2 ; } <nl> + as_fn_error $ ? " cannot compute suffix of object files : cannot compile <nl> + See \ ` config . log ' for more details " " $ LINENO " 5 ; } <nl> + fi <nl> + rm - f conftest . $ ac_cv_objext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_objext " > & 5 <nl> + $ as_echo " $ ac_cv_objext " > & 6 ; } <nl> + OBJEXT = $ ac_cv_objext <nl> + ac_objext = $ OBJEXT <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether we are using the GNU C compiler " > & 5 <nl> + $ as_echo_n " checking whether we are using the GNU C compiler . . . " > & 6 ; } <nl> + if $ { ac_cv_c_compiler_gnu + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + # ifndef __GNUC__ <nl> + choke me <nl> + # endif <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + ac_compiler_gnu = yes <nl> + else <nl> + ac_compiler_gnu = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + ac_cv_c_compiler_gnu = $ ac_compiler_gnu <nl> + <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_c_compiler_gnu " > & 5 <nl> + $ as_echo " $ ac_cv_c_compiler_gnu " > & 6 ; } <nl> + if test $ ac_compiler_gnu = yes ; then <nl> + GCC = yes <nl> + else <nl> + GCC = <nl> + fi <nl> + ac_test_CFLAGS = $ { CFLAGS + set } <nl> + ac_save_CFLAGS = $ CFLAGS <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether $ CC accepts - g " > & 5 <nl> + $ as_echo_n " checking whether $ CC accepts - g . . . " > & 6 ; } <nl> + if $ { ac_cv_prog_cc_g + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + ac_save_c_werror_flag = $ ac_c_werror_flag <nl> + ac_c_werror_flag = yes <nl> + ac_cv_prog_cc_g = no <nl> + CFLAGS = " - g " <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + ac_cv_prog_cc_g = yes <nl> + else <nl> + CFLAGS = " " <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + <nl> + else <nl> + ac_c_werror_flag = $ ac_save_c_werror_flag <nl> + CFLAGS = " - g " <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + ac_cv_prog_cc_g = yes <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + ac_c_werror_flag = $ ac_save_c_werror_flag <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_prog_cc_g " > & 5 <nl> + $ as_echo " $ ac_cv_prog_cc_g " > & 6 ; } <nl> + if test " $ ac_test_CFLAGS " = set ; then <nl> + CFLAGS = $ ac_save_CFLAGS <nl> + elif test $ ac_cv_prog_cc_g = yes ; then <nl> + if test " $ GCC " = yes ; then <nl> + CFLAGS = " - g - O2 " <nl> + else <nl> + CFLAGS = " - g " <nl> + fi <nl> + else <nl> + if test " $ GCC " = yes ; then <nl> + CFLAGS = " - O2 " <nl> + else <nl> + CFLAGS = <nl> + fi <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ CC option to accept ISO C89 " > & 5 <nl> + $ as_echo_n " checking for $ CC option to accept ISO C89 . . . " > & 6 ; } <nl> + if $ { ac_cv_prog_cc_c89 + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + ac_cv_prog_cc_c89 = no <nl> + ac_save_CC = $ CC <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # include < stdarg . h > <nl> + # include < stdio . h > <nl> + struct stat ; <nl> + / * Most of the following tests are stolen from RCS 5 . 7 ' s src / conf . sh . * / <nl> + struct buf { int x ; } ; <nl> + FILE * ( * rcsopen ) ( struct buf * , struct stat * , int ) ; <nl> + static char * e ( p , i ) <nl> + char * * p ; <nl> + int i ; <nl> + { <nl> + return p [ i ] ; <nl> + } <nl> + static char * f ( char * ( * g ) ( char * * , int ) , char * * p , . . . ) <nl> + { <nl> + char * s ; <nl> + va_list v ; <nl> + va_start ( v , p ) ; <nl> + s = g ( p , va_arg ( v , int ) ) ; <nl> + va_end ( v ) ; <nl> + return s ; <nl> + } <nl> + <nl> + / * OSF 4 . 0 Compaq cc is some sort of almost - ANSI by default . It has <nl> + function prototypes and stuff , but not ' \ xHH ' hex character constants . <nl> + These don ' t provoke an error unfortunately , instead are silently treated <nl> + as ' x ' . The following induces an error , until - std is added to get <nl> + proper ANSI mode . Curiously ' \ x00 ' ! = ' x ' always comes out true , for an <nl> + array size at least . It ' s necessary to write ' \ x00 ' = = 0 to get something <nl> + that ' s true only with - std . * / <nl> + int osf4_cc_array [ ' \ x00 ' = = 0 ? 1 : - 1 ] ; <nl> + <nl> + / * IBM C 6 for AIX is almost - ANSI by default , but it replaces macro parameters <nl> + inside strings and character constants . * / <nl> + # define FOO ( x ) ' x ' <nl> + int xlc6_cc_array [ FOO ( a ) = = ' x ' ? 1 : - 1 ] ; <nl> + <nl> + int test ( int i , double x ) ; <nl> + struct s1 { int ( * f ) ( int a ) ; } ; <nl> + struct s2 { int ( * f ) ( double a ) ; } ; <nl> + int pairnames ( int , char * * , FILE * ( * ) ( struct buf * , struct stat * , int ) , int , int ) ; <nl> + int argc ; <nl> + char * * argv ; <nl> + int <nl> + main ( ) <nl> + { <nl> + return f ( e , argv , 0 ) ! = argv [ 0 ] | | f ( e , argv , 1 ) ! = argv [ 1 ] ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + for ac_arg in ' ' - qlanglvl = extc89 - qlanglvl = ansi - std \ <nl> + - Ae " - Aa - D_HPUX_SOURCE " " - Xc - D__EXTENSIONS__ " <nl> + do <nl> + CC = " $ ac_save_CC $ ac_arg " <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + ac_cv_prog_cc_c89 = $ ac_arg <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext <nl> + test " x $ ac_cv_prog_cc_c89 " ! = " xno " & & break <nl> + done <nl> + rm - f conftest . $ ac_ext <nl> + CC = $ ac_save_CC <nl> + <nl> + fi <nl> + # AC_CACHE_VAL <nl> + case " x $ ac_cv_prog_cc_c89 " in <nl> + x ) <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : none needed " > & 5 <nl> + $ as_echo " none needed " > & 6 ; } ; ; <nl> + xno ) <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : unsupported " > & 5 <nl> + $ as_echo " unsupported " > & 6 ; } ; ; <nl> + * ) <nl> + CC = " $ CC $ ac_cv_prog_cc_c89 " <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_prog_cc_c89 " > & 5 <nl> + $ as_echo " $ ac_cv_prog_cc_c89 " > & 6 ; } ; ; <nl> + esac <nl> + if test " x $ ac_cv_prog_cc_c89 " ! = xno ; then : <nl> + <nl> + fi <nl> + <nl> + ac_ext = c <nl> + ac_cpp = ' $ CPP $ CPPFLAGS ' <nl> + ac_compile = ' $ CC - c $ CFLAGS $ CPPFLAGS conftest . $ ac_ext > & 5 ' <nl> + ac_link = ' $ CC - o conftest $ ac_exeext $ CFLAGS $ CPPFLAGS $ LDFLAGS conftest . $ ac_ext $ LIBS > & 5 ' <nl> + ac_compiler_gnu = $ ac_cv_c_compiler_gnu <nl> + <nl> + <nl> + if test " x $ GCC " ! = " xyes " ; then <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler is MSVC " > & 5 <nl> + $ as_echo_n " checking whether compiler is MSVC . . . " > & 6 ; } <nl> + if $ { je_cv_msvc + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + # ifndef _MSC_VER <nl> + int fail - 1 ; <nl> + # endif <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_msvc = yes <nl> + else <nl> + je_cv_msvc = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_msvc " > & 5 <nl> + $ as_echo " $ je_cv_msvc " > & 6 ; } <nl> + fi <nl> + <nl> + je_cv_cray_prgenv_wrapper = " " <nl> + if test " x $ { PE_ENV } " ! = " x " ; then <nl> + case " $ { CC } " in <nl> + CC | cc ) <nl> + je_cv_cray_prgenv_wrapper = " yes " <nl> + ; ; <nl> + * ) <nl> + ; ; <nl> + esac <nl> + fi <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler is cray " > & 5 <nl> + $ as_echo_n " checking whether compiler is cray . . . " > & 6 ; } <nl> + if $ { je_cv_cray + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + # ifndef _CRAYC <nl> + int fail - 1 ; <nl> + # endif <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cray = yes <nl> + else <nl> + je_cv_cray = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_cray " > & 5 <nl> + $ as_echo " $ je_cv_cray " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_cray } " = " xyes " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether cray compiler version is 8 . 4 " > & 5 <nl> + $ as_echo_n " checking whether cray compiler version is 8 . 4 . . . " > & 6 ; } <nl> + if $ { je_cv_cray_84 + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + # if ! ( _RELEASE_MAJOR = = 8 & & _RELEASE_MINOR = = 4 ) <nl> + int fail - 1 ; <nl> + # endif <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cray_84 = yes <nl> + else <nl> + je_cv_cray_84 = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_cray_84 " > & 5 <nl> + $ as_echo " $ je_cv_cray_84 " > & 6 ; } <nl> + fi <nl> + <nl> + if test " x $ GCC " = " xyes " ; then <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - std = gnu11 " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - std = gnu11 . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - std = gnu11 <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - std = gnu11 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ je_cv_cflags_added " = " x - std = gnu11 " ; then <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define JEMALLOC_HAS_RESTRICT 1 <nl> + _ACEOF <nl> + <nl> + else <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - std = gnu99 " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - std = gnu99 . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - std = gnu99 <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - std = gnu99 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ je_cv_cflags_added " = " x - std = gnu99 " ; then <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define JEMALLOC_HAS_RESTRICT 1 <nl> + _ACEOF <nl> + <nl> + fi <nl> + fi <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - Wall " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - Wall . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - Wall <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - Wall <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - Wshorten - 64 - to - 32 " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - Wshorten - 64 - to - 32 . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - Wshorten - 64 - to - 32 <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - Wshorten - 64 - to - 32 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - Wsign - compare " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - Wsign - compare . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - Wsign - compare <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - Wsign - compare <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - pipe " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - pipe . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - pipe <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - pipe <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - g3 " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - g3 . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - g3 <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - g3 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + elif test " x $ je_cv_msvc " = " xyes " ; then <nl> + CC = " $ CC - nologo " <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - Zi " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - Zi . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - Zi <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - Zi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - MT " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - MT . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - MT <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - MT <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - W3 " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - W3 . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - W3 <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - W3 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - FS " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - FS . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - FS <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - FS <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + T_APPEND_V = - I $ { srcdir } / include / msvc_compat <nl> + if test " x $ { CPPFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CPPFLAGS = " $ { CPPFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CPPFLAGS = " $ { CPPFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + fi <nl> + if test " x $ je_cv_cray " = " xyes " ; then <nl> + if test " x $ je_cv_cray_84 " = " xyes " ; then <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - hipa2 " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - hipa2 . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - hipa2 <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - hipa2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - hnognu " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - hnognu . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - hnognu <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - hnognu <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + fi <nl> + if test " x $ enable_cc_silence " ! = " xno " ; then <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - hnomessage = 128 " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - hnomessage = 128 . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - hnomessage = 128 <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - hnomessage = 128 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - hnomessage = 1357 " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - hnomessage = 1357 . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - hnomessage = 1357 <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - hnomessage = 1357 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + fi <nl> + fi <nl> + <nl> + <nl> + <nl> + ac_ext = c <nl> + ac_cpp = ' $ CPP $ CPPFLAGS ' <nl> + ac_compile = ' $ CC - c $ CFLAGS $ CPPFLAGS conftest . $ ac_ext > & 5 ' <nl> + ac_link = ' $ CC - o conftest $ ac_exeext $ CFLAGS $ CPPFLAGS $ LDFLAGS conftest . $ ac_ext $ LIBS > & 5 ' <nl> + ac_compiler_gnu = $ ac_cv_c_compiler_gnu <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking how to run the C preprocessor " > & 5 <nl> + $ as_echo_n " checking how to run the C preprocessor . . . " > & 6 ; } <nl> + # On Suns , sometimes $ CPP names a directory . <nl> + if test - n " $ CPP " & & test - d " $ CPP " ; then <nl> + CPP = <nl> + fi <nl> + if test - z " $ CPP " ; then <nl> + if $ { ac_cv_prog_CPP + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + # Double quotes because CPP needs to be expanded <nl> + for CPP in " $ CC - E " " $ CC - E - traditional - cpp " " / lib / cpp " <nl> + do <nl> + ac_preproc_ok = false <nl> + for ac_c_preproc_warn_flag in ' ' yes <nl> + do <nl> + # Use a header file that comes with gcc , so configuring glibc <nl> + # with a fresh cross - compiler works . <nl> + # Prefer < limits . h > to < assert . h > if __STDC__ is defined , since <nl> + # < limits . h > exists even on freestanding compilers . <nl> + # On the NeXT , cc - E runs the code through the compiler ' s parser , <nl> + # not just through cpp . " Syntax error " is here to catch this case . <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # ifdef __STDC__ <nl> + # include < limits . h > <nl> + # else <nl> + # include < assert . h > <nl> + # endif <nl> + Syntax error <nl> + _ACEOF <nl> + if ac_fn_c_try_cpp " $ LINENO " ; then : <nl> + <nl> + else <nl> + # Broken : fails on valid input . <nl> + continue <nl> + fi <nl> + rm - f conftest . err conftest . i conftest . $ ac_ext <nl> + <nl> + # OK , works on sane cases . Now check whether nonexistent headers <nl> + # can be detected and how . <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # include < ac_nonexistent . h > <nl> + _ACEOF <nl> + if ac_fn_c_try_cpp " $ LINENO " ; then : <nl> + # Broken : success on invalid input . <nl> + continue <nl> + else <nl> + # Passes both tests . <nl> + ac_preproc_ok = : <nl> + break <nl> + fi <nl> + rm - f conftest . err conftest . i conftest . $ ac_ext <nl> + <nl> + done <nl> + # Because of ` break ' , _AC_PREPROC_IFELSE ' s cleaning code was skipped . <nl> + rm - f conftest . i conftest . err conftest . $ ac_ext <nl> + if $ ac_preproc_ok ; then : <nl> + break <nl> + fi <nl> + <nl> + done <nl> + ac_cv_prog_CPP = $ CPP <nl> + <nl> + fi <nl> + CPP = $ ac_cv_prog_CPP <nl> + else <nl> + ac_cv_prog_CPP = $ CPP <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ CPP " > & 5 <nl> + $ as_echo " $ CPP " > & 6 ; } <nl> + ac_preproc_ok = false <nl> + for ac_c_preproc_warn_flag in ' ' yes <nl> + do <nl> + # Use a header file that comes with gcc , so configuring glibc <nl> + # with a fresh cross - compiler works . <nl> + # Prefer < limits . h > to < assert . h > if __STDC__ is defined , since <nl> + # < limits . h > exists even on freestanding compilers . <nl> + # On the NeXT , cc - E runs the code through the compiler ' s parser , <nl> + # not just through cpp . " Syntax error " is here to catch this case . <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # ifdef __STDC__ <nl> + # include < limits . h > <nl> + # else <nl> + # include < assert . h > <nl> + # endif <nl> + Syntax error <nl> + _ACEOF <nl> + if ac_fn_c_try_cpp " $ LINENO " ; then : <nl> + <nl> + else <nl> + # Broken : fails on valid input . <nl> + continue <nl> + fi <nl> + rm - f conftest . err conftest . i conftest . $ ac_ext <nl> + <nl> + # OK , works on sane cases . Now check whether nonexistent headers <nl> + # can be detected and how . <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # include < ac_nonexistent . h > <nl> + _ACEOF <nl> + if ac_fn_c_try_cpp " $ LINENO " ; then : <nl> + # Broken : success on invalid input . <nl> + continue <nl> + else <nl> + # Passes both tests . <nl> + ac_preproc_ok = : <nl> + break <nl> + fi <nl> + rm - f conftest . err conftest . i conftest . $ ac_ext <nl> + <nl> + done <nl> + # Because of ` break ' , _AC_PREPROC_IFELSE ' s cleaning code was skipped . <nl> + rm - f conftest . i conftest . err conftest . $ ac_ext <nl> + if $ ac_preproc_ok ; then : <nl> + <nl> + else <nl> + { { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : in \ ` $ ac_pwd ' : " > & 5 <nl> + $ as_echo " $ as_me : error : in \ ` $ ac_pwd ' : " > & 2 ; } <nl> + as_fn_error $ ? " C preprocessor \ " $ CPP \ " fails sanity check <nl> + See \ ` config . log ' for more details " " $ LINENO " 5 ; } <nl> + fi <nl> + <nl> + ac_ext = c <nl> + ac_cpp = ' $ CPP $ CPPFLAGS ' <nl> + ac_compile = ' $ CC - c $ CFLAGS $ CPPFLAGS conftest . $ ac_ext > & 5 ' <nl> + ac_link = ' $ CC - o conftest $ ac_exeext $ CFLAGS $ CPPFLAGS $ LDFLAGS conftest . $ ac_ext $ LIBS > & 5 ' <nl> + ac_compiler_gnu = $ ac_cv_c_compiler_gnu <nl> + <nl> + <nl> + # Check whether - - enable - cxx was given . <nl> + if test " $ { enable_cxx + set } " = set ; then : <nl> + enableval = $ enable_cxx ; if test " x $ enable_cxx " = " xno " ; then <nl> + enable_cxx = " 0 " <nl> + else <nl> + enable_cxx = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_cxx = " 1 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ enable_cxx " = " x1 " ; then <nl> + # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> + # http : / / www . gnu . org / software / autoconf - archive / ax_cxx_compile_stdcxx . html <nl> + # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> + # <nl> + # SYNOPSIS <nl> + # <nl> + # AX_CXX_COMPILE_STDCXX ( VERSION , [ ext | noext ] , [ mandatory | optional ] ) <nl> + # <nl> + # DESCRIPTION <nl> + # <nl> + # Check for baseline language coverage in the compiler for the specified <nl> + # version of the C + + standard . If necessary , add switches to CXX and <nl> + # CXXCPP to enable support . VERSION may be ' 11 ' ( for the C + + 11 standard ) <nl> + # or ' 14 ' ( for the C + + 14 standard ) . <nl> + # <nl> + # The second argument , if specified , indicates whether you insist on an <nl> + # extended mode ( e . g . - std = gnu + + 11 ) or a strict conformance mode ( e . g . <nl> + # - std = c + + 11 ) . If neither is specified , you get whatever works , with <nl> + # preference for an extended mode . <nl> + # <nl> + # The third argument , if specified ' mandatory ' or if left unspecified , <nl> + # indicates that baseline support for the specified C + + standard is <nl> + # required and that the macro should error out if no mode with that <nl> + # support is found . If specified ' optional ' , then configuration proceeds <nl> + # regardless , after defining HAVE_CXX $ { VERSION } if and only if a <nl> + # supporting mode is found . <nl> + # <nl> + # LICENSE <nl> + # <nl> + # Copyright ( c ) 2008 Benjamin Kosnik < bkoz @ redhat . com > <nl> + # Copyright ( c ) 2012 Zack Weinberg < zackw @ panix . com > <nl> + # Copyright ( c ) 2013 Roy Stogner < roystgnr @ ices . utexas . edu > <nl> + # Copyright ( c ) 2014 , 2015 Google Inc . ; contributed by Alexey Sokolov < sokolov @ google . com > <nl> + # Copyright ( c ) 2015 Paul Norman < penorman @ mac . com > <nl> + # Copyright ( c ) 2015 Moritz Klammler < moritz @ klammler . eu > <nl> + # <nl> + # Copying and distribution of this file , with or without modification , are <nl> + # permitted in any medium without royalty provided the copyright notice <nl> + # and this notice are preserved . This file is offered as - is , without any <nl> + # warranty . <nl> + <nl> + # serial 4 <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + ac_ext = cpp <nl> + ac_cpp = ' $ CXXCPP $ CPPFLAGS ' <nl> + ac_compile = ' $ CXX - c $ CXXFLAGS $ CPPFLAGS conftest . $ ac_ext > & 5 ' <nl> + ac_link = ' $ CXX - o conftest $ ac_exeext $ CXXFLAGS $ CPPFLAGS $ LDFLAGS conftest . $ ac_ext $ LIBS > & 5 ' <nl> + ac_compiler_gnu = $ ac_cv_cxx_compiler_gnu <nl> + if test - z " $ CXX " ; then <nl> + if test - n " $ CCC " ; then <nl> + CXX = $ CCC <nl> + else <nl> + if test - n " $ ac_tool_prefix " ; then <nl> + for ac_prog in g + + c + + gpp aCC CC cxx cc + + cl . exe FCC KCC RCC xlC_r xlC <nl> + do <nl> + # Extract the first word of " $ ac_tool_prefix $ ac_prog " , so it can be a program name with args . <nl> + set dummy $ ac_tool_prefix $ ac_prog ; ac_word = $ 2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ ac_word " > & 5 <nl> + $ as_echo_n " checking for $ ac_word . . . " > & 6 ; } <nl> + if $ { ac_cv_prog_CXX + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if test - n " $ CXX " ; then <nl> + ac_cv_prog_CXX = " $ CXX " # Let the user override the test . <nl> + else <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + if as_fn_executable_p " $ as_dir / $ ac_word $ ac_exec_ext " ; then <nl> + ac_cv_prog_CXX = " $ ac_tool_prefix $ ac_prog " <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : found $ as_dir / $ ac_word $ ac_exec_ext " > & 5 <nl> + break 2 <nl> + fi <nl> + done <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + fi <nl> + fi <nl> + CXX = $ ac_cv_prog_CXX <nl> + if test - n " $ CXX " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ CXX " > & 5 <nl> + $ as_echo " $ CXX " > & 6 ; } <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + fi <nl> + <nl> + <nl> + test - n " $ CXX " & & break <nl> + done <nl> + fi <nl> + if test - z " $ CXX " ; then <nl> + ac_ct_CXX = $ CXX <nl> + for ac_prog in g + + c + + gpp aCC CC cxx cc + + cl . exe FCC KCC RCC xlC_r xlC <nl> + do <nl> + # Extract the first word of " $ ac_prog " , so it can be a program name with args . <nl> + set dummy $ ac_prog ; ac_word = $ 2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ ac_word " > & 5 <nl> + $ as_echo_n " checking for $ ac_word . . . " > & 6 ; } <nl> + if $ { ac_cv_prog_ac_ct_CXX + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if test - n " $ ac_ct_CXX " ; then <nl> + ac_cv_prog_ac_ct_CXX = " $ ac_ct_CXX " # Let the user override the test . <nl> + else <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + if as_fn_executable_p " $ as_dir / $ ac_word $ ac_exec_ext " ; then <nl> + ac_cv_prog_ac_ct_CXX = " $ ac_prog " <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : found $ as_dir / $ ac_word $ ac_exec_ext " > & 5 <nl> + break 2 <nl> + fi <nl> + done <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + fi <nl> + fi <nl> + ac_ct_CXX = $ ac_cv_prog_ac_ct_CXX <nl> + if test - n " $ ac_ct_CXX " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_ct_CXX " > & 5 <nl> + $ as_echo " $ ac_ct_CXX " > & 6 ; } <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + fi <nl> + <nl> + <nl> + test - n " $ ac_ct_CXX " & & break <nl> + done <nl> + <nl> + if test " x $ ac_ct_CXX " = x ; then <nl> + CXX = " g + + " <nl> + else <nl> + case $ cross_compiling : $ ac_tool_warned in <nl> + yes : ) <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : using cross tools not prefixed with host triplet " > & 5 <nl> + $ as_echo " $ as_me : WARNING : using cross tools not prefixed with host triplet " > & 2 ; } <nl> + ac_tool_warned = yes ; ; <nl> + esac <nl> + CXX = $ ac_ct_CXX <nl> + fi <nl> + fi <nl> + <nl> + fi <nl> + fi <nl> + # Provide some information about the compiler . <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for C + + compiler version " > & 5 <nl> + set X $ ac_compile <nl> + ac_compiler = $ 2 <nl> + for ac_option in - - version - v - V - qversion ; do <nl> + { { ac_try = " $ ac_compiler $ ac_option > & 5 " <nl> + case " ( ( $ ac_try " in <nl> + * \ " * | * \ ` * | * \ \ * ) ac_try_echo = \ $ ac_try ; ; <nl> + * ) ac_try_echo = $ ac_try ; ; <nl> + esac <nl> + eval ac_try_echo = " \ " \ $ as_me : $ { as_lineno - $ LINENO } : $ ac_try_echo \ " " <nl> + $ as_echo " $ ac_try_echo " ; } > & 5 <nl> + ( eval " $ ac_compiler $ ac_option > & 5 " ) 2 > conftest . err <nl> + ac_status = $ ? <nl> + if test - s conftest . err ; then <nl> + sed ' 10a \ <nl> + . . . rest of stderr output deleted . . . <nl> + 10q ' conftest . err > conftest . er1 <nl> + cat conftest . er1 > & 5 <nl> + fi <nl> + rm - f conftest . er1 conftest . err <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : \ $ ? = $ ac_status " > & 5 <nl> + test $ ac_status = 0 ; } <nl> + done <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether we are using the GNU C + + compiler " > & 5 <nl> + $ as_echo_n " checking whether we are using the GNU C + + compiler . . . " > & 6 ; } <nl> + if $ { ac_cv_cxx_compiler_gnu + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + # ifndef __GNUC__ <nl> + choke me <nl> + # endif <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_cxx_try_compile " $ LINENO " ; then : <nl> + ac_compiler_gnu = yes <nl> + else <nl> + ac_compiler_gnu = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + ac_cv_cxx_compiler_gnu = $ ac_compiler_gnu <nl> + <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_cxx_compiler_gnu " > & 5 <nl> + $ as_echo " $ ac_cv_cxx_compiler_gnu " > & 6 ; } <nl> + if test $ ac_compiler_gnu = yes ; then <nl> + GXX = yes <nl> + else <nl> + GXX = <nl> + fi <nl> + ac_test_CXXFLAGS = $ { CXXFLAGS + set } <nl> + ac_save_CXXFLAGS = $ CXXFLAGS <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether $ CXX accepts - g " > & 5 <nl> + $ as_echo_n " checking whether $ CXX accepts - g . . . " > & 6 ; } <nl> + if $ { ac_cv_prog_cxx_g + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + ac_save_cxx_werror_flag = $ ac_cxx_werror_flag <nl> + ac_cxx_werror_flag = yes <nl> + ac_cv_prog_cxx_g = no <nl> + CXXFLAGS = " - g " <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_cxx_try_compile " $ LINENO " ; then : <nl> + ac_cv_prog_cxx_g = yes <nl> + else <nl> + CXXFLAGS = " " <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_cxx_try_compile " $ LINENO " ; then : <nl> + <nl> + else <nl> + ac_cxx_werror_flag = $ ac_save_cxx_werror_flag <nl> + CXXFLAGS = " - g " <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_cxx_try_compile " $ LINENO " ; then : <nl> + ac_cv_prog_cxx_g = yes <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + ac_cxx_werror_flag = $ ac_save_cxx_werror_flag <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_prog_cxx_g " > & 5 <nl> + $ as_echo " $ ac_cv_prog_cxx_g " > & 6 ; } <nl> + if test " $ ac_test_CXXFLAGS " = set ; then <nl> + CXXFLAGS = $ ac_save_CXXFLAGS <nl> + elif test $ ac_cv_prog_cxx_g = yes ; then <nl> + if test " $ GXX " = yes ; then <nl> + CXXFLAGS = " - g - O2 " <nl> + else <nl> + CXXFLAGS = " - g " <nl> + fi <nl> + else <nl> + if test " $ GXX " = yes ; then <nl> + CXXFLAGS = " - O2 " <nl> + else <nl> + CXXFLAGS = <nl> + fi <nl> + fi <nl> + ac_ext = cpp <nl> + ac_cpp = ' $ CXXCPP $ CPPFLAGS ' <nl> + ac_compile = ' $ CXX - c $ CXXFLAGS $ CPPFLAGS conftest . $ ac_ext > & 5 ' <nl> + ac_link = ' $ CXX - o conftest $ ac_exeext $ CXXFLAGS $ CPPFLAGS $ LDFLAGS conftest . $ ac_ext $ LIBS > & 5 ' <nl> + ac_compiler_gnu = $ ac_cv_cxx_compiler_gnu <nl> + <nl> + <nl> + ax_cxx_compile_cxx14_required = false <nl> + ac_ext = cpp <nl> + ac_cpp = ' $ CXXCPP $ CPPFLAGS ' <nl> + ac_compile = ' $ CXX - c $ CXXFLAGS $ CPPFLAGS conftest . $ ac_ext > & 5 ' <nl> + ac_link = ' $ CXX - o conftest $ ac_exeext $ CXXFLAGS $ CPPFLAGS $ LDFLAGS conftest . $ ac_ext $ LIBS > & 5 ' <nl> + ac_compiler_gnu = $ ac_cv_cxx_compiler_gnu <nl> + ac_success = no <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether $ CXX supports C + + 14 features by default " > & 5 <nl> + $ as_echo_n " checking whether $ CXX supports C + + 14 features by default . . . " > & 6 ; } <nl> + if $ { ax_cv_cxx_compile_cxx14 + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + / / If the compiler admits that it is not ready for C + + 11 , why torture it ? <nl> + / / Hopefully , this will speed up the test . <nl> + <nl> + # ifndef __cplusplus <nl> + <nl> + # error " This is not a C + + compiler " <nl> + <nl> + # elif __cplusplus < 201103L <nl> + <nl> + # error " This is not a C + + 11 compiler " <nl> + <nl> + # else <nl> + <nl> + namespace cxx11 <nl> + { <nl> + <nl> + namespace test_static_assert <nl> + { <nl> + <nl> + template < typename T > <nl> + struct check <nl> + { <nl> + static_assert ( sizeof ( int ) < = sizeof ( T ) , " not big enough " ) ; <nl> + } ; <nl> + <nl> + } <nl> + <nl> + namespace test_final_override <nl> + { <nl> + <nl> + struct Base <nl> + { <nl> + virtual void f ( ) { } <nl> + } ; <nl> + <nl> + struct Derived : public Base <nl> + { <nl> + virtual void f ( ) override { } <nl> + } ; <nl> + <nl> + } <nl> + <nl> + namespace test_double_right_angle_brackets <nl> + { <nl> + <nl> + template < typename T > <nl> + struct check { } ; <nl> + <nl> + typedef check < void > single_type ; <nl> + typedef check < check < void > > double_type ; <nl> + typedef check < check < check < void > > > triple_type ; <nl> + typedef check < check < check < check < void > > > > quadruple_type ; <nl> + <nl> + } <nl> + <nl> + namespace test_decltype <nl> + { <nl> + <nl> + int <nl> + f ( ) <nl> + { <nl> + int a = 1 ; <nl> + decltype ( a ) b = 2 ; <nl> + return a + b ; <nl> + } <nl> + <nl> + } <nl> + <nl> + namespace test_type_deduction <nl> + { <nl> + <nl> + template < typename T1 , typename T2 > <nl> + struct is_same <nl> + { <nl> + static const bool value = false ; <nl> + } ; <nl> + <nl> + template < typename T > <nl> + struct is_same < T , T > <nl> + { <nl> + static const bool value = true ; <nl> + } ; <nl> + <nl> + template < typename T1 , typename T2 > <nl> + auto <nl> + add ( T1 a1 , T2 a2 ) - > decltype ( a1 + a2 ) <nl> + { <nl> + return a1 + a2 ; <nl> + } <nl> + <nl> + int <nl> + test ( const int c , volatile int v ) <nl> + { <nl> + static_assert ( is_same < int , decltype ( 0 ) > : : value = = true , " " ) ; <nl> + static_assert ( is_same < int , decltype ( c ) > : : value = = false , " " ) ; <nl> + static_assert ( is_same < int , decltype ( v ) > : : value = = false , " " ) ; <nl> + auto ac = c ; <nl> + auto av = v ; <nl> + auto sumi = ac + av + ' x ' ; <nl> + auto sumf = ac + av + 1 . 0 ; <nl> + static_assert ( is_same < int , decltype ( ac ) > : : value = = true , " " ) ; <nl> + static_assert ( is_same < int , decltype ( av ) > : : value = = true , " " ) ; <nl> + static_assert ( is_same < int , decltype ( sumi ) > : : value = = true , " " ) ; <nl> + static_assert ( is_same < int , decltype ( sumf ) > : : value = = false , " " ) ; <nl> + static_assert ( is_same < int , decltype ( add ( c , v ) ) > : : value = = true , " " ) ; <nl> + return ( sumf > 0 . 0 ) ? sumi : add ( c , v ) ; <nl> + } <nl> + <nl> + } <nl> + <nl> + namespace test_noexcept <nl> + { <nl> + <nl> + int f ( ) { return 0 ; } <nl> + int g ( ) noexcept { return 0 ; } <nl> + <nl> + static_assert ( noexcept ( f ( ) ) = = false , " " ) ; <nl> + static_assert ( noexcept ( g ( ) ) = = true , " " ) ; <nl> + <nl> + } <nl> + <nl> + namespace test_constexpr <nl> + { <nl> + <nl> + template < typename CharT > <nl> + unsigned long constexpr <nl> + strlen_c_r ( const CharT * const s , const unsigned long acc ) noexcept <nl> + { <nl> + return * s ? strlen_c_r ( s + 1 , acc + 1 ) : acc ; <nl> + } <nl> + <nl> + template < typename CharT > <nl> + unsigned long constexpr <nl> + strlen_c ( const CharT * const s ) noexcept <nl> + { <nl> + return strlen_c_r ( s , 0UL ) ; <nl> + } <nl> + <nl> + static_assert ( strlen_c ( " " ) = = 0UL , " " ) ; <nl> + static_assert ( strlen_c ( " 1 " ) = = 1UL , " " ) ; <nl> + static_assert ( strlen_c ( " example " ) = = 7UL , " " ) ; <nl> + static_assert ( strlen_c ( " another \ 0example " ) = = 7UL , " " ) ; <nl> + <nl> + } <nl> + <nl> + namespace test_rvalue_references <nl> + { <nl> + <nl> + template < int N > <nl> + struct answer <nl> + { <nl> + static constexpr int value = N ; <nl> + } ; <nl> + <nl> + answer < 1 > f ( int & ) { return answer < 1 > ( ) ; } <nl> + answer < 2 > f ( const int & ) { return answer < 2 > ( ) ; } <nl> + answer < 3 > f ( int & & ) { return answer < 3 > ( ) ; } <nl> + <nl> + void <nl> + test ( ) <nl> + { <nl> + int i = 0 ; <nl> + const int c = 0 ; <nl> + static_assert ( decltype ( f ( i ) ) : : value = = 1 , " " ) ; <nl> + static_assert ( decltype ( f ( c ) ) : : value = = 2 , " " ) ; <nl> + static_assert ( decltype ( f ( 0 ) ) : : value = = 3 , " " ) ; <nl> + } <nl> + <nl> + } <nl> + <nl> + namespace test_uniform_initialization <nl> + { <nl> + <nl> + struct test <nl> + { <nl> + static const int zero { } ; <nl> + static const int one { 1 } ; <nl> + } ; <nl> + <nl> + static_assert ( test : : zero = = 0 , " " ) ; <nl> + static_assert ( test : : one = = 1 , " " ) ; <nl> + <nl> + } <nl> + <nl> + namespace test_lambdas <nl> + { <nl> + <nl> + void <nl> + test1 ( ) <nl> + { <nl> + auto lambda1 = [ ] ( ) { } ; <nl> + auto lambda2 = lambda1 ; <nl> + lambda1 ( ) ; <nl> + lambda2 ( ) ; <nl> + } <nl> + <nl> + int <nl> + test2 ( ) <nl> + { <nl> + auto a = [ ] ( int i , int j ) { return i + j ; } ( 1 , 2 ) ; <nl> + auto b = [ ] ( ) - > int { return ' 0 ' ; } ( ) ; <nl> + auto c = [ = ] ( ) { return a + b ; } ( ) ; <nl> + auto d = [ & ] ( ) { return c ; } ( ) ; <nl> + auto e = [ a , & b ] ( int x ) mutable { <nl> + const auto identity = [ ] ( int y ) { return y ; } ; <nl> + for ( auto i = 0 ; i < a ; + + i ) <nl> + a + = b - - ; <nl> + return x + identity ( a + b ) ; <nl> + } ( 0 ) ; <nl> + return a + b + c + d + e ; <nl> + } <nl> + <nl> + int <nl> + test3 ( ) <nl> + { <nl> + const auto nullary = [ ] ( ) { return 0 ; } ; <nl> + const auto unary = [ ] ( int x ) { return x ; } ; <nl> + using nullary_t = decltype ( nullary ) ; <nl> + using unary_t = decltype ( unary ) ; <nl> + const auto higher1st = [ ] ( nullary_t f ) { return f ( ) ; } ; <nl> + const auto higher2nd = [ unary ] ( nullary_t f1 ) { <nl> + return [ unary , f1 ] ( unary_t f2 ) { return f2 ( unary ( f1 ( ) ) ) ; } ; <nl> + } ; <nl> + return higher1st ( nullary ) + higher2nd ( nullary ) ( unary ) ; <nl> + } <nl> + <nl> + } <nl> + <nl> + namespace test_variadic_templates <nl> + { <nl> + <nl> + template < int . . . > <nl> + struct sum ; <nl> + <nl> + template < int N0 , int . . . N1toN > <nl> + struct sum < N0 , N1toN . . . > <nl> + { <nl> + static constexpr auto value = N0 + sum < N1toN . . . > : : value ; <nl> + } ; <nl> + <nl> + template < > <nl> + struct sum < > <nl> + { <nl> + static constexpr auto value = 0 ; <nl> + } ; <nl> + <nl> + static_assert ( sum < > : : value = = 0 , " " ) ; <nl> + static_assert ( sum < 1 > : : value = = 1 , " " ) ; <nl> + static_assert ( sum < 23 > : : value = = 23 , " " ) ; <nl> + static_assert ( sum < 1 , 2 > : : value = = 3 , " " ) ; <nl> + static_assert ( sum < 5 , 5 , 11 > : : value = = 21 , " " ) ; <nl> + static_assert ( sum < 2 , 3 , 5 , 7 , 11 , 13 > : : value = = 41 , " " ) ; <nl> + <nl> + } <nl> + <nl> + / / http : / / stackoverflow . com / questions / 13728184 / template - aliases - and - sfinae <nl> + / / Clang 3 . 1 fails with headers of libstd + + 4 . 8 . 3 when using std : : function <nl> + / / because of this . <nl> + namespace test_template_alias_sfinae <nl> + { <nl> + <nl> + struct foo { } ; <nl> + <nl> + template < typename T > <nl> + using member = typename T : : member_type ; <nl> + <nl> + template < typename T > <nl> + void func ( . . . ) { } <nl> + <nl> + template < typename T > <nl> + void func ( member < T > * ) { } <nl> + <nl> + void test ( ) ; <nl> + <nl> + void test ( ) { func < foo > ( 0 ) ; } <nl> + <nl> + } <nl> + <nl> + } / / namespace cxx11 <nl> + <nl> + # endif / / __cplusplus > = 201103L <nl> + <nl> + <nl> + <nl> + <nl> + / / If the compiler admits that it is not ready for C + + 14 , why torture it ? <nl> + / / Hopefully , this will speed up the test . <nl> + <nl> + # ifndef __cplusplus <nl> + <nl> + # error " This is not a C + + compiler " <nl> + <nl> + # elif __cplusplus < 201402L <nl> + <nl> + # error " This is not a C + + 14 compiler " <nl> + <nl> + # else <nl> + <nl> + namespace cxx14 <nl> + { <nl> + <nl> + namespace test_polymorphic_lambdas <nl> + { <nl> + <nl> + int <nl> + test ( ) <nl> + { <nl> + const auto lambda = [ ] ( auto & & . . . args ) { <nl> + const auto istiny = [ ] ( auto x ) { <nl> + return ( sizeof ( x ) = = 1UL ) ? 1 : 0 ; <nl> + } ; <nl> + const int aretiny [ ] = { istiny ( args ) . . . } ; <nl> + return aretiny [ 0 ] ; <nl> + } ; <nl> + return lambda ( 1 , 1L , 1 . 0f , ' 1 ' ) ; <nl> + } <nl> + <nl> + } <nl> + <nl> + namespace test_binary_literals <nl> + { <nl> + <nl> + constexpr auto ivii = 0b0000000000101010 ; <nl> + static_assert ( ivii = = 42 , " wrong value " ) ; <nl> + <nl> + } <nl> + <nl> + namespace test_generalized_constexpr <nl> + { <nl> + <nl> + template < typename CharT > <nl> + constexpr unsigned long <nl> + strlen_c ( const CharT * const s ) noexcept <nl> + { <nl> + auto length = 0UL ; <nl> + for ( auto p = s ; * p ; + + p ) <nl> + + + length ; <nl> + return length ; <nl> + } <nl> + <nl> + static_assert ( strlen_c ( " " ) = = 0UL , " " ) ; <nl> + static_assert ( strlen_c ( " x " ) = = 1UL , " " ) ; <nl> + static_assert ( strlen_c ( " test " ) = = 4UL , " " ) ; <nl> + static_assert ( strlen_c ( " another \ 0test " ) = = 7UL , " " ) ; <nl> + <nl> + } <nl> + <nl> + namespace test_lambda_init_capture <nl> + { <nl> + <nl> + int <nl> + test ( ) <nl> + { <nl> + auto x = 0 ; <nl> + const auto lambda1 = [ a = x ] ( int b ) { return a + b ; } ; <nl> + const auto lambda2 = [ a = lambda1 ( x ) ] ( ) { return a ; } ; <nl> + return lambda2 ( ) ; <nl> + } <nl> + <nl> + } <nl> + <nl> + namespace test_digit_seperators <nl> + { <nl> + <nl> + constexpr auto ten_million = 100 ' 000 ' 000 ; <nl> + static_assert ( ten_million = = 100000000 , " " ) ; <nl> + <nl> + } <nl> + <nl> + namespace test_return_type_deduction <nl> + { <nl> + <nl> + auto f ( int & x ) { return x ; } <nl> + decltype ( auto ) g ( int & x ) { return x ; } <nl> + <nl> + template < typename T1 , typename T2 > <nl> + struct is_same <nl> + { <nl> + static constexpr auto value = false ; <nl> + } ; <nl> + <nl> + template < typename T > <nl> + struct is_same < T , T > <nl> + { <nl> + static constexpr auto value = true ; <nl> + } ; <nl> + <nl> + int <nl> + test ( ) <nl> + { <nl> + auto x = 0 ; <nl> + static_assert ( is_same < int , decltype ( f ( x ) ) > : : value , " " ) ; <nl> + static_assert ( is_same < int & , decltype ( g ( x ) ) > : : value , " " ) ; <nl> + return x ; <nl> + } <nl> + <nl> + } <nl> + <nl> + } / / namespace cxx14 <nl> + <nl> + # endif / / __cplusplus > = 201402L <nl> + <nl> + <nl> + <nl> + _ACEOF <nl> + if ac_fn_cxx_try_compile " $ LINENO " ; then : <nl> + ax_cv_cxx_compile_cxx14 = yes <nl> + else <nl> + ax_cv_cxx_compile_cxx14 = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ax_cv_cxx_compile_cxx14 " > & 5 <nl> + $ as_echo " $ ax_cv_cxx_compile_cxx14 " > & 6 ; } <nl> + if test x $ ax_cv_cxx_compile_cxx14 = xyes ; then <nl> + ac_success = yes <nl> + fi <nl> + <nl> + <nl> + <nl> + if test x $ ac_success = xno ; then <nl> + for switch in - std = c + + 14 - std = c + + 0x + std = c + + 14 " - h std = c + + 14 " ; do <nl> + cachevar = ` $ as_echo " ax_cv_cxx_compile_cxx14_ $ switch " | $ as_tr_sh ` <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether $ CXX supports C + + 14 features with $ switch " > & 5 <nl> + $ as_echo_n " checking whether $ CXX supports C + + 14 features with $ switch . . . " > & 6 ; } <nl> + if eval \ $ { $ cachevar + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + ac_save_CXX = " $ CXX " <nl> + CXX = " $ CXX $ switch " <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + / / If the compiler admits that it is not ready for C + + 11 , why torture it ? <nl> + / / Hopefully , this will speed up the test . <nl> + <nl> + # ifndef __cplusplus <nl> + <nl> + # error " This is not a C + + compiler " <nl> + <nl> + # elif __cplusplus < 201103L <nl> + <nl> + # error " This is not a C + + 11 compiler " <nl> + <nl> + # else <nl> + <nl> + namespace cxx11 <nl> + { <nl> + <nl> + namespace test_static_assert <nl> + { <nl> + <nl> + template < typename T > <nl> + struct check <nl> + { <nl> + static_assert ( sizeof ( int ) < = sizeof ( T ) , " not big enough " ) ; <nl> + } ; <nl> + <nl> + } <nl> + <nl> + namespace test_final_override <nl> + { <nl> + <nl> + struct Base <nl> + { <nl> + virtual void f ( ) { } <nl> + } ; <nl> + <nl> + struct Derived : public Base <nl> + { <nl> + virtual void f ( ) override { } <nl> + } ; <nl> + <nl> + } <nl> + <nl> + namespace test_double_right_angle_brackets <nl> + { <nl> + <nl> + template < typename T > <nl> + struct check { } ; <nl> + <nl> + typedef check < void > single_type ; <nl> + typedef check < check < void > > double_type ; <nl> + typedef check < check < check < void > > > triple_type ; <nl> + typedef check < check < check < check < void > > > > quadruple_type ; <nl> + <nl> + } <nl> + <nl> + namespace test_decltype <nl> + { <nl> + <nl> + int <nl> + f ( ) <nl> + { <nl> + int a = 1 ; <nl> + decltype ( a ) b = 2 ; <nl> + return a + b ; <nl> + } <nl> + <nl> + } <nl> + <nl> + namespace test_type_deduction <nl> + { <nl> + <nl> + template < typename T1 , typename T2 > <nl> + struct is_same <nl> + { <nl> + static const bool value = false ; <nl> + } ; <nl> + <nl> + template < typename T > <nl> + struct is_same < T , T > <nl> + { <nl> + static const bool value = true ; <nl> + } ; <nl> + <nl> + template < typename T1 , typename T2 > <nl> + auto <nl> + add ( T1 a1 , T2 a2 ) - > decltype ( a1 + a2 ) <nl> + { <nl> + return a1 + a2 ; <nl> + } <nl> + <nl> + int <nl> + test ( const int c , volatile int v ) <nl> + { <nl> + static_assert ( is_same < int , decltype ( 0 ) > : : value = = true , " " ) ; <nl> + static_assert ( is_same < int , decltype ( c ) > : : value = = false , " " ) ; <nl> + static_assert ( is_same < int , decltype ( v ) > : : value = = false , " " ) ; <nl> + auto ac = c ; <nl> + auto av = v ; <nl> + auto sumi = ac + av + ' x ' ; <nl> + auto sumf = ac + av + 1 . 0 ; <nl> + static_assert ( is_same < int , decltype ( ac ) > : : value = = true , " " ) ; <nl> + static_assert ( is_same < int , decltype ( av ) > : : value = = true , " " ) ; <nl> + static_assert ( is_same < int , decltype ( sumi ) > : : value = = true , " " ) ; <nl> + static_assert ( is_same < int , decltype ( sumf ) > : : value = = false , " " ) ; <nl> + static_assert ( is_same < int , decltype ( add ( c , v ) ) > : : value = = true , " " ) ; <nl> + return ( sumf > 0 . 0 ) ? sumi : add ( c , v ) ; <nl> + } <nl> + <nl> + } <nl> + <nl> + namespace test_noexcept <nl> + { <nl> + <nl> + int f ( ) { return 0 ; } <nl> + int g ( ) noexcept { return 0 ; } <nl> + <nl> + static_assert ( noexcept ( f ( ) ) = = false , " " ) ; <nl> + static_assert ( noexcept ( g ( ) ) = = true , " " ) ; <nl> + <nl> + } <nl> + <nl> + namespace test_constexpr <nl> + { <nl> + <nl> + template < typename CharT > <nl> + unsigned long constexpr <nl> + strlen_c_r ( const CharT * const s , const unsigned long acc ) noexcept <nl> + { <nl> + return * s ? strlen_c_r ( s + 1 , acc + 1 ) : acc ; <nl> + } <nl> + <nl> + template < typename CharT > <nl> + unsigned long constexpr <nl> + strlen_c ( const CharT * const s ) noexcept <nl> + { <nl> + return strlen_c_r ( s , 0UL ) ; <nl> + } <nl> + <nl> + static_assert ( strlen_c ( " " ) = = 0UL , " " ) ; <nl> + static_assert ( strlen_c ( " 1 " ) = = 1UL , " " ) ; <nl> + static_assert ( strlen_c ( " example " ) = = 7UL , " " ) ; <nl> + static_assert ( strlen_c ( " another \ 0example " ) = = 7UL , " " ) ; <nl> + <nl> + } <nl> + <nl> + namespace test_rvalue_references <nl> + { <nl> + <nl> + template < int N > <nl> + struct answer <nl> + { <nl> + static constexpr int value = N ; <nl> + } ; <nl> + <nl> + answer < 1 > f ( int & ) { return answer < 1 > ( ) ; } <nl> + answer < 2 > f ( const int & ) { return answer < 2 > ( ) ; } <nl> + answer < 3 > f ( int & & ) { return answer < 3 > ( ) ; } <nl> + <nl> + void <nl> + test ( ) <nl> + { <nl> + int i = 0 ; <nl> + const int c = 0 ; <nl> + static_assert ( decltype ( f ( i ) ) : : value = = 1 , " " ) ; <nl> + static_assert ( decltype ( f ( c ) ) : : value = = 2 , " " ) ; <nl> + static_assert ( decltype ( f ( 0 ) ) : : value = = 3 , " " ) ; <nl> + } <nl> + <nl> + } <nl> + <nl> + namespace test_uniform_initialization <nl> + { <nl> + <nl> + struct test <nl> + { <nl> + static const int zero { } ; <nl> + static const int one { 1 } ; <nl> + } ; <nl> + <nl> + static_assert ( test : : zero = = 0 , " " ) ; <nl> + static_assert ( test : : one = = 1 , " " ) ; <nl> + <nl> + } <nl> + <nl> + namespace test_lambdas <nl> + { <nl> + <nl> + void <nl> + test1 ( ) <nl> + { <nl> + auto lambda1 = [ ] ( ) { } ; <nl> + auto lambda2 = lambda1 ; <nl> + lambda1 ( ) ; <nl> + lambda2 ( ) ; <nl> + } <nl> + <nl> + int <nl> + test2 ( ) <nl> + { <nl> + auto a = [ ] ( int i , int j ) { return i + j ; } ( 1 , 2 ) ; <nl> + auto b = [ ] ( ) - > int { return ' 0 ' ; } ( ) ; <nl> + auto c = [ = ] ( ) { return a + b ; } ( ) ; <nl> + auto d = [ & ] ( ) { return c ; } ( ) ; <nl> + auto e = [ a , & b ] ( int x ) mutable { <nl> + const auto identity = [ ] ( int y ) { return y ; } ; <nl> + for ( auto i = 0 ; i < a ; + + i ) <nl> + a + = b - - ; <nl> + return x + identity ( a + b ) ; <nl> + } ( 0 ) ; <nl> + return a + b + c + d + e ; <nl> + } <nl> + <nl> + int <nl> + test3 ( ) <nl> + { <nl> + const auto nullary = [ ] ( ) { return 0 ; } ; <nl> + const auto unary = [ ] ( int x ) { return x ; } ; <nl> + using nullary_t = decltype ( nullary ) ; <nl> + using unary_t = decltype ( unary ) ; <nl> + const auto higher1st = [ ] ( nullary_t f ) { return f ( ) ; } ; <nl> + const auto higher2nd = [ unary ] ( nullary_t f1 ) { <nl> + return [ unary , f1 ] ( unary_t f2 ) { return f2 ( unary ( f1 ( ) ) ) ; } ; <nl> + } ; <nl> + return higher1st ( nullary ) + higher2nd ( nullary ) ( unary ) ; <nl> + } <nl> + <nl> + } <nl> + <nl> + namespace test_variadic_templates <nl> + { <nl> + <nl> + template < int . . . > <nl> + struct sum ; <nl> + <nl> + template < int N0 , int . . . N1toN > <nl> + struct sum < N0 , N1toN . . . > <nl> + { <nl> + static constexpr auto value = N0 + sum < N1toN . . . > : : value ; <nl> + } ; <nl> + <nl> + template < > <nl> + struct sum < > <nl> + { <nl> + static constexpr auto value = 0 ; <nl> + } ; <nl> + <nl> + static_assert ( sum < > : : value = = 0 , " " ) ; <nl> + static_assert ( sum < 1 > : : value = = 1 , " " ) ; <nl> + static_assert ( sum < 23 > : : value = = 23 , " " ) ; <nl> + static_assert ( sum < 1 , 2 > : : value = = 3 , " " ) ; <nl> + static_assert ( sum < 5 , 5 , 11 > : : value = = 21 , " " ) ; <nl> + static_assert ( sum < 2 , 3 , 5 , 7 , 11 , 13 > : : value = = 41 , " " ) ; <nl> + <nl> + } <nl> + <nl> + / / http : / / stackoverflow . com / questions / 13728184 / template - aliases - and - sfinae <nl> + / / Clang 3 . 1 fails with headers of libstd + + 4 . 8 . 3 when using std : : function <nl> + / / because of this . <nl> + namespace test_template_alias_sfinae <nl> + { <nl> + <nl> + struct foo { } ; <nl> + <nl> + template < typename T > <nl> + using member = typename T : : member_type ; <nl> + <nl> + template < typename T > <nl> + void func ( . . . ) { } <nl> + <nl> + template < typename T > <nl> + void func ( member < T > * ) { } <nl> + <nl> + void test ( ) ; <nl> + <nl> + void test ( ) { func < foo > ( 0 ) ; } <nl> + <nl> + } <nl> + <nl> + } / / namespace cxx11 <nl> + <nl> + # endif / / __cplusplus > = 201103L <nl> + <nl> + <nl> + <nl> + <nl> + / / If the compiler admits that it is not ready for C + + 14 , why torture it ? <nl> + / / Hopefully , this will speed up the test . <nl> + <nl> + # ifndef __cplusplus <nl> + <nl> + # error " This is not a C + + compiler " <nl> + <nl> + # elif __cplusplus < 201402L <nl> + <nl> + # error " This is not a C + + 14 compiler " <nl> + <nl> + # else <nl> + <nl> + namespace cxx14 <nl> + { <nl> + <nl> + namespace test_polymorphic_lambdas <nl> + { <nl> + <nl> + int <nl> + test ( ) <nl> + { <nl> + const auto lambda = [ ] ( auto & & . . . args ) { <nl> + const auto istiny = [ ] ( auto x ) { <nl> + return ( sizeof ( x ) = = 1UL ) ? 1 : 0 ; <nl> + } ; <nl> + const int aretiny [ ] = { istiny ( args ) . . . } ; <nl> + return aretiny [ 0 ] ; <nl> + } ; <nl> + return lambda ( 1 , 1L , 1 . 0f , ' 1 ' ) ; <nl> + } <nl> + <nl> + } <nl> + <nl> + namespace test_binary_literals <nl> + { <nl> + <nl> + constexpr auto ivii = 0b0000000000101010 ; <nl> + static_assert ( ivii = = 42 , " wrong value " ) ; <nl> + <nl> + } <nl> + <nl> + namespace test_generalized_constexpr <nl> + { <nl> + <nl> + template < typename CharT > <nl> + constexpr unsigned long <nl> + strlen_c ( const CharT * const s ) noexcept <nl> + { <nl> + auto length = 0UL ; <nl> + for ( auto p = s ; * p ; + + p ) <nl> + + + length ; <nl> + return length ; <nl> + } <nl> + <nl> + static_assert ( strlen_c ( " " ) = = 0UL , " " ) ; <nl> + static_assert ( strlen_c ( " x " ) = = 1UL , " " ) ; <nl> + static_assert ( strlen_c ( " test " ) = = 4UL , " " ) ; <nl> + static_assert ( strlen_c ( " another \ 0test " ) = = 7UL , " " ) ; <nl> + <nl> + } <nl> + <nl> + namespace test_lambda_init_capture <nl> + { <nl> + <nl> + int <nl> + test ( ) <nl> + { <nl> + auto x = 0 ; <nl> + const auto lambda1 = [ a = x ] ( int b ) { return a + b ; } ; <nl> + const auto lambda2 = [ a = lambda1 ( x ) ] ( ) { return a ; } ; <nl> + return lambda2 ( ) ; <nl> + } <nl> + <nl> + } <nl> + <nl> + namespace test_digit_seperators <nl> + { <nl> + <nl> + constexpr auto ten_million = 100 ' 000 ' 000 ; <nl> + static_assert ( ten_million = = 100000000 , " " ) ; <nl> + <nl> + } <nl> + <nl> + namespace test_return_type_deduction <nl> + { <nl> + <nl> + auto f ( int & x ) { return x ; } <nl> + decltype ( auto ) g ( int & x ) { return x ; } <nl> + <nl> + template < typename T1 , typename T2 > <nl> + struct is_same <nl> + { <nl> + static constexpr auto value = false ; <nl> + } ; <nl> + <nl> + template < typename T > <nl> + struct is_same < T , T > <nl> + { <nl> + static constexpr auto value = true ; <nl> + } ; <nl> + <nl> + int <nl> + test ( ) <nl> + { <nl> + auto x = 0 ; <nl> + static_assert ( is_same < int , decltype ( f ( x ) ) > : : value , " " ) ; <nl> + static_assert ( is_same < int & , decltype ( g ( x ) ) > : : value , " " ) ; <nl> + return x ; <nl> + } <nl> + <nl> + } <nl> + <nl> + } / / namespace cxx14 <nl> + <nl> + # endif / / __cplusplus > = 201402L <nl> + <nl> + <nl> + <nl> + _ACEOF <nl> + if ac_fn_cxx_try_compile " $ LINENO " ; then : <nl> + eval $ cachevar = yes <nl> + else <nl> + eval $ cachevar = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + CXX = " $ ac_save_CXX " <nl> + fi <nl> + eval ac_res = \ $ $ cachevar <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_res " > & 5 <nl> + $ as_echo " $ ac_res " > & 6 ; } <nl> + if eval test x \ $ $ cachevar = xyes ; then <nl> + CXX = " $ CXX $ switch " <nl> + if test - n " $ CXXCPP " ; then <nl> + CXXCPP = " $ CXXCPP $ switch " <nl> + fi <nl> + ac_success = yes <nl> + break <nl> + fi <nl> + done <nl> + fi <nl> + ac_ext = c <nl> + ac_cpp = ' $ CPP $ CPPFLAGS ' <nl> + ac_compile = ' $ CC - c $ CFLAGS $ CPPFLAGS conftest . $ ac_ext > & 5 ' <nl> + ac_link = ' $ CC - o conftest $ ac_exeext $ CFLAGS $ CPPFLAGS $ LDFLAGS conftest . $ ac_ext $ LIBS > & 5 ' <nl> + ac_compiler_gnu = $ ac_cv_c_compiler_gnu <nl> + <nl> + if test x $ ax_cxx_compile_cxx14_required = xtrue ; then <nl> + if test x $ ac_success = xno ; then <nl> + as_fn_error $ ? " * * * A compiler with support for C + + 14 language features is required . " " $ LINENO " 5 <nl> + fi <nl> + fi <nl> + if test x $ ac_success = xno ; then <nl> + HAVE_CXX14 = 0 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : No compiler with C + + 14 support was found " > & 5 <nl> + $ as_echo " $ as_me : No compiler with C + + 14 support was found " > & 6 ; } <nl> + else <nl> + HAVE_CXX14 = 1 <nl> + <nl> + $ as_echo " # define HAVE_CXX14 1 " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + if test " x $ { HAVE_CXX14 } " = " x1 " ; then <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - Wall " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - Wall . . . " > & 6 ; } <nl> + T_CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } " <nl> + T_APPEND_V = - Wall <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { SPECIFIED_CXXFLAGS } " = " x " ; then <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + else <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cxxflags_added = - Wall <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cxxflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CXXFLAGS = " $ { T_CONFIGURE_CXXFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { SPECIFIED_CXXFLAGS } " = " x " ; then <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + else <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - g3 " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - g3 . . . " > & 6 ; } <nl> + T_CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } " <nl> + T_APPEND_V = - g3 <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { SPECIFIED_CXXFLAGS } " = " x " ; then <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + else <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cxxflags_added = - g3 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cxxflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CXXFLAGS = " $ { T_CONFIGURE_CXXFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { SPECIFIED_CXXFLAGS } " = " x " ; then <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + else <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + SAVED_LIBS = " $ { LIBS } " <nl> + T_APPEND_V = - lstdc + + <nl> + if test " x $ { LIBS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + LIBS = " $ { LIBS } $ { T_APPEND_V } " <nl> + else <nl> + LIBS = " $ { LIBS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether libstdc + + linkage is compilable " > & 5 <nl> + $ as_echo_n " checking whether libstdc + + linkage is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_libstdcxx + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < stdlib . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + int * arr = ( int * ) malloc ( sizeof ( int ) * 42 ) ; <nl> + if ( arr = = NULL ) <nl> + return 1 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_libstdcxx = yes <nl> + else <nl> + je_cv_libstdcxx = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_libstdcxx " > & 5 <nl> + $ as_echo " $ je_cv_libstdcxx " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_libstdcxx } " = " xno " ; then <nl> + LIBS = " $ { SAVED_LIBS } " <nl> + fi <nl> + else <nl> + enable_cxx = " 0 " <nl> + fi <nl> + fi <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for grep that handles long lines and - e " > & 5 <nl> + $ as_echo_n " checking for grep that handles long lines and - e . . . " > & 6 ; } <nl> + if $ { ac_cv_path_GREP + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if test - z " $ GREP " ; then <nl> + ac_path_GREP_found = false <nl> + # Loop through the user ' s path and test for each of PROGNAME - LIST <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH $ PATH_SEPARATOR / usr / xpg4 / bin <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + for ac_prog in grep ggrep ; do <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + ac_path_GREP = " $ as_dir / $ ac_prog $ ac_exec_ext " <nl> + as_fn_executable_p " $ ac_path_GREP " | | continue <nl> + # Check for GNU ac_path_GREP and select it if it is found . <nl> + # Check for GNU $ ac_path_GREP <nl> + case ` " $ ac_path_GREP " - - version 2 > & 1 ` in <nl> + * GNU * ) <nl> + ac_cv_path_GREP = " $ ac_path_GREP " ac_path_GREP_found = : ; ; <nl> + * ) <nl> + ac_count = 0 <nl> + $ as_echo_n 0123456789 > " conftest . in " <nl> + while : <nl> + do <nl> + cat " conftest . in " " conftest . in " > " conftest . tmp " <nl> + mv " conftest . tmp " " conftest . in " <nl> + cp " conftest . in " " conftest . nl " <nl> + $ as_echo ' GREP ' > > " conftest . nl " <nl> + " $ ac_path_GREP " - e ' GREP $ ' - e ' - ( cannot match ) - ' < " conftest . nl " > " conftest . out " 2 > / dev / null | | break <nl> + diff " conftest . out " " conftest . nl " > / dev / null 2 > & 1 | | break <nl> + as_fn_arith $ ac_count + 1 & & ac_count = $ as_val <nl> + if test $ ac_count - gt $ { ac_path_GREP_max - 0 } ; then <nl> + # Best one so far , save it but keep looking for a better one <nl> + ac_cv_path_GREP = " $ ac_path_GREP " <nl> + ac_path_GREP_max = $ ac_count <nl> + fi <nl> + # 10 * ( 2 ^ 10 ) chars as input seems more than enough <nl> + test $ ac_count - gt 10 & & break <nl> + done <nl> + rm - f conftest . in conftest . tmp conftest . nl conftest . out ; ; <nl> + esac <nl> + <nl> + $ ac_path_GREP_found & & break 3 <nl> + done <nl> + done <nl> + done <nl> + IFS = $ as_save_IFS <nl> + if test - z " $ ac_cv_path_GREP " ; then <nl> + as_fn_error $ ? " no acceptable grep could be found in $ PATH $ PATH_SEPARATOR / usr / xpg4 / bin " " $ LINENO " 5 <nl> + fi <nl> + else <nl> + ac_cv_path_GREP = $ GREP <nl> + fi <nl> + <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_path_GREP " > & 5 <nl> + $ as_echo " $ ac_cv_path_GREP " > & 6 ; } <nl> + GREP = " $ ac_cv_path_GREP " <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for egrep " > & 5 <nl> + $ as_echo_n " checking for egrep . . . " > & 6 ; } <nl> + if $ { ac_cv_path_EGREP + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if echo a | $ GREP - E ' ( a | b ) ' > / dev / null 2 > & 1 <nl> + then ac_cv_path_EGREP = " $ GREP - E " <nl> + else <nl> + if test - z " $ EGREP " ; then <nl> + ac_path_EGREP_found = false <nl> + # Loop through the user ' s path and test for each of PROGNAME - LIST <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH $ PATH_SEPARATOR / usr / xpg4 / bin <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + for ac_prog in egrep ; do <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + ac_path_EGREP = " $ as_dir / $ ac_prog $ ac_exec_ext " <nl> + as_fn_executable_p " $ ac_path_EGREP " | | continue <nl> + # Check for GNU ac_path_EGREP and select it if it is found . <nl> + # Check for GNU $ ac_path_EGREP <nl> + case ` " $ ac_path_EGREP " - - version 2 > & 1 ` in <nl> + * GNU * ) <nl> + ac_cv_path_EGREP = " $ ac_path_EGREP " ac_path_EGREP_found = : ; ; <nl> + * ) <nl> + ac_count = 0 <nl> + $ as_echo_n 0123456789 > " conftest . in " <nl> + while : <nl> + do <nl> + cat " conftest . in " " conftest . in " > " conftest . tmp " <nl> + mv " conftest . tmp " " conftest . in " <nl> + cp " conftest . in " " conftest . nl " <nl> + $ as_echo ' EGREP ' > > " conftest . nl " <nl> + " $ ac_path_EGREP " ' EGREP $ ' < " conftest . nl " > " conftest . out " 2 > / dev / null | | break <nl> + diff " conftest . out " " conftest . nl " > / dev / null 2 > & 1 | | break <nl> + as_fn_arith $ ac_count + 1 & & ac_count = $ as_val <nl> + if test $ ac_count - gt $ { ac_path_EGREP_max - 0 } ; then <nl> + # Best one so far , save it but keep looking for a better one <nl> + ac_cv_path_EGREP = " $ ac_path_EGREP " <nl> + ac_path_EGREP_max = $ ac_count <nl> + fi <nl> + # 10 * ( 2 ^ 10 ) chars as input seems more than enough <nl> + test $ ac_count - gt 10 & & break <nl> + done <nl> + rm - f conftest . in conftest . tmp conftest . nl conftest . out ; ; <nl> + esac <nl> + <nl> + $ ac_path_EGREP_found & & break 3 <nl> + done <nl> + done <nl> + done <nl> + IFS = $ as_save_IFS <nl> + if test - z " $ ac_cv_path_EGREP " ; then <nl> + as_fn_error $ ? " no acceptable egrep could be found in $ PATH $ PATH_SEPARATOR / usr / xpg4 / bin " " $ LINENO " 5 <nl> + fi <nl> + else <nl> + ac_cv_path_EGREP = $ EGREP <nl> + fi <nl> + <nl> + fi <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_path_EGREP " > & 5 <nl> + $ as_echo " $ ac_cv_path_EGREP " > & 6 ; } <nl> + EGREP = " $ ac_cv_path_EGREP " <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for ANSI C header files " > & 5 <nl> + $ as_echo_n " checking for ANSI C header files . . . " > & 6 ; } <nl> + if $ { ac_cv_header_stdc + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # include < stdlib . h > <nl> + # include < stdarg . h > <nl> + # include < string . h > <nl> + # include < float . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + ac_cv_header_stdc = yes <nl> + else <nl> + ac_cv_header_stdc = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + <nl> + if test $ ac_cv_header_stdc = yes ; then <nl> + # SunOS 4 . x string . h does not declare mem * , contrary to ANSI . <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # include < string . h > <nl> + <nl> + _ACEOF <nl> + if ( eval " $ ac_cpp conftest . $ ac_ext " ) 2 > & 5 | <nl> + $ EGREP " memchr " > / dev / null 2 > & 1 ; then : <nl> + <nl> + else <nl> + ac_cv_header_stdc = no <nl> + fi <nl> + rm - f conftest * <nl> + <nl> + fi <nl> + <nl> + if test $ ac_cv_header_stdc = yes ; then <nl> + # ISC 2 . 0 . 2 stdlib . h does not declare free , contrary to ANSI . <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # include < stdlib . h > <nl> + <nl> + _ACEOF <nl> + if ( eval " $ ac_cpp conftest . $ ac_ext " ) 2 > & 5 | <nl> + $ EGREP " free " > / dev / null 2 > & 1 ; then : <nl> + <nl> + else <nl> + ac_cv_header_stdc = no <nl> + fi <nl> + rm - f conftest * <nl> + <nl> + fi <nl> + <nl> + if test $ ac_cv_header_stdc = yes ; then <nl> + # / bin / cc in Irix - 4 . 0 . 5 gets non - ANSI ctype macros unless using - ansi . <nl> + if test " $ cross_compiling " = yes ; then : <nl> + : <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # include < ctype . h > <nl> + # include < stdlib . h > <nl> + # if ( ( ' ' & 0x0FF ) = = 0x020 ) <nl> + # define ISLOWER ( c ) ( ' a ' < = ( c ) & & ( c ) < = ' z ' ) <nl> + # define TOUPPER ( c ) ( ISLOWER ( c ) ? ' A ' + ( ( c ) - ' a ' ) : ( c ) ) <nl> + # else <nl> + # define ISLOWER ( c ) \ <nl> + ( ( ' a ' < = ( c ) & & ( c ) < = ' i ' ) \ <nl> + | | ( ' j ' < = ( c ) & & ( c ) < = ' r ' ) \ <nl> + | | ( ' s ' < = ( c ) & & ( c ) < = ' z ' ) ) <nl> + # define TOUPPER ( c ) ( ISLOWER ( c ) ? ( ( c ) | 0x40 ) : ( c ) ) <nl> + # endif <nl> + <nl> + # define XOR ( e , f ) ( ( ( e ) & & ! ( f ) ) | | ( ! ( e ) & & ( f ) ) ) <nl> + int <nl> + main ( ) <nl> + { <nl> + int i ; <nl> + for ( i = 0 ; i < 256 ; i + + ) <nl> + if ( XOR ( islower ( i ) , ISLOWER ( i ) ) <nl> + | | toupper ( i ) ! = TOUPPER ( i ) ) <nl> + return 2 ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_run " $ LINENO " ; then : <nl> + <nl> + else <nl> + ac_cv_header_stdc = no <nl> + fi <nl> + rm - f core * . core core . conftest . * gmon . out bb . out conftest $ ac_exeext \ <nl> + conftest . $ ac_objext conftest . beam conftest . $ ac_ext <nl> + fi <nl> + <nl> + fi <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_header_stdc " > & 5 <nl> + $ as_echo " $ ac_cv_header_stdc " > & 6 ; } <nl> + if test $ ac_cv_header_stdc = yes ; then <nl> + <nl> + $ as_echo " # define STDC_HEADERS 1 " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + # On IRIX 5 . 3 , sys / types and inttypes . h are conflicting . <nl> + for ac_header in sys / types . h sys / stat . h stdlib . h string . h memory . h strings . h \ <nl> + inttypes . h stdint . h unistd . h <nl> + do : <nl> + as_ac_Header = ` $ as_echo " ac_cv_header_ $ ac_header " | $ as_tr_sh ` <nl> + ac_fn_c_check_header_compile " $ LINENO " " $ ac_header " " $ as_ac_Header " " $ ac_includes_default <nl> + " <nl> + if eval test \ " x \ $ " $ as_ac_Header " \ " = x " yes " ; then : <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define ` $ as_echo " HAVE_ $ ac_header " | $ as_tr_cpp ` 1 <nl> + _ACEOF <nl> + <nl> + fi <nl> + <nl> + done <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether byte ordering is bigendian " > & 5 <nl> + $ as_echo_n " checking whether byte ordering is bigendian . . . " > & 6 ; } <nl> + if $ { ac_cv_c_bigendian + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + ac_cv_c_bigendian = unknown <nl> + # See if we ' re dealing with a universal compiler . <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # ifndef __APPLE_CC__ <nl> + not a universal capable compiler <nl> + # endif <nl> + typedef int dummy ; <nl> + <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + <nl> + # Check for potential - arch flags . It is not universal unless <nl> + # there are at least two - arch flags with different values . <nl> + ac_arch = <nl> + ac_prev = <nl> + for ac_word in $ CC $ CFLAGS $ CPPFLAGS $ LDFLAGS ; do <nl> + if test - n " $ ac_prev " ; then <nl> + case $ ac_word in <nl> + i ? 86 | x86_64 | ppc | ppc64 ) <nl> + if test - z " $ ac_arch " | | test " $ ac_arch " = " $ ac_word " ; then <nl> + ac_arch = $ ac_word <nl> + else <nl> + ac_cv_c_bigendian = universal <nl> + break <nl> + fi <nl> + ; ; <nl> + esac <nl> + ac_prev = <nl> + elif test " x $ ac_word " = " x - arch " ; then <nl> + ac_prev = arch <nl> + fi <nl> + done <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test $ ac_cv_c_bigendian = unknown ; then <nl> + # See if sys / param . h defines the BYTE_ORDER macro . <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # include < sys / types . h > <nl> + # include < sys / param . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + # if ! ( defined BYTE_ORDER & & defined BIG_ENDIAN \ <nl> + & & defined LITTLE_ENDIAN & & BYTE_ORDER & & BIG_ENDIAN \ <nl> + & & LITTLE_ENDIAN ) <nl> + bogus endian macros <nl> + # endif <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + # It does ; now see whether it defined to BIG_ENDIAN or not . <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # include < sys / types . h > <nl> + # include < sys / param . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + # if BYTE_ORDER ! = BIG_ENDIAN <nl> + not big endian <nl> + # endif <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + ac_cv_c_bigendian = yes <nl> + else <nl> + ac_cv_c_bigendian = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + fi <nl> + if test $ ac_cv_c_bigendian = unknown ; then <nl> + # See if < limits . h > defines _LITTLE_ENDIAN or _BIG_ENDIAN ( e . g . , Solaris ) . <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # include < limits . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + # if ! ( defined _LITTLE_ENDIAN | | defined _BIG_ENDIAN ) <nl> + bogus endian macros <nl> + # endif <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + # It does ; now see whether it defined to _BIG_ENDIAN or not . <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # include < limits . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + # ifndef _BIG_ENDIAN <nl> + not big endian <nl> + # endif <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + ac_cv_c_bigendian = yes <nl> + else <nl> + ac_cv_c_bigendian = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + fi <nl> + if test $ ac_cv_c_bigendian = unknown ; then <nl> + # Compile a test program . <nl> + if test " $ cross_compiling " = yes ; then : <nl> + # Try to guess by grepping values from an object file . <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + short int ascii_mm [ ] = <nl> + { 0x4249 , 0x4765 , 0x6E44 , 0x6961 , 0x6E53 , 0x7953 , 0 } ; <nl> + short int ascii_ii [ ] = <nl> + { 0x694C , 0x5454 , 0x656C , 0x6E45 , 0x6944 , 0x6E61 , 0 } ; <nl> + int use_ascii ( int i ) { <nl> + return ascii_mm [ i ] + ascii_ii [ i ] ; <nl> + } <nl> + short int ebcdic_ii [ ] = <nl> + { 0x89D3 , 0xE3E3 , 0x8593 , 0x95C5 , 0x89C4 , 0x9581 , 0 } ; <nl> + short int ebcdic_mm [ ] = <nl> + { 0xC2C9 , 0xC785 , 0x95C4 , 0x8981 , 0x95E2 , 0xA8E2 , 0 } ; <nl> + int use_ebcdic ( int i ) { <nl> + return ebcdic_mm [ i ] + ebcdic_ii [ i ] ; <nl> + } <nl> + extern int foo ; <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + return use_ascii ( foo ) = = use_ebcdic ( foo ) ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + if grep BIGenDianSyS conftest . $ ac_objext > / dev / null ; then <nl> + ac_cv_c_bigendian = yes <nl> + fi <nl> + if grep LiTTleEnDian conftest . $ ac_objext > / dev / null ; then <nl> + if test " $ ac_cv_c_bigendian " = unknown ; then <nl> + ac_cv_c_bigendian = no <nl> + else <nl> + # finding both strings is unlikely to happen , but who knows ? <nl> + ac_cv_c_bigendian = unknown <nl> + fi <nl> + fi <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + $ ac_includes_default <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + / * Are we little or big endian ? From Harbison & Steele . * / <nl> + union <nl> + { <nl> + long int l ; <nl> + char c [ sizeof ( long int ) ] ; <nl> + } u ; <nl> + u . l = 1 ; <nl> + return u . c [ sizeof ( long int ) - 1 ] = = 1 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_run " $ LINENO " ; then : <nl> + ac_cv_c_bigendian = no <nl> + else <nl> + ac_cv_c_bigendian = yes <nl> + fi <nl> + rm - f core * . core core . conftest . * gmon . out bb . out conftest $ ac_exeext \ <nl> + conftest . $ ac_objext conftest . beam conftest . $ ac_ext <nl> + fi <nl> + <nl> + fi <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_c_bigendian " > & 5 <nl> + $ as_echo " $ ac_cv_c_bigendian " > & 6 ; } <nl> + case $ ac_cv_c_bigendian in # ( <nl> + yes ) <nl> + ac_cv_big_endian = 1 ; ; # ( <nl> + no ) <nl> + ac_cv_big_endian = 0 ; ; # ( <nl> + universal ) <nl> + <nl> + $ as_echo " # define AC_APPLE_UNIVERSAL_BUILD 1 " > > confdefs . h <nl> + <nl> + ; ; # ( <nl> + * ) <nl> + as_fn_error $ ? " unknown endianness <nl> + presetting ac_cv_c_bigendian = no ( or yes ) will help " " $ LINENO " 5 ; ; <nl> + esac <nl> + <nl> + if test " x $ { ac_cv_big_endian } " = " x1 " ; then <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define JEMALLOC_BIG_ENDIAN <nl> + _ACEOF <nl> + <nl> + fi <nl> + <nl> + if test " x $ { je_cv_msvc } " = " xyes " - a " x $ { ac_cv_header_inttypes_h } " = " xno " ; then <nl> + T_APPEND_V = - I $ { srcdir } / include / msvc_compat / C99 <nl> + if test " x $ { CPPFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CPPFLAGS = " $ { CPPFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CPPFLAGS = " $ { CPPFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + fi <nl> + <nl> + if test " x $ { je_cv_msvc } " = " xyes " ; then <nl> + LG_SIZEOF_PTR = LG_SIZEOF_PTR_WIN <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : Using a predefined value for sizeof ( void * ) : 4 for 32 - bit , 8 for 64 - bit " > & 5 <nl> + $ as_echo " Using a predefined value for sizeof ( void * ) : 4 for 32 - bit , 8 for 64 - bit " > & 6 ; } <nl> + else <nl> + # The cast to long int works around a bug in the HP C Compiler <nl> + # version HP92453 - 01 B . 11 . 11 . 23709 . GP , which incorrectly rejects <nl> + # declarations like ` int a3 [ [ ( sizeof ( unsigned char ) ) > = 0 ] ] ; ' . <nl> + # This bug is HP SR number 8606223364 . <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking size of void * " > & 5 <nl> + $ as_echo_n " checking size of void * . . . " > & 6 ; } <nl> + if $ { ac_cv_sizeof_void_p + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if ac_fn_c_compute_int " $ LINENO " " ( long int ) ( sizeof ( void * ) ) " " ac_cv_sizeof_void_p " " $ ac_includes_default " ; then : <nl> + <nl> + else <nl> + if test " $ ac_cv_type_void_p " = yes ; then <nl> + { { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : in \ ` $ ac_pwd ' : " > & 5 <nl> + $ as_echo " $ as_me : error : in \ ` $ ac_pwd ' : " > & 2 ; } <nl> + as_fn_error 77 " cannot compute sizeof ( void * ) <nl> + See \ ` config . log ' for more details " " $ LINENO " 5 ; } <nl> + else <nl> + ac_cv_sizeof_void_p = 0 <nl> + fi <nl> + fi <nl> + <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_sizeof_void_p " > & 5 <nl> + $ as_echo " $ ac_cv_sizeof_void_p " > & 6 ; } <nl> + <nl> + <nl> + <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define SIZEOF_VOID_P $ ac_cv_sizeof_void_p <nl> + _ACEOF <nl> + <nl> + <nl> + if test " x $ { ac_cv_sizeof_void_p } " = " x8 " ; then <nl> + LG_SIZEOF_PTR = 3 <nl> + elif test " x $ { ac_cv_sizeof_void_p } " = " x4 " ; then <nl> + LG_SIZEOF_PTR = 2 <nl> + else <nl> + as_fn_error $ ? " Unsupported pointer size : $ { ac_cv_sizeof_void_p } " " $ LINENO " 5 <nl> + fi <nl> + fi <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define LG_SIZEOF_PTR $ LG_SIZEOF_PTR <nl> + _ACEOF <nl> + <nl> + <nl> + # The cast to long int works around a bug in the HP C Compiler <nl> + # version HP92453 - 01 B . 11 . 11 . 23709 . GP , which incorrectly rejects <nl> + # declarations like ` int a3 [ [ ( sizeof ( unsigned char ) ) > = 0 ] ] ; ' . <nl> + # This bug is HP SR number 8606223364 . <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking size of int " > & 5 <nl> + $ as_echo_n " checking size of int . . . " > & 6 ; } <nl> + if $ { ac_cv_sizeof_int + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if ac_fn_c_compute_int " $ LINENO " " ( long int ) ( sizeof ( int ) ) " " ac_cv_sizeof_int " " $ ac_includes_default " ; then : <nl> + <nl> + else <nl> + if test " $ ac_cv_type_int " = yes ; then <nl> + { { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : in \ ` $ ac_pwd ' : " > & 5 <nl> + $ as_echo " $ as_me : error : in \ ` $ ac_pwd ' : " > & 2 ; } <nl> + as_fn_error 77 " cannot compute sizeof ( int ) <nl> + See \ ` config . log ' for more details " " $ LINENO " 5 ; } <nl> + else <nl> + ac_cv_sizeof_int = 0 <nl> + fi <nl> + fi <nl> + <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_sizeof_int " > & 5 <nl> + $ as_echo " $ ac_cv_sizeof_int " > & 6 ; } <nl> + <nl> + <nl> + <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define SIZEOF_INT $ ac_cv_sizeof_int <nl> + _ACEOF <nl> + <nl> + <nl> + if test " x $ { ac_cv_sizeof_int } " = " x8 " ; then <nl> + LG_SIZEOF_INT = 3 <nl> + elif test " x $ { ac_cv_sizeof_int } " = " x4 " ; then <nl> + LG_SIZEOF_INT = 2 <nl> + else <nl> + as_fn_error $ ? " Unsupported int size : $ { ac_cv_sizeof_int } " " $ LINENO " 5 <nl> + fi <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define LG_SIZEOF_INT $ LG_SIZEOF_INT <nl> + _ACEOF <nl> + <nl> + <nl> + # The cast to long int works around a bug in the HP C Compiler <nl> + # version HP92453 - 01 B . 11 . 11 . 23709 . GP , which incorrectly rejects <nl> + # declarations like ` int a3 [ [ ( sizeof ( unsigned char ) ) > = 0 ] ] ; ' . <nl> + # This bug is HP SR number 8606223364 . <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking size of long " > & 5 <nl> + $ as_echo_n " checking size of long . . . " > & 6 ; } <nl> + if $ { ac_cv_sizeof_long + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if ac_fn_c_compute_int " $ LINENO " " ( long int ) ( sizeof ( long ) ) " " ac_cv_sizeof_long " " $ ac_includes_default " ; then : <nl> + <nl> + else <nl> + if test " $ ac_cv_type_long " = yes ; then <nl> + { { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : in \ ` $ ac_pwd ' : " > & 5 <nl> + $ as_echo " $ as_me : error : in \ ` $ ac_pwd ' : " > & 2 ; } <nl> + as_fn_error 77 " cannot compute sizeof ( long ) <nl> + See \ ` config . log ' for more details " " $ LINENO " 5 ; } <nl> + else <nl> + ac_cv_sizeof_long = 0 <nl> + fi <nl> + fi <nl> + <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_sizeof_long " > & 5 <nl> + $ as_echo " $ ac_cv_sizeof_long " > & 6 ; } <nl> + <nl> + <nl> + <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define SIZEOF_LONG $ ac_cv_sizeof_long <nl> + _ACEOF <nl> + <nl> + <nl> + if test " x $ { ac_cv_sizeof_long } " = " x8 " ; then <nl> + LG_SIZEOF_LONG = 3 <nl> + elif test " x $ { ac_cv_sizeof_long } " = " x4 " ; then <nl> + LG_SIZEOF_LONG = 2 <nl> + else <nl> + as_fn_error $ ? " Unsupported long size : $ { ac_cv_sizeof_long } " " $ LINENO " 5 <nl> + fi <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define LG_SIZEOF_LONG $ LG_SIZEOF_LONG <nl> + _ACEOF <nl> + <nl> + <nl> + # The cast to long int works around a bug in the HP C Compiler <nl> + # version HP92453 - 01 B . 11 . 11 . 23709 . GP , which incorrectly rejects <nl> + # declarations like ` int a3 [ [ ( sizeof ( unsigned char ) ) > = 0 ] ] ; ' . <nl> + # This bug is HP SR number 8606223364 . <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking size of long long " > & 5 <nl> + $ as_echo_n " checking size of long long . . . " > & 6 ; } <nl> + if $ { ac_cv_sizeof_long_long + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if ac_fn_c_compute_int " $ LINENO " " ( long int ) ( sizeof ( long long ) ) " " ac_cv_sizeof_long_long " " $ ac_includes_default " ; then : <nl> + <nl> + else <nl> + if test " $ ac_cv_type_long_long " = yes ; then <nl> + { { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : in \ ` $ ac_pwd ' : " > & 5 <nl> + $ as_echo " $ as_me : error : in \ ` $ ac_pwd ' : " > & 2 ; } <nl> + as_fn_error 77 " cannot compute sizeof ( long long ) <nl> + See \ ` config . log ' for more details " " $ LINENO " 5 ; } <nl> + else <nl> + ac_cv_sizeof_long_long = 0 <nl> + fi <nl> + fi <nl> + <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_sizeof_long_long " > & 5 <nl> + $ as_echo " $ ac_cv_sizeof_long_long " > & 6 ; } <nl> + <nl> + <nl> + <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define SIZEOF_LONG_LONG $ ac_cv_sizeof_long_long <nl> + _ACEOF <nl> + <nl> + <nl> + if test " x $ { ac_cv_sizeof_long_long } " = " x8 " ; then <nl> + LG_SIZEOF_LONG_LONG = 3 <nl> + elif test " x $ { ac_cv_sizeof_long_long } " = " x4 " ; then <nl> + LG_SIZEOF_LONG_LONG = 2 <nl> + else <nl> + as_fn_error $ ? " Unsupported long long size : $ { ac_cv_sizeof_long_long } " " $ LINENO " 5 <nl> + fi <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define LG_SIZEOF_LONG_LONG $ LG_SIZEOF_LONG_LONG <nl> + _ACEOF <nl> + <nl> + <nl> + # The cast to long int works around a bug in the HP C Compiler <nl> + # version HP92453 - 01 B . 11 . 11 . 23709 . GP , which incorrectly rejects <nl> + # declarations like ` int a3 [ [ ( sizeof ( unsigned char ) ) > = 0 ] ] ; ' . <nl> + # This bug is HP SR number 8606223364 . <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking size of intmax_t " > & 5 <nl> + $ as_echo_n " checking size of intmax_t . . . " > & 6 ; } <nl> + if $ { ac_cv_sizeof_intmax_t + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if ac_fn_c_compute_int " $ LINENO " " ( long int ) ( sizeof ( intmax_t ) ) " " ac_cv_sizeof_intmax_t " " $ ac_includes_default " ; then : <nl> + <nl> + else <nl> + if test " $ ac_cv_type_intmax_t " = yes ; then <nl> + { { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : in \ ` $ ac_pwd ' : " > & 5 <nl> + $ as_echo " $ as_me : error : in \ ` $ ac_pwd ' : " > & 2 ; } <nl> + as_fn_error 77 " cannot compute sizeof ( intmax_t ) <nl> + See \ ` config . log ' for more details " " $ LINENO " 5 ; } <nl> + else <nl> + ac_cv_sizeof_intmax_t = 0 <nl> + fi <nl> + fi <nl> + <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_sizeof_intmax_t " > & 5 <nl> + $ as_echo " $ ac_cv_sizeof_intmax_t " > & 6 ; } <nl> + <nl> + <nl> + <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define SIZEOF_INTMAX_T $ ac_cv_sizeof_intmax_t <nl> + _ACEOF <nl> + <nl> + <nl> + if test " x $ { ac_cv_sizeof_intmax_t } " = " x16 " ; then <nl> + LG_SIZEOF_INTMAX_T = 4 <nl> + elif test " x $ { ac_cv_sizeof_intmax_t } " = " x8 " ; then <nl> + LG_SIZEOF_INTMAX_T = 3 <nl> + elif test " x $ { ac_cv_sizeof_intmax_t } " = " x4 " ; then <nl> + LG_SIZEOF_INTMAX_T = 2 <nl> + else <nl> + as_fn_error $ ? " Unsupported intmax_t size : $ { ac_cv_sizeof_intmax_t } " " $ LINENO " 5 <nl> + fi <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define LG_SIZEOF_INTMAX_T $ LG_SIZEOF_INTMAX_T <nl> + _ACEOF <nl> + <nl> + <nl> + # Make sure we can run config . sub . <nl> + $ SHELL " $ ac_aux_dir / config . sub " sun4 > / dev / null 2 > & 1 | | <nl> + as_fn_error $ ? " cannot run $ SHELL $ ac_aux_dir / config . sub " " $ LINENO " 5 <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking build system type " > & 5 <nl> + $ as_echo_n " checking build system type . . . " > & 6 ; } <nl> + if $ { ac_cv_build + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + ac_build_alias = $ build_alias <nl> + test " x $ ac_build_alias " = x & & <nl> + ac_build_alias = ` $ SHELL " $ ac_aux_dir / config . guess " ` <nl> + test " x $ ac_build_alias " = x & & <nl> + as_fn_error $ ? " cannot guess build type ; you must specify one " " $ LINENO " 5 <nl> + ac_cv_build = ` $ SHELL " $ ac_aux_dir / config . sub " $ ac_build_alias ` | | <nl> + as_fn_error $ ? " $ SHELL $ ac_aux_dir / config . sub $ ac_build_alias failed " " $ LINENO " 5 <nl> + <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_build " > & 5 <nl> + $ as_echo " $ ac_cv_build " > & 6 ; } <nl> + case $ ac_cv_build in <nl> + * - * - * ) ; ; <nl> + * ) as_fn_error $ ? " invalid value of canonical build " " $ LINENO " 5 ; ; <nl> + esac <nl> + build = $ ac_cv_build <nl> + ac_save_IFS = $ IFS ; IFS = ' - ' <nl> + set x $ ac_cv_build <nl> + shift <nl> + build_cpu = $ 1 <nl> + build_vendor = $ 2 <nl> + shift ; shift <nl> + # Remember , the first character of IFS is used to create $ * , <nl> + # except with old shells : <nl> + build_os = $ * <nl> + IFS = $ ac_save_IFS <nl> + case $ build_os in * \ * ) build_os = ` echo " $ build_os " | sed ' s / / - / g ' ` ; ; esac <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking host system type " > & 5 <nl> + $ as_echo_n " checking host system type . . . " > & 6 ; } <nl> + if $ { ac_cv_host + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if test " x $ host_alias " = x ; then <nl> + ac_cv_host = $ ac_cv_build <nl> + else <nl> + ac_cv_host = ` $ SHELL " $ ac_aux_dir / config . sub " $ host_alias ` | | <nl> + as_fn_error $ ? " $ SHELL $ ac_aux_dir / config . sub $ host_alias failed " " $ LINENO " 5 <nl> + fi <nl> + <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_host " > & 5 <nl> + $ as_echo " $ ac_cv_host " > & 6 ; } <nl> + case $ ac_cv_host in <nl> + * - * - * ) ; ; <nl> + * ) as_fn_error $ ? " invalid value of canonical host " " $ LINENO " 5 ; ; <nl> + esac <nl> + host = $ ac_cv_host <nl> + ac_save_IFS = $ IFS ; IFS = ' - ' <nl> + set x $ ac_cv_host <nl> + shift <nl> + host_cpu = $ 1 <nl> + host_vendor = $ 2 <nl> + shift ; shift <nl> + # Remember , the first character of IFS is used to create $ * , <nl> + # except with old shells : <nl> + host_os = $ * <nl> + IFS = $ ac_save_IFS <nl> + case $ host_os in * \ * ) host_os = ` echo " $ host_os " | sed ' s / / - / g ' ` ; ; esac <nl> + <nl> + <nl> + CPU_SPINWAIT = " " <nl> + case " $ { host_cpu } " in <nl> + i686 | x86_64 ) <nl> + if test " x $ { je_cv_msvc } " = " xyes " ; then <nl> + if $ { je_cv_pause_msvc + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether pause instruction MSVC is compilable " > & 5 <nl> + $ as_echo_n " checking whether pause instruction MSVC is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_pause_msvc + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + _mm_pause ( ) ; return 0 ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_pause_msvc = yes <nl> + else <nl> + je_cv_pause_msvc = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_pause_msvc " > & 5 <nl> + $ as_echo " $ je_cv_pause_msvc " > & 6 ; } <nl> + <nl> + fi <nl> + <nl> + if test " x $ { je_cv_pause_msvc } " = " xyes " ; then <nl> + CPU_SPINWAIT = ' _mm_pause ( ) ' <nl> + fi <nl> + else <nl> + if $ { je_cv_pause + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether pause instruction is compilable " > & 5 <nl> + $ as_echo_n " checking whether pause instruction is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_pause + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + __asm__ volatile ( " pause " ) ; return 0 ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_pause = yes <nl> + else <nl> + je_cv_pause = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_pause " > & 5 <nl> + $ as_echo " $ je_cv_pause " > & 6 ; } <nl> + <nl> + fi <nl> + <nl> + if test " x $ { je_cv_pause } " = " xyes " ; then <nl> + CPU_SPINWAIT = ' __asm__ volatile ( " pause " ) ' <nl> + fi <nl> + fi <nl> + ; ; <nl> + powerpc ) <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define HAVE_ALTIVEC <nl> + _ACEOF <nl> + <nl> + ; ; <nl> + * ) <nl> + ; ; <nl> + esac <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define CPU_SPINWAIT $ CPU_SPINWAIT <nl> + _ACEOF <nl> + <nl> + <nl> + case " $ { host_cpu } " in <nl> + aarch64 ) <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking number of significant virtual address bits " > & 5 <nl> + $ as_echo_n " checking number of significant virtual address bits . . . " > & 6 ; } <nl> + LG_VADDR = 48 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ LG_VADDR " > & 5 <nl> + $ as_echo " $ LG_VADDR " > & 6 ; } <nl> + ; ; <nl> + x86_64 ) <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking number of significant virtual address bits " > & 5 <nl> + $ as_echo_n " checking number of significant virtual address bits . . . " > & 6 ; } <nl> + if $ { je_cv_lg_vaddr + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if test " $ cross_compiling " = yes ; then : <nl> + je_cv_lg_vaddr = 57 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < stdio . h > <nl> + # ifdef _WIN32 <nl> + # include < limits . h > <nl> + # include < intrin . h > <nl> + typedef unsigned __int32 uint32_t ; <nl> + # else <nl> + # include < stdint . h > <nl> + # endif <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + uint32_t r [ 4 ] ; <nl> + uint32_t eax_in = 0x80000008U ; <nl> + # ifdef _WIN32 <nl> + __cpuid ( ( int * ) r , ( int ) eax_in ) ; <nl> + # else <nl> + asm volatile ( " cpuid " <nl> + : " = a " ( r [ 0 ] ) , " = b " ( r [ 1 ] ) , " = c " ( r [ 2 ] ) , " = d " ( r [ 3 ] ) <nl> + : " a " ( eax_in ) , " c " ( 0 ) <nl> + ) ; <nl> + # endif <nl> + uint32_t eax_out = r [ 0 ] ; <nl> + uint32_t vaddr = ( ( eax_out & 0x0000ff00U ) > > 8 ) ; <nl> + FILE * f = fopen ( " conftest . out " , " w " ) ; <nl> + if ( f = = NULL ) { <nl> + return 1 ; <nl> + } <nl> + fprintf ( f , " % u " , vaddr ) ; <nl> + fclose ( f ) ; <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_run " $ LINENO " ; then : <nl> + je_cv_lg_vaddr = ` cat conftest . out ` <nl> + else <nl> + je_cv_lg_vaddr = error <nl> + fi <nl> + rm - f core * . core core . conftest . * gmon . out bb . out conftest $ ac_exeext \ <nl> + conftest . $ ac_objext conftest . beam conftest . $ ac_ext <nl> + fi <nl> + <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_lg_vaddr " > & 5 <nl> + $ as_echo " $ je_cv_lg_vaddr " > & 6 ; } <nl> + if test " x $ { je_cv_lg_vaddr } " ! = " x " ; then <nl> + LG_VADDR = " $ { je_cv_lg_vaddr } " <nl> + fi <nl> + if test " x $ { LG_VADDR } " ! = " xerror " ; then <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define LG_VADDR $ LG_VADDR <nl> + _ACEOF <nl> + <nl> + else <nl> + as_fn_error $ ? " cannot determine number of significant virtual address bits " " $ LINENO " 5 <nl> + fi <nl> + ; ; <nl> + * ) <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking number of significant virtual address bits " > & 5 <nl> + $ as_echo_n " checking number of significant virtual address bits . . . " > & 6 ; } <nl> + if test " x $ { LG_SIZEOF_PTR } " = " x3 " ; then <nl> + LG_VADDR = 64 <nl> + elif test " x $ { LG_SIZEOF_PTR } " = " x2 " ; then <nl> + LG_VADDR = 32 <nl> + elif test " x $ { LG_SIZEOF_PTR } " = " xLG_SIZEOF_PTR_WIN " ; then <nl> + LG_VADDR = " ( 1U < < ( LG_SIZEOF_PTR_WIN + 3 ) ) " <nl> + else <nl> + as_fn_error $ ? " Unsupported lg ( pointer size ) : $ { LG_SIZEOF_PTR } " " $ LINENO " 5 <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ LG_VADDR " > & 5 <nl> + $ as_echo " $ LG_VADDR " > & 6 ; } <nl> + ; ; <nl> + esac <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define LG_VADDR $ LG_VADDR <nl> + _ACEOF <nl> + <nl> + <nl> + LD_PRELOAD_VAR = " LD_PRELOAD " <nl> + so = " so " <nl> + importlib = " $ { so } " <nl> + o = " $ ac_objext " <nl> + a = " a " <nl> + exe = " $ ac_exeext " <nl> + libprefix = " lib " <nl> + link_whole_archive = " 0 " <nl> + DSO_LDFLAGS = ' - shared - Wl , - soname , $ ( @ F ) ' <nl> + RPATH = ' - Wl , - rpath , $ ( 1 ) ' <nl> + SOREV = " $ { so } . $ { rev } " <nl> + PIC_CFLAGS = ' - fPIC - DPIC ' <nl> + CTARGET = ' - o $ @ ' <nl> + LDTARGET = ' - o $ @ ' <nl> + TEST_LD_MODE = <nl> + EXTRA_LDFLAGS = <nl> + ARFLAGS = ' crus ' <nl> + AROUT = ' $ @ ' <nl> + CC_MM = 1 <nl> + <nl> + if test " x $ je_cv_cray_prgenv_wrapper " = " xyes " ; then <nl> + TEST_LD_MODE = ' - dynamic ' <nl> + fi <nl> + <nl> + if test " x $ { je_cv_cray } " = " xyes " ; then <nl> + CC_MM = <nl> + fi <nl> + <nl> + <nl> + <nl> + <nl> + if test - n " $ ac_tool_prefix " ; then <nl> + # Extract the first word of " $ { ac_tool_prefix } ar " , so it can be a program name with args . <nl> + set dummy $ { ac_tool_prefix } ar ; ac_word = $ 2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ ac_word " > & 5 <nl> + $ as_echo_n " checking for $ ac_word . . . " > & 6 ; } <nl> + if $ { ac_cv_prog_AR + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if test - n " $ AR " ; then <nl> + ac_cv_prog_AR = " $ AR " # Let the user override the test . <nl> + else <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + if as_fn_executable_p " $ as_dir / $ ac_word $ ac_exec_ext " ; then <nl> + ac_cv_prog_AR = " $ { ac_tool_prefix } ar " <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : found $ as_dir / $ ac_word $ ac_exec_ext " > & 5 <nl> + break 2 <nl> + fi <nl> + done <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + fi <nl> + fi <nl> + AR = $ ac_cv_prog_AR <nl> + if test - n " $ AR " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ AR " > & 5 <nl> + $ as_echo " $ AR " > & 6 ; } <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + fi <nl> + <nl> + <nl> + fi <nl> + if test - z " $ ac_cv_prog_AR " ; then <nl> + ac_ct_AR = $ AR <nl> + # Extract the first word of " ar " , so it can be a program name with args . <nl> + set dummy ar ; ac_word = $ 2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ ac_word " > & 5 <nl> + $ as_echo_n " checking for $ ac_word . . . " > & 6 ; } <nl> + if $ { ac_cv_prog_ac_ct_AR + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if test - n " $ ac_ct_AR " ; then <nl> + ac_cv_prog_ac_ct_AR = " $ ac_ct_AR " # Let the user override the test . <nl> + else <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + if as_fn_executable_p " $ as_dir / $ ac_word $ ac_exec_ext " ; then <nl> + ac_cv_prog_ac_ct_AR = " ar " <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : found $ as_dir / $ ac_word $ ac_exec_ext " > & 5 <nl> + break 2 <nl> + fi <nl> + done <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + fi <nl> + fi <nl> + ac_ct_AR = $ ac_cv_prog_ac_ct_AR <nl> + if test - n " $ ac_ct_AR " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_ct_AR " > & 5 <nl> + $ as_echo " $ ac_ct_AR " > & 6 ; } <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + fi <nl> + <nl> + if test " x $ ac_ct_AR " = x ; then <nl> + AR = " : " <nl> + else <nl> + case $ cross_compiling : $ ac_tool_warned in <nl> + yes : ) <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : using cross tools not prefixed with host triplet " > & 5 <nl> + $ as_echo " $ as_me : WARNING : using cross tools not prefixed with host triplet " > & 2 ; } <nl> + ac_tool_warned = yes ; ; <nl> + esac <nl> + AR = $ ac_ct_AR <nl> + fi <nl> + else <nl> + AR = " $ ac_cv_prog_AR " <nl> + fi <nl> + <nl> + <nl> + default_munmap = " 1 " <nl> + maps_coalesce = " 1 " <nl> + case " $ { host } " in <nl> + * - * - darwin * | * - * - ios * ) <nl> + abi = " macho " <nl> + RPATH = " " <nl> + LD_PRELOAD_VAR = " DYLD_INSERT_LIBRARIES " <nl> + so = " dylib " <nl> + importlib = " $ { so } " <nl> + force_tls = " 0 " <nl> + DSO_LDFLAGS = ' - shared - Wl , - install_name , $ ( LIBDIR ) / $ ( @ F ) ' <nl> + SOREV = " $ { rev } . $ { so } " <nl> + sbrk_deprecated = " 1 " <nl> + ; ; <nl> + * - * - freebsd * ) <nl> + abi = " elf " <nl> + $ as_echo " # define JEMALLOC_SYSCTL_VM_OVERCOMMIT " > > confdefs . h <nl> + <nl> + force_lazy_lock = " 1 " <nl> + ; ; <nl> + * - * - dragonfly * ) <nl> + abi = " elf " <nl> + ; ; <nl> + * - * - openbsd * ) <nl> + abi = " elf " <nl> + force_tls = " 0 " <nl> + ; ; <nl> + * - * - bitrig * ) <nl> + abi = " elf " <nl> + ; ; <nl> + * - * - linux - android ) <nl> + T_APPEND_V = - D_GNU_SOURCE <nl> + if test " x $ { CPPFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CPPFLAGS = " $ { CPPFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CPPFLAGS = " $ { CPPFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + abi = " elf " <nl> + $ as_echo " # define JEMALLOC_HAS_ALLOCA_H 1 " > > confdefs . h <nl> + <nl> + $ as_echo " # define JEMALLOC_PROC_SYS_VM_OVERCOMMIT_MEMORY " > > confdefs . h <nl> + <nl> + $ as_echo " # define JEMALLOC_THREADED_INIT " > > confdefs . h <nl> + <nl> + $ as_echo " # define JEMALLOC_C11ATOMICS 1 " > > confdefs . h <nl> + <nl> + force_tls = " 0 " <nl> + default_munmap = " 0 " <nl> + ; ; <nl> + * - * - linux * | * - * - kfreebsd * ) <nl> + T_APPEND_V = - D_GNU_SOURCE <nl> + if test " x $ { CPPFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CPPFLAGS = " $ { CPPFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CPPFLAGS = " $ { CPPFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + abi = " elf " <nl> + $ as_echo " # define JEMALLOC_HAS_ALLOCA_H 1 " > > confdefs . h <nl> + <nl> + $ as_echo " # define JEMALLOC_PROC_SYS_VM_OVERCOMMIT_MEMORY " > > confdefs . h <nl> + <nl> + $ as_echo " # define JEMALLOC_THREADED_INIT " > > confdefs . h <nl> + <nl> + $ as_echo " # define JEMALLOC_USE_CXX_THROW " > > confdefs . h <nl> + <nl> + default_munmap = " 0 " <nl> + ; ; <nl> + * - * - netbsd * ) <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking ABI " > & 5 <nl> + $ as_echo_n " checking ABI . . . " > & 6 ; } <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # ifdef __ELF__ <nl> + / * ELF * / <nl> + # else <nl> + # error aout <nl> + # endif <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + abi = " elf " <nl> + else <nl> + abi = " aout " <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ abi " > & 5 <nl> + $ as_echo " $ abi " > & 6 ; } <nl> + ; ; <nl> + * - * - solaris2 * ) <nl> + abi = " elf " <nl> + RPATH = ' - Wl , - R , $ ( 1 ) ' <nl> + T_APPEND_V = - D_POSIX_PTHREAD_SEMANTICS <nl> + if test " x $ { CPPFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CPPFLAGS = " $ { CPPFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CPPFLAGS = " $ { CPPFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + T_APPEND_V = - lposix4 - lsocket - lnsl <nl> + if test " x $ { LIBS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + LIBS = " $ { LIBS } $ { T_APPEND_V } " <nl> + else <nl> + LIBS = " $ { LIBS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + ; ; <nl> + * - ibm - aix * ) <nl> + if " $ LG_SIZEOF_PTR " = " 8 " ; then <nl> + LD_PRELOAD_VAR = " LDR_PRELOAD64 " <nl> + else <nl> + LD_PRELOAD_VAR = " LDR_PRELOAD " <nl> + fi <nl> + abi = " xcoff " <nl> + ; ; <nl> + * - * - mingw * | * - * - cygwin * ) <nl> + abi = " pecoff " <nl> + force_tls = " 0 " <nl> + maps_coalesce = " 0 " <nl> + RPATH = " " <nl> + so = " dll " <nl> + if test " x $ je_cv_msvc " = " xyes " ; then <nl> + importlib = " lib " <nl> + DSO_LDFLAGS = " - LD " <nl> + EXTRA_LDFLAGS = " - link - DEBUG " <nl> + CTARGET = ' - Fo $ @ ' <nl> + LDTARGET = ' - Fe $ @ ' <nl> + AR = ' lib ' <nl> + ARFLAGS = ' - nologo - out : ' <nl> + AROUT = ' $ @ ' <nl> + CC_MM = <nl> + else <nl> + importlib = " $ { so } " <nl> + DSO_LDFLAGS = " - shared " <nl> + link_whole_archive = " 1 " <nl> + fi <nl> + a = " lib " <nl> + libprefix = " " <nl> + SOREV = " $ { so } " <nl> + PIC_CFLAGS = " " <nl> + ; ; <nl> + * ) <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : Unsupported operating system : $ { host } " > & 5 <nl> + $ as_echo " Unsupported operating system : $ { host } " > & 6 ; } <nl> + abi = " elf " <nl> + ; ; <nl> + esac <nl> + <nl> + JEMALLOC_USABLE_SIZE_CONST = const <nl> + for ac_header in malloc . h <nl> + do : <nl> + ac_fn_c_check_header_mongrel " $ LINENO " " malloc . h " " ac_cv_header_malloc_h " " $ ac_includes_default " <nl> + if test " x $ ac_cv_header_malloc_h " = xyes ; then : <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define HAVE_MALLOC_H 1 <nl> + _ACEOF <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether malloc_usable_size definition can use const argument " > & 5 <nl> + $ as_echo_n " checking whether malloc_usable_size definition can use const argument . . . " > & 6 ; } <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # include < malloc . h > <nl> + # include < stddef . h > <nl> + size_t malloc_usable_size ( const void * ptr ) ; <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + <nl> + else <nl> + <nl> + JEMALLOC_USABLE_SIZE_CONST = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + <nl> + fi <nl> + <nl> + done <nl> + <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define JEMALLOC_USABLE_SIZE_CONST $ JEMALLOC_USABLE_SIZE_CONST <nl> + _ACEOF <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for library containing log " > & 5 <nl> + $ as_echo_n " checking for library containing log . . . " > & 6 ; } <nl> + if $ { ac_cv_search_log + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + ac_func_search_save_LIBS = $ LIBS <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + / * Override any GCC internal prototype to avoid an error . <nl> + Use char because int might match the return type of a GCC <nl> + builtin and then its argument prototype would still apply . * / <nl> + # ifdef __cplusplus <nl> + extern " C " <nl> + # endif <nl> + char log ( ) ; <nl> + int <nl> + main ( ) <nl> + { <nl> + return log ( ) ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + for ac_lib in ' ' m ; do <nl> + if test - z " $ ac_lib " ; then <nl> + ac_res = " none required " <nl> + else <nl> + ac_res = - l $ ac_lib <nl> + LIBS = " - l $ ac_lib $ ac_func_search_save_LIBS " <nl> + fi <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + ac_cv_search_log = $ ac_res <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext <nl> + if $ { ac_cv_search_log + : } false ; then : <nl> + break <nl> + fi <nl> + done <nl> + if $ { ac_cv_search_log + : } false ; then : <nl> + <nl> + else <nl> + ac_cv_search_log = no <nl> + fi <nl> + rm conftest . $ ac_ext <nl> + LIBS = $ ac_func_search_save_LIBS <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_search_log " > & 5 <nl> + $ as_echo " $ ac_cv_search_log " > & 6 ; } <nl> + ac_res = $ ac_cv_search_log <nl> + if test " $ ac_res " ! = no ; then : <nl> + test " $ ac_res " = " none required " | | LIBS = " $ ac_res $ LIBS " <nl> + <nl> + else <nl> + as_fn_error $ ? " Missing math functions " " $ LINENO " 5 <nl> + fi <nl> + <nl> + if test " x $ ac_cv_search_log " ! = " xnone required " ; then <nl> + LM = " $ ac_cv_search_log " <nl> + else <nl> + LM = <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether __attribute__ syntax is compilable " > & 5 <nl> + $ as_echo_n " checking whether __attribute__ syntax is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_attribute + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + static __attribute__ ( ( unused ) ) void foo ( void ) { } <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_attribute = yes <nl> + else <nl> + je_cv_attribute = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_attribute " > & 5 <nl> + $ as_echo " $ je_cv_attribute " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_attribute } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_HAVE_ATTR " > > confdefs . h <nl> + <nl> + if test " x $ { GCC } " = " xyes " - a " x $ { abi } " = " xelf " ; then <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - fvisibility = hidden " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - fvisibility = hidden . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - fvisibility = hidden <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - fvisibility = hidden <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - fvisibility = hidden " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - fvisibility = hidden . . . " > & 6 ; } <nl> + T_CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } " <nl> + T_APPEND_V = - fvisibility = hidden <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { SPECIFIED_CXXFLAGS } " = " x " ; then <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + else <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cxxflags_added = - fvisibility = hidden <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cxxflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CXXFLAGS = " $ { T_CONFIGURE_CXXFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { SPECIFIED_CXXFLAGS } " = " x " ; then <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + else <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + fi <nl> + <nl> + <nl> + fi <nl> + fi <nl> + SAVED_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - Werror " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - Werror . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - Werror <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - Werror <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - herror_on_warning " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - herror_on_warning . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - herror_on_warning <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - herror_on_warning <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether tls_model attribute is compilable " > & 5 <nl> + $ as_echo_n " checking whether tls_model attribute is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_tls_model + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + static __thread int <nl> + __attribute__ ( ( tls_model ( " initial - exec " ) , unused ) ) foo ; <nl> + foo = 0 ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_tls_model = yes <nl> + else <nl> + je_cv_tls_model = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_tls_model " > & 5 <nl> + $ as_echo " $ je_cv_tls_model " > & 6 ; } <nl> + <nl> + CONFIGURE_CFLAGS = " $ { SAVED_CONFIGURE_CFLAGS } " <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { je_cv_tls_model } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_TLS_MODEL __attribute__ ( ( tls_model ( \ " initial - exec \ " ) ) ) " > > confdefs . h <nl> + <nl> + else <nl> + $ as_echo " # define JEMALLOC_TLS_MODEL " > > confdefs . h <nl> + <nl> + fi <nl> + SAVED_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - Werror " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - Werror . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - Werror <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - Werror <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - herror_on_warning " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - herror_on_warning . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - herror_on_warning <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - herror_on_warning <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether alloc_size attribute is compilable " > & 5 <nl> + $ as_echo_n " checking whether alloc_size attribute is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_alloc_size + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # include < stdlib . h > <nl> + int <nl> + main ( ) <nl> + { <nl> + void * foo ( size_t size ) __attribute__ ( ( alloc_size ( 1 ) ) ) ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_alloc_size = yes <nl> + else <nl> + je_cv_alloc_size = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_alloc_size " > & 5 <nl> + $ as_echo " $ je_cv_alloc_size " > & 6 ; } <nl> + <nl> + CONFIGURE_CFLAGS = " $ { SAVED_CONFIGURE_CFLAGS } " <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { je_cv_alloc_size } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_HAVE_ATTR_ALLOC_SIZE " > > confdefs . h <nl> + <nl> + fi <nl> + SAVED_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - Werror " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - Werror . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - Werror <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - Werror <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - herror_on_warning " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - herror_on_warning . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - herror_on_warning <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - herror_on_warning <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether format ( gnu_printf , . . . ) attribute is compilable " > & 5 <nl> + $ as_echo_n " checking whether format ( gnu_printf , . . . ) attribute is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_format_gnu_printf + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # include < stdlib . h > <nl> + int <nl> + main ( ) <nl> + { <nl> + void * foo ( const char * format , . . . ) __attribute__ ( ( format ( gnu_printf , 1 , 2 ) ) ) ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_format_gnu_printf = yes <nl> + else <nl> + je_cv_format_gnu_printf = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_format_gnu_printf " > & 5 <nl> + $ as_echo " $ je_cv_format_gnu_printf " > & 6 ; } <nl> + <nl> + CONFIGURE_CFLAGS = " $ { SAVED_CONFIGURE_CFLAGS } " <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { je_cv_format_gnu_printf } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_HAVE_ATTR_FORMAT_GNU_PRINTF " > > confdefs . h <nl> + <nl> + fi <nl> + SAVED_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - Werror " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - Werror . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - Werror <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - Werror <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - herror_on_warning " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - herror_on_warning . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - herror_on_warning <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - herror_on_warning <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether format ( printf , . . . ) attribute is compilable " > & 5 <nl> + $ as_echo_n " checking whether format ( printf , . . . ) attribute is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_format_printf + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + # include < stdlib . h > <nl> + int <nl> + main ( ) <nl> + { <nl> + void * foo ( const char * format , . . . ) __attribute__ ( ( format ( printf , 1 , 2 ) ) ) ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_format_printf = yes <nl> + else <nl> + je_cv_format_printf = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_format_printf " > & 5 <nl> + $ as_echo " $ je_cv_format_printf " > & 6 ; } <nl> + <nl> + CONFIGURE_CFLAGS = " $ { SAVED_CONFIGURE_CFLAGS } " <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { je_cv_format_printf } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_HAVE_ATTR_FORMAT_PRINTF " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + # Check whether - - with - rpath was given . <nl> + if test " $ { with_rpath + set } " = set ; then : <nl> + withval = $ with_rpath ; if test " x $ with_rpath " = " xno " ; then <nl> + RPATH_EXTRA = <nl> + else <nl> + RPATH_EXTRA = " ` echo $ with_rpath | tr \ " : \ " \ " \ " ` " <nl> + fi <nl> + else <nl> + RPATH_EXTRA = <nl> + <nl> + fi <nl> + <nl> + <nl> + <nl> + # Check whether - - enable - autogen was given . <nl> + if test " $ { enable_autogen + set } " = set ; then : <nl> + enableval = $ enable_autogen ; if test " x $ enable_autogen " = " xno " ; then <nl> + enable_autogen = " 0 " <nl> + else <nl> + enable_autogen = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_autogen = " 0 " <nl> + <nl> + fi <nl> + <nl> + <nl> + <nl> + # Find a good install program . We prefer a C program ( faster ) , <nl> + # so one script is as good as another . But avoid the broken or <nl> + # incompatible versions : <nl> + # SysV / etc / install , / usr / sbin / install <nl> + # SunOS / usr / etc / install <nl> + # IRIX / sbin / install <nl> + # AIX / bin / install <nl> + # AmigaOS / C / install , which installs bootblocks on floppy discs <nl> + # AIX 4 / usr / bin / installbsd , which doesn ' t work without a - g flag <nl> + # AFS / usr / afsws / bin / install , which mishandles nonexistent args <nl> + # SVR4 / usr / ucb / install , which tries to use the nonexistent group " staff " <nl> + # OS / 2 ' s system install , which has a completely different semantic <nl> + # . / install , which can be erroneously created by make from . / install . sh . <nl> + # Reject install programs that cannot install multiple files . <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for a BSD - compatible install " > & 5 <nl> + $ as_echo_n " checking for a BSD - compatible install . . . " > & 6 ; } <nl> + if test - z " $ INSTALL " ; then <nl> + if $ { ac_cv_path_install + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + # Account for people who put trailing slashes in PATH elements . <nl> + case $ as_dir / in # ( ( <nl> + . / | . / / | / [ cC ] / * | \ <nl> + / etc / * | / usr / sbin / * | / usr / etc / * | / sbin / * | / usr / afsws / bin / * | \ <nl> + ? : [ \ \ / ] os2 [ \ \ / ] install [ \ \ / ] * | ? : [ \ \ / ] OS2 [ \ \ / ] INSTALL [ \ \ / ] * | \ <nl> + / usr / ucb / * ) ; ; <nl> + * ) <nl> + # OSF1 and SCO ODT 3 . 0 have their own names for install . <nl> + # Don ' t use installbsd from OSF since it installs stuff as root <nl> + # by default . <nl> + for ac_prog in ginstall scoinst install ; do <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + if as_fn_executable_p " $ as_dir / $ ac_prog $ ac_exec_ext " ; then <nl> + if test $ ac_prog = install & & <nl> + grep dspmsg " $ as_dir / $ ac_prog $ ac_exec_ext " > / dev / null 2 > & 1 ; then <nl> + # AIX install . It has an incompatible calling convention . <nl> + : <nl> + elif test $ ac_prog = install & & <nl> + grep pwplus " $ as_dir / $ ac_prog $ ac_exec_ext " > / dev / null 2 > & 1 ; then <nl> + # program - specific install script used by HP pwplus - - don ' t use . <nl> + : <nl> + else <nl> + rm - rf conftest . one conftest . two conftest . dir <nl> + echo one > conftest . one <nl> + echo two > conftest . two <nl> + mkdir conftest . dir <nl> + if " $ as_dir / $ ac_prog $ ac_exec_ext " - c conftest . one conftest . two " ` pwd ` / conftest . dir " & & <nl> + test - s conftest . one & & test - s conftest . two & & <nl> + test - s conftest . dir / conftest . one & & <nl> + test - s conftest . dir / conftest . two <nl> + then <nl> + ac_cv_path_install = " $ as_dir / $ ac_prog $ ac_exec_ext - c " <nl> + break 3 <nl> + fi <nl> + fi <nl> + fi <nl> + done <nl> + done <nl> + ; ; <nl> + esac <nl> + <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + rm - rf conftest . one conftest . two conftest . dir <nl> + <nl> + fi <nl> + if test " $ { ac_cv_path_install + set } " = set ; then <nl> + INSTALL = $ ac_cv_path_install <nl> + else <nl> + # As a last resort , use the slow shell script . Don ' t cache a <nl> + # value for INSTALL within a source directory , because that will <nl> + # break other packages using the cache if that directory is <nl> + # removed , or if the value is a relative name . <nl> + INSTALL = $ ac_install_sh <nl> + fi <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ INSTALL " > & 5 <nl> + $ as_echo " $ INSTALL " > & 6 ; } <nl> + <nl> + # Use test - z because SunOS4 sh mishandles braces in $ { var - val } . <nl> + # It thinks the first close brace ends the variable substitution . <nl> + test - z " $ INSTALL_PROGRAM " & & INSTALL_PROGRAM = ' $ { INSTALL } ' <nl> + <nl> + test - z " $ INSTALL_SCRIPT " & & INSTALL_SCRIPT = ' $ { INSTALL } ' <nl> + <nl> + test - z " $ INSTALL_DATA " & & INSTALL_DATA = ' $ { INSTALL } - m 644 ' <nl> + <nl> + if test - n " $ ac_tool_prefix " ; then <nl> + # Extract the first word of " $ { ac_tool_prefix } ranlib " , so it can be a program name with args . <nl> + set dummy $ { ac_tool_prefix } ranlib ; ac_word = $ 2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ ac_word " > & 5 <nl> + $ as_echo_n " checking for $ ac_word . . . " > & 6 ; } <nl> + if $ { ac_cv_prog_RANLIB + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if test - n " $ RANLIB " ; then <nl> + ac_cv_prog_RANLIB = " $ RANLIB " # Let the user override the test . <nl> + else <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + if as_fn_executable_p " $ as_dir / $ ac_word $ ac_exec_ext " ; then <nl> + ac_cv_prog_RANLIB = " $ { ac_tool_prefix } ranlib " <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : found $ as_dir / $ ac_word $ ac_exec_ext " > & 5 <nl> + break 2 <nl> + fi <nl> + done <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + fi <nl> + fi <nl> + RANLIB = $ ac_cv_prog_RANLIB <nl> + if test - n " $ RANLIB " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ RANLIB " > & 5 <nl> + $ as_echo " $ RANLIB " > & 6 ; } <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + fi <nl> + <nl> + <nl> + fi <nl> + if test - z " $ ac_cv_prog_RANLIB " ; then <nl> + ac_ct_RANLIB = $ RANLIB <nl> + # Extract the first word of " ranlib " , so it can be a program name with args . <nl> + set dummy ranlib ; ac_word = $ 2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ ac_word " > & 5 <nl> + $ as_echo_n " checking for $ ac_word . . . " > & 6 ; } <nl> + if $ { ac_cv_prog_ac_ct_RANLIB + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if test - n " $ ac_ct_RANLIB " ; then <nl> + ac_cv_prog_ac_ct_RANLIB = " $ ac_ct_RANLIB " # Let the user override the test . <nl> + else <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + if as_fn_executable_p " $ as_dir / $ ac_word $ ac_exec_ext " ; then <nl> + ac_cv_prog_ac_ct_RANLIB = " ranlib " <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : found $ as_dir / $ ac_word $ ac_exec_ext " > & 5 <nl> + break 2 <nl> + fi <nl> + done <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + fi <nl> + fi <nl> + ac_ct_RANLIB = $ ac_cv_prog_ac_ct_RANLIB <nl> + if test - n " $ ac_ct_RANLIB " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_ct_RANLIB " > & 5 <nl> + $ as_echo " $ ac_ct_RANLIB " > & 6 ; } <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + fi <nl> + <nl> + if test " x $ ac_ct_RANLIB " = x ; then <nl> + RANLIB = " : " <nl> + else <nl> + case $ cross_compiling : $ ac_tool_warned in <nl> + yes : ) <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : using cross tools not prefixed with host triplet " > & 5 <nl> + $ as_echo " $ as_me : WARNING : using cross tools not prefixed with host triplet " > & 2 ; } <nl> + ac_tool_warned = yes ; ; <nl> + esac <nl> + RANLIB = $ ac_ct_RANLIB <nl> + fi <nl> + else <nl> + RANLIB = " $ ac_cv_prog_RANLIB " <nl> + fi <nl> + <nl> + # Extract the first word of " ld " , so it can be a program name with args . <nl> + set dummy ld ; ac_word = $ 2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ ac_word " > & 5 <nl> + $ as_echo_n " checking for $ ac_word . . . " > & 6 ; } <nl> + if $ { ac_cv_path_LD + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + case $ LD in <nl> + [ \ \ / ] * | ? : [ \ \ / ] * ) <nl> + ac_cv_path_LD = " $ LD " # Let the user override the test with a path . <nl> + ; ; <nl> + * ) <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + if as_fn_executable_p " $ as_dir / $ ac_word $ ac_exec_ext " ; then <nl> + ac_cv_path_LD = " $ as_dir / $ ac_word $ ac_exec_ext " <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : found $ as_dir / $ ac_word $ ac_exec_ext " > & 5 <nl> + break 2 <nl> + fi <nl> + done <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + test - z " $ ac_cv_path_LD " & & ac_cv_path_LD = " false " <nl> + ; ; <nl> + esac <nl> + fi <nl> + LD = $ ac_cv_path_LD <nl> + if test - n " $ LD " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ LD " > & 5 <nl> + $ as_echo " $ LD " > & 6 ; } <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + fi <nl> + <nl> + <nl> + # Extract the first word of " autoconf " , so it can be a program name with args . <nl> + set dummy autoconf ; ac_word = $ 2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for $ ac_word " > & 5 <nl> + $ as_echo_n " checking for $ ac_word . . . " > & 6 ; } <nl> + if $ { ac_cv_path_AUTOCONF + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + case $ AUTOCONF in <nl> + [ \ \ / ] * | ? : [ \ \ / ] * ) <nl> + ac_cv_path_AUTOCONF = " $ AUTOCONF " # Let the user override the test with a path . <nl> + ; ; <nl> + * ) <nl> + as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + for ac_exec_ext in ' ' $ ac_executable_extensions ; do <nl> + if as_fn_executable_p " $ as_dir / $ ac_word $ ac_exec_ext " ; then <nl> + ac_cv_path_AUTOCONF = " $ as_dir / $ ac_word $ ac_exec_ext " <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : found $ as_dir / $ ac_word $ ac_exec_ext " > & 5 <nl> + break 2 <nl> + fi <nl> + done <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + test - z " $ ac_cv_path_AUTOCONF " & & ac_cv_path_AUTOCONF = " false " <nl> + ; ; <nl> + esac <nl> + fi <nl> + AUTOCONF = $ ac_cv_path_AUTOCONF <nl> + if test - n " $ AUTOCONF " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ AUTOCONF " > & 5 <nl> + $ as_echo " $ AUTOCONF " > & 6 ; } <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + fi <nl> + <nl> + <nl> + <nl> + public_syms = " malloc_conf malloc_message malloc calloc posix_memalign aligned_alloc realloc free mallocx rallocx xallocx sallocx dallocx sdallocx nallocx mallctl mallctlnametomib mallctlbymib malloc_stats_print malloc_usable_size " <nl> + <nl> + ac_fn_c_check_func " $ LINENO " " memalign " " ac_cv_func_memalign " <nl> + if test " x $ ac_cv_func_memalign " = xyes ; then : <nl> + $ as_echo " # define JEMALLOC_OVERRIDE_MEMALIGN " > > confdefs . h <nl> + <nl> + public_syms = " $ { public_syms } memalign " <nl> + fi <nl> + <nl> + ac_fn_c_check_func " $ LINENO " " valloc " " ac_cv_func_valloc " <nl> + if test " x $ ac_cv_func_valloc " = xyes ; then : <nl> + $ as_echo " # define JEMALLOC_OVERRIDE_VALLOC " > > confdefs . h <nl> + <nl> + public_syms = " $ { public_syms } valloc " <nl> + fi <nl> + <nl> + <nl> + GCOV_FLAGS = <nl> + # Check whether - - enable - code - coverage was given . <nl> + if test " $ { enable_code_coverage + set } " = set ; then : <nl> + enableval = $ enable_code_coverage ; if test " x $ enable_code_coverage " = " xno " ; then <nl> + enable_code_coverage = " 0 " <nl> + else <nl> + enable_code_coverage = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_code_coverage = " 0 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ enable_code_coverage " = " x1 " ; then <nl> + deoptimize = " no " <nl> + echo " $ CFLAGS $ EXTRA_CFLAGS " | grep ' \ - O ' > / dev / null | | deoptimize = " yes " <nl> + if test " x $ { deoptimize } " = " xyes " ; then <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - O0 " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - O0 . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - O0 <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - O0 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + fi <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - fprofile - arcs - ftest - coverage " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - fprofile - arcs - ftest - coverage . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - fprofile - arcs - ftest - coverage <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - fprofile - arcs - ftest - coverage <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + EXTRA_LDFLAGS = " $ EXTRA_LDFLAGS - fprofile - arcs - ftest - coverage " <nl> + $ as_echo " # define JEMALLOC_CODE_COVERAGE " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + <nl> + # Check whether - - with - mangling was given . <nl> + if test " $ { with_mangling + set } " = set ; then : <nl> + withval = $ with_mangling ; mangling_map = " $ with_mangling " <nl> + else <nl> + mangling_map = " " <nl> + fi <nl> + <nl> + <nl> + <nl> + # Check whether - - with - jemalloc_prefix was given . <nl> + if test " $ { with_jemalloc_prefix + set } " = set ; then : <nl> + withval = $ with_jemalloc_prefix ; JEMALLOC_PREFIX = " $ with_jemalloc_prefix " <nl> + else <nl> + if test " x $ abi " ! = " xmacho " - a " x $ abi " ! = " xpecoff " ; then <nl> + JEMALLOC_PREFIX = " " <nl> + else <nl> + JEMALLOC_PREFIX = " je_ " <nl> + fi <nl> + <nl> + fi <nl> + <nl> + if test " x $ JEMALLOC_PREFIX " ! = " x " ; then <nl> + JEMALLOC_CPREFIX = ` echo $ { JEMALLOC_PREFIX } | tr " a - z " " A - Z " ` <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define JEMALLOC_PREFIX " $ JEMALLOC_PREFIX " <nl> + _ACEOF <nl> + <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define JEMALLOC_CPREFIX " $ JEMALLOC_CPREFIX " <nl> + _ACEOF <nl> + <nl> + fi <nl> + <nl> + <nl> + <nl> + # Check whether - - with - export was given . <nl> + if test " $ { with_export + set } " = set ; then : <nl> + withval = $ with_export ; if test " x $ with_export " = " xno " ; then <nl> + $ as_echo " # define JEMALLOC_EXPORT / * * / " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + fi <nl> + <nl> + <nl> + <nl> + # Check whether - - with - private_namespace was given . <nl> + if test " $ { with_private_namespace + set } " = set ; then : <nl> + withval = $ with_private_namespace ; JEMALLOC_PRIVATE_NAMESPACE = " $ { with_private_namespace } je_ " <nl> + else <nl> + JEMALLOC_PRIVATE_NAMESPACE = " je_ " <nl> + <nl> + fi <nl> + <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define JEMALLOC_PRIVATE_NAMESPACE $ JEMALLOC_PRIVATE_NAMESPACE <nl> + _ACEOF <nl> + <nl> + private_namespace = " $ JEMALLOC_PRIVATE_NAMESPACE " <nl> + <nl> + <nl> + <nl> + # Check whether - - with - install_suffix was given . <nl> + if test " $ { with_install_suffix + set } " = set ; then : <nl> + withval = $ with_install_suffix ; INSTALL_SUFFIX = " $ with_install_suffix " <nl> + else <nl> + INSTALL_SUFFIX = <nl> + <nl> + fi <nl> + <nl> + install_suffix = " $ INSTALL_SUFFIX " <nl> + <nl> + <nl> + <nl> + # Check whether - - with - malloc_conf was given . <nl> + if test " $ { with_malloc_conf + set } " = set ; then : <nl> + withval = $ with_malloc_conf ; JEMALLOC_CONFIG_MALLOC_CONF = " $ with_malloc_conf " <nl> + else <nl> + JEMALLOC_CONFIG_MALLOC_CONF = " " <nl> + <nl> + fi <nl> + <nl> + config_malloc_conf = " $ JEMALLOC_CONFIG_MALLOC_CONF " <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define JEMALLOC_CONFIG_MALLOC_CONF " $ config_malloc_conf " <nl> + _ACEOF <nl> + <nl> + <nl> + je_ = " je_ " <nl> + <nl> + <nl> + cfgoutputs_in = " Makefile . in " <nl> + cfgoutputs_in = " $ { cfgoutputs_in } jemalloc . pc . in " <nl> + cfgoutputs_in = " $ { cfgoutputs_in } doc / html . xsl . in " <nl> + cfgoutputs_in = " $ { cfgoutputs_in } doc / manpages . xsl . in " <nl> + cfgoutputs_in = " $ { cfgoutputs_in } doc / jemalloc . xml . in " <nl> + cfgoutputs_in = " $ { cfgoutputs_in } include / jemalloc / jemalloc_macros . h . in " <nl> + cfgoutputs_in = " $ { cfgoutputs_in } include / jemalloc / jemalloc_protos . h . in " <nl> + cfgoutputs_in = " $ { cfgoutputs_in } include / jemalloc / jemalloc_typedefs . h . in " <nl> + cfgoutputs_in = " $ { cfgoutputs_in } include / jemalloc / internal / jemalloc_internal . h . in " <nl> + cfgoutputs_in = " $ { cfgoutputs_in } test / test . sh . in " <nl> + cfgoutputs_in = " $ { cfgoutputs_in } test / include / test / jemalloc_test . h . in " <nl> + <nl> + cfgoutputs_out = " Makefile " <nl> + cfgoutputs_out = " $ { cfgoutputs_out } jemalloc . pc " <nl> + cfgoutputs_out = " $ { cfgoutputs_out } doc / html . xsl " <nl> + cfgoutputs_out = " $ { cfgoutputs_out } doc / manpages . xsl " <nl> + cfgoutputs_out = " $ { cfgoutputs_out } doc / jemalloc . xml " <nl> + cfgoutputs_out = " $ { cfgoutputs_out } include / jemalloc / jemalloc_macros . h " <nl> + cfgoutputs_out = " $ { cfgoutputs_out } include / jemalloc / jemalloc_protos . h " <nl> + cfgoutputs_out = " $ { cfgoutputs_out } include / jemalloc / jemalloc_typedefs . h " <nl> + cfgoutputs_out = " $ { cfgoutputs_out } include / jemalloc / internal / jemalloc_internal . h " <nl> + cfgoutputs_out = " $ { cfgoutputs_out } test / test . sh " <nl> + cfgoutputs_out = " $ { cfgoutputs_out } test / include / test / jemalloc_test . h " <nl> + <nl> + cfgoutputs_tup = " Makefile " <nl> + cfgoutputs_tup = " $ { cfgoutputs_tup } jemalloc . pc : jemalloc . pc . in " <nl> + cfgoutputs_tup = " $ { cfgoutputs_tup } doc / html . xsl : doc / html . xsl . in " <nl> + cfgoutputs_tup = " $ { cfgoutputs_tup } doc / manpages . xsl : doc / manpages . xsl . in " <nl> + cfgoutputs_tup = " $ { cfgoutputs_tup } doc / jemalloc . xml : doc / jemalloc . xml . in " <nl> + cfgoutputs_tup = " $ { cfgoutputs_tup } include / jemalloc / jemalloc_macros . h : include / jemalloc / jemalloc_macros . h . in " <nl> + cfgoutputs_tup = " $ { cfgoutputs_tup } include / jemalloc / jemalloc_protos . h : include / jemalloc / jemalloc_protos . h . in " <nl> + cfgoutputs_tup = " $ { cfgoutputs_tup } include / jemalloc / jemalloc_typedefs . h : include / jemalloc / jemalloc_typedefs . h . in " <nl> + cfgoutputs_tup = " $ { cfgoutputs_tup } include / jemalloc / internal / jemalloc_internal . h " <nl> + cfgoutputs_tup = " $ { cfgoutputs_tup } test / test . sh : test / test . sh . in " <nl> + cfgoutputs_tup = " $ { cfgoutputs_tup } test / include / test / jemalloc_test . h : test / include / test / jemalloc_test . h . in " <nl> + <nl> + cfghdrs_in = " include / jemalloc / jemalloc_defs . h . in " <nl> + cfghdrs_in = " $ { cfghdrs_in } include / jemalloc / internal / jemalloc_internal_defs . h . in " <nl> + cfghdrs_in = " $ { cfghdrs_in } include / jemalloc / internal / private_namespace . sh " <nl> + cfghdrs_in = " $ { cfghdrs_in } include / jemalloc / internal / private_unnamespace . sh " <nl> + cfghdrs_in = " $ { cfghdrs_in } include / jemalloc / internal / private_symbols . txt " <nl> + cfghdrs_in = " $ { cfghdrs_in } include / jemalloc / internal / public_namespace . sh " <nl> + cfghdrs_in = " $ { cfghdrs_in } include / jemalloc / internal / public_unnamespace . sh " <nl> + cfghdrs_in = " $ { cfghdrs_in } include / jemalloc / internal / size_classes . sh " <nl> + cfghdrs_in = " $ { cfghdrs_in } include / jemalloc / jemalloc_rename . sh " <nl> + cfghdrs_in = " $ { cfghdrs_in } include / jemalloc / jemalloc_mangle . sh " <nl> + cfghdrs_in = " $ { cfghdrs_in } include / jemalloc / jemalloc . sh " <nl> + cfghdrs_in = " $ { cfghdrs_in } test / include / test / jemalloc_test_defs . h . in " <nl> + <nl> + cfghdrs_out = " include / jemalloc / jemalloc_defs . h " <nl> + cfghdrs_out = " $ { cfghdrs_out } include / jemalloc / jemalloc $ { install_suffix } . h " <nl> + cfghdrs_out = " $ { cfghdrs_out } include / jemalloc / internal / private_namespace . h " <nl> + cfghdrs_out = " $ { cfghdrs_out } include / jemalloc / internal / private_unnamespace . h " <nl> + cfghdrs_out = " $ { cfghdrs_out } include / jemalloc / internal / public_symbols . txt " <nl> + cfghdrs_out = " $ { cfghdrs_out } include / jemalloc / internal / public_namespace . h " <nl> + cfghdrs_out = " $ { cfghdrs_out } include / jemalloc / internal / public_unnamespace . h " <nl> + cfghdrs_out = " $ { cfghdrs_out } include / jemalloc / internal / size_classes . h " <nl> + cfghdrs_out = " $ { cfghdrs_out } include / jemalloc / jemalloc_protos_jet . h " <nl> + cfghdrs_out = " $ { cfghdrs_out } include / jemalloc / jemalloc_rename . h " <nl> + cfghdrs_out = " $ { cfghdrs_out } include / jemalloc / jemalloc_mangle . h " <nl> + cfghdrs_out = " $ { cfghdrs_out } include / jemalloc / jemalloc_mangle_jet . h " <nl> + cfghdrs_out = " $ { cfghdrs_out } include / jemalloc / internal / jemalloc_internal_defs . h " <nl> + cfghdrs_out = " $ { cfghdrs_out } test / include / test / jemalloc_test_defs . h " <nl> + <nl> + cfghdrs_tup = " include / jemalloc / jemalloc_defs . h : include / jemalloc / jemalloc_defs . h . in " <nl> + cfghdrs_tup = " $ { cfghdrs_tup } include / jemalloc / internal / jemalloc_internal_defs . h : include / jemalloc / internal / jemalloc_internal_defs . h . in " <nl> + cfghdrs_tup = " $ { cfghdrs_tup } test / include / test / jemalloc_test_defs . h : test / include / test / jemalloc_test_defs . h . in " <nl> + <nl> + # Check whether - - enable - cc - silence was given . <nl> + if test " $ { enable_cc_silence + set } " = set ; then : <nl> + enableval = $ enable_cc_silence ; if test " x $ enable_cc_silence " = " xno " ; then <nl> + enable_cc_silence = " 0 " <nl> + else <nl> + enable_cc_silence = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_cc_silence = " 1 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ enable_cc_silence " = " x1 " ; then <nl> + $ as_echo " # define JEMALLOC_CC_SILENCE " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + # Check whether - - enable - debug was given . <nl> + if test " $ { enable_debug + set } " = set ; then : <nl> + enableval = $ enable_debug ; if test " x $ enable_debug " = " xno " ; then <nl> + enable_debug = " 0 " <nl> + else <nl> + enable_debug = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_debug = " 0 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ enable_debug " = " x1 " ; then <nl> + $ as_echo " # define JEMALLOC_DEBUG " > > confdefs . h <nl> + <nl> + fi <nl> + if test " x $ enable_debug " = " x1 " ; then <nl> + $ as_echo " # define JEMALLOC_DEBUG " > > confdefs . h <nl> + <nl> + enable_ivsalloc = " 1 " <nl> + fi <nl> + <nl> + <nl> + # Check whether - - enable - ivsalloc was given . <nl> + if test " $ { enable_ivsalloc + set } " = set ; then : <nl> + enableval = $ enable_ivsalloc ; if test " x $ enable_ivsalloc " = " xno " ; then <nl> + enable_ivsalloc = " 0 " <nl> + else <nl> + enable_ivsalloc = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_ivsalloc = " 0 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ enable_ivsalloc " = " x1 " ; then <nl> + $ as_echo " # define JEMALLOC_IVSALLOC " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + if test " x $ enable_debug " = " x0 " ; then <nl> + if test " x $ GCC " = " xyes " ; then <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - O3 " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - O3 . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - O3 <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - O3 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - O3 " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - O3 . . . " > & 6 ; } <nl> + T_CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } " <nl> + T_APPEND_V = - O3 <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { SPECIFIED_CXXFLAGS } " = " x " ; then <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + else <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cxxflags_added = - O3 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cxxflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CXXFLAGS = " $ { T_CONFIGURE_CXXFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { SPECIFIED_CXXFLAGS } " = " x " ; then <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + else <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - funroll - loops " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - funroll - loops . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - funroll - loops <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - funroll - loops <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + elif test " x $ je_cv_msvc " = " xyes " ; then <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - O2 " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - O2 . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - O2 <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - O2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - O2 " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - O2 . . . " > & 6 ; } <nl> + T_CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } " <nl> + T_APPEND_V = - O2 <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { SPECIFIED_CXXFLAGS } " = " x " ; then <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + else <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cxxflags_added = - O2 <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cxxflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CXXFLAGS = " $ { T_CONFIGURE_CXXFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { SPECIFIED_CXXFLAGS } " = " x " ; then <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + else <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + fi <nl> + <nl> + <nl> + else <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - O " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - O . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - O <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - O <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - O " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - O . . . " > & 6 ; } <nl> + T_CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } " <nl> + T_APPEND_V = - O <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { SPECIFIED_CXXFLAGS } " = " x " ; then <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + else <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cxxflags_added = - O <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cxxflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CXXFLAGS = " $ { T_CONFIGURE_CXXFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CXXFLAGS } " = " x " - o " x $ { SPECIFIED_CXXFLAGS } " = " x " ; then <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + else <nl> + CXXFLAGS = " $ { CONFIGURE_CXXFLAGS } $ { SPECIFIED_CXXFLAGS } " <nl> + fi <nl> + <nl> + <nl> + fi <nl> + fi <nl> + <nl> + # Check whether - - enable - stats was given . <nl> + if test " $ { enable_stats + set } " = set ; then : <nl> + enableval = $ enable_stats ; if test " x $ enable_stats " = " xno " ; then <nl> + enable_stats = " 0 " <nl> + else <nl> + enable_stats = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_stats = " 1 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ enable_stats " = " x1 " ; then <nl> + $ as_echo " # define JEMALLOC_STATS " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + # Check whether - - enable - prof was given . <nl> + if test " $ { enable_prof + set } " = set ; then : <nl> + enableval = $ enable_prof ; if test " x $ enable_prof " = " xno " ; then <nl> + enable_prof = " 0 " <nl> + else <nl> + enable_prof = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_prof = " 0 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ enable_prof " = " x1 " ; then <nl> + backtrace_method = " " <nl> + else <nl> + backtrace_method = " N / A " <nl> + fi <nl> + <nl> + # Check whether - - enable - prof - libunwind was given . <nl> + if test " $ { enable_prof_libunwind + set } " = set ; then : <nl> + enableval = $ enable_prof_libunwind ; if test " x $ enable_prof_libunwind " = " xno " ; then <nl> + enable_prof_libunwind = " 0 " <nl> + else <nl> + enable_prof_libunwind = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_prof_libunwind = " 0 " <nl> + <nl> + fi <nl> + <nl> + <nl> + # Check whether - - with - static_libunwind was given . <nl> + if test " $ { with_static_libunwind + set } " = set ; then : <nl> + withval = $ with_static_libunwind ; if test " x $ with_static_libunwind " = " xno " ; then <nl> + LUNWIND = " - lunwind " <nl> + else <nl> + if test ! - f " $ with_static_libunwind " ; then <nl> + as_fn_error $ ? " Static libunwind not found : $ with_static_libunwind " " $ LINENO " 5 <nl> + fi <nl> + LUNWIND = " $ with_static_libunwind " <nl> + fi <nl> + else <nl> + LUNWIND = " - lunwind " <nl> + <nl> + fi <nl> + <nl> + if test " x $ backtrace_method " = " x " - a " x $ enable_prof_libunwind " = " x1 " ; then <nl> + for ac_header in libunwind . h <nl> + do : <nl> + ac_fn_c_check_header_mongrel " $ LINENO " " libunwind . h " " ac_cv_header_libunwind_h " " $ ac_includes_default " <nl> + if test " x $ ac_cv_header_libunwind_h " = xyes ; then : <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define HAVE_LIBUNWIND_H 1 <nl> + _ACEOF <nl> + <nl> + else <nl> + enable_prof_libunwind = " 0 " <nl> + fi <nl> + <nl> + done <nl> + <nl> + if test " x $ LUNWIND " = " x - lunwind " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for unw_backtrace in - lunwind " > & 5 <nl> + $ as_echo_n " checking for unw_backtrace in - lunwind . . . " > & 6 ; } <nl> + if $ { ac_cv_lib_unwind_unw_backtrace + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + ac_check_lib_save_LIBS = $ LIBS <nl> + LIBS = " - lunwind $ LIBS " <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + / * Override any GCC internal prototype to avoid an error . <nl> + Use char because int might match the return type of a GCC <nl> + builtin and then its argument prototype would still apply . * / <nl> + # ifdef __cplusplus <nl> + extern " C " <nl> + # endif <nl> + char unw_backtrace ( ) ; <nl> + int <nl> + main ( ) <nl> + { <nl> + return unw_backtrace ( ) ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + ac_cv_lib_unwind_unw_backtrace = yes <nl> + else <nl> + ac_cv_lib_unwind_unw_backtrace = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + LIBS = $ ac_check_lib_save_LIBS <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_lib_unwind_unw_backtrace " > & 5 <nl> + $ as_echo " $ ac_cv_lib_unwind_unw_backtrace " > & 6 ; } <nl> + if test " x $ ac_cv_lib_unwind_unw_backtrace " = xyes ; then : <nl> + T_APPEND_V = $ LUNWIND <nl> + if test " x $ { LIBS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + LIBS = " $ { LIBS } $ { T_APPEND_V } " <nl> + else <nl> + LIBS = " $ { LIBS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + else <nl> + enable_prof_libunwind = " 0 " <nl> + fi <nl> + <nl> + else <nl> + T_APPEND_V = $ LUNWIND <nl> + if test " x $ { LIBS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + LIBS = " $ { LIBS } $ { T_APPEND_V } " <nl> + else <nl> + LIBS = " $ { LIBS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + fi <nl> + if test " x $ { enable_prof_libunwind } " = " x1 " ; then <nl> + backtrace_method = " libunwind " <nl> + $ as_echo " # define JEMALLOC_PROF_LIBUNWIND " > > confdefs . h <nl> + <nl> + fi <nl> + fi <nl> + <nl> + # Check whether - - enable - prof - libgcc was given . <nl> + if test " $ { enable_prof_libgcc + set } " = set ; then : <nl> + enableval = $ enable_prof_libgcc ; if test " x $ enable_prof_libgcc " = " xno " ; then <nl> + enable_prof_libgcc = " 0 " <nl> + else <nl> + enable_prof_libgcc = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_prof_libgcc = " 1 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ backtrace_method " = " x " - a " x $ enable_prof_libgcc " = " x1 " \ <nl> + - a " x $ GCC " = " xyes " ; then <nl> + for ac_header in unwind . h <nl> + do : <nl> + ac_fn_c_check_header_mongrel " $ LINENO " " unwind . h " " ac_cv_header_unwind_h " " $ ac_includes_default " <nl> + if test " x $ ac_cv_header_unwind_h " = xyes ; then : <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define HAVE_UNWIND_H 1 <nl> + _ACEOF <nl> + <nl> + else <nl> + enable_prof_libgcc = " 0 " <nl> + fi <nl> + <nl> + done <nl> + <nl> + if test " x $ { enable_prof_libgcc } " = " x1 " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for _Unwind_Backtrace in - lgcc " > & 5 <nl> + $ as_echo_n " checking for _Unwind_Backtrace in - lgcc . . . " > & 6 ; } <nl> + if $ { ac_cv_lib_gcc__Unwind_Backtrace + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + ac_check_lib_save_LIBS = $ LIBS <nl> + LIBS = " - lgcc $ LIBS " <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + / * Override any GCC internal prototype to avoid an error . <nl> + Use char because int might match the return type of a GCC <nl> + builtin and then its argument prototype would still apply . * / <nl> + # ifdef __cplusplus <nl> + extern " C " <nl> + # endif <nl> + char _Unwind_Backtrace ( ) ; <nl> + int <nl> + main ( ) <nl> + { <nl> + return _Unwind_Backtrace ( ) ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + ac_cv_lib_gcc__Unwind_Backtrace = yes <nl> + else <nl> + ac_cv_lib_gcc__Unwind_Backtrace = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + LIBS = $ ac_check_lib_save_LIBS <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_lib_gcc__Unwind_Backtrace " > & 5 <nl> + $ as_echo " $ ac_cv_lib_gcc__Unwind_Backtrace " > & 6 ; } <nl> + if test " x $ ac_cv_lib_gcc__Unwind_Backtrace " = xyes ; then : <nl> + T_APPEND_V = - lgcc <nl> + if test " x $ { LIBS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + LIBS = " $ { LIBS } $ { T_APPEND_V } " <nl> + else <nl> + LIBS = " $ { LIBS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + else <nl> + enable_prof_libgcc = " 0 " <nl> + fi <nl> + <nl> + fi <nl> + if test " x $ { enable_prof_libgcc } " = " x1 " ; then <nl> + backtrace_method = " libgcc " <nl> + $ as_echo " # define JEMALLOC_PROF_LIBGCC " > > confdefs . h <nl> + <nl> + fi <nl> + else <nl> + enable_prof_libgcc = " 0 " <nl> + fi <nl> + <nl> + # Check whether - - enable - prof - gcc was given . <nl> + if test " $ { enable_prof_gcc + set } " = set ; then : <nl> + enableval = $ enable_prof_gcc ; if test " x $ enable_prof_gcc " = " xno " ; then <nl> + enable_prof_gcc = " 0 " <nl> + else <nl> + enable_prof_gcc = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_prof_gcc = " 1 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ backtrace_method " = " x " - a " x $ enable_prof_gcc " = " x1 " \ <nl> + - a " x $ GCC " = " xyes " ; then <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - fno - omit - frame - pointer " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - fno - omit - frame - pointer . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - fno - omit - frame - pointer <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - fno - omit - frame - pointer <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + backtrace_method = " gcc intrinsics " <nl> + $ as_echo " # define JEMALLOC_PROF_GCC " > > confdefs . h <nl> + <nl> + else <nl> + enable_prof_gcc = " 0 " <nl> + fi <nl> + <nl> + if test " x $ backtrace_method " = " x " ; then <nl> + backtrace_method = " none ( disabling profiling ) " <nl> + enable_prof = " 0 " <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking configured backtracing method " > & 5 <nl> + $ as_echo_n " checking configured backtracing method . . . " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ backtrace_method " > & 5 <nl> + $ as_echo " $ backtrace_method " > & 6 ; } <nl> + if test " x $ enable_prof " = " x1 " ; then <nl> + T_APPEND_V = $ LM <nl> + if test " x $ { LIBS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + LIBS = " $ { LIBS } $ { T_APPEND_V } " <nl> + else <nl> + LIBS = " $ { LIBS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + <nl> + $ as_echo " # define JEMALLOC_PROF " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + # Check whether - - enable - tcache was given . <nl> + if test " $ { enable_tcache + set } " = set ; then : <nl> + enableval = $ enable_tcache ; if test " x $ enable_tcache " = " xno " ; then <nl> + enable_tcache = " 0 " <nl> + else <nl> + enable_tcache = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_tcache = " 1 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ enable_tcache " = " x1 " ; then <nl> + $ as_echo " # define JEMALLOC_TCACHE " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + if test " x $ { maps_coalesce } " = " x1 " ; then <nl> + $ as_echo " # define JEMALLOC_MAPS_COALESCE " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + # Check whether - - enable - munmap was given . <nl> + if test " $ { enable_munmap + set } " = set ; then : <nl> + enableval = $ enable_munmap ; if test " x $ enable_munmap " = " xno " ; then <nl> + enable_munmap = " 0 " <nl> + else <nl> + enable_munmap = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_munmap = " $ { default_munmap } " <nl> + <nl> + fi <nl> + <nl> + if test " x $ enable_munmap " = " x1 " ; then <nl> + $ as_echo " # define JEMALLOC_MUNMAP " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + have_dss = " 1 " <nl> + ac_fn_c_check_func " $ LINENO " " sbrk " " ac_cv_func_sbrk " <nl> + if test " x $ ac_cv_func_sbrk " = xyes ; then : <nl> + have_sbrk = " 1 " <nl> + else <nl> + have_sbrk = " 0 " <nl> + fi <nl> + <nl> + if test " x $ have_sbrk " = " x1 " ; then <nl> + if test " x $ sbrk_deprecated " = " x1 " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : Disabling dss allocation because sbrk is deprecated " > & 5 <nl> + $ as_echo " Disabling dss allocation because sbrk is deprecated " > & 6 ; } <nl> + have_dss = " 0 " <nl> + fi <nl> + else <nl> + have_dss = " 0 " <nl> + fi <nl> + <nl> + if test " x $ have_dss " = " x1 " ; then <nl> + $ as_echo " # define JEMALLOC_DSS " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + # Check whether - - enable - fill was given . <nl> + if test " $ { enable_fill + set } " = set ; then : <nl> + enableval = $ enable_fill ; if test " x $ enable_fill " = " xno " ; then <nl> + enable_fill = " 0 " <nl> + else <nl> + enable_fill = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_fill = " 1 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ enable_fill " = " x1 " ; then <nl> + $ as_echo " # define JEMALLOC_FILL " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + # Check whether - - enable - utrace was given . <nl> + if test " $ { enable_utrace + set } " = set ; then : <nl> + enableval = $ enable_utrace ; if test " x $ enable_utrace " = " xno " ; then <nl> + enable_utrace = " 0 " <nl> + else <nl> + enable_utrace = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_utrace = " 0 " <nl> + <nl> + fi <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether utrace ( 2 ) is compilable " > & 5 <nl> + $ as_echo_n " checking whether utrace ( 2 ) is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_utrace + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < sys / types . h > <nl> + # include < sys / param . h > <nl> + # include < sys / time . h > <nl> + # include < sys / uio . h > <nl> + # include < sys / ktrace . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + utrace ( ( void * ) 0 , 0 ) ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_utrace = yes <nl> + else <nl> + je_cv_utrace = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_utrace " > & 5 <nl> + $ as_echo " $ je_cv_utrace " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_utrace } " = " xno " ; then <nl> + enable_utrace = " 0 " <nl> + fi <nl> + if test " x $ enable_utrace " = " x1 " ; then <nl> + $ as_echo " # define JEMALLOC_UTRACE " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + # Check whether - - enable - xmalloc was given . <nl> + if test " $ { enable_xmalloc + set } " = set ; then : <nl> + enableval = $ enable_xmalloc ; if test " x $ enable_xmalloc " = " xno " ; then <nl> + enable_xmalloc = " 0 " <nl> + else <nl> + enable_xmalloc = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_xmalloc = " 0 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ enable_xmalloc " = " x1 " ; then <nl> + $ as_echo " # define JEMALLOC_XMALLOC " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + # Check whether - - enable - cache - oblivious was given . <nl> + if test " $ { enable_cache_oblivious + set } " = set ; then : <nl> + enableval = $ enable_cache_oblivious ; if test " x $ enable_cache_oblivious " = " xno " ; then <nl> + enable_cache_oblivious = " 0 " <nl> + else <nl> + enable_cache_oblivious = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_cache_oblivious = " 1 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ enable_cache_oblivious " = " x1 " ; then <nl> + $ as_echo " # define JEMALLOC_CACHE_OBLIVIOUS " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether a program using __builtin_unreachable is compilable " > & 5 <nl> + $ as_echo_n " checking whether a program using __builtin_unreachable is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_gcc_builtin_unreachable + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + void foo ( void ) { <nl> + __builtin_unreachable ( ) ; <nl> + } <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + { <nl> + foo ( ) ; <nl> + } <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_gcc_builtin_unreachable = yes <nl> + else <nl> + je_cv_gcc_builtin_unreachable = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_gcc_builtin_unreachable " > & 5 <nl> + $ as_echo " $ je_cv_gcc_builtin_unreachable " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_gcc_builtin_unreachable } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_INTERNAL_UNREACHABLE __builtin_unreachable " > > confdefs . h <nl> + <nl> + else <nl> + $ as_echo " # define JEMALLOC_INTERNAL_UNREACHABLE abort " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether a program using __builtin_ffsl is compilable " > & 5 <nl> + $ as_echo_n " checking whether a program using __builtin_ffsl is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_gcc_builtin_ffsl + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < stdio . h > <nl> + # include < strings . h > <nl> + # include < string . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + { <nl> + int rv = __builtin_ffsl ( 0x08 ) ; <nl> + printf ( " % d \ n " , rv ) ; <nl> + } <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_gcc_builtin_ffsl = yes <nl> + else <nl> + je_cv_gcc_builtin_ffsl = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_gcc_builtin_ffsl " > & 5 <nl> + $ as_echo " $ je_cv_gcc_builtin_ffsl " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_gcc_builtin_ffsl } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_INTERNAL_FFSLL __builtin_ffsll " > > confdefs . h <nl> + <nl> + $ as_echo " # define JEMALLOC_INTERNAL_FFSL __builtin_ffsl " > > confdefs . h <nl> + <nl> + $ as_echo " # define JEMALLOC_INTERNAL_FFS __builtin_ffs " > > confdefs . h <nl> + <nl> + else <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether a program using ffsl is compilable " > & 5 <nl> + $ as_echo_n " checking whether a program using ffsl is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_function_ffsl + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < stdio . h > <nl> + # include < strings . h > <nl> + # include < string . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + { <nl> + int rv = ffsl ( 0x08 ) ; <nl> + printf ( " % d \ n " , rv ) ; <nl> + } <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_function_ffsl = yes <nl> + else <nl> + je_cv_function_ffsl = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_function_ffsl " > & 5 <nl> + $ as_echo " $ je_cv_function_ffsl " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_function_ffsl } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_INTERNAL_FFSLL ffsll " > > confdefs . h <nl> + <nl> + $ as_echo " # define JEMALLOC_INTERNAL_FFSL ffsl " > > confdefs . h <nl> + <nl> + $ as_echo " # define JEMALLOC_INTERNAL_FFS ffs " > > confdefs . h <nl> + <nl> + else <nl> + as_fn_error $ ? " Cannot build without ffsl ( 3 ) or __builtin_ffsl ( ) " " $ LINENO " 5 <nl> + fi <nl> + fi <nl> + <nl> + <nl> + # Check whether - - with - lg_tiny_min was given . <nl> + if test " $ { with_lg_tiny_min + set } " = set ; then : <nl> + withval = $ with_lg_tiny_min ; LG_TINY_MIN = " $ with_lg_tiny_min " <nl> + else <nl> + LG_TINY_MIN = " 3 " <nl> + fi <nl> + <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define LG_TINY_MIN $ LG_TINY_MIN <nl> + _ACEOF <nl> + <nl> + <nl> + <nl> + # Check whether - - with - lg_quantum was given . <nl> + if test " $ { with_lg_quantum + set } " = set ; then : <nl> + withval = $ with_lg_quantum ; LG_QUANTA = " $ with_lg_quantum " <nl> + else <nl> + LG_QUANTA = " 3 4 " <nl> + fi <nl> + <nl> + if test " x $ with_lg_quantum " ! = " x " ; then <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define LG_QUANTUM $ with_lg_quantum <nl> + _ACEOF <nl> + <nl> + fi <nl> + <nl> + <nl> + # Check whether - - with - lg_page was given . <nl> + if test " $ { with_lg_page + set } " = set ; then : <nl> + withval = $ with_lg_page ; LG_PAGE = " $ with_lg_page " <nl> + else <nl> + LG_PAGE = " detect " <nl> + fi <nl> + <nl> + if test " x $ LG_PAGE " = " xdetect " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking LG_PAGE " > & 5 <nl> + $ as_echo_n " checking LG_PAGE . . . " > & 6 ; } <nl> + if $ { je_cv_lg_page + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + if test " $ cross_compiling " = yes ; then : <nl> + je_cv_lg_page = 12 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < strings . h > <nl> + # ifdef _WIN32 <nl> + # include < windows . h > <nl> + # else <nl> + # include < unistd . h > <nl> + # endif <nl> + # include < stdio . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + int result ; <nl> + FILE * f ; <nl> + <nl> + # ifdef _WIN32 <nl> + SYSTEM_INFO si ; <nl> + GetSystemInfo ( & si ) ; <nl> + result = si . dwPageSize ; <nl> + # else <nl> + result = sysconf ( _SC_PAGESIZE ) ; <nl> + # endif <nl> + if ( result = = - 1 ) { <nl> + return 1 ; <nl> + } <nl> + result = JEMALLOC_INTERNAL_FFSL ( result ) - 1 ; <nl> + <nl> + f = fopen ( " conftest . out " , " w " ) ; <nl> + if ( f = = NULL ) { <nl> + return 1 ; <nl> + } <nl> + fprintf ( f , " % d " , result ) ; <nl> + fclose ( f ) ; <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_run " $ LINENO " ; then : <nl> + je_cv_lg_page = ` cat conftest . out ` <nl> + else <nl> + je_cv_lg_page = undefined <nl> + fi <nl> + rm - f core * . core core . conftest . * gmon . out bb . out conftest $ ac_exeext \ <nl> + conftest . $ ac_objext conftest . beam conftest . $ ac_ext <nl> + fi <nl> + <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_lg_page " > & 5 <nl> + $ as_echo " $ je_cv_lg_page " > & 6 ; } <nl> + fi <nl> + if test " x $ { je_cv_lg_page } " ! = " x " ; then <nl> + LG_PAGE = " $ { je_cv_lg_page } " <nl> + fi <nl> + if test " x $ { LG_PAGE } " ! = " xundefined " ; then <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define LG_PAGE $ LG_PAGE <nl> + _ACEOF <nl> + <nl> + else <nl> + as_fn_error $ ? " cannot determine value for LG_PAGE " " $ LINENO " 5 <nl> + fi <nl> + <nl> + <nl> + # Check whether - - with - lg_hugepage was given . <nl> + if test " $ { with_lg_hugepage + set } " = set ; then : <nl> + withval = $ with_lg_hugepage ; je_cv_lg_hugepage = " $ { with_lg_hugepage } " <nl> + else <nl> + je_cv_lg_hugepage = " " <nl> + fi <nl> + <nl> + if test " x $ { je_cv_lg_hugepage } " = " x " ; then <nl> + if test - e " / proc / meminfo " ; then <nl> + hpsk = ` cat / proc / meminfo 2 > / dev / null | \ <nl> + grep - e ' ^ Hugepagesize : [ [ : space : ] ] \ + [ 0 - 9 ] \ + [ [ : space : ] ] kB $ ' | \ <nl> + awk ' { print $ 2 } ' ` <nl> + if test " x $ { hpsk } " ! = " x " ; then <nl> + je_cv_lg_hugepage = 10 <nl> + while test " $ { hpsk } " - gt 1 ; do <nl> + hpsk = " $ ( ( hpsk / 2 ) ) " <nl> + je_cv_lg_hugepage = " $ ( ( je_cv_lg_hugepage + 1 ) ) " <nl> + done <nl> + fi <nl> + fi <nl> + <nl> + if test " x $ { je_cv_lg_hugepage } " = " x " ; then <nl> + je_cv_lg_hugepage = 21 <nl> + fi <nl> + fi <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define LG_HUGEPAGE $ { je_cv_lg_hugepage } <nl> + _ACEOF <nl> + <nl> + <nl> + <nl> + # Check whether - - with - lg_page_sizes was given . <nl> + if test " $ { with_lg_page_sizes + set } " = set ; then : <nl> + withval = $ with_lg_page_sizes ; LG_PAGE_SIZES = " $ with_lg_page_sizes " <nl> + else <nl> + LG_PAGE_SIZES = " $ LG_PAGE " <nl> + fi <nl> + <nl> + <nl> + <nl> + # Check whether - - with - lg_size_class_group was given . <nl> + if test " $ { with_lg_size_class_group + set } " = set ; then : <nl> + withval = $ with_lg_size_class_group ; LG_SIZE_CLASS_GROUP = " $ with_lg_size_class_group " <nl> + else <nl> + LG_SIZE_CLASS_GROUP = " 2 " <nl> + fi <nl> + <nl> + <nl> + <nl> + <nl> + # Check whether - - with - version was given . <nl> + if test " $ { with_version + set } " = set ; then : <nl> + withval = $ with_version ; <nl> + echo " $ { with_version } " | grep ' ^ [ 0 - 9 ] \ + \ . [ 0 - 9 ] \ + \ . [ 0 - 9 ] \ + - [ 0 - 9 ] \ + - g [ 0 - 9a - f ] \ + $ ' 2 > & 1 1 > / dev / null <nl> + if test $ ? - ne 0 ; then <nl> + as_fn_error $ ? " $ { with_version } does not match < major > . < minor > . < bugfix > - < nrev > - g < gid > " " $ LINENO " 5 <nl> + fi <nl> + echo " $ with_version " > " $ { objroot } VERSION " <nl> + <nl> + else <nl> + <nl> + if test " x ` test ! \ " $ { srcroot } \ " & & cd \ " $ { srcroot } \ " ; git rev - parse - - is - inside - work - tree 2 > / dev / null ` " = " xtrue " ; then <nl> + for pattern in ' [ 0 - 9 ] . [ 0 - 9 ] . [ 0 - 9 ] ' ' [ 0 - 9 ] . [ 0 - 9 ] . [ 0 - 9 ] [ 0 - 9 ] ' \ <nl> + ' [ 0 - 9 ] . [ 0 - 9 ] [ 0 - 9 ] . [ 0 - 9 ] ' ' [ 0 - 9 ] . [ 0 - 9 ] [ 0 - 9 ] . [ 0 - 9 ] [ 0 - 9 ] ' \ <nl> + ' [ 0 - 9 ] [ 0 - 9 ] . [ 0 - 9 ] . [ 0 - 9 ] ' ' [ 0 - 9 ] [ 0 - 9 ] . [ 0 - 9 ] . [ 0 - 9 ] [ 0 - 9 ] ' \ <nl> + ' [ 0 - 9 ] [ 0 - 9 ] . [ 0 - 9 ] [ 0 - 9 ] . [ 0 - 9 ] ' \ <nl> + ' [ 0 - 9 ] [ 0 - 9 ] . [ 0 - 9 ] [ 0 - 9 ] . [ 0 - 9 ] [ 0 - 9 ] ' ; do <nl> + ( test ! " $ { srcroot } " & & cd " $ { srcroot } " ; git describe - - long - - abbrev = 40 - - match = " $ { pattern } " ) > " $ { objroot } VERSION . tmp " 2 > / dev / null <nl> + if test $ ? - eq 0 ; then <nl> + mv " $ { objroot } VERSION . tmp " " $ { objroot } VERSION " <nl> + break <nl> + fi <nl> + done <nl> + fi <nl> + rm - f " $ { objroot } VERSION . tmp " <nl> + <nl> + fi <nl> + <nl> + <nl> + if test ! - e " $ { objroot } VERSION " ; then <nl> + if test ! - e " $ { srcroot } VERSION " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : Missing VERSION file , and unable to generate it ; creating bogus VERSION " > & 5 <nl> + $ as_echo " Missing VERSION file , and unable to generate it ; creating bogus VERSION " > & 6 ; } <nl> + echo " 0 . 0 . 0 - 0 - g0000000000000000000000000000000000000000 " > " $ { objroot } VERSION " <nl> + else <nl> + cp $ { srcroot } VERSION $ { objroot } VERSION <nl> + fi <nl> + fi <nl> + jemalloc_version = ` cat " $ { objroot } VERSION " ` <nl> + jemalloc_version_major = ` echo $ { jemalloc_version } | tr " . g - " " " | awk ' { print $ 1 } ' ` <nl> + jemalloc_version_minor = ` echo $ { jemalloc_version } | tr " . g - " " " | awk ' { print $ 2 } ' ` <nl> + jemalloc_version_bugfix = ` echo $ { jemalloc_version } | tr " . g - " " " | awk ' { print $ 3 } ' ` <nl> + jemalloc_version_nrev = ` echo $ { jemalloc_version } | tr " . g - " " " | awk ' { print $ 4 } ' ` <nl> + jemalloc_version_gid = ` echo $ { jemalloc_version } | tr " . g - " " " | awk ' { print $ 5 } ' ` <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + if test " x $ abi " ! = " xpecoff " ; then <nl> + for ac_header in pthread . h <nl> + do : <nl> + ac_fn_c_check_header_mongrel " $ LINENO " " pthread . h " " ac_cv_header_pthread_h " " $ ac_includes_default " <nl> + if test " x $ ac_cv_header_pthread_h " = xyes ; then : <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define HAVE_PTHREAD_H 1 <nl> + _ACEOF <nl> + <nl> + else <nl> + as_fn_error $ ? " pthread . h is missing " " $ LINENO " 5 <nl> + fi <nl> + <nl> + done <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for pthread_create in - lpthread " > & 5 <nl> + $ as_echo_n " checking for pthread_create in - lpthread . . . " > & 6 ; } <nl> + if $ { ac_cv_lib_pthread_pthread_create + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + ac_check_lib_save_LIBS = $ LIBS <nl> + LIBS = " - lpthread $ LIBS " <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + / * Override any GCC internal prototype to avoid an error . <nl> + Use char because int might match the return type of a GCC <nl> + builtin and then its argument prototype would still apply . * / <nl> + # ifdef __cplusplus <nl> + extern " C " <nl> + # endif <nl> + char pthread_create ( ) ; <nl> + int <nl> + main ( ) <nl> + { <nl> + return pthread_create ( ) ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + ac_cv_lib_pthread_pthread_create = yes <nl> + else <nl> + ac_cv_lib_pthread_pthread_create = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + LIBS = $ ac_check_lib_save_LIBS <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_lib_pthread_pthread_create " > & 5 <nl> + $ as_echo " $ ac_cv_lib_pthread_pthread_create " > & 6 ; } <nl> + if test " x $ ac_cv_lib_pthread_pthread_create " = xyes ; then : <nl> + T_APPEND_V = - lpthread <nl> + if test " x $ { LIBS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + LIBS = " $ { LIBS } $ { T_APPEND_V } " <nl> + else <nl> + LIBS = " $ { LIBS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for library containing pthread_create " > & 5 <nl> + $ as_echo_n " checking for library containing pthread_create . . . " > & 6 ; } <nl> + if $ { ac_cv_search_pthread_create + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + ac_func_search_save_LIBS = $ LIBS <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + / * Override any GCC internal prototype to avoid an error . <nl> + Use char because int might match the return type of a GCC <nl> + builtin and then its argument prototype would still apply . * / <nl> + # ifdef __cplusplus <nl> + extern " C " <nl> + # endif <nl> + char pthread_create ( ) ; <nl> + int <nl> + main ( ) <nl> + { <nl> + return pthread_create ( ) ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + for ac_lib in ' ' ; do <nl> + if test - z " $ ac_lib " ; then <nl> + ac_res = " none required " <nl> + else <nl> + ac_res = - l $ ac_lib <nl> + LIBS = " - l $ ac_lib $ ac_func_search_save_LIBS " <nl> + fi <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + ac_cv_search_pthread_create = $ ac_res <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext <nl> + if $ { ac_cv_search_pthread_create + : } false ; then : <nl> + break <nl> + fi <nl> + done <nl> + if $ { ac_cv_search_pthread_create + : } false ; then : <nl> + <nl> + else <nl> + ac_cv_search_pthread_create = no <nl> + fi <nl> + rm conftest . $ ac_ext <nl> + LIBS = $ ac_func_search_save_LIBS <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_search_pthread_create " > & 5 <nl> + $ as_echo " $ ac_cv_search_pthread_create " > & 6 ; } <nl> + ac_res = $ ac_cv_search_pthread_create <nl> + if test " $ ac_res " ! = no ; then : <nl> + test " $ ac_res " = " none required " | | LIBS = " $ ac_res $ LIBS " <nl> + <nl> + else <nl> + as_fn_error $ ? " libpthread is missing " " $ LINENO " 5 <nl> + fi <nl> + <nl> + fi <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether pthread_atfork ( 3 ) is compilable " > & 5 <nl> + $ as_echo_n " checking whether pthread_atfork ( 3 ) is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_pthread_atfork + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < pthread . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + pthread_atfork ( ( void * ) 0 , ( void * ) 0 , ( void * ) 0 ) ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_pthread_atfork = yes <nl> + else <nl> + je_cv_pthread_atfork = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_pthread_atfork " > & 5 <nl> + $ as_echo " $ je_cv_pthread_atfork " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_pthread_atfork } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_HAVE_PTHREAD_ATFORK " > > confdefs . h <nl> + <nl> + fi <nl> + fi <nl> + <nl> + T_APPEND_V = - D_REENTRANT <nl> + if test " x $ { CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CFLAGS = " $ { CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CFLAGS = " $ { CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for library containing clock_gettime " > & 5 <nl> + $ as_echo_n " checking for library containing clock_gettime . . . " > & 6 ; } <nl> + if $ { ac_cv_search_clock_gettime + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + ac_func_search_save_LIBS = $ LIBS <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + / * Override any GCC internal prototype to avoid an error . <nl> + Use char because int might match the return type of a GCC <nl> + builtin and then its argument prototype would still apply . * / <nl> + # ifdef __cplusplus <nl> + extern " C " <nl> + # endif <nl> + char clock_gettime ( ) ; <nl> + int <nl> + main ( ) <nl> + { <nl> + return clock_gettime ( ) ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + for ac_lib in ' ' rt ; do <nl> + if test - z " $ ac_lib " ; then <nl> + ac_res = " none required " <nl> + else <nl> + ac_res = - l $ ac_lib <nl> + LIBS = " - l $ ac_lib $ ac_func_search_save_LIBS " <nl> + fi <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + ac_cv_search_clock_gettime = $ ac_res <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext <nl> + if $ { ac_cv_search_clock_gettime + : } false ; then : <nl> + break <nl> + fi <nl> + done <nl> + if $ { ac_cv_search_clock_gettime + : } false ; then : <nl> + <nl> + else <nl> + ac_cv_search_clock_gettime = no <nl> + fi <nl> + rm conftest . $ ac_ext <nl> + LIBS = $ ac_func_search_save_LIBS <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_search_clock_gettime " > & 5 <nl> + $ as_echo " $ ac_cv_search_clock_gettime " > & 6 ; } <nl> + ac_res = $ ac_cv_search_clock_gettime <nl> + if test " $ ac_res " ! = no ; then : <nl> + test " $ ac_res " = " none required " | | LIBS = " $ ac_res $ LIBS " <nl> + <nl> + fi <nl> + <nl> + <nl> + if test " x $ je_cv_cray_prgenv_wrapper " = " xyes " ; then <nl> + if test " $ ac_cv_search_clock_gettime " ! = " - lrt " ; then <nl> + SAVED_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + <nl> + <nl> + unset ac_cv_search_clock_gettime <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - dynamic " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - dynamic . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - dynamic <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - dynamic <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for library containing clock_gettime " > & 5 <nl> + $ as_echo_n " checking for library containing clock_gettime . . . " > & 6 ; } <nl> + if $ { ac_cv_search_clock_gettime + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + ac_func_search_save_LIBS = $ LIBS <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + / * Override any GCC internal prototype to avoid an error . <nl> + Use char because int might match the return type of a GCC <nl> + builtin and then its argument prototype would still apply . * / <nl> + # ifdef __cplusplus <nl> + extern " C " <nl> + # endif <nl> + char clock_gettime ( ) ; <nl> + int <nl> + main ( ) <nl> + { <nl> + return clock_gettime ( ) ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + for ac_lib in ' ' rt ; do <nl> + if test - z " $ ac_lib " ; then <nl> + ac_res = " none required " <nl> + else <nl> + ac_res = - l $ ac_lib <nl> + LIBS = " - l $ ac_lib $ ac_func_search_save_LIBS " <nl> + fi <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + ac_cv_search_clock_gettime = $ ac_res <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext <nl> + if $ { ac_cv_search_clock_gettime + : } false ; then : <nl> + break <nl> + fi <nl> + done <nl> + if $ { ac_cv_search_clock_gettime + : } false ; then : <nl> + <nl> + else <nl> + ac_cv_search_clock_gettime = no <nl> + fi <nl> + rm conftest . $ ac_ext <nl> + LIBS = $ ac_func_search_save_LIBS <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_search_clock_gettime " > & 5 <nl> + $ as_echo " $ ac_cv_search_clock_gettime " > & 6 ; } <nl> + ac_res = $ ac_cv_search_clock_gettime <nl> + if test " $ ac_res " ! = no ; then : <nl> + test " $ ac_res " = " none required " | | LIBS = " $ ac_res $ LIBS " <nl> + <nl> + fi <nl> + <nl> + <nl> + CONFIGURE_CFLAGS = " $ { SAVED_CONFIGURE_CFLAGS } " <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + fi <nl> + fi <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether clock_gettime ( CLOCK_MONOTONIC_COARSE , . . . ) is compilable " > & 5 <nl> + $ as_echo_n " checking whether clock_gettime ( CLOCK_MONOTONIC_COARSE , . . . ) is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_clock_monotonic_coarse + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < time . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + struct timespec ts ; <nl> + <nl> + clock_gettime ( CLOCK_MONOTONIC_COARSE , & ts ) ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_clock_monotonic_coarse = yes <nl> + else <nl> + je_cv_clock_monotonic_coarse = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_clock_monotonic_coarse " > & 5 <nl> + $ as_echo " $ je_cv_clock_monotonic_coarse " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_clock_monotonic_coarse } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_HAVE_CLOCK_MONOTONIC_COARSE 1 " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether clock_gettime ( CLOCK_MONOTONIC , . . . ) is compilable " > & 5 <nl> + $ as_echo_n " checking whether clock_gettime ( CLOCK_MONOTONIC , . . . ) is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_clock_monotonic + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < unistd . h > <nl> + # include < time . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + struct timespec ts ; <nl> + <nl> + clock_gettime ( CLOCK_MONOTONIC , & ts ) ; <nl> + # if ! defined ( _POSIX_MONOTONIC_CLOCK ) | | _POSIX_MONOTONIC_CLOCK < 0 <nl> + # error _POSIX_MONOTONIC_CLOCK missing / invalid <nl> + # endif <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_clock_monotonic = yes <nl> + else <nl> + je_cv_clock_monotonic = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_clock_monotonic " > & 5 <nl> + $ as_echo " $ je_cv_clock_monotonic " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_clock_monotonic } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_HAVE_CLOCK_MONOTONIC 1 " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether mach_absolute_time ( ) is compilable " > & 5 <nl> + $ as_echo_n " checking whether mach_absolute_time ( ) is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_mach_absolute_time + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < mach / mach_time . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + mach_absolute_time ( ) ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_mach_absolute_time = yes <nl> + else <nl> + je_cv_mach_absolute_time = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_mach_absolute_time " > & 5 <nl> + $ as_echo " $ je_cv_mach_absolute_time " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_mach_absolute_time } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_HAVE_MACH_ABSOLUTE_TIME 1 " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + # Check whether - - enable - syscall was given . <nl> + if test " $ { enable_syscall + set } " = set ; then : <nl> + enableval = $ enable_syscall ; if test " x $ enable_syscall " = " xno " ; then <nl> + enable_syscall = " 0 " <nl> + else <nl> + enable_syscall = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_syscall = " 1 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ enable_syscall " = " x1 " ; then <nl> + SAVED_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether compiler supports - Werror " > & 5 <nl> + $ as_echo_n " checking whether compiler supports - Werror . . . " > & 6 ; } <nl> + T_CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } " <nl> + T_APPEND_V = - Werror <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + else <nl> + CONFIGURE_CFLAGS = " $ { CONFIGURE_CFLAGS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + je_cv_cflags_added = - Werror <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + je_cv_cflags_added = <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + CONFIGURE_CFLAGS = " $ { T_CONFIGURE_CFLAGS } " <nl> + <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether syscall ( 2 ) is compilable " > & 5 <nl> + $ as_echo_n " checking whether syscall ( 2 ) is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_syscall + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < sys / syscall . h > <nl> + # include < unistd . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + syscall ( SYS_write , 2 , " hello " , 5 ) ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_syscall = yes <nl> + else <nl> + je_cv_syscall = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_syscall " > & 5 <nl> + $ as_echo " $ je_cv_syscall " > & 6 ; } <nl> + <nl> + CONFIGURE_CFLAGS = " $ { SAVED_CONFIGURE_CFLAGS } " <nl> + if test " x $ { CONFIGURE_CFLAGS } " = " x " - o " x $ { SPECIFIED_CFLAGS } " = " x " ; then <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + else <nl> + CFLAGS = " $ { CONFIGURE_CFLAGS } $ { SPECIFIED_CFLAGS } " <nl> + fi <nl> + <nl> + <nl> + if test " x $ je_cv_syscall " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_USE_SYSCALL " > > confdefs . h <nl> + <nl> + fi <nl> + fi <nl> + <nl> + ac_fn_c_check_func " $ LINENO " " secure_getenv " " ac_cv_func_secure_getenv " <nl> + if test " x $ ac_cv_func_secure_getenv " = xyes ; then : <nl> + have_secure_getenv = " 1 " <nl> + else <nl> + have_secure_getenv = " 0 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ have_secure_getenv " = " x1 " ; then <nl> + $ as_echo " # define JEMALLOC_HAVE_SECURE_GETENV " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + ac_fn_c_check_func " $ LINENO " " issetugid " " ac_cv_func_issetugid " <nl> + if test " x $ ac_cv_func_issetugid " = xyes ; then : <nl> + have_issetugid = " 1 " <nl> + else <nl> + have_issetugid = " 0 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ have_issetugid " = " x1 " ; then <nl> + $ as_echo " # define JEMALLOC_HAVE_ISSETUGID " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + ac_fn_c_check_func " $ LINENO " " _malloc_thread_cleanup " " ac_cv_func__malloc_thread_cleanup " <nl> + if test " x $ ac_cv_func__malloc_thread_cleanup " = xyes ; then : <nl> + have__malloc_thread_cleanup = " 1 " <nl> + else <nl> + have__malloc_thread_cleanup = " 0 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ have__malloc_thread_cleanup " = " x1 " ; then <nl> + $ as_echo " # define JEMALLOC_MALLOC_THREAD_CLEANUP " > > confdefs . h <nl> + <nl> + force_tls = " 1 " <nl> + fi <nl> + <nl> + ac_fn_c_check_func " $ LINENO " " _pthread_mutex_init_calloc_cb " " ac_cv_func__pthread_mutex_init_calloc_cb " <nl> + if test " x $ ac_cv_func__pthread_mutex_init_calloc_cb " = xyes ; then : <nl> + have__pthread_mutex_init_calloc_cb = " 1 " <nl> + else <nl> + have__pthread_mutex_init_calloc_cb = " 0 " <nl> + <nl> + fi <nl> + <nl> + if test " x $ have__pthread_mutex_init_calloc_cb " = " x1 " ; then <nl> + $ as_echo " # define JEMALLOC_MUTEX_INIT_CB 1 " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + # Check whether - - enable - lazy_lock was given . <nl> + if test " $ { enable_lazy_lock + set } " = set ; then : <nl> + enableval = $ enable_lazy_lock ; if test " x $ enable_lazy_lock " = " xno " ; then <nl> + enable_lazy_lock = " 0 " <nl> + else <nl> + enable_lazy_lock = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_lazy_lock = " " <nl> + <nl> + fi <nl> + <nl> + if test " x $ { enable_lazy_lock } " = " x " ; then <nl> + if test " x $ { force_lazy_lock } " = " x1 " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : Forcing lazy - lock to avoid allocator / threading bootstrap issues " > & 5 <nl> + $ as_echo " Forcing lazy - lock to avoid allocator / threading bootstrap issues " > & 6 ; } <nl> + enable_lazy_lock = " 1 " <nl> + else <nl> + enable_lazy_lock = " 0 " <nl> + fi <nl> + fi <nl> + if test " x $ { enable_lazy_lock } " = " x1 " - a " x $ { abi } " = " xpecoff " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : Forcing no lazy - lock because thread creation monitoring is unimplemented " > & 5 <nl> + $ as_echo " Forcing no lazy - lock because thread creation monitoring is unimplemented " > & 6 ; } <nl> + enable_lazy_lock = " 0 " <nl> + fi <nl> + if test " x $ enable_lazy_lock " = " x1 " ; then <nl> + if test " x $ abi " ! = " xpecoff " ; then <nl> + for ac_header in dlfcn . h <nl> + do : <nl> + ac_fn_c_check_header_mongrel " $ LINENO " " dlfcn . h " " ac_cv_header_dlfcn_h " " $ ac_includes_default " <nl> + if test " x $ ac_cv_header_dlfcn_h " = xyes ; then : <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define HAVE_DLFCN_H 1 <nl> + _ACEOF <nl> + <nl> + else <nl> + as_fn_error $ ? " dlfcn . h is missing " " $ LINENO " 5 <nl> + fi <nl> + <nl> + done <nl> + <nl> + ac_fn_c_check_func " $ LINENO " " dlsym " " ac_cv_func_dlsym " <nl> + if test " x $ ac_cv_func_dlsym " = xyes ; then : <nl> + <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for dlsym in - ldl " > & 5 <nl> + $ as_echo_n " checking for dlsym in - ldl . . . " > & 6 ; } <nl> + if $ { ac_cv_lib_dl_dlsym + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + ac_check_lib_save_LIBS = $ LIBS <nl> + LIBS = " - ldl $ LIBS " <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + / * Override any GCC internal prototype to avoid an error . <nl> + Use char because int might match the return type of a GCC <nl> + builtin and then its argument prototype would still apply . * / <nl> + # ifdef __cplusplus <nl> + extern " C " <nl> + # endif <nl> + char dlsym ( ) ; <nl> + int <nl> + main ( ) <nl> + { <nl> + return dlsym ( ) ; <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + ac_cv_lib_dl_dlsym = yes <nl> + else <nl> + ac_cv_lib_dl_dlsym = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + LIBS = $ ac_check_lib_save_LIBS <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_lib_dl_dlsym " > & 5 <nl> + $ as_echo " $ ac_cv_lib_dl_dlsym " > & 6 ; } <nl> + if test " x $ ac_cv_lib_dl_dlsym " = xyes ; then : <nl> + T_APPEND_V = - ldl <nl> + if test " x $ { LIBS } " = " x " - o " x $ { T_APPEND_V } " = " x " ; then <nl> + LIBS = " $ { LIBS } $ { T_APPEND_V } " <nl> + else <nl> + LIBS = " $ { LIBS } $ { T_APPEND_V } " <nl> + fi <nl> + <nl> + <nl> + else <nl> + as_fn_error $ ? " libdl is missing " " $ LINENO " 5 <nl> + fi <nl> + <nl> + <nl> + fi <nl> + <nl> + fi <nl> + $ as_echo " # define JEMALLOC_LAZY_LOCK " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + # Check whether - - enable - tls was given . <nl> + if test " $ { enable_tls + set } " = set ; then : <nl> + enableval = $ enable_tls ; if test " x $ enable_tls " = " xno " ; then <nl> + enable_tls = " 0 " <nl> + else <nl> + enable_tls = " 1 " <nl> + fi <nl> + <nl> + else <nl> + enable_tls = " " <nl> + <nl> + fi <nl> + <nl> + if test " x $ { enable_tls } " = " x " ; then <nl> + if test " x $ { force_tls } " = " x1 " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : Forcing TLS to avoid allocator / threading bootstrap issues " > & 5 <nl> + $ as_echo " Forcing TLS to avoid allocator / threading bootstrap issues " > & 6 ; } <nl> + enable_tls = " 1 " <nl> + elif test " x $ { force_tls } " = " x0 " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : Forcing no TLS to avoid allocator / threading bootstrap issues " > & 5 <nl> + $ as_echo " Forcing no TLS to avoid allocator / threading bootstrap issues " > & 6 ; } <nl> + enable_tls = " 0 " <nl> + else <nl> + enable_tls = " 1 " <nl> + fi <nl> + fi <nl> + if test " x $ { enable_tls } " = " x1 " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for TLS " > & 5 <nl> + $ as_echo_n " checking for TLS . . . " > & 6 ; } <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + __thread int x ; <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + x = 42 ; <nl> + <nl> + return 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : yes " > & 5 <nl> + $ as_echo " yes " > & 6 ; } <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : no " > & 5 <nl> + $ as_echo " no " > & 6 ; } <nl> + enable_tls = " 0 " <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + else <nl> + enable_tls = " 0 " <nl> + fi <nl> + <nl> + if test " x $ { enable_tls } " = " x1 " ; then <nl> + if test " x $ { force_tls } " = " x0 " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : TLS enabled despite being marked unusable on this platform " > & 5 <nl> + $ as_echo " $ as_me : WARNING : TLS enabled despite being marked unusable on this platform " > & 2 ; } <nl> + fi <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define JEMALLOC_TLS <nl> + _ACEOF <nl> + <nl> + elif test " x $ { force_tls } " = " x1 " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : TLS disabled despite being marked critical on this platform " > & 5 <nl> + $ as_echo " $ as_me : WARNING : TLS disabled despite being marked critical on this platform " > & 2 ; } <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether C11 atomics is compilable " > & 5 <nl> + $ as_echo_n " checking whether C11 atomics is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_c11atomics + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < stdint . h > <nl> + # if ( __STDC_VERSION__ > = 201112L ) & & ! defined ( __STDC_NO_ATOMICS__ ) <nl> + # include < stdatomic . h > <nl> + # else <nl> + # error Atomics not available <nl> + # endif <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + uint64_t * p = ( uint64_t * ) 0 ; <nl> + uint64_t x = 1 ; <nl> + volatile atomic_uint_least64_t * a = ( volatile atomic_uint_least64_t * ) p ; <nl> + uint64_t r = atomic_fetch_add ( a , x ) + x ; <nl> + return r = = 0 ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_c11atomics = yes <nl> + else <nl> + je_cv_c11atomics = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_c11atomics " > & 5 <nl> + $ as_echo " $ je_cv_c11atomics " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_c11atomics } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_C11ATOMICS 1 " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether atomic ( 9 ) is compilable " > & 5 <nl> + $ as_echo_n " checking whether atomic ( 9 ) is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_atomic9 + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < sys / types . h > <nl> + # include < machine / atomic . h > <nl> + # include < inttypes . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + { <nl> + uint32_t x32 = 0 ; <nl> + volatile uint32_t * x32p = & x32 ; <nl> + atomic_fetchadd_32 ( x32p , 1 ) ; <nl> + } <nl> + { <nl> + unsigned long xlong = 0 ; <nl> + volatile unsigned long * xlongp = & xlong ; <nl> + atomic_fetchadd_long ( xlongp , 1 ) ; <nl> + } <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_atomic9 = yes <nl> + else <nl> + je_cv_atomic9 = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_atomic9 " > & 5 <nl> + $ as_echo " $ je_cv_atomic9 " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_atomic9 } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_ATOMIC9 1 " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether Darwin OSAtomic * ( ) is compilable " > & 5 <nl> + $ as_echo_n " checking whether Darwin OSAtomic * ( ) is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_osatomic + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < libkern / OSAtomic . h > <nl> + # include < inttypes . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + { <nl> + int32_t x32 = 0 ; <nl> + volatile int32_t * x32p = & x32 ; <nl> + OSAtomicAdd32 ( 1 , x32p ) ; <nl> + } <nl> + { <nl> + int64_t x64 = 0 ; <nl> + volatile int64_t * x64p = & x64 ; <nl> + OSAtomicAdd64 ( 1 , x64p ) ; <nl> + } <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_osatomic = yes <nl> + else <nl> + je_cv_osatomic = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_osatomic " > & 5 <nl> + $ as_echo " $ je_cv_osatomic " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_osatomic } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_OSATOMIC " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether madvise ( 2 ) is compilable " > & 5 <nl> + $ as_echo_n " checking whether madvise ( 2 ) is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_madvise + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < sys / mman . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + madvise ( ( void * ) 0 , 0 , 0 ) ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_madvise = yes <nl> + else <nl> + je_cv_madvise = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_madvise " > & 5 <nl> + $ as_echo " $ je_cv_madvise " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_madvise } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_HAVE_MADVISE " > > confdefs . h <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether madvise ( . . . , MADV_FREE ) is compilable " > & 5 <nl> + $ as_echo_n " checking whether madvise ( . . . , MADV_FREE ) is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_madv_free + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < sys / mman . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + madvise ( ( void * ) 0 , 0 , MADV_FREE ) ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_madv_free = yes <nl> + else <nl> + je_cv_madv_free = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_madv_free " > & 5 <nl> + $ as_echo " $ je_cv_madv_free " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_madv_free } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_PURGE_MADVISE_FREE " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether madvise ( . . . , MADV_DONTNEED ) is compilable " > & 5 <nl> + $ as_echo_n " checking whether madvise ( . . . , MADV_DONTNEED ) is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_madv_dontneed + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < sys / mman . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + madvise ( ( void * ) 0 , 0 , MADV_DONTNEED ) ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_madv_dontneed = yes <nl> + else <nl> + je_cv_madv_dontneed = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_madv_dontneed " > & 5 <nl> + $ as_echo " $ je_cv_madv_dontneed " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_madv_dontneed } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_PURGE_MADVISE_DONTNEED " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether madvise ( . . . , MADV_ [ NO ] HUGEPAGE ) is compilable " > & 5 <nl> + $ as_echo_n " checking whether madvise ( . . . , MADV_ [ NO ] HUGEPAGE ) is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_thp + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < sys / mman . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + madvise ( ( void * ) 0 , 0 , MADV_HUGEPAGE ) ; <nl> + madvise ( ( void * ) 0 , 0 , MADV_NOHUGEPAGE ) ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_thp = yes <nl> + else <nl> + je_cv_thp = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_thp " > & 5 <nl> + $ as_echo " $ je_cv_thp " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_thp } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_THP " > > confdefs . h <nl> + <nl> + fi <nl> + fi <nl> + <nl> + <nl> + <nl> + <nl> + if test " x $ { je_cv_atomic9 } " ! = " xyes " - a " x $ { je_cv_osatomic } " ! = " xyes " ; then <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether to force 32 - bit __sync_ { add , sub } _and_fetch ( ) " > & 5 <nl> + $ as_echo_n " checking whether to force 32 - bit __sync_ { add , sub } _and_fetch ( ) . . . " > & 6 ; } <nl> + if $ { je_cv_sync_compare_and_swap_4 + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < stdint . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + # ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 <nl> + { <nl> + uint32_t x32 = 0 ; <nl> + __sync_add_and_fetch ( & x32 , 42 ) ; <nl> + __sync_sub_and_fetch ( & x32 , 1 ) ; <nl> + } <nl> + # else <nl> + # error __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 is defined , no need to force <nl> + # endif <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_sync_compare_and_swap_4 = yes <nl> + else <nl> + je_cv_sync_compare_and_swap_4 = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_sync_compare_and_swap_4 " > & 5 <nl> + $ as_echo " $ je_cv_sync_compare_and_swap_4 " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_sync_compare_and_swap_4 } " = " xyes " ; then <nl> + $ as_echo " # define JE_FORCE_SYNC_COMPARE_AND_SWAP_4 " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether to force 64 - bit __sync_ { add , sub } _and_fetch ( ) " > & 5 <nl> + $ as_echo_n " checking whether to force 64 - bit __sync_ { add , sub } _and_fetch ( ) . . . " > & 6 ; } <nl> + if $ { je_cv_sync_compare_and_swap_8 + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < stdint . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + # ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 <nl> + { <nl> + uint64_t x64 = 0 ; <nl> + __sync_add_and_fetch ( & x64 , 42 ) ; <nl> + __sync_sub_and_fetch ( & x64 , 1 ) ; <nl> + } <nl> + # else <nl> + # error __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 is defined , no need to force <nl> + # endif <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_sync_compare_and_swap_8 = yes <nl> + else <nl> + je_cv_sync_compare_and_swap_8 = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_sync_compare_and_swap_8 " > & 5 <nl> + $ as_echo " $ je_cv_sync_compare_and_swap_8 " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_sync_compare_and_swap_8 } " = " xyes " ; then <nl> + $ as_echo " # define JE_FORCE_SYNC_COMPARE_AND_SWAP_8 " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + fi <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for __builtin_clz " > & 5 <nl> + $ as_echo_n " checking for __builtin_clz . . . " > & 6 ; } <nl> + if $ { je_cv_builtin_clz + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + { <nl> + unsigned x = 0 ; <nl> + int y = __builtin_clz ( x ) ; <nl> + } <nl> + { <nl> + unsigned long x = 0 ; <nl> + int y = __builtin_clzl ( x ) ; <nl> + } <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_builtin_clz = yes <nl> + else <nl> + je_cv_builtin_clz = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_builtin_clz " > & 5 <nl> + $ as_echo " $ je_cv_builtin_clz " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_builtin_clz } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_HAVE_BUILTIN_CLZ " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether Darwin os_unfair_lock_ * ( ) is compilable " > & 5 <nl> + $ as_echo_n " checking whether Darwin os_unfair_lock_ * ( ) is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_os_unfair_lock + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < os / lock . h > <nl> + # include < AvailabilityMacros . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + # if MAC_OS_X_VERSION_MIN_REQUIRED < 101200 <nl> + # error " os_unfair_lock is not supported " <nl> + # else <nl> + os_unfair_lock lock = OS_UNFAIR_LOCK_INIT ; <nl> + os_unfair_lock_lock ( & lock ) ; <nl> + os_unfair_lock_unlock ( & lock ) ; <nl> + # endif <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_os_unfair_lock = yes <nl> + else <nl> + je_cv_os_unfair_lock = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_os_unfair_lock " > & 5 <nl> + $ as_echo " $ je_cv_os_unfair_lock " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_os_unfair_lock } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_OS_UNFAIR_LOCK " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether Darwin OSSpin * ( ) is compilable " > & 5 <nl> + $ as_echo_n " checking whether Darwin OSSpin * ( ) is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_osspin + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < libkern / OSAtomic . h > <nl> + # include < inttypes . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + OSSpinLock lock = 0 ; <nl> + OSSpinLockLock ( & lock ) ; <nl> + OSSpinLockUnlock ( & lock ) ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_osspin = yes <nl> + else <nl> + je_cv_osspin = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_osspin " > & 5 <nl> + $ as_echo " $ je_cv_osspin " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_osspin } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_OSSPIN " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + # Check whether - - enable - zone - allocator was given . <nl> + if test " $ { enable_zone_allocator + set } " = set ; then : <nl> + enableval = $ enable_zone_allocator ; if test " x $ enable_zone_allocator " = " xno " ; then <nl> + enable_zone_allocator = " 0 " <nl> + else <nl> + enable_zone_allocator = " 1 " <nl> + fi <nl> + <nl> + else <nl> + if test " x $ { abi } " = " xmacho " ; then <nl> + enable_zone_allocator = " 1 " <nl> + fi <nl> + <nl> + <nl> + fi <nl> + <nl> + <nl> + <nl> + if test " x $ { enable_zone_allocator } " = " x1 " ; then <nl> + if test " x $ { abi } " ! = " xmacho " ; then <nl> + as_fn_error $ ? " - - enable - zone - allocator is only supported on Darwin " " $ LINENO " 5 <nl> + fi <nl> + $ as_echo " # define JEMALLOC_ZONE " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether glibc malloc hook is compilable " > & 5 <nl> + $ as_echo_n " checking whether glibc malloc hook is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_glibc_malloc_hook + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < stddef . h > <nl> + <nl> + extern void ( * __free_hook ) ( void * ptr ) ; <nl> + extern void * ( * __malloc_hook ) ( size_t size ) ; <nl> + extern void * ( * __realloc_hook ) ( void * ptr , size_t size ) ; <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + void * ptr = 0L ; <nl> + if ( __malloc_hook ) ptr = __malloc_hook ( 1 ) ; <nl> + if ( __realloc_hook ) ptr = __realloc_hook ( ptr , 2 ) ; <nl> + if ( __free_hook & & ptr ) __free_hook ( ptr ) ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_glibc_malloc_hook = yes <nl> + else <nl> + je_cv_glibc_malloc_hook = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_glibc_malloc_hook " > & 5 <nl> + $ as_echo " $ je_cv_glibc_malloc_hook " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_glibc_malloc_hook } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_GLIBC_MALLOC_HOOK " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether glibc memalign hook is compilable " > & 5 <nl> + $ as_echo_n " checking whether glibc memalign hook is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_glibc_memalign_hook + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < stddef . h > <nl> + <nl> + extern void * ( * __memalign_hook ) ( size_t alignment , size_t size ) ; <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + void * ptr = 0L ; <nl> + if ( __memalign_hook ) ptr = __memalign_hook ( 16 , 7 ) ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_glibc_memalign_hook = yes <nl> + else <nl> + je_cv_glibc_memalign_hook = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_glibc_memalign_hook " > & 5 <nl> + $ as_echo " $ je_cv_glibc_memalign_hook " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_glibc_memalign_hook } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_GLIBC_MEMALIGN_HOOK " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking whether pthreads adaptive mutexes is compilable " > & 5 <nl> + $ as_echo_n " checking whether pthreads adaptive mutexes is compilable . . . " > & 6 ; } <nl> + if $ { je_cv_pthread_mutex_adaptive_np + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < pthread . h > <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + pthread_mutexattr_t attr ; <nl> + pthread_mutexattr_init ( & attr ) ; <nl> + pthread_mutexattr_settype ( & attr , PTHREAD_MUTEX_ADAPTIVE_NP ) ; <nl> + pthread_mutexattr_destroy ( & attr ) ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_link " $ LINENO " ; then : <nl> + je_cv_pthread_mutex_adaptive_np = yes <nl> + else <nl> + je_cv_pthread_mutex_adaptive_np = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext \ <nl> + conftest $ ac_exeext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ je_cv_pthread_mutex_adaptive_np " > & 5 <nl> + $ as_echo " $ je_cv_pthread_mutex_adaptive_np " > & 6 ; } <nl> + <nl> + if test " x $ { je_cv_pthread_mutex_adaptive_np } " = " xyes " ; then <nl> + $ as_echo " # define JEMALLOC_HAVE_PTHREAD_MUTEX_ADAPTIVE_NP " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : checking for stdbool . h that conforms to C99 " > & 5 <nl> + $ as_echo_n " checking for stdbool . h that conforms to C99 . . . " > & 6 ; } <nl> + if $ { ac_cv_header_stdbool_h + : } false ; then : <nl> + $ as_echo_n " ( cached ) " > & 6 <nl> + else <nl> + cat confdefs . h - < < _ACEOF > conftest . $ ac_ext <nl> + / * end confdefs . h . * / <nl> + <nl> + # include < stdbool . h > <nl> + # ifndef bool <nl> + " error : bool is not defined " <nl> + # endif <nl> + # ifndef false <nl> + " error : false is not defined " <nl> + # endif <nl> + # if false <nl> + " error : false is not 0 " <nl> + # endif <nl> + # ifndef true <nl> + " error : true is not defined " <nl> + # endif <nl> + # if true ! = 1 <nl> + " error : true is not 1 " <nl> + # endif <nl> + # ifndef __bool_true_false_are_defined <nl> + " error : __bool_true_false_are_defined is not defined " <nl> + # endif <nl> + <nl> + struct s { _Bool s : 1 ; _Bool t ; } s ; <nl> + <nl> + char a [ true = = 1 ? 1 : - 1 ] ; <nl> + char b [ false = = 0 ? 1 : - 1 ] ; <nl> + char c [ __bool_true_false_are_defined = = 1 ? 1 : - 1 ] ; <nl> + char d [ ( bool ) 0 . 5 = = true ? 1 : - 1 ] ; <nl> + / * See body of main program for ' e ' . * / <nl> + char f [ ( _Bool ) 0 . 0 = = false ? 1 : - 1 ] ; <nl> + char g [ true ] ; <nl> + char h [ sizeof ( _Bool ) ] ; <nl> + char i [ sizeof s . t ] ; <nl> + enum { j = false , k = true , l = false * true , m = true * 256 } ; <nl> + / * The following fails for <nl> + HP aC + + / ANSI C B3910B A . 05 . 55 [ Dec 04 2003 ] . * / <nl> + _Bool n [ m ] ; <nl> + char o [ sizeof n = = m * sizeof n [ 0 ] ? 1 : - 1 ] ; <nl> + char p [ - 1 - ( _Bool ) 0 < 0 & & - 1 - ( bool ) 0 < 0 ? 1 : - 1 ] ; <nl> + / * Catch a bug in an HP - UX C compiler . See <nl> + http : / / gcc . gnu . org / ml / gcc - patches / 2003 - 12 / msg02303 . html <nl> + http : / / lists . gnu . org / archive / html / bug - coreutils / 2005 - 11 / msg00161 . html <nl> + * / <nl> + _Bool q = true ; <nl> + _Bool * pq = & q ; <nl> + <nl> + int <nl> + main ( ) <nl> + { <nl> + <nl> + bool e = & s ; <nl> + * pq | = q ; <nl> + * pq | = ! q ; <nl> + / * Refer to every declared value , to avoid compiler optimizations . * / <nl> + return ( ! a + ! b + ! c + ! d + ! e + ! f + ! g + ! h + ! i + ! ! j + ! k + ! ! l <nl> + + ! m + ! n + ! o + ! p + ! q + ! pq ) ; <nl> + <nl> + ; <nl> + return 0 ; <nl> + } <nl> + _ACEOF <nl> + if ac_fn_c_try_compile " $ LINENO " ; then : <nl> + ac_cv_header_stdbool_h = yes <nl> + else <nl> + ac_cv_header_stdbool_h = no <nl> + fi <nl> + rm - f core conftest . err conftest . $ ac_objext conftest . $ ac_ext <nl> + fi <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : $ ac_cv_header_stdbool_h " > & 5 <nl> + $ as_echo " $ ac_cv_header_stdbool_h " > & 6 ; } <nl> + ac_fn_c_check_type " $ LINENO " " _Bool " " ac_cv_type__Bool " " $ ac_includes_default " <nl> + if test " x $ ac_cv_type__Bool " = xyes ; then : <nl> + <nl> + cat > > confdefs . h < < _ACEOF <nl> + # define HAVE__BOOL 1 <nl> + _ACEOF <nl> + <nl> + <nl> + fi <nl> + <nl> + <nl> + if test $ ac_cv_header_stdbool_h = yes ; then <nl> + <nl> + $ as_echo " # define HAVE_STDBOOL_H 1 " > > confdefs . h <nl> + <nl> + fi <nl> + <nl> + <nl> + <nl> + ac_config_commands = " $ ac_config_commands include / jemalloc / internal / private_namespace . h " <nl> + <nl> + ac_config_commands = " $ ac_config_commands include / jemalloc / internal / private_unnamespace . h " <nl> + <nl> + ac_config_commands = " $ ac_config_commands include / jemalloc / internal / public_symbols . txt " <nl> + <nl> + ac_config_commands = " $ ac_config_commands include / jemalloc / internal / public_namespace . h " <nl> + <nl> + ac_config_commands = " $ ac_config_commands include / jemalloc / internal / public_unnamespace . h " <nl> + <nl> + ac_config_commands = " $ ac_config_commands include / jemalloc / internal / size_classes . h " <nl> + <nl> + ac_config_commands = " $ ac_config_commands include / jemalloc / jemalloc_protos_jet . h " <nl> + <nl> + ac_config_commands = " $ ac_config_commands include / jemalloc / jemalloc_rename . h " <nl> + <nl> + ac_config_commands = " $ ac_config_commands include / jemalloc / jemalloc_mangle . h " <nl> + <nl> + ac_config_commands = " $ ac_config_commands include / jemalloc / jemalloc_mangle_jet . h " <nl> + <nl> + ac_config_commands = " $ ac_config_commands include / jemalloc / jemalloc . h " <nl> + <nl> + <nl> + <nl> + <nl> + ac_config_headers = " $ ac_config_headers $ cfghdrs_tup " <nl> + <nl> + <nl> + <nl> + ac_config_files = " $ ac_config_files $ cfgoutputs_tup config . stamp bin / jemalloc - config bin / jemalloc . sh bin / jeprof " <nl> + <nl> + <nl> + <nl> + cat > confcache < < \ _ACEOF <nl> + # This file is a shell script that caches the results of configure <nl> + # tests run on this system so they can be shared between configure <nl> + # scripts and configure runs , see configure ' s option - - config - cache . <nl> + # It is not useful on other systems . If it contains results you don ' t <nl> + # want to keep , you may remove or edit it . <nl> + # <nl> + # config . status only pays attention to the cache file if you give it <nl> + # the - - recheck option to rerun configure . <nl> + # <nl> + # ` ac_cv_env_foo ' variables ( set or unset ) will be overridden when <nl> + # loading this file , other * unset * ` ac_cv_foo ' will be assigned the <nl> + # following values . <nl> + <nl> + _ACEOF <nl> + <nl> + # The following way of writing the cache mishandles newlines in values , <nl> + # but we know of no workaround that is simple , portable , and efficient . <nl> + # So , we kill variables containing newlines . <nl> + # Ultrix sh set writes to stderr and can ' t be redirected directly , <nl> + # and sets the high bit in the cache file unless we assign to the vars . <nl> + ( <nl> + for ac_var in ` ( set ) 2 > & 1 | sed - n ' s / ^ \ ( [ a - zA - Z_ ] [ a - zA - Z0 - 9_ ] * \ ) = . * / \ 1 / p ' ` ; do <nl> + eval ac_val = \ $ $ ac_var <nl> + case $ ac_val in # ( <nl> + * $ { as_nl } * ) <nl> + case $ ac_var in # ( <nl> + * _cv_ * ) { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : cache variable $ ac_var contains a newline " > & 5 <nl> + $ as_echo " $ as_me : WARNING : cache variable $ ac_var contains a newline " > & 2 ; } ; ; <nl> + esac <nl> + case $ ac_var in # ( <nl> + _ | IFS | as_nl ) ; ; # ( <nl> + BASH_ARGV | BASH_SOURCE ) eval $ ac_var = ; ; # ( <nl> + * ) { eval $ ac_var = ; unset $ ac_var ; } ; ; <nl> + esac ; ; <nl> + esac <nl> + done <nl> + <nl> + ( set ) 2 > & 1 | <nl> + case $ as_nl ` ( ac_space = ' ' ; set ) 2 > & 1 ` in # ( <nl> + * $ { as_nl } ac_space = \ * ) <nl> + # ` set ' does not quote correctly , so add quotes : double - quote <nl> + # substitution turns \ \ \ \ into \ \ , and sed turns \ \ into \ . <nl> + sed - n \ <nl> + " s / ' / ' \ \ \ \ ' ' / g ; <nl> + s / ^ \ \ ( [ _ $ as_cr_alnum ] * _cv_ [ _ $ as_cr_alnum ] * \ \ ) = \ \ ( . * \ \ ) / \ \ 1 = ' \ \ 2 ' / p " <nl> + ; ; # ( <nl> + * ) <nl> + # ` set ' quotes correctly as required by POSIX , so do not add quotes . <nl> + sed - n " / ^ [ _ $ as_cr_alnum ] * _cv_ [ _ $ as_cr_alnum ] * = / p " <nl> + ; ; <nl> + esac | <nl> + sort <nl> + ) | <nl> + sed ' <nl> + / ^ ac_cv_env_ / b end <nl> + t clear <nl> + : clear <nl> + s / ^ \ ( [ ^ = ] * \ ) = \ ( . * [ { } ] . * \ ) $ / test " $ { \ 1 + set } " = set | | & / <nl> + t end <nl> + s / ^ \ ( [ ^ = ] * \ ) = \ ( . * \ ) $ / \ 1 = $ { \ 1 = \ 2 } / <nl> + : end ' > > confcache <nl> + if diff " $ cache_file " confcache > / dev / null 2 > & 1 ; then : ; else <nl> + if test - w " $ cache_file " ; then <nl> + if test " x $ cache_file " ! = " x / dev / null " ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : updating cache $ cache_file " > & 5 <nl> + $ as_echo " $ as_me : updating cache $ cache_file " > & 6 ; } <nl> + if test ! - f " $ cache_file " | | test - h " $ cache_file " ; then <nl> + cat confcache > " $ cache_file " <nl> + else <nl> + case $ cache_file in # ( <nl> + * / * | ? : * ) <nl> + mv - f confcache " $ cache_file " $ $ & & <nl> + mv - f " $ cache_file " $ $ " $ cache_file " ; ; # ( <nl> + * ) <nl> + mv - f confcache " $ cache_file " ; ; <nl> + esac <nl> + fi <nl> + fi <nl> + else <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : not updating unwritable cache $ cache_file " > & 5 <nl> + $ as_echo " $ as_me : not updating unwritable cache $ cache_file " > & 6 ; } <nl> + fi <nl> + fi <nl> + rm - f confcache <nl> + <nl> + test " x $ prefix " = xNONE & & prefix = $ ac_default_prefix <nl> + # Let make expand exec_prefix . <nl> + test " x $ exec_prefix " = xNONE & & exec_prefix = ' $ { prefix } ' <nl> + <nl> + DEFS = - DHAVE_CONFIG_H <nl> + <nl> + ac_libobjs = <nl> + ac_ltlibobjs = <nl> + U = <nl> + for ac_i in : $ LIBOBJS ; do test " x $ ac_i " = x : & & continue <nl> + # 1 . Remove the extension , and $ U if already installed . <nl> + ac_script = ' s / \ $ U \ . / . / ; s / \ . o $ / / ; s / \ . obj $ / / ' <nl> + ac_i = ` $ as_echo " $ ac_i " | sed " $ ac_script " ` <nl> + # 2 . Prepend LIBOBJDIR . When used with automake > = 1 . 10 LIBOBJDIR <nl> + # will be set to the directory where LIBOBJS objects are built . <nl> + as_fn_append ac_libobjs " \ $ { LIBOBJDIR } $ ac_i \ $ U . $ ac_objext " <nl> + as_fn_append ac_ltlibobjs " \ $ { LIBOBJDIR } $ ac_i " ' $ U . lo ' <nl> + done <nl> + LIBOBJS = $ ac_libobjs <nl> + <nl> + LTLIBOBJS = $ ac_ltlibobjs <nl> + <nl> + <nl> + <nl> + <nl> + : " $ { CONFIG_STATUS = . / config . status } " <nl> + ac_write_fail = 0 <nl> + ac_clean_files_save = $ ac_clean_files <nl> + ac_clean_files = " $ ac_clean_files $ CONFIG_STATUS " <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : creating $ CONFIG_STATUS " > & 5 <nl> + $ as_echo " $ as_me : creating $ CONFIG_STATUS " > & 6 ; } <nl> + as_write_fail = 0 <nl> + cat > $ CONFIG_STATUS < < _ASEOF | | as_write_fail = 1 <nl> + # ! $ SHELL <nl> + # Generated by $ as_me . <nl> + # Run this file to recreate the current configuration . <nl> + # Compiler output produced by configure , useful for debugging <nl> + # configure , is in config . log if it exists . <nl> + <nl> + debug = false <nl> + ac_cs_recheck = false <nl> + ac_cs_silent = false <nl> + <nl> + SHELL = \ $ { CONFIG_SHELL - $ SHELL } <nl> + export SHELL <nl> + _ASEOF <nl> + cat > > $ CONFIG_STATUS < < \ _ASEOF | | as_write_fail = 1 <nl> + # # mmmmmmmmmmmmmmmmmm - - # # <nl> + # # M4sh Initialization . # # <nl> + # # mmmmmmmmmmmmmmmmmm - - # # <nl> + <nl> + # Be more Bourne compatible <nl> + DUALCASE = 1 ; export DUALCASE # for MKS sh <nl> + if test - n " $ { ZSH_VERSION + set } " & & ( emulate sh ) > / dev / null 2 > & 1 ; then : <nl> + emulate sh <nl> + NULLCMD = : <nl> + # Pre - 4 . 2 versions of Zsh do word splitting on $ { 1 + " $ @ " } , which <nl> + # is contrary to our usage . Disable this feature . <nl> + alias - g ' $ { 1 + " $ @ " } ' = ' " $ @ " ' <nl> + setopt NO_GLOB_SUBST <nl> + else <nl> + case ` ( set - o ) 2 > / dev / null ` in # ( <nl> + * posix * ) : <nl> + set - o posix ; ; # ( <nl> + * ) : <nl> + ; ; <nl> + esac <nl> + fi <nl> + <nl> + <nl> + as_nl = ' <nl> + ' <nl> + export as_nl <nl> + # Printing a long string crashes Solaris 7 / usr / bin / printf . <nl> + as_echo = ' \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ' <nl> + as_echo = $ as_echo $ as_echo $ as_echo $ as_echo $ as_echo <nl> + as_echo = $ as_echo $ as_echo $ as_echo $ as_echo $ as_echo $ as_echo <nl> + # Prefer a ksh shell builtin over an external printf program on Solaris , <nl> + # but without wasting forks for bash or zsh . <nl> + if test - z " $ BASH_VERSION $ ZSH_VERSION " \ <nl> + & & ( test " X ` print - r - - $ as_echo ` " = " X $ as_echo " ) 2 > / dev / null ; then <nl> + as_echo = ' print - r - - ' <nl> + as_echo_n = ' print - rn - - ' <nl> + elif ( test " X ` printf % s $ as_echo ` " = " X $ as_echo " ) 2 > / dev / null ; then <nl> + as_echo = ' printf % s \ n ' <nl> + as_echo_n = ' printf % s ' <nl> + else <nl> + if test " X ` ( / usr / ucb / echo - n - n $ as_echo ) 2 > / dev / null ` " = " X - n $ as_echo " ; then <nl> + as_echo_body = ' eval / usr / ucb / echo - n " $ 1 $ as_nl " ' <nl> + as_echo_n = ' / usr / ucb / echo - n ' <nl> + else <nl> + as_echo_body = ' eval expr " X $ 1 " : " X \ \ ( . * \ \ ) " ' <nl> + as_echo_n_body = ' eval <nl> + arg = $ 1 ; <nl> + case $ arg in # ( <nl> + * " $ as_nl " * ) <nl> + expr " X $ arg " : " X \ \ ( . * \ \ ) $ as_nl " ; <nl> + arg = ` expr " X $ arg " : " . * $ as_nl \ \ ( . * \ \ ) " ` ; ; <nl> + esac ; <nl> + expr " X $ arg " : " X \ \ ( . * \ \ ) " | tr - d " $ as_nl " <nl> + ' <nl> + export as_echo_n_body <nl> + as_echo_n = ' sh - c $ as_echo_n_body as_echo ' <nl> + fi <nl> + export as_echo_body <nl> + as_echo = ' sh - c $ as_echo_body as_echo ' <nl> + fi <nl> + <nl> + # The user is always right . <nl> + if test " $ { PATH_SEPARATOR + set } " ! = set ; then <nl> + PATH_SEPARATOR = : <nl> + ( PATH = ' / bin ; / bin ' ; FPATH = $ PATH ; sh - c : ) > / dev / null 2 > & 1 & & { <nl> + ( PATH = ' / bin : / bin ' ; FPATH = $ PATH ; sh - c : ) > / dev / null 2 > & 1 | | <nl> + PATH_SEPARATOR = ' ; ' <nl> + } <nl> + fi <nl> + <nl> + <nl> + # IFS <nl> + # We need space , tab and new line , in precisely that order . Quoting is <nl> + # there to prevent editors from complaining about space - tab . <nl> + # ( If _AS_PATH_WALK were called with IFS unset , it would disable word <nl> + # splitting by setting IFS to empty value . ) <nl> + IFS = " " " $ as_nl " <nl> + <nl> + # Find who we are . Look in the path if we contain no directory separator . <nl> + as_myself = <nl> + case $ 0 in # ( ( <nl> + * [ \ \ / ] * ) as_myself = $ 0 ; ; <nl> + * ) as_save_IFS = $ IFS ; IFS = $ PATH_SEPARATOR <nl> + for as_dir in $ PATH <nl> + do <nl> + IFS = $ as_save_IFS <nl> + test - z " $ as_dir " & & as_dir = . <nl> + test - r " $ as_dir / $ 0 " & & as_myself = $ as_dir / $ 0 & & break <nl> + done <nl> + IFS = $ as_save_IFS <nl> + <nl> + ; ; <nl> + esac <nl> + # We did not find ourselves , most probably we were run as ` sh COMMAND ' <nl> + # in which case we are not to be found in the path . <nl> + if test " x $ as_myself " = x ; then <nl> + as_myself = $ 0 <nl> + fi <nl> + if test ! - f " $ as_myself " ; then <nl> + $ as_echo " $ as_myself : error : cannot find myself ; rerun with an absolute file name " > & 2 <nl> + exit 1 <nl> + fi <nl> + <nl> + # Unset variables that we do not need and which cause bugs ( e . g . in <nl> + # pre - 3 . 0 UWIN ksh ) . But do not cause bugs in bash 2 . 01 ; the " | | exit 1 " <nl> + # suppresses any " Segmentation fault " message there . ' ( ( ' could <nl> + # trigger a bug in pdksh 5 . 2 . 14 . <nl> + for as_var in BASH_ENV ENV MAIL MAILPATH <nl> + do eval test x \ $ { $ as_var + set } = xset \ <nl> + & & ( ( unset $ as_var ) | | exit 1 ) > / dev / null 2 > & 1 & & unset $ as_var | | : <nl> + done <nl> + PS1 = ' $ ' <nl> + PS2 = ' > ' <nl> + PS4 = ' + ' <nl> + <nl> + # NLS nuisances . <nl> + LC_ALL = C <nl> + export LC_ALL <nl> + LANGUAGE = C <nl> + export LANGUAGE <nl> + <nl> + # CDPATH . <nl> + ( unset CDPATH ) > / dev / null 2 > & 1 & & unset CDPATH <nl> + <nl> + <nl> + # as_fn_error STATUS ERROR [ LINENO LOG_FD ] <nl> + # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> + # Output " ` basename $ 0 ` : error : ERROR " to stderr . If LINENO and LOG_FD are <nl> + # provided , also output the error to LOG_FD , referencing LINENO . Then exit the <nl> + # script with STATUS , using 1 if that was 0 . <nl> + as_fn_error ( ) <nl> + { <nl> + as_status = $ 1 ; test $ as_status - eq 0 & & as_status = 1 <nl> + if test " $ 4 " ; then <nl> + as_lineno = $ { as_lineno - " $ 3 " } as_lineno_stack = as_lineno_stack = $ as_lineno_stack <nl> + $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : error : $ 2 " > & $ 4 <nl> + fi <nl> + $ as_echo " $ as_me : error : $ 2 " > & 2 <nl> + as_fn_exit $ as_status <nl> + } # as_fn_error <nl> + <nl> + <nl> + # as_fn_set_status STATUS <nl> + # mmmmmmmmmmmmmmmmmmmmm - - <nl> + # Set $ ? to STATUS , without forking . <nl> + as_fn_set_status ( ) <nl> + { <nl> + return $ 1 <nl> + } # as_fn_set_status <nl> + <nl> + # as_fn_exit STATUS <nl> + # mmmmmmmmmmmmmmm - - <nl> + # Exit the shell with STATUS , even in a " trap 0 " or " set - e " context . <nl> + as_fn_exit ( ) <nl> + { <nl> + set + e <nl> + as_fn_set_status $ 1 <nl> + exit $ 1 <nl> + } # as_fn_exit <nl> + <nl> + # as_fn_unset VAR <nl> + # mmmmmmmmmmmmmmm <nl> + # Portably unset VAR . <nl> + as_fn_unset ( ) <nl> + { <nl> + { eval $ 1 = ; unset $ 1 ; } <nl> + } <nl> + as_unset = as_fn_unset <nl> + # as_fn_append VAR VALUE <nl> + # mmmmmmmmmmmmmmmmmmmmm - <nl> + # Append the text in VALUE to the end of the definition contained in VAR . Take <nl> + # advantage of any shell optimizations that allow amortized linear growth over <nl> + # repeated appends , instead of the typical quadratic growth present in naive <nl> + # implementations . <nl> + if ( eval " as_var = 1 ; as_var + = 2 ; test x \ $ as_var = x12 " ) 2 > / dev / null ; then : <nl> + eval ' as_fn_append ( ) <nl> + { <nl> + eval $ 1 + = \ $ 2 <nl> + } ' <nl> + else <nl> + as_fn_append ( ) <nl> + { <nl> + eval $ 1 = \ $ $ 1 \ $ 2 <nl> + } <nl> + fi # as_fn_append <nl> + <nl> + # as_fn_arith ARG . . . <nl> + # mmmmmmmmmmmmmmmmmm <nl> + # Perform arithmetic evaluation on the ARGs , and store the result in the <nl> + # global $ as_val . Take advantage of shells that can avoid forks . The arguments <nl> + # must be portable across $ ( ( ) ) and expr . <nl> + if ( eval " test \ $ ( ( 1 + 1 ) ) = 2 " ) 2 > / dev / null ; then : <nl> + eval ' as_fn_arith ( ) <nl> + { <nl> + as_val = $ ( ( $ * ) ) <nl> + } ' <nl> + else <nl> + as_fn_arith ( ) <nl> + { <nl> + as_val = ` expr " $ @ " | | test $ ? - eq 1 ` <nl> + } <nl> + fi # as_fn_arith <nl> + <nl> + <nl> + if expr a : ' \ ( a \ ) ' > / dev / null 2 > & 1 & & <nl> + test " X ` expr 00001 : ' . * \ ( . . . \ ) ' ` " = X001 ; then <nl> + as_expr = expr <nl> + else <nl> + as_expr = false <nl> + fi <nl> + <nl> + if ( basename - - / ) > / dev / null 2 > & 1 & & test " X ` basename - - / 2 > & 1 ` " = " X / " ; then <nl> + as_basename = basename <nl> + else <nl> + as_basename = false <nl> + fi <nl> + <nl> + if ( as_dir = ` dirname - - / ` & & test " X $ as_dir " = X / ) > / dev / null 2 > & 1 ; then <nl> + as_dirname = dirname <nl> + else <nl> + as_dirname = false <nl> + fi <nl> + <nl> + as_me = ` $ as_basename - - " $ 0 " | | <nl> + $ as_expr X / " $ 0 " : ' . * / \ ( [ ^ / ] [ ^ / ] * \ ) / * $ ' \ | \ <nl> + X " $ 0 " : ' X \ ( / / \ ) $ ' \ | \ <nl> + X " $ 0 " : ' X \ ( / \ ) ' \ | . 2 > / dev / null | | <nl> + $ as_echo X / " $ 0 " | <nl> + sed ' / ^ . * \ / \ ( [ ^ / ] [ ^ / ] * \ ) \ / * $ / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + / ^ X \ / \ ( \ / \ / \ ) $ / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + / ^ X \ / \ ( \ / \ ) . * / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + s / . * / . / ; q ' ` <nl> + <nl> + # Avoid depending upon Character Ranges . <nl> + as_cr_letters = ' abcdefghijklmnopqrstuvwxyz ' <nl> + as_cr_LETTERS = ' ABCDEFGHIJKLMNOPQRSTUVWXYZ ' <nl> + as_cr_Letters = $ as_cr_letters $ as_cr_LETTERS <nl> + as_cr_digits = ' 0123456789 ' <nl> + as_cr_alnum = $ as_cr_Letters $ as_cr_digits <nl> + <nl> + ECHO_C = ECHO_N = ECHO_T = <nl> + case ` echo - n x ` in # ( ( ( ( ( <nl> + - n * ) <nl> + case ` echo ' xy \ c ' ` in <nl> + * c * ) ECHO_T = ' ' ; ; # ECHO_T is single tab character . <nl> + xy ) ECHO_C = ' \ c ' ; ; <nl> + * ) echo ` echo ksh88 bug on AIX 6 . 1 ` > / dev / null <nl> + ECHO_T = ' ' ; ; <nl> + esac ; ; <nl> + * ) <nl> + ECHO_N = ' - n ' ; ; <nl> + esac <nl> + <nl> + rm - f conf $ $ conf $ $ . exe conf $ $ . file <nl> + if test - d conf $ $ . dir ; then <nl> + rm - f conf $ $ . dir / conf $ $ . file <nl> + else <nl> + rm - f conf $ $ . dir <nl> + mkdir conf $ $ . dir 2 > / dev / null <nl> + fi <nl> + if ( echo > conf $ $ . file ) 2 > / dev / null ; then <nl> + if ln - s conf $ $ . file conf $ $ 2 > / dev / null ; then <nl> + as_ln_s = ' ln - s ' <nl> + # . . . but there are two gotchas : <nl> + # 1 ) On MSYS , both ` ln - s file dir ' and ` ln file dir ' fail . <nl> + # 2 ) DJGPP < 2 . 04 has no symlinks ; ` ln - s ' creates a wrapper executable . <nl> + # In both cases , we have to default to ` cp - pR ' . <nl> + ln - s conf $ $ . file conf $ $ . dir 2 > / dev / null & & test ! - f conf $ $ . exe | | <nl> + as_ln_s = ' cp - pR ' <nl> + elif ln conf $ $ . file conf $ $ 2 > / dev / null ; then <nl> + as_ln_s = ln <nl> + else <nl> + as_ln_s = ' cp - pR ' <nl> + fi <nl> + else <nl> + as_ln_s = ' cp - pR ' <nl> + fi <nl> + rm - f conf $ $ conf $ $ . exe conf $ $ . dir / conf $ $ . file conf $ $ . file <nl> + rmdir conf $ $ . dir 2 > / dev / null <nl> + <nl> + <nl> + # as_fn_mkdir_p <nl> + # mmmmmmmmmmmm - <nl> + # Create " $ as_dir " as a directory , including parents if necessary . <nl> + as_fn_mkdir_p ( ) <nl> + { <nl> + <nl> + case $ as_dir in # ( <nl> + - * ) as_dir = . / $ as_dir ; ; <nl> + esac <nl> + test - d " $ as_dir " | | eval $ as_mkdir_p | | { <nl> + as_dirs = <nl> + while : ; do <nl> + case $ as_dir in # ( <nl> + * \ ' * ) as_qdir = ` $ as_echo " $ as_dir " | sed " s / ' / ' \ \ \ \ \ \ \ \ ' ' / g " ` ; ; # ' ( <nl> + * ) as_qdir = $ as_dir ; ; <nl> + esac <nl> + as_dirs = " ' $ as_qdir ' $ as_dirs " <nl> + as_dir = ` $ as_dirname - - " $ as_dir " | | <nl> + $ as_expr X " $ as_dir " : ' X \ ( . * [ ^ / ] \ ) / / * [ ^ / ] [ ^ / ] * / * $ ' \ | \ <nl> + X " $ as_dir " : ' X \ ( / / \ ) [ ^ / ] ' \ | \ <nl> + X " $ as_dir " : ' X \ ( / / \ ) $ ' \ | \ <nl> + X " $ as_dir " : ' X \ ( / \ ) ' \ | . 2 > / dev / null | | <nl> + $ as_echo X " $ as_dir " | <nl> + sed ' / ^ X \ ( . * [ ^ / ] \ ) \ / \ / * [ ^ / ] [ ^ / ] * \ / * $ / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + / ^ X \ ( \ / \ / \ ) [ ^ / ] . * / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + / ^ X \ ( \ / \ / \ ) $ / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + / ^ X \ ( \ / \ ) . * / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + s / . * / . / ; q ' ` <nl> + test - d " $ as_dir " & & break <nl> + done <nl> + test - z " $ as_dirs " | | eval " mkdir $ as_dirs " <nl> + } | | test - d " $ as_dir " | | as_fn_error $ ? " cannot create directory $ as_dir " <nl> + <nl> + <nl> + } # as_fn_mkdir_p <nl> + if mkdir - p . 2 > / dev / null ; then <nl> + as_mkdir_p = ' mkdir - p " $ as_dir " ' <nl> + else <nl> + test - d . / - p & & rmdir . / - p <nl> + as_mkdir_p = false <nl> + fi <nl> + <nl> + <nl> + # as_fn_executable_p FILE <nl> + # mmmmmmmmmmmmmmmmmmmmm - - <nl> + # Test if FILE is an executable regular file . <nl> + as_fn_executable_p ( ) <nl> + { <nl> + test - f " $ 1 " & & test - x " $ 1 " <nl> + } # as_fn_executable_p <nl> + as_test_x = ' test - x ' <nl> + as_executable_p = as_fn_executable_p <nl> + <nl> + # Sed expression to map a string onto a valid CPP name . <nl> + as_tr_cpp = " eval sed ' y % * $ as_cr_letters % P $ as_cr_LETTERS % ; s % [ ^ _ $ as_cr_alnum ] % _ % g ' " <nl> + <nl> + # Sed expression to map a string onto a valid variable name . <nl> + as_tr_sh = " eval sed ' y % * + % pp % ; s % [ ^ _ $ as_cr_alnum ] % _ % g ' " <nl> + <nl> + <nl> + exec 6 > & 1 <nl> + # # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - # # <nl> + # # Main body of $ CONFIG_STATUS script . # # <nl> + # # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - # # <nl> + _ASEOF <nl> + test $ as_write_fail = 0 & & chmod + x $ CONFIG_STATUS | | ac_write_fail = 1 <nl> + <nl> + cat > > $ CONFIG_STATUS < < \ _ACEOF | | ac_write_fail = 1 <nl> + # Save the log message , to keep $ 0 and so on meaningful , and to <nl> + # report actual input values of CONFIG_FILES etc . instead of their <nl> + # values after options handling . <nl> + ac_log = " <nl> + This file was extended by $ as_me , which was <nl> + generated by GNU Autoconf 2 . 69 . Invocation command line was <nl> + <nl> + CONFIG_FILES = $ CONFIG_FILES <nl> + CONFIG_HEADERS = $ CONFIG_HEADERS <nl> + CONFIG_LINKS = $ CONFIG_LINKS <nl> + CONFIG_COMMANDS = $ CONFIG_COMMANDS <nl> + $ $ 0 $ @ <nl> + <nl> + on ` ( hostname | | uname - n ) 2 > / dev / null | sed 1q ` <nl> + " <nl> + <nl> + _ACEOF <nl> + <nl> + case $ ac_config_files in * " <nl> + " * ) set x $ ac_config_files ; shift ; ac_config_files = $ * ; ; <nl> + esac <nl> + <nl> + case $ ac_config_headers in * " <nl> + " * ) set x $ ac_config_headers ; shift ; ac_config_headers = $ * ; ; <nl> + esac <nl> + <nl> + <nl> + cat > > $ CONFIG_STATUS < < _ACEOF | | ac_write_fail = 1 <nl> + # Files that config . status was made for . <nl> + config_files = " $ ac_config_files " <nl> + config_headers = " $ ac_config_headers " <nl> + config_commands = " $ ac_config_commands " <nl> + <nl> + _ACEOF <nl> + <nl> + cat > > $ CONFIG_STATUS < < \ _ACEOF | | ac_write_fail = 1 <nl> + ac_cs_usage = " \ <nl> + \ ` $ as_me ' instantiates files and other configuration actions <nl> + from templates according to the current configuration . Unless the files <nl> + and actions are specified as TAGs , all are instantiated by default . <nl> + <nl> + Usage : $ 0 [ OPTION ] . . . [ TAG ] . . . <nl> + <nl> + - h , - - help print this help , then exit <nl> + - V , - - version print version number and configuration settings , then exit <nl> + - - config print configuration , then exit <nl> + - q , - - quiet , - - silent <nl> + do not print progress messages <nl> + - d , - - debug don ' t remove temporary files <nl> + - - recheck update $ as_me by reconfiguring in the same conditions <nl> + - - file = FILE [ : TEMPLATE ] <nl> + instantiate the configuration file FILE <nl> + - - header = FILE [ : TEMPLATE ] <nl> + instantiate the configuration header FILE <nl> + <nl> + Configuration files : <nl> + $ config_files <nl> + <nl> + Configuration headers : <nl> + $ config_headers <nl> + <nl> + Configuration commands : <nl> + $ config_commands <nl> + <nl> + Report bugs to the package provider . " <nl> + <nl> + _ACEOF <nl> + cat > > $ CONFIG_STATUS < < _ACEOF | | ac_write_fail = 1 <nl> + ac_cs_config = " ` $ as_echo " $ ac_configure_args " | sed ' s / ^ / / ; s / [ \ \ " " \ ` \ $ ] / \ \ \ \ & / g ' ` " <nl> + ac_cs_version = " \ \ <nl> + config . status <nl> + configured by $ 0 , generated by GNU Autoconf 2 . 69 , <nl> + with options \ \ " \ $ ac_cs_config \ \ " <nl> + <nl> + Copyright ( C ) 2012 Free Software Foundation , Inc . <nl> + This config . status script is free software ; the Free Software Foundation <nl> + gives unlimited permission to copy , distribute and modify it . " <nl> + <nl> + ac_pwd = ' $ ac_pwd ' <nl> + srcdir = ' $ srcdir ' <nl> + INSTALL = ' $ INSTALL ' <nl> + test - n " \ $ AWK " | | AWK = awk <nl> + _ACEOF <nl> + <nl> + cat > > $ CONFIG_STATUS < < \ _ACEOF | | ac_write_fail = 1 <nl> + # The default lists apply if the user does not specify any file . <nl> + ac_need_defaults = : <nl> + while test $ # ! = 0 <nl> + do <nl> + case $ 1 in <nl> + - - * = ? * ) <nl> + ac_option = ` expr " X $ 1 " : ' X \ ( [ ^ = ] * \ ) = ' ` <nl> + ac_optarg = ` expr " X $ 1 " : ' X [ ^ = ] * = \ ( . * \ ) ' ` <nl> + ac_shift = : <nl> + ; ; <nl> + - - * = ) <nl> + ac_option = ` expr " X $ 1 " : ' X \ ( [ ^ = ] * \ ) = ' ` <nl> + ac_optarg = <nl> + ac_shift = : <nl> + ; ; <nl> + * ) <nl> + ac_option = $ 1 <nl> + ac_optarg = $ 2 <nl> + ac_shift = shift <nl> + ; ; <nl> + esac <nl> + <nl> + case $ ac_option in <nl> + # Handling of the options . <nl> + - recheck | - - recheck | - - rechec | - - reche | - - rech | - - rec | - - re | - - r ) <nl> + ac_cs_recheck = : ; ; <nl> + - - version | - - versio | - - versi | - - vers | - - ver | - - ve | - - v | - V ) <nl> + $ as_echo " $ ac_cs_version " ; exit ; ; <nl> + - - config | - - confi | - - conf | - - con | - - co | - - c ) <nl> + $ as_echo " $ ac_cs_config " ; exit ; ; <nl> + - - debug | - - debu | - - deb | - - de | - - d | - d ) <nl> + debug = : ; ; <nl> + - - file | - - fil | - - fi | - - f ) <nl> + $ ac_shift <nl> + case $ ac_optarg in <nl> + * \ ' * ) ac_optarg = ` $ as_echo " $ ac_optarg " | sed " s / ' / ' \ \ \ \ \ \ \ \ ' ' / g " ` ; ; <nl> + ' ' ) as_fn_error $ ? " missing file argument " ; ; <nl> + esac <nl> + as_fn_append CONFIG_FILES " ' $ ac_optarg ' " <nl> + ac_need_defaults = false ; ; <nl> + - - header | - - heade | - - head | - - hea ) <nl> + $ ac_shift <nl> + case $ ac_optarg in <nl> + * \ ' * ) ac_optarg = ` $ as_echo " $ ac_optarg " | sed " s / ' / ' \ \ \ \ \ \ \ \ ' ' / g " ` ; ; <nl> + esac <nl> + as_fn_append CONFIG_HEADERS " ' $ ac_optarg ' " <nl> + ac_need_defaults = false ; ; <nl> + - - he | - - h ) <nl> + # Conflict between - - help and - - header <nl> + as_fn_error $ ? " ambiguous option : \ ` $ 1 ' <nl> + Try \ ` $ 0 - - help ' for more information . " ; ; <nl> + - - help | - - hel | - h ) <nl> + $ as_echo " $ ac_cs_usage " ; exit ; ; <nl> + - q | - quiet | - - quiet | - - quie | - - qui | - - qu | - - q \ <nl> + | - silent | - - silent | - - silen | - - sile | - - sil | - - si | - - s ) <nl> + ac_cs_silent = : ; ; <nl> + <nl> + # This is an error . <nl> + - * ) as_fn_error $ ? " unrecognized option : \ ` $ 1 ' <nl> + Try \ ` $ 0 - - help ' for more information . " ; ; <nl> + <nl> + * ) as_fn_append ac_config_targets " $ 1 " <nl> + ac_need_defaults = false ; ; <nl> + <nl> + esac <nl> + shift <nl> + done <nl> + <nl> + ac_configure_extra_args = <nl> + <nl> + if $ ac_cs_silent ; then <nl> + exec 6 > / dev / null <nl> + ac_configure_extra_args = " $ ac_configure_extra_args - - silent " <nl> + fi <nl> + <nl> + _ACEOF <nl> + cat > > $ CONFIG_STATUS < < _ACEOF | | ac_write_fail = 1 <nl> + if \ $ ac_cs_recheck ; then <nl> + set X $ SHELL ' $ 0 ' $ ac_configure_args \ $ ac_configure_extra_args - - no - create - - no - recursion <nl> + shift <nl> + \ $ as_echo " running CONFIG_SHELL = $ SHELL \ $ * " > & 6 <nl> + CONFIG_SHELL = ' $ SHELL ' <nl> + export CONFIG_SHELL <nl> + exec " \ $ @ " <nl> + fi <nl> + <nl> + _ACEOF <nl> + cat > > $ CONFIG_STATUS < < \ _ACEOF | | ac_write_fail = 1 <nl> + exec 5 > > config . log <nl> + { <nl> + echo <nl> + sed ' h ; s / . / - / g ; s / ^ . . . / # # / ; s / . . . $ / # # / ; p ; x ; p ; x ' < < _ASBOX <nl> + # # Running $ as_me . # # <nl> + _ASBOX <nl> + $ as_echo " $ ac_log " <nl> + } > & 5 <nl> + <nl> + _ACEOF <nl> + cat > > $ CONFIG_STATUS < < _ACEOF | | ac_write_fail = 1 <nl> + # <nl> + # INIT - COMMANDS <nl> + # <nl> + <nl> + srcdir = " $ { srcdir } " <nl> + objroot = " $ { objroot } " <nl> + <nl> + <nl> + srcdir = " $ { srcdir } " <nl> + objroot = " $ { objroot } " <nl> + <nl> + <nl> + srcdir = " $ { srcdir } " <nl> + objroot = " $ { objroot } " <nl> + mangling_map = " $ { mangling_map } " <nl> + public_syms = " $ { public_syms } " <nl> + JEMALLOC_PREFIX = " $ { JEMALLOC_PREFIX } " <nl> + <nl> + <nl> + srcdir = " $ { srcdir } " <nl> + objroot = " $ { objroot } " <nl> + <nl> + <nl> + srcdir = " $ { srcdir } " <nl> + objroot = " $ { objroot } " <nl> + <nl> + <nl> + SHELL = " $ { SHELL } " <nl> + srcdir = " $ { srcdir } " <nl> + objroot = " $ { objroot } " <nl> + LG_QUANTA = " $ { LG_QUANTA } " <nl> + LG_TINY_MIN = $ { LG_TINY_MIN } <nl> + LG_PAGE_SIZES = " $ { LG_PAGE_SIZES } " <nl> + LG_SIZE_CLASS_GROUP = $ { LG_SIZE_CLASS_GROUP } <nl> + <nl> + <nl> + srcdir = " $ { srcdir } " <nl> + objroot = " $ { objroot } " <nl> + <nl> + <nl> + srcdir = " $ { srcdir } " <nl> + objroot = " $ { objroot } " <nl> + <nl> + <nl> + srcdir = " $ { srcdir } " <nl> + objroot = " $ { objroot } " <nl> + <nl> + <nl> + srcdir = " $ { srcdir } " <nl> + objroot = " $ { objroot } " <nl> + <nl> + <nl> + srcdir = " $ { srcdir } " <nl> + objroot = " $ { objroot } " <nl> + install_suffix = " $ { install_suffix } " <nl> + <nl> + <nl> + _ACEOF <nl> + <nl> + cat > > $ CONFIG_STATUS < < \ _ACEOF | | ac_write_fail = 1 <nl> + <nl> + # Handling of arguments . <nl> + for ac_config_target in $ ac_config_targets <nl> + do <nl> + case $ ac_config_target in <nl> + " include / jemalloc / internal / private_namespace . h " ) CONFIG_COMMANDS = " $ CONFIG_COMMANDS include / jemalloc / internal / private_namespace . h " ; ; <nl> + " include / jemalloc / internal / private_unnamespace . h " ) CONFIG_COMMANDS = " $ CONFIG_COMMANDS include / jemalloc / internal / private_unnamespace . h " ; ; <nl> + " include / jemalloc / internal / public_symbols . txt " ) CONFIG_COMMANDS = " $ CONFIG_COMMANDS include / jemalloc / internal / public_symbols . txt " ; ; <nl> + " include / jemalloc / internal / public_namespace . h " ) CONFIG_COMMANDS = " $ CONFIG_COMMANDS include / jemalloc / internal / public_namespace . h " ; ; <nl> + " include / jemalloc / internal / public_unnamespace . h " ) CONFIG_COMMANDS = " $ CONFIG_COMMANDS include / jemalloc / internal / public_unnamespace . h " ; ; <nl> + " include / jemalloc / internal / size_classes . h " ) CONFIG_COMMANDS = " $ CONFIG_COMMANDS include / jemalloc / internal / size_classes . h " ; ; <nl> + " include / jemalloc / jemalloc_protos_jet . h " ) CONFIG_COMMANDS = " $ CONFIG_COMMANDS include / jemalloc / jemalloc_protos_jet . h " ; ; <nl> + " include / jemalloc / jemalloc_rename . h " ) CONFIG_COMMANDS = " $ CONFIG_COMMANDS include / jemalloc / jemalloc_rename . h " ; ; <nl> + " include / jemalloc / jemalloc_mangle . h " ) CONFIG_COMMANDS = " $ CONFIG_COMMANDS include / jemalloc / jemalloc_mangle . h " ; ; <nl> + " include / jemalloc / jemalloc_mangle_jet . h " ) CONFIG_COMMANDS = " $ CONFIG_COMMANDS include / jemalloc / jemalloc_mangle_jet . h " ; ; <nl> + " include / jemalloc / jemalloc . h " ) CONFIG_COMMANDS = " $ CONFIG_COMMANDS include / jemalloc / jemalloc . h " ; ; <nl> + " $ cfghdrs_tup " ) CONFIG_HEADERS = " $ CONFIG_HEADERS $ cfghdrs_tup " ; ; <nl> + " $ cfgoutputs_tup " ) CONFIG_FILES = " $ CONFIG_FILES $ cfgoutputs_tup " ; ; <nl> + " config . stamp " ) CONFIG_FILES = " $ CONFIG_FILES config . stamp " ; ; <nl> + " bin / jemalloc - config " ) CONFIG_FILES = " $ CONFIG_FILES bin / jemalloc - config " ; ; <nl> + " bin / jemalloc . sh " ) CONFIG_FILES = " $ CONFIG_FILES bin / jemalloc . sh " ; ; <nl> + " bin / jeprof " ) CONFIG_FILES = " $ CONFIG_FILES bin / jeprof " ; ; <nl> + <nl> + * ) as_fn_error $ ? " invalid argument : \ ` $ ac_config_target ' " " $ LINENO " 5 ; ; <nl> + esac <nl> + done <nl> + <nl> + <nl> + # If the user did not use the arguments to specify the items to instantiate , <nl> + # then the envvar interface is used . Set only those that are not . <nl> + # We use the long form for the default assignment because of an extremely <nl> + # bizarre bug on SunOS 4 . 1 . 3 . <nl> + if $ ac_need_defaults ; then <nl> + test " $ { CONFIG_FILES + set } " = set | | CONFIG_FILES = $ config_files <nl> + test " $ { CONFIG_HEADERS + set } " = set | | CONFIG_HEADERS = $ config_headers <nl> + test " $ { CONFIG_COMMANDS + set } " = set | | CONFIG_COMMANDS = $ config_commands <nl> + fi <nl> + <nl> + # Have a temporary directory for convenience . Make it in the build tree <nl> + # simply because there is no reason against having it here , and in addition , <nl> + # creating and moving files from / tmp can sometimes cause problems . <nl> + # Hook for its removal unless debugging . <nl> + # Note that there is a small window in which the directory will not be cleaned : <nl> + # after its creation but before its name has been assigned to ` $ tmp ' . <nl> + $ debug | | <nl> + { <nl> + tmp = ac_tmp = <nl> + trap ' exit_status = $ ? <nl> + : " $ { ac_tmp : = $ tmp } " <nl> + { test ! - d " $ ac_tmp " | | rm - fr " $ ac_tmp " ; } & & exit $ exit_status <nl> + ' 0 <nl> + trap ' as_fn_exit 1 ' 1 2 13 15 <nl> + } <nl> + # Create a ( secure ) tmp directory for tmp files . <nl> + <nl> + { <nl> + tmp = ` ( umask 077 & & mktemp - d " . / confXXXXXX " ) 2 > / dev / null ` & & <nl> + test - d " $ tmp " <nl> + } | | <nl> + { <nl> + tmp = . / conf $ $ - $ RANDOM <nl> + ( umask 077 & & mkdir " $ tmp " ) <nl> + } | | as_fn_error $ ? " cannot create a temporary directory in . " " $ LINENO " 5 <nl> + ac_tmp = $ tmp <nl> + <nl> + # Set up the scripts for CONFIG_FILES section . <nl> + # No need to generate them if there are no CONFIG_FILES . <nl> + # This happens for instance with ` . / config . status config . h ' . <nl> + if test - n " $ CONFIG_FILES " ; then <nl> + <nl> + <nl> + ac_cr = ` echo X | tr X ' \ 015 ' ` <nl> + # On cygwin , bash can eat \ r inside ` ` if the user requested igncr . <nl> + # But we know of no other shell where ac_cr would be empty at this <nl> + # point , so we can use a bashism as a fallback . <nl> + if test " x $ ac_cr " = x ; then <nl> + eval ac_cr = \ $ \ ' \ \ r \ ' <nl> + fi <nl> + ac_cs_awk_cr = ` $ AWK ' BEGIN { print " a \ rb " } ' < / dev / null 2 > / dev / null ` <nl> + if test " $ ac_cs_awk_cr " = " a $ { ac_cr } b " ; then <nl> + ac_cs_awk_cr = ' \ \ r ' <nl> + else <nl> + ac_cs_awk_cr = $ ac_cr <nl> + fi <nl> + <nl> + echo ' BEGIN { ' > " $ ac_tmp / subs1 . awk " & & <nl> + _ACEOF <nl> + <nl> + <nl> + { <nl> + echo " cat > conf $ $ subs . awk < < _ACEOF " & & <nl> + echo " $ ac_subst_vars " | sed ' s / . * / & ! $ & $ ac_delim / ' & & <nl> + echo " _ACEOF " <nl> + } > conf $ $ subs . sh | | <nl> + as_fn_error $ ? " could not make $ CONFIG_STATUS " " $ LINENO " 5 <nl> + ac_delim_num = ` echo " $ ac_subst_vars " | grep - c ' ^ ' ` <nl> + ac_delim = ' % ! _ ! # ' <nl> + for ac_last_try in false false false false false : ; do <nl> + . . / conf $ $ subs . sh | | <nl> + as_fn_error $ ? " could not make $ CONFIG_STATUS " " $ LINENO " 5 <nl> + <nl> + ac_delim_n = ` sed - n " s / . * $ ac_delim \ $ / X / p " conf $ $ subs . awk | grep - c X ` <nl> + if test $ ac_delim_n = $ ac_delim_num ; then <nl> + break <nl> + elif $ ac_last_try ; then <nl> + as_fn_error $ ? " could not make $ CONFIG_STATUS " " $ LINENO " 5 <nl> + else <nl> + ac_delim = " $ ac_delim ! $ ac_delim _ $ ac_delim ! ! " <nl> + fi <nl> + done <nl> + rm - f conf $ $ subs . sh <nl> + <nl> + cat > > $ CONFIG_STATUS < < _ACEOF | | ac_write_fail = 1 <nl> + cat > > " \ $ ac_tmp / subs1 . awk " < < \ \ _ACAWK & & <nl> + _ACEOF <nl> + sed - n ' <nl> + h <nl> + s / ^ / S [ " / ; s / ! . * / " ] = / <nl> + p <nl> + g <nl> + s / ^ [ ^ ! ] * ! / / <nl> + : repl <nl> + t repl <nl> + s / ' " $ ac_delim " ' $ / / <nl> + t delim <nl> + : nl <nl> + h <nl> + s / \ ( . \ { 148 \ } \ ) . . * / \ 1 / <nl> + t more1 <nl> + s / [ " \ \ ] / \ \ & / g ; s / ^ / " / ; s / $ / \ \ n " \ \ / <nl> + p <nl> + n <nl> + b repl <nl> + : more1 <nl> + s / [ " \ \ ] / \ \ & / g ; s / ^ / " / ; s / $ / " \ \ / <nl> + p <nl> + g <nl> + s / . \ { 148 \ } / / <nl> + t nl <nl> + : delim <nl> + h <nl> + s / \ ( . \ { 148 \ } \ ) . . * / \ 1 / <nl> + t more2 <nl> + s / [ " \ \ ] / \ \ & / g ; s / ^ / " / ; s / $ / " / <nl> + p <nl> + b <nl> + : more2 <nl> + s / [ " \ \ ] / \ \ & / g ; s / ^ / " / ; s / $ / " \ \ / <nl> + p <nl> + g <nl> + s / . \ { 148 \ } / / <nl> + t delim <nl> + ' < conf $ $ subs . awk | sed ' <nl> + / ^ [ ^ " " ] / { <nl> + N <nl> + s / \ n / / <nl> + } <nl> + ' > > $ CONFIG_STATUS | | ac_write_fail = 1 <nl> + rm - f conf $ $ subs . awk <nl> + cat > > $ CONFIG_STATUS < < _ACEOF | | ac_write_fail = 1 <nl> + _ACAWK <nl> + cat > > " \ $ ac_tmp / subs1 . awk " < < _ACAWK & & <nl> + for ( key in S ) S_is_set [ key ] = 1 <nl> + FS = "  " <nl> + <nl> + } <nl> + { <nl> + line = $ 0 <nl> + nfields = split ( line , field , " @ " ) <nl> + substed = 0 <nl> + len = length ( field [ 1 ] ) <nl> + for ( i = 2 ; i < nfields ; i + + ) { <nl> + key = field [ i ] <nl> + keylen = length ( key ) <nl> + if ( S_is_set [ key ] ) { <nl> + value = S [ key ] <nl> + line = substr ( line , 1 , len ) " " value " " substr ( line , len + keylen + 3 ) <nl> + len + = length ( value ) + length ( field [ + + i ] ) <nl> + substed = 1 <nl> + } else <nl> + len + = 1 + keylen <nl> + } <nl> + <nl> + print line <nl> + } <nl> + <nl> + _ACAWK <nl> + _ACEOF <nl> + cat > > $ CONFIG_STATUS < < \ _ACEOF | | ac_write_fail = 1 <nl> + if sed " s / $ ac_cr / / " < / dev / null > / dev / null 2 > & 1 ; then <nl> + sed " s / $ ac_cr \ $ / / ; s / $ ac_cr / $ ac_cs_awk_cr / g " <nl> + else <nl> + cat <nl> + fi < " $ ac_tmp / subs1 . awk " > " $ ac_tmp / subs . awk " \ <nl> + | | as_fn_error $ ? " could not setup config files machinery " " $ LINENO " 5 <nl> + _ACEOF <nl> + <nl> + # VPATH may cause trouble with some makes , so we remove sole $ ( srcdir ) , <nl> + # $ { srcdir } and @ srcdir @ entries from VPATH if srcdir is " . " , strip leading and <nl> + # trailing colons and then remove the whole line if VPATH becomes empty <nl> + # ( actually we leave an empty line to preserve line numbers ) . <nl> + if test " x $ srcdir " = x . ; then <nl> + ac_vpsub = ' / ^ [ ] * VPATH [ ] * = [ ] * / { <nl> + h <nl> + s / / / <nl> + s / ^ / : / <nl> + s / [ ] * $ / : / <nl> + s / : \ $ ( srcdir ) : / : / g <nl> + s / : \ $ { srcdir } : / : / g <nl> + s / : @ srcdir @ : / : / g <nl> + s / ^ : * / / <nl> + s / : * $ / / <nl> + x <nl> + s / \ ( = [ ] * \ ) . * / \ 1 / <nl> + G <nl> + s / \ n / / <nl> + s / ^ [ ^ = ] * = [ ] * $ / / <nl> + } ' <nl> + fi <nl> + <nl> + cat > > $ CONFIG_STATUS < < \ _ACEOF | | ac_write_fail = 1 <nl> + fi # test - n " $ CONFIG_FILES " <nl> + <nl> + # Set up the scripts for CONFIG_HEADERS section . <nl> + # No need to generate them if there are no CONFIG_HEADERS . <nl> + # This happens for instance with ` . / config . status Makefile ' . <nl> + if test - n " $ CONFIG_HEADERS " ; then <nl> + cat > " $ ac_tmp / defines . awk " < < \ _ACAWK | | <nl> + BEGIN { <nl> + _ACEOF <nl> + <nl> + # Transform confdefs . h into an awk script ` defines . awk ' , embedded as <nl> + # here - document in config . status , that substitutes the proper values into <nl> + # config . h . in to produce config . h . <nl> + <nl> + # Create a delimiter string that does not exist in confdefs . h , to ease <nl> + # handling of long lines . <nl> + ac_delim = ' % ! _ ! # ' <nl> + for ac_last_try in false false : ; do <nl> + ac_tt = ` sed - n " / $ ac_delim / p " confdefs . h ` <nl> + if test - z " $ ac_tt " ; then <nl> + break <nl> + elif $ ac_last_try ; then <nl> + as_fn_error $ ? " could not make $ CONFIG_HEADERS " " $ LINENO " 5 <nl> + else <nl> + ac_delim = " $ ac_delim ! $ ac_delim _ $ ac_delim ! ! " <nl> + fi <nl> + done <nl> + <nl> + # For the awk script , D is an array of macro values keyed by name , <nl> + # likewise P contains macro parameters if any . Preserve backslash <nl> + # newline sequences . <nl> + <nl> + ac_word_re = [ _ $ as_cr_Letters ] [ _ $ as_cr_alnum ] * <nl> + sed - n ' <nl> + s / . \ { 148 \ } / & ' " $ ac_delim " ' / g <nl> + t rset <nl> + : rset <nl> + s / ^ [ ] * # [ ] * define [ ] [ ] * / / <nl> + t def <nl> + d <nl> + : def <nl> + s / \ \ $ / / <nl> + t bsnl <nl> + s / [ " \ \ ] / \ \ & / g <nl> + s / ^ \ ( ' " $ ac_word_re " ' \ ) \ ( ( [ ^ ( ) ] * ) \ ) [ ] * \ ( . * \ ) / P [ " \ 1 " ] = " \ 2 " \ <nl> + D [ " \ 1 " ] = " \ 3 " / p <nl> + s / ^ \ ( ' " $ ac_word_re " ' \ ) [ ] * \ ( . * \ ) / D [ " \ 1 " ] = " \ 2 " / p <nl> + d <nl> + : bsnl <nl> + s / [ " \ \ ] / \ \ & / g <nl> + s / ^ \ ( ' " $ ac_word_re " ' \ ) \ ( ( [ ^ ( ) ] * ) \ ) [ ] * \ ( . * \ ) / P [ " \ 1 " ] = " \ 2 " \ <nl> + D [ " \ 1 " ] = " \ 3 \ \ \ \ \ \ n " \ \ / p <nl> + t cont <nl> + s / ^ \ ( ' " $ ac_word_re " ' \ ) [ ] * \ ( . * \ ) / D [ " \ 1 " ] = " \ 2 \ \ \ \ \ \ n " \ \ / p <nl> + t cont <nl> + d <nl> + : cont <nl> + n <nl> + s / . \ { 148 \ } / & ' " $ ac_delim " ' / g <nl> + t clear <nl> + : clear <nl> + s / \ \ $ / / <nl> + t bsnlc <nl> + s / [ " \ \ ] / \ \ & / g ; s / ^ / " / ; s / $ / " / p <nl> + d <nl> + : bsnlc <nl> + s / [ " \ \ ] / \ \ & / g ; s / ^ / " / ; s / $ / \ \ \ \ \ \ n " \ \ / p <nl> + b cont <nl> + ' < confdefs . h | sed ' <nl> + s / ' " $ ac_delim " ' / " \ \ \ <nl> + " / g ' > > $ CONFIG_STATUS | | ac_write_fail = 1 <nl> + <nl> + cat > > $ CONFIG_STATUS < < _ACEOF | | ac_write_fail = 1 <nl> + for ( key in D ) D_is_set [ key ] = 1 <nl> + FS = "  " <nl> + } <nl> + / ^ [ \ t ] * # [ \ t ] * ( define | undef ) [ \ t ] + $ ac_word_re ( [ \ t ( ] | \ $ ) / { <nl> + line = \ $ 0 <nl> + split ( line , arg , " " ) <nl> + if ( arg [ 1 ] = = " # " ) { <nl> + defundef = arg [ 2 ] <nl> + mac1 = arg [ 3 ] <nl> + } else { <nl> + defundef = substr ( arg [ 1 ] , 2 ) <nl> + mac1 = arg [ 2 ] <nl> + } <nl> + split ( mac1 , mac2 , " ( " ) # ) <nl> + macro = mac2 [ 1 ] <nl> + prefix = substr ( line , 1 , index ( line , defundef ) - 1 ) <nl> + if ( D_is_set [ macro ] ) { <nl> + # Preserve the white space surrounding the " # " . <nl> + print prefix " define " , macro P [ macro ] D [ macro ] <nl> + next <nl> + } else { <nl> + # Replace # undef with comments . This is necessary , for example , <nl> + # in the case of _POSIX_SOURCE , which is predefined and required <nl> + # on some systems where configure will not decide to define it . <nl> + if ( defundef = = " undef " ) { <nl> + print " / * " , prefix defundef , macro , " * / " <nl> + next <nl> + } <nl> + } <nl> + } <nl> + { print } <nl> + _ACAWK <nl> + _ACEOF <nl> + cat > > $ CONFIG_STATUS < < \ _ACEOF | | ac_write_fail = 1 <nl> + as_fn_error $ ? " could not setup config headers machinery " " $ LINENO " 5 <nl> + fi # test - n " $ CONFIG_HEADERS " <nl> + <nl> + <nl> + eval set X " : F $ CONFIG_FILES : H $ CONFIG_HEADERS : C $ CONFIG_COMMANDS " <nl> + shift <nl> + for ac_tag <nl> + do <nl> + case $ ac_tag in <nl> + : [ FHLC ] ) ac_mode = $ ac_tag ; continue ; ; <nl> + esac <nl> + case $ ac_mode $ ac_tag in <nl> + : [ FHL ] * : * ) ; ; <nl> + : L * | : C * : * ) as_fn_error $ ? " invalid tag \ ` $ ac_tag ' " " $ LINENO " 5 ; ; <nl> + : [ FH ] - ) ac_tag = - : - ; ; <nl> + : [ FH ] * ) ac_tag = $ ac_tag : $ ac_tag . in ; ; <nl> + esac <nl> + ac_save_IFS = $ IFS <nl> + IFS = : <nl> + set x $ ac_tag <nl> + IFS = $ ac_save_IFS <nl> + shift <nl> + ac_file = $ 1 <nl> + shift <nl> + <nl> + case $ ac_mode in <nl> + : L ) ac_source = $ 1 ; ; <nl> + : [ FH ] ) <nl> + ac_file_inputs = <nl> + for ac_f <nl> + do <nl> + case $ ac_f in <nl> + - ) ac_f = " $ ac_tmp / stdin " ; ; <nl> + * ) # Look for the file first in the build tree , then in the source tree <nl> + # ( if the path is not absolute ) . The absolute path cannot be DOS - style , <nl> + # because $ ac_f cannot contain ` : ' . <nl> + test - f " $ ac_f " | | <nl> + case $ ac_f in <nl> + [ \ \ / $ ] * ) false ; ; <nl> + * ) test - f " $ srcdir / $ ac_f " & & ac_f = " $ srcdir / $ ac_f " ; ; <nl> + esac | | <nl> + as_fn_error 1 " cannot find input file : \ ` $ ac_f ' " " $ LINENO " 5 ; ; <nl> + esac <nl> + case $ ac_f in * \ ' * ) ac_f = ` $ as_echo " $ ac_f " | sed " s / ' / ' \ \ \ \ \ \ \ \ ' ' / g " ` ; ; esac <nl> + as_fn_append ac_file_inputs " ' $ ac_f ' " <nl> + done <nl> + <nl> + # Let ' s still pretend it is ` configure ' which instantiates ( i . e . , don ' t <nl> + # use $ as_me ) , people would be surprised to read : <nl> + # / * config . h . Generated by config . status . * / <nl> + configure_input = ' Generated from ' ` <nl> + $ as_echo " $ * " | sed ' s | ^ [ ^ : ] * / | | ; s | : [ ^ : ] * / | , | g ' <nl> + ` ' by configure . ' <nl> + if test x " $ ac_file " ! = x - ; then <nl> + configure_input = " $ ac_file . $ configure_input " <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : creating $ ac_file " > & 5 <nl> + $ as_echo " $ as_me : creating $ ac_file " > & 6 ; } <nl> + fi <nl> + # Neutralize special characters interpreted by sed in replacement strings . <nl> + case $ configure_input in # ( <nl> + * \ & * | * \ | * | * \ \ * ) <nl> + ac_sed_conf_input = ` $ as_echo " $ configure_input " | <nl> + sed ' s / [ \ \ \ \ & | ] / \ \ \ \ & / g ' ` ; ; # ( <nl> + * ) ac_sed_conf_input = $ configure_input ; ; <nl> + esac <nl> + <nl> + case $ ac_tag in <nl> + * : - : * | * : - ) cat > " $ ac_tmp / stdin " \ <nl> + | | as_fn_error $ ? " could not create $ ac_file " " $ LINENO " 5 ; ; <nl> + esac <nl> + ; ; <nl> + esac <nl> + <nl> + ac_dir = ` $ as_dirname - - " $ ac_file " | | <nl> + $ as_expr X " $ ac_file " : ' X \ ( . * [ ^ / ] \ ) / / * [ ^ / ] [ ^ / ] * / * $ ' \ | \ <nl> + X " $ ac_file " : ' X \ ( / / \ ) [ ^ / ] ' \ | \ <nl> + X " $ ac_file " : ' X \ ( / / \ ) $ ' \ | \ <nl> + X " $ ac_file " : ' X \ ( / \ ) ' \ | . 2 > / dev / null | | <nl> + $ as_echo X " $ ac_file " | <nl> + sed ' / ^ X \ ( . * [ ^ / ] \ ) \ / \ / * [ ^ / ] [ ^ / ] * \ / * $ / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + / ^ X \ ( \ / \ / \ ) [ ^ / ] . * / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + / ^ X \ ( \ / \ / \ ) $ / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + / ^ X \ ( \ / \ ) . * / { <nl> + s / / \ 1 / <nl> + q <nl> + } <nl> + s / . * / . / ; q ' ` <nl> + as_dir = " $ ac_dir " ; as_fn_mkdir_p <nl> + ac_builddir = . <nl> + <nl> + case " $ ac_dir " in <nl> + . ) ac_dir_suffix = ac_top_builddir_sub = . ac_top_build_prefix = ; ; <nl> + * ) <nl> + ac_dir_suffix = / ` $ as_echo " $ ac_dir " | sed ' s | ^ \ . [ \ \ / ] | | ' ` <nl> + # A " . . " for each directory in $ ac_dir_suffix . <nl> + ac_top_builddir_sub = ` $ as_echo " $ ac_dir_suffix " | sed ' s | / [ ^ \ \ / ] * | / . . | g ; s | / | | ' ` <nl> + case $ ac_top_builddir_sub in <nl> + " " ) ac_top_builddir_sub = . ac_top_build_prefix = ; ; <nl> + * ) ac_top_build_prefix = $ ac_top_builddir_sub / ; ; <nl> + esac ; ; <nl> + esac <nl> + ac_abs_top_builddir = $ ac_pwd <nl> + ac_abs_builddir = $ ac_pwd $ ac_dir_suffix <nl> + # for backward compatibility : <nl> + ac_top_builddir = $ ac_top_build_prefix <nl> + <nl> + case $ srcdir in <nl> + . ) # We are building in place . <nl> + ac_srcdir = . <nl> + ac_top_srcdir = $ ac_top_builddir_sub <nl> + ac_abs_top_srcdir = $ ac_pwd ; ; <nl> + [ \ \ / ] * | ? : [ \ \ / ] * ) # Absolute name . <nl> + ac_srcdir = $ srcdir $ ac_dir_suffix ; <nl> + ac_top_srcdir = $ srcdir <nl> + ac_abs_top_srcdir = $ srcdir ; ; <nl> + * ) # Relative name . <nl> + ac_srcdir = $ ac_top_build_prefix $ srcdir $ ac_dir_suffix <nl> + ac_top_srcdir = $ ac_top_build_prefix $ srcdir <nl> + ac_abs_top_srcdir = $ ac_pwd / $ srcdir ; ; <nl> + esac <nl> + ac_abs_srcdir = $ ac_abs_top_srcdir $ ac_dir_suffix <nl> + <nl> + <nl> + case $ ac_mode in <nl> + : F ) <nl> + # <nl> + # CONFIG_FILE <nl> + # <nl> + <nl> + case $ INSTALL in <nl> + [ \ \ / $ ] * | ? : [ \ \ / ] * ) ac_INSTALL = $ INSTALL ; ; <nl> + * ) ac_INSTALL = $ ac_top_build_prefix $ INSTALL ; ; <nl> + esac <nl> + _ACEOF <nl> + <nl> + cat > > $ CONFIG_STATUS < < \ _ACEOF | | ac_write_fail = 1 <nl> + # If the template does not know about datarootdir , expand it . <nl> + # FIXME : This hack should be removed a few years after 2 . 60 . <nl> + ac_datarootdir_hack = ; ac_datarootdir_seen = <nl> + ac_sed_dataroot = ' <nl> + / datarootdir / { <nl> + p <nl> + q <nl> + } <nl> + / @ datadir @ / p <nl> + / @ docdir @ / p <nl> + / @ infodir @ / p <nl> + / @ localedir @ / p <nl> + / @ mandir @ / p ' <nl> + case ` eval " sed - n \ " \ $ ac_sed_dataroot \ " $ ac_file_inputs " ` in <nl> + * datarootdir * ) ac_datarootdir_seen = yes ; ; <nl> + * @ datadir @ * | * @ docdir @ * | * @ infodir @ * | * @ localedir @ * | * @ mandir @ * ) <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : $ ac_file_inputs seems to ignore the - - datarootdir setting " > & 5 <nl> + $ as_echo " $ as_me : WARNING : $ ac_file_inputs seems to ignore the - - datarootdir setting " > & 2 ; } <nl> + _ACEOF <nl> + cat > > $ CONFIG_STATUS < < _ACEOF | | ac_write_fail = 1 <nl> + ac_datarootdir_hack = ' <nl> + s & @ datadir @ & $ datadir & g <nl> + s & @ docdir @ & $ docdir & g <nl> + s & @ infodir @ & $ infodir & g <nl> + s & @ localedir @ & $ localedir & g <nl> + s & @ mandir @ & $ mandir & g <nl> + s & \ \ \ $ { datarootdir } & $ datarootdir & g ' ; ; <nl> + esac <nl> + _ACEOF <nl> + <nl> + # Neutralize VPATH when ` $ srcdir ' = ` . ' . <nl> + # Shell code in configure . ac might set extrasub . <nl> + # FIXME : do we really want to maintain this feature ? <nl> + cat > > $ CONFIG_STATUS < < _ACEOF | | ac_write_fail = 1 <nl> + ac_sed_extra = " $ ac_vpsub <nl> + $ extrasub <nl> + _ACEOF <nl> + cat > > $ CONFIG_STATUS < < \ _ACEOF | | ac_write_fail = 1 <nl> + : t <nl> + / @ [ a - zA - Z_ ] [ a - zA - Z_0 - 9 ] * @ / ! b <nl> + s | @ configure_input @ | $ ac_sed_conf_input | ; t t <nl> + s & @ top_builddir @ & $ ac_top_builddir_sub & ; t t <nl> + s & @ top_build_prefix @ & $ ac_top_build_prefix & ; t t <nl> + s & @ srcdir @ & $ ac_srcdir & ; t t <nl> + s & @ abs_srcdir @ & $ ac_abs_srcdir & ; t t <nl> + s & @ top_srcdir @ & $ ac_top_srcdir & ; t t <nl> + s & @ abs_top_srcdir @ & $ ac_abs_top_srcdir & ; t t <nl> + s & @ builddir @ & $ ac_builddir & ; t t <nl> + s & @ abs_builddir @ & $ ac_abs_builddir & ; t t <nl> + s & @ abs_top_builddir @ & $ ac_abs_top_builddir & ; t t <nl> + s & @ INSTALL @ & $ ac_INSTALL & ; t t <nl> + $ ac_datarootdir_hack <nl> + " <nl> + eval sed \ " \ $ ac_sed_extra \ " " $ ac_file_inputs " | $ AWK - f " $ ac_tmp / subs . awk " \ <nl> + > $ ac_tmp / out | | as_fn_error $ ? " could not create $ ac_file " " $ LINENO " 5 <nl> + <nl> + test - z " $ ac_datarootdir_hack $ ac_datarootdir_seen " & & <nl> + { ac_out = ` sed - n ' / \ $ { datarootdir } / p ' " $ ac_tmp / out " ` ; test - n " $ ac_out " ; } & & <nl> + { ac_out = ` sed - n ' / ^ [ ] * datarootdir [ ] * : * = / p ' \ <nl> + " $ ac_tmp / out " ` ; test - z " $ ac_out " ; } & & <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : $ ac_file contains a reference to the variable \ ` datarootdir ' <nl> + which seems to be undefined . Please make sure it is defined " > & 5 <nl> + $ as_echo " $ as_me : WARNING : $ ac_file contains a reference to the variable \ ` datarootdir ' <nl> + which seems to be undefined . Please make sure it is defined " > & 2 ; } <nl> + <nl> + rm - f " $ ac_tmp / stdin " <nl> + case $ ac_file in <nl> + - ) cat " $ ac_tmp / out " & & rm - f " $ ac_tmp / out " ; ; <nl> + * ) rm - f " $ ac_file " & & mv " $ ac_tmp / out " " $ ac_file " ; ; <nl> + esac \ <nl> + | | as_fn_error $ ? " could not create $ ac_file " " $ LINENO " 5 <nl> + ; ; <nl> + : H ) <nl> + # <nl> + # CONFIG_HEADER <nl> + # <nl> + if test x " $ ac_file " ! = x - ; then <nl> + { <nl> + $ as_echo " / * $ configure_input * / " \ <nl> + & & eval ' $ AWK - f " $ ac_tmp / defines . awk " ' " $ ac_file_inputs " <nl> + } > " $ ac_tmp / config . h " \ <nl> + | | as_fn_error $ ? " could not create $ ac_file " " $ LINENO " 5 <nl> + if diff " $ ac_file " " $ ac_tmp / config . h " > / dev / null 2 > & 1 ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : $ ac_file is unchanged " > & 5 <nl> + $ as_echo " $ as_me : $ ac_file is unchanged " > & 6 ; } <nl> + else <nl> + rm - f " $ ac_file " <nl> + mv " $ ac_tmp / config . h " " $ ac_file " \ <nl> + | | as_fn_error $ ? " could not create $ ac_file " " $ LINENO " 5 <nl> + fi <nl> + else <nl> + $ as_echo " / * $ configure_input * / " \ <nl> + & & eval ' $ AWK - f " $ ac_tmp / defines . awk " ' " $ ac_file_inputs " \ <nl> + | | as_fn_error $ ? " could not create - " " $ LINENO " 5 <nl> + fi <nl> + ; ; <nl> + <nl> + : C ) { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : executing $ ac_file commands " > & 5 <nl> + $ as_echo " $ as_me : executing $ ac_file commands " > & 6 ; } <nl> + ; ; <nl> + esac <nl> + <nl> + <nl> + case $ ac_file $ ac_mode in <nl> + " include / jemalloc / internal / private_namespace . h " : C ) <nl> + mkdir - p " $ { objroot } include / jemalloc / internal " <nl> + " $ { srcdir } / include / jemalloc / internal / private_namespace . sh " " $ { srcdir } / include / jemalloc / internal / private_symbols . txt " > " $ { objroot } include / jemalloc / internal / private_namespace . h " <nl> + ; ; <nl> + " include / jemalloc / internal / private_unnamespace . h " : C ) <nl> + mkdir - p " $ { objroot } include / jemalloc / internal " <nl> + " $ { srcdir } / include / jemalloc / internal / private_unnamespace . sh " " $ { srcdir } / include / jemalloc / internal / private_symbols . txt " > " $ { objroot } include / jemalloc / internal / private_unnamespace . h " <nl> + ; ; <nl> + " include / jemalloc / internal / public_symbols . txt " : C ) <nl> + f = " $ { objroot } include / jemalloc / internal / public_symbols . txt " <nl> + mkdir - p " $ { objroot } include / jemalloc / internal " <nl> + cp / dev / null " $ { f } " <nl> + for nm in ` echo $ { mangling_map } | tr ' , ' ' ' ` ; do <nl> + n = ` echo $ { nm } | tr ' : ' ' ' | awk ' { print $ 1 } ' ` <nl> + m = ` echo $ { nm } | tr ' : ' ' ' | awk ' { print $ 2 } ' ` <nl> + echo " $ { n } : $ { m } " > > " $ { f } " <nl> + public_syms = ` for sym in $ { public_syms } ; do echo " $ { sym } " ; done | grep - v " ^ $ { n } \ $ " | tr ' \ n ' ' ' ` <nl> + done <nl> + for sym in $ { public_syms } ; do <nl> + n = " $ { sym } " <nl> + m = " $ { JEMALLOC_PREFIX } $ { sym } " <nl> + echo " $ { n } : $ { m } " > > " $ { f } " <nl> + done <nl> + ; ; <nl> + " include / jemalloc / internal / public_namespace . h " : C ) <nl> + mkdir - p " $ { objroot } include / jemalloc / internal " <nl> + " $ { srcdir } / include / jemalloc / internal / public_namespace . sh " " $ { objroot } include / jemalloc / internal / public_symbols . txt " > " $ { objroot } include / jemalloc / internal / public_namespace . h " <nl> + ; ; <nl> + " include / jemalloc / internal / public_unnamespace . h " : C ) <nl> + mkdir - p " $ { objroot } include / jemalloc / internal " <nl> + " $ { srcdir } / include / jemalloc / internal / public_unnamespace . sh " " $ { objroot } include / jemalloc / internal / public_symbols . txt " > " $ { objroot } include / jemalloc / internal / public_unnamespace . h " <nl> + ; ; <nl> + " include / jemalloc / internal / size_classes . h " : C ) <nl> + mkdir - p " $ { objroot } include / jemalloc / internal " <nl> + " $ { SHELL } " " $ { srcdir } / include / jemalloc / internal / size_classes . sh " " $ { LG_QUANTA } " $ { LG_TINY_MIN } " $ { LG_PAGE_SIZES } " $ { LG_SIZE_CLASS_GROUP } > " $ { objroot } include / jemalloc / internal / size_classes . h " <nl> + ; ; <nl> + " include / jemalloc / jemalloc_protos_jet . h " : C ) <nl> + mkdir - p " $ { objroot } include / jemalloc " <nl> + cat " $ { srcdir } / include / jemalloc / jemalloc_protos . h . in " | sed - e ' s / @ je_ @ / jet_ / g ' > " $ { objroot } include / jemalloc / jemalloc_protos_jet . h " <nl> + ; ; <nl> + " include / jemalloc / jemalloc_rename . h " : C ) <nl> + mkdir - p " $ { objroot } include / jemalloc " <nl> + " $ { srcdir } / include / jemalloc / jemalloc_rename . sh " " $ { objroot } include / jemalloc / internal / public_symbols . txt " > " $ { objroot } include / jemalloc / jemalloc_rename . h " <nl> + ; ; <nl> + " include / jemalloc / jemalloc_mangle . h " : C ) <nl> + mkdir - p " $ { objroot } include / jemalloc " <nl> + " $ { srcdir } / include / jemalloc / jemalloc_mangle . sh " " $ { objroot } include / jemalloc / internal / public_symbols . txt " je_ > " $ { objroot } include / jemalloc / jemalloc_mangle . h " <nl> + ; ; <nl> + " include / jemalloc / jemalloc_mangle_jet . h " : C ) <nl> + mkdir - p " $ { objroot } include / jemalloc " <nl> + " $ { srcdir } / include / jemalloc / jemalloc_mangle . sh " " $ { objroot } include / jemalloc / internal / public_symbols . txt " jet_ > " $ { objroot } include / jemalloc / jemalloc_mangle_jet . h " <nl> + ; ; <nl> + " include / jemalloc / jemalloc . h " : C ) <nl> + mkdir - p " $ { objroot } include / jemalloc " <nl> + " $ { srcdir } / include / jemalloc / jemalloc . sh " " $ { objroot } " > " $ { objroot } include / jemalloc / jemalloc $ { install_suffix } . h " <nl> + ; ; <nl> + <nl> + esac <nl> + done # for ac_tag <nl> + <nl> + <nl> + as_fn_exit 0 <nl> + _ACEOF <nl> + ac_clean_files = $ ac_clean_files_save <nl> + <nl> + test $ ac_write_fail = 0 | | <nl> + as_fn_error $ ? " write failure creating $ CONFIG_STATUS " " $ LINENO " 5 <nl> + <nl> + <nl> + # configure is writing to config . log , and then calls config . status . <nl> + # config . status does its own redirection , appending to config . log . <nl> + # Unfortunately , on DOS this fails , as config . log is still kept open <nl> + # by configure , so config . status won ' t be able to write to it ; its <nl> + # output is simply discarded . So we exec the FD to / dev / null , <nl> + # effectively closing config . log , so it can be properly ( re ) opened and <nl> + # appended to by config . status . When coming back to configure , we <nl> + # need to make the FD available again . <nl> + if test " $ no_create " ! = yes ; then <nl> + ac_cs_success = : <nl> + ac_config_status_args = <nl> + test " $ silent " = yes & & <nl> + ac_config_status_args = " $ ac_config_status_args - - quiet " <nl> + exec 5 > / dev / null <nl> + $ SHELL $ CONFIG_STATUS $ ac_config_status_args | | ac_cs_success = false <nl> + exec 5 > > config . log <nl> + # Use | | , not & & , to avoid exiting from the if with $ ? = 1 , which <nl> + # would make configure fail if this is the last instruction . <nl> + $ ac_cs_success | | as_fn_exit 1 <nl> + fi <nl> + if test - n " $ ac_unrecognized_opts " & & test " $ enable_option_checking " ! = no ; then <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : WARNING : unrecognized options : $ ac_unrecognized_opts " > & 5 <nl> + $ as_echo " $ as_me : WARNING : unrecognized options : $ ac_unrecognized_opts " > & 2 ; } <nl> + fi <nl> + <nl> + <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = " > & 5 <nl> + $ as_echo " = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : jemalloc version : $ { jemalloc_version } " > & 5 <nl> + $ as_echo " jemalloc version : $ { jemalloc_version } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : library revision : $ { rev } " > & 5 <nl> + $ as_echo " library revision : $ { rev } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : " > & 5 <nl> + $ as_echo " " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : CONFIG : $ { CONFIG } " > & 5 <nl> + $ as_echo " CONFIG : $ { CONFIG } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : CC : $ { CC } " > & 5 <nl> + $ as_echo " CC : $ { CC } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : CONFIGURE_CFLAGS : $ { CONFIGURE_CFLAGS } " > & 5 <nl> + $ as_echo " CONFIGURE_CFLAGS : $ { CONFIGURE_CFLAGS } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : SPECIFIED_CFLAGS : $ { SPECIFIED_CFLAGS } " > & 5 <nl> + $ as_echo " SPECIFIED_CFLAGS : $ { SPECIFIED_CFLAGS } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : EXTRA_CFLAGS : $ { EXTRA_CFLAGS } " > & 5 <nl> + $ as_echo " EXTRA_CFLAGS : $ { EXTRA_CFLAGS } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : CPPFLAGS : $ { CPPFLAGS } " > & 5 <nl> + $ as_echo " CPPFLAGS : $ { CPPFLAGS } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : CXX : $ { CXX } " > & 5 <nl> + $ as_echo " CXX : $ { CXX } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : CONFIGURE_CXXFLAGS : $ { CONFIGURE_CXXFLAGS } " > & 5 <nl> + $ as_echo " CONFIGURE_CXXFLAGS : $ { CONFIGURE_CXXFLAGS } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : SPECIFIED_CXXFLAGS : $ { SPECIFIED_CXXFLAGS } " > & 5 <nl> + $ as_echo " SPECIFIED_CXXFLAGS : $ { SPECIFIED_CXXFLAGS } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : EXTRA_CXXFLAGS : $ { EXTRA_CXXFLAGS } " > & 5 <nl> + $ as_echo " EXTRA_CXXFLAGS : $ { EXTRA_CXXFLAGS } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : LDFLAGS : $ { LDFLAGS } " > & 5 <nl> + $ as_echo " LDFLAGS : $ { LDFLAGS } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : EXTRA_LDFLAGS : $ { EXTRA_LDFLAGS } " > & 5 <nl> + $ as_echo " EXTRA_LDFLAGS : $ { EXTRA_LDFLAGS } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : DSO_LDFLAGS : $ { DSO_LDFLAGS } " > & 5 <nl> + $ as_echo " DSO_LDFLAGS : $ { DSO_LDFLAGS } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : LIBS : $ { LIBS } " > & 5 <nl> + $ as_echo " LIBS : $ { LIBS } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : RPATH_EXTRA : $ { RPATH_EXTRA } " > & 5 <nl> + $ as_echo " RPATH_EXTRA : $ { RPATH_EXTRA } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : " > & 5 <nl> + $ as_echo " " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : XSLTPROC : $ { XSLTPROC } " > & 5 <nl> + $ as_echo " XSLTPROC : $ { XSLTPROC } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : XSLROOT : $ { XSLROOT } " > & 5 <nl> + $ as_echo " XSLROOT : $ { XSLROOT } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : " > & 5 <nl> + $ as_echo " " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : PREFIX : $ { PREFIX } " > & 5 <nl> + $ as_echo " PREFIX : $ { PREFIX } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : BINDIR : $ { BINDIR } " > & 5 <nl> + $ as_echo " BINDIR : $ { BINDIR } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : DATADIR : $ { DATADIR } " > & 5 <nl> + $ as_echo " DATADIR : $ { DATADIR } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : INCLUDEDIR : $ { INCLUDEDIR } " > & 5 <nl> + $ as_echo " INCLUDEDIR : $ { INCLUDEDIR } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : LIBDIR : $ { LIBDIR } " > & 5 <nl> + $ as_echo " LIBDIR : $ { LIBDIR } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : MANDIR : $ { MANDIR } " > & 5 <nl> + $ as_echo " MANDIR : $ { MANDIR } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : " > & 5 <nl> + $ as_echo " " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : srcroot : $ { srcroot } " > & 5 <nl> + $ as_echo " srcroot : $ { srcroot } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : abs_srcroot : $ { abs_srcroot } " > & 5 <nl> + $ as_echo " abs_srcroot : $ { abs_srcroot } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : objroot : $ { objroot } " > & 5 <nl> + $ as_echo " objroot : $ { objroot } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : abs_objroot : $ { abs_objroot } " > & 5 <nl> + $ as_echo " abs_objroot : $ { abs_objroot } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : " > & 5 <nl> + $ as_echo " " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : JEMALLOC_PREFIX : $ { JEMALLOC_PREFIX } " > & 5 <nl> + $ as_echo " JEMALLOC_PREFIX : $ { JEMALLOC_PREFIX } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : JEMALLOC_PRIVATE_NAMESPACE " > & 5 <nl> + $ as_echo " JEMALLOC_PRIVATE_NAMESPACE " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : : $ { JEMALLOC_PRIVATE_NAMESPACE } " > & 5 <nl> + $ as_echo " : $ { JEMALLOC_PRIVATE_NAMESPACE } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : install_suffix : $ { install_suffix } " > & 5 <nl> + $ as_echo " install_suffix : $ { install_suffix } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : malloc_conf : $ { config_malloc_conf } " > & 5 <nl> + $ as_echo " malloc_conf : $ { config_malloc_conf } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : autogen : $ { enable_autogen } " > & 5 <nl> + $ as_echo " autogen : $ { enable_autogen } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : cc - silence : $ { enable_cc_silence } " > & 5 <nl> + $ as_echo " cc - silence : $ { enable_cc_silence } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : debug : $ { enable_debug } " > & 5 <nl> + $ as_echo " debug : $ { enable_debug } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : code - coverage : $ { enable_code_coverage } " > & 5 <nl> + $ as_echo " code - coverage : $ { enable_code_coverage } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : stats : $ { enable_stats } " > & 5 <nl> + $ as_echo " stats : $ { enable_stats } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : prof : $ { enable_prof } " > & 5 <nl> + $ as_echo " prof : $ { enable_prof } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : prof - libunwind : $ { enable_prof_libunwind } " > & 5 <nl> + $ as_echo " prof - libunwind : $ { enable_prof_libunwind } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : prof - libgcc : $ { enable_prof_libgcc } " > & 5 <nl> + $ as_echo " prof - libgcc : $ { enable_prof_libgcc } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : prof - gcc : $ { enable_prof_gcc } " > & 5 <nl> + $ as_echo " prof - gcc : $ { enable_prof_gcc } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : tcache : $ { enable_tcache } " > & 5 <nl> + $ as_echo " tcache : $ { enable_tcache } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : fill : $ { enable_fill } " > & 5 <nl> + $ as_echo " fill : $ { enable_fill } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : utrace : $ { enable_utrace } " > & 5 <nl> + $ as_echo " utrace : $ { enable_utrace } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : xmalloc : $ { enable_xmalloc } " > & 5 <nl> + $ as_echo " xmalloc : $ { enable_xmalloc } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : munmap : $ { enable_munmap } " > & 5 <nl> + $ as_echo " munmap : $ { enable_munmap } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : lazy_lock : $ { enable_lazy_lock } " > & 5 <nl> + $ as_echo " lazy_lock : $ { enable_lazy_lock } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : tls : $ { enable_tls } " > & 5 <nl> + $ as_echo " tls : $ { enable_tls } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : cache - oblivious : $ { enable_cache_oblivious } " > & 5 <nl> + $ as_echo " cache - oblivious : $ { enable_cache_oblivious } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : cxx : $ { enable_cxx } " > & 5 <nl> + $ as_echo " cxx : $ { enable_cxx } " > & 6 ; } <nl> + { $ as_echo " $ as_me : $ { as_lineno - $ LINENO } : result : = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = " > & 5 <nl> + $ as_echo " = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = " > & 6 ; } <nl>
added generated configure script
arangodb/arangodb
9a65bfe3e23033c0ff768b89fd5557a209f9fa78
2017-04-19T18:27:26Z
mmm a / lib / IRGen / GenClass . cpp <nl> ppp b / lib / IRGen / GenClass . cpp <nl> namespace { <nl> / / context . <nl> if ( superclassType . hasArchetype ( ) ) <nl> Options | = ClassMetadataFlags : : ClassHasGenericLayout ; <nl> + <nl> + / / Since we ' re not going to visit the superclass , make sure that we still <nl> + / / set ClassHasObjCAncestry correctly . <nl> + if ( superclassType . getASTType ( ) - > getReferenceCounting ( ) <nl> + = = ReferenceCounting : : ObjC ) { <nl> + Options | = ClassMetadataFlags : : ClassHasObjCAncestry ; <nl> + } <nl> } else { <nl> / / Otherwise , we are allowed to have total knowledge of the superclass <nl> / / fields , so walk them to compute the layout . <nl> mmm a / test / IRGen / class_resilience_objc . swift <nl> ppp b / test / IRGen / class_resilience_objc . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> / / RUN : % target - swift - frontend - emit - module - enable - library - evolution - emit - module - path = % t / resilient_struct . swiftmodule - module - name = resilient_struct % S / . . / Inputs / resilient_struct . swift <nl> - / / RUN : % target - swift - frontend ( mock - sdk : % clang - importer - sdk ) - I % t - enable - library - evolution - enable - objc - interop - emit - ir - o - - primary - file % s | % FileCheck % s - - check - prefix = CHECK - - check - prefix = CHECK - % target - ptrsize - DINT = i % target - ptrsize <nl> + / / RUN : % target - swift - frontend - emit - module - enable - library - evolution - emit - module - path = % t / resilient_objc_class . swiftmodule - module - name = resilient_objc_class % S / . . / Inputs / resilient_objc_class . swift - I % t <nl> + / / RUN : % target - swift - frontend ( mock - sdk : % clang - importer - sdk ) - I % t - enable - library - evolution - emit - ir - o - - primary - file % s | % FileCheck % s - - check - prefix = CHECK - - check - prefix = CHECK - % target - ptrsize - DINT = i % target - ptrsize <nl> <nl> - / / XFAIL : CPU = armv7k <nl> - / / XFAIL : CPU = powerpc64le <nl> - / / XFAIL : CPU = s390x <nl> + / / REQUIRES : objc_interop <nl> <nl> import Foundation <nl> import resilient_struct <nl> + import resilient_objc_class <nl> <nl> / / Note that these are all mutable to allow for the runtime to slide them . <nl> / / CHECK : @ " $ s21class_resilience_objc27ClassWithEmptyThenResilientC9resilient0I7_struct0H3IntVvpWvd " = hidden global [ [ INT ] ] 0 , <nl> / / CHECK : @ " $ s21class_resilience_objc27ClassWithResilientThenEmptyC9resilient0I7_struct0F3IntVvpWvd " = hidden global [ [ INT ] ] 0 , <nl> + / / CHECK : @ " $ s21class_resilience_objc34AnotherClassWithEmptyThenResilientC9resilient0J7_struct0I3IntVvpWvd " = hidden global [ [ INT ] ] 0 , <nl> + / / CHECK : @ " $ s21class_resilience_objc34AnotherClassWithResilientThenEmptyC9resilient0J7_struct0G3IntVvpWvd " = hidden global [ [ INT ] ] 0 , <nl> + <nl> / / CHECK : @ " $ s21class_resilience_objc27ClassWithEmptyThenResilientC5emptyAA0F0VvpWvd " = hidden global [ [ INT ] ] 0 , <nl> / / CHECK : @ " $ s21class_resilience_objc27ClassWithResilientThenEmptyC5emptyAA0H0VvpWvd " = hidden global [ [ INT ] ] 0 , <nl> + / / CHECK : @ " $ s21class_resilience_objc34AnotherClassWithEmptyThenResilientC5emptyAA0G0VvpWvd " = hidden global [ [ INT ] ] 0 , <nl> + / / CHECK : @ " $ s21class_resilience_objc34AnotherClassWithResilientThenEmptyC5emptyAA0I0VvpWvd " = hidden global [ [ INT ] ] 0 , <nl> <nl> public class FixedLayoutObjCSubclass : NSObject { <nl> / / This field could use constant direct access because NSObject has <nl> public class ClassWithResilientThenEmpty : DummyClass { <nl> self . resilient = resilient <nl> } <nl> } <nl> + <nl> + / / Same as the above , but the superclass is resilient , and ultimately inherits <nl> + / / from an Objective - C base class . <nl> + <nl> + public class AnotherClassWithEmptyThenResilient : ResilientNSObjectOutsideParent { <nl> + public let empty : Empty <nl> + public let resilient : ResilientInt <nl> + <nl> + public init ( empty : Empty , resilient : ResilientInt ) { <nl> + self . empty = empty <nl> + self . resilient = resilient <nl> + } <nl> + } <nl> + <nl> + public class AnotherClassWithResilientThenEmpty : ResilientNSObjectOutsideParent { <nl> + public let resilient : ResilientInt <nl> + public let empty : Empty <nl> + <nl> + public init ( empty : Empty , resilient : ResilientInt ) { <nl> + self . empty = empty <nl> + self . resilient = resilient <nl> + } <nl> + } <nl> mmm a / test / Interpreter / Inputs / ObjCClasses / ObjCClasses . h <nl> ppp b / test / Interpreter / Inputs / ObjCClasses / ObjCClasses . h <nl> NS_ASSUME_NONNULL_BEGIN <nl> / * This class has instance variables which are not apparent in the <nl> interface . Subclasses will need to be slid by the ObjC runtime . * / <nl> @ interface HasHiddenIvars : NSObject <nl> + - ( instancetype ) init ; <nl> @ property NSInteger x ; <nl> @ property NSInteger y ; <nl> @ property NSInteger z ; <nl> new file mode 100644 <nl> index 000000000000 . . 402229162f82 <nl> mmm / dev / null <nl> ppp b / test / Interpreter / Inputs / resilient_objc_class . swift <nl> <nl> + import ObjCClasses <nl> + <nl> + open class HasResilientObjCBaseClass : HasHiddenIvars { } <nl> mmm a / test / Interpreter / objc_class_resilience . swift <nl> ppp b / test / Interpreter / objc_class_resilience . swift <nl> <nl> / / RUN : % empty - directory ( % t ) <nl> <nl> / / RUN : % target - clang - fobjc - arc % S / Inputs / ObjCClasses / ObjCClasses . m - c - o % t / ObjCClasses . o <nl> + <nl> / / RUN : % target - build - swift - dylib ( % t / % target - library - name ( resilient_struct ) ) - enable - library - evolution % S / . . / Inputs / resilient_struct . swift - emit - module - emit - module - path % t / resilient_struct . swiftmodule - module - name resilient_struct <nl> - / / RUN : % target - codesign % t / % target - library - name ( resilient_struct ) <nl> + / / RUN : % target - build - swift - dylib ( % t / % target - library - name ( resilient_objc_class ) ) - enable - library - evolution % S / Inputs / resilient_objc_class . swift - emit - module - emit - module - path % t / resilient_objc_class . swiftmodule - module - name resilient_objc_class - I % S / Inputs / ObjCClasses / - L % t - Xlinker % t / ObjCClasses . o - framework Foundation <nl> + <nl> + / / RUN : % target - codesign % t / % target - library - name ( resilient_struct ) % t / % target - library - name ( resilient_objc_class ) <nl> <nl> - / / RUN : % target - build - swift % s - L % t - I % t - lresilient_struct - I % S / Inputs / ObjCClasses / - Xlinker % t / ObjCClasses . o - o % t / main % target - rpath ( % t ) <nl> + / / RUN : % target - build - swift % s - L % t - I % t - lresilient_struct - lresilient_objc_class - I % S / Inputs / ObjCClasses / - o % t / main % target - rpath ( % t ) <nl> / / RUN : % target - codesign % t / main <nl> <nl> - / / RUN : % target - run % t / main % t / % target - library - name ( resilient_struct ) <nl> + / / RUN : % target - run % t / main % t / % target - library - name ( resilient_struct ) % t / % target - library - name ( resilient_objc_class ) <nl> <nl> / / REQUIRES : executable_test <nl> / / REQUIRES : objc_interop <nl> <nl> import StdlibUnittest <nl> import Foundation <nl> import resilient_struct <nl> + import resilient_objc_class <nl> import ObjCClasses <nl> <nl> <nl> ResilientClassTestSuite . test ( " ResilientThenEmpty " ) { <nl> expectEqual ( c . t , 400000 ) <nl> } <nl> <nl> + / / Same as the above , but the class itself has a resilient base class <nl> + class AnotherClassWithEmptyThenResilient : HasResilientObjCBaseClass { <nl> + let empty : Empty <nl> + let resilient : ResilientInt <nl> + <nl> + init ( empty : Empty , resilient : ResilientInt ) { <nl> + self . empty = empty <nl> + self . resilient = resilient <nl> + } <nl> + } <nl> + <nl> + ResilientClassTestSuite . test ( " AnotherEmptyThenResilient " ) { <nl> + let c = AnotherClassWithEmptyThenResilient ( empty : Empty ( ) , <nl> + resilient : ResilientInt ( i : 17 ) ) <nl> + c . x = 100 <nl> + c . y = 2000 <nl> + c . z = 30000 <nl> + c . t = 400000 <nl> + expectEqual ( c . resilient . i , 17 ) <nl> + expectEqual ( c . x , 100 ) <nl> + expectEqual ( c . y , 2000 ) <nl> + expectEqual ( c . z , 30000 ) <nl> + expectEqual ( c . t , 400000 ) <nl> + } <nl> + <nl> + class AnotherClassWithResilientThenEmpty : HasHiddenIvars { <nl> + let resilient : ResilientInt <nl> + let empty : Empty <nl> + <nl> + init ( empty : Empty , resilient : ResilientInt ) { <nl> + self . empty = empty <nl> + self . resilient = resilient <nl> + } <nl> + } <nl> + <nl> + ResilientClassTestSuite . test ( " AnotherResilientThenEmpty " ) { <nl> + let c = AnotherClassWithResilientThenEmpty ( empty : Empty ( ) , <nl> + resilient : ResilientInt ( i : 17 ) ) <nl> + c . x = 100 <nl> + c . y = 2000 <nl> + c . z = 30000 <nl> + c . t = 400000 <nl> + expectEqual ( c . resilient . i , 17 ) <nl> + expectEqual ( c . x , 100 ) <nl> + expectEqual ( c . y , 2000 ) <nl> + expectEqual ( c . z , 30000 ) <nl> + expectEqual ( c . t , 400000 ) <nl> + } <nl> + <nl> runAllTests ( ) <nl>
IRGen : Fix crash with empty - sized field in a class with resilient ancestry
apple/swift
1851630e81bb7661b15f806fa587924fa3710ce8
2020-04-27T23:41:42Z
mmm a / userdocs / diagnostics / protocol - type - non - conformance . md <nl> ppp b / userdocs / diagnostics / protocol - type - non - conformance . md <nl> Currently , even if a protocol ` P ` requires no initializers or static members , th <nl> <nl> # # Exceptions <nl> <nl> - The Swift protocol ` Error ` has no required members and , when used as a type , conforms to itself ; ` @ objc ` protocols with no static requirements can also be used as types that conform to themselves . <nl> + When used as a type , the Swift protocol ` Error ` conforms to itself ; ` @ objc ` protocols with no static requirements can also be used as types that conform to themselves . <nl> <nl> # # Alternatives <nl> <nl>
[ docs ] Update educational note for accuracy about ` Error ` requirements
apple/swift
680682fc539b72a7c7e2d8c1897f9710bc861006
2020-09-06T20:51:51Z
mmm a / tests / test_main . cpp <nl> ppp b / tests / test_main . cpp <nl> int test_main ( int argc , char * argv [ ] ) { <nl> <nl> / / Clean arguments of " - - test " from the args . <nl> for ( int x = 0 ; x < argc ; x + + ) { <nl> - if ( strncmp ( argv [ x ] , " - - test " , 6 ) ! = 0 ) { <nl> - test_args . push_back ( String ( argv [ x ] ) ) ; <nl> + String arg = String ( argv [ x ] ) ; <nl> + if ( arg ! = " - - test " ) { <nl> + test_args . push_back ( arg ) ; <nl> } <nl> } <nl> / / Convert Godot command line arguments back to standard arguments . <nl>
Fix doctest runner ignoring all arguments starting with - - test
godotengine/godot
16913368eba145d0e855bdbf654494f3bc9da543
2020-09-02T15:23:34Z
mmm a / filament / backend / include / backend / PipelineState . h <nl> ppp b / filament / backend / include / backend / PipelineState . h <nl> <nl> # include < backend / DriverEnums . h > <nl> # include < backend / Handle . h > <nl> <nl> + # include < limits > <nl> + <nl> # include < stdint . h > <nl> <nl> namespace filament { <nl> struct PipelineState { <nl> Handle < HwProgram > program ; <nl> RasterState rasterState ; <nl> PolygonOffset polygonOffset ; <nl> + Viewport scissor { 0 , 0 , <nl> + ( uint32_t ) std : : numeric_limits < int32_t > : : max ( ) , <nl> + ( uint32_t ) std : : numeric_limits < int32_t > : : max ( ) <nl> + } ; <nl> } ; <nl> <nl> <nl> mmm a / filament / backend / include / private / backend / DriverAPI . inc <nl> ppp b / filament / backend / include / private / backend / DriverAPI . inc <nl> DECL_DRIVER_API_N ( setRenderPrimitiveRange , <nl> uint32_t , maxIndex , <nl> uint32_t , count ) <nl> <nl> - / / Sets up a scissor rectangle that automatically gets clipped against the viewport . <nl> - DECL_DRIVER_API_N ( setViewportScissor , <nl> - int32_t , left , <nl> - int32_t , bottom , <nl> - uint32_t , width , <nl> - uint32_t , height ) <nl> - <nl> / * <nl> * Swap chain <nl> * / <nl> mmm a / filament / backend / src / metal / MetalDriver . mm <nl> ppp b / filament / backend / src / metal / MetalDriver . mm <nl> <nl> primitive - > maxIndex = maxIndex > minIndex ? maxIndex : primitive - > maxVertexCount - 1 ; <nl> } <nl> <nl> - void MetalDriver : : setViewportScissor ( int32_t left , int32_t bottom , uint32_t width , <nl> - uint32_t height ) { <nl> - <nl> - } <nl> - <nl> void MetalDriver : : makeCurrent ( Handle < HwSwapChain > schDraw , Handle < HwSwapChain > schRead ) { <nl> ASSERT_PRECONDITION_NON_FATAL ( schDraw = = schRead , <nl> " Metal driver does not support distinct draw / read swap chains . " ) ; <nl> <nl> clamp : 0 . 0 ] ; <nl> } <nl> <nl> + / / FIXME : implement take ps . scissor into account <nl> + / / must be intersected with viewport ( see OpenGLDriver . cpp for implementation details ) <nl> + <nl> / / Bind uniform buffers . <nl> id < MTLBuffer > uniformsToBind [ Program : : UNIFORM_BINDING_COUNT ] = { nil } ; <nl> NSUInteger offsets [ Program : : UNIFORM_BINDING_COUNT ] = { 0 } ; <nl> mmm a / filament / backend / src / opengl / OpenGLDriver . cpp <nl> ppp b / filament / backend / src / opengl / OpenGLDriver . cpp <nl> void OpenGLDriver : : setRenderPrimitiveRange ( Handle < HwRenderPrimitive > rph , <nl> } <nl> <nl> / / Sets up a scissor rectangle that automatically gets clipped against the viewport . <nl> - void OpenGLDriver : : setViewportScissor ( <nl> - int32_t left , int32_t bottom , uint32_t width , uint32_t height ) { <nl> + void OpenGLDriver : : setViewportScissor ( Viewport const & viewportScissor ) noexcept { <nl> DEBUG_MARKER ( ) <nl> <nl> / / In OpenGL , all four scissor parameters are actually signed , so clamp to MAX_INT32 . <nl> const int32_t maxval = std : : numeric_limits < int32_t > : : max ( ) ; <nl> - left = std : : min ( left , maxval ) ; <nl> - bottom = std : : min ( bottom , maxval ) ; <nl> - width = std : : min ( width , uint32_t ( maxval ) ) ; <nl> - height = std : : min ( height , uint32_t ( maxval ) ) ; <nl> + int32_t left = std : : min ( viewportScissor . left , maxval ) ; <nl> + int32_t bottom = std : : min ( viewportScissor . bottom , maxval ) ; <nl> + uint32_t width = std : : min ( viewportScissor . width , uint32_t ( maxval ) ) ; <nl> + uint32_t height = std : : min ( viewportScissor . height , uint32_t ( maxval ) ) ; <nl> / / Compute the intersection of the requested scissor rectangle with the current viewport . <nl> / / Note that the viewport rectangle isn ' t necessarily equal to the bounds of the current <nl> / / Filament View ( e . g . , when post - processing is enabled ) . <nl> void OpenGLDriver : : setViewportScissor ( <nl> scissor . z = std : : max ( 0 , right - scissor . x ) ; <nl> scissor . w = std : : max ( 0 , top - scissor . y ) ; <nl> setScissor ( scissor . x , scissor . y , scissor . z , scissor . w ) ; <nl> + enable ( GL_SCISSOR_TEST ) ; <nl> } <nl> <nl> / * <nl> void OpenGLDriver : : draw ( PipelineState state , Handle < HwRenderPrimitive > rph ) { <nl> <nl> polygonOffset ( state . polygonOffset . slope , state . polygonOffset . constant ) ; <nl> <nl> - enable ( GL_SCISSOR_TEST ) ; <nl> + setViewportScissor ( state . scissor ) ; <nl> <nl> glDrawRangeElements ( GLenum ( rp - > type ) , rp - > minIndex , rp - > maxIndex , rp - > count , <nl> rp - > gl . indicesType , reinterpret_cast < const void * > ( rp - > offset ) ) ; <nl> mmm a / filament / backend / src / opengl / OpenGLDriver . h <nl> ppp b / filament / backend / src / opengl / OpenGLDriver . h <nl> class OpenGLDriver final : public backend : : DriverBase { <nl> bool clearDepth , double depth , <nl> bool clearStencil , uint32_t stencil ) noexcept ; <nl> <nl> + void setViewportScissor ( backend : : Viewport const & viewportScissor ) noexcept ; <nl> + <nl> / / sampler buffer binding points ( nullptr if not used ) <nl> std : : array < backend : : HwSamplerGroup * , backend : : Program : : SAMPLER_BINDING_COUNT > mSamplerBindings ; / / 8 pointers <nl> <nl> mmm a / filament / backend / src / vulkan / VulkanDriver . cpp <nl> ppp b / filament / backend / src / vulkan / VulkanDriver . cpp <nl> void VulkanDriver : : setRenderPrimitiveRange ( Handle < HwRenderPrimitive > rph , <nl> primitive . maxIndex = maxIndex > minIndex ? maxIndex : primitive . maxVertexCount - 1 ; <nl> } <nl> <nl> - void VulkanDriver : : setViewportScissor ( <nl> - int32_t left , int32_t bottom , uint32_t width , uint32_t height ) { <nl> - assert ( mContext . currentCommands & & mCurrentRenderTarget ) ; <nl> - / / Compute the intersection of the requested scissor rectangle with the current viewport . <nl> - int32_t x = std : : max ( left , ( int32_t ) mContext . viewport . x ) ; <nl> - int32_t y = std : : max ( bottom , ( int32_t ) mContext . viewport . y ) ; <nl> - int32_t right = std : : min ( left + ( int32_t ) width , <nl> - ( int32_t ) ( mContext . viewport . x + mContext . viewport . width ) ) ; <nl> - int32_t top = std : : min ( bottom + ( int32_t ) height , <nl> - ( int32_t ) ( mContext . viewport . y + mContext . viewport . height ) ) ; <nl> - VkRect2D scissor { <nl> - . extent = { ( uint32_t ) right - x , ( uint32_t ) top - y } , <nl> - . offset = { std : : max ( 0 , x ) , std : : max ( 0 , y ) } <nl> - } ; <nl> - <nl> - mCurrentRenderTarget - > transformClientRectToPlatform ( & scissor ) ; <nl> - vkCmdSetScissor ( mContext . currentCommands - > cmdbuffer , 0 , 1 , & scissor ) ; <nl> - } <nl> - <nl> void VulkanDriver : : makeCurrent ( Handle < HwSwapChain > drawSch , Handle < HwSwapChain > readSch ) { <nl> ASSERT_PRECONDITION_NON_FATAL ( drawSch = = readSch , <nl> " Vulkan driver does not support distinct draw / read swap chains . " ) ; <nl> void VulkanDriver : : draw ( PipelineState pipelineState , Handle < HwRenderPrimitive > r <nl> Handle < HwProgram > programHandle = pipelineState . program ; <nl> RasterState rasterState = pipelineState . rasterState ; <nl> PolygonOffset depthOffset = pipelineState . polygonOffset ; <nl> + const Viewport & viewportScissor = pipelineState . scissor ; <nl> <nl> auto * program = handle_cast < VulkanProgram > ( mHandleMap , programHandle ) ; <nl> mDisposer . acquire ( program , commands - > resources ) ; <nl> void VulkanDriver : : draw ( PipelineState pipelineState , Handle < HwRenderPrimitive > r <nl> } <nl> } <nl> <nl> + / / Set scissoring . <nl> + / / Compute the intersection of the requested scissor rectangle with the current viewport . <nl> + const int32_t x = std : : max ( viewportScissor . left , ( int32_t ) mContext . viewport . x ) ; <nl> + const int32_t y = std : : max ( viewportScissor . bottom , ( int32_t ) mContext . viewport . y ) ; <nl> + const int32_t right = std : : min ( viewportScissor . left + ( int32_t ) viewportScissor . width , <nl> + ( int32_t ) ( mContext . viewport . x + mContext . viewport . width ) ) ; <nl> + const int32_t top = std : : min ( viewportScissor . bottom + ( int32_t ) viewportScissor . height , <nl> + ( int32_t ) ( mContext . viewport . y + mContext . viewport . height ) ) ; <nl> + VkRect2D scissor { <nl> + . extent = { ( uint32_t ) right - x , ( uint32_t ) top - y } , <nl> + . offset = { std : : max ( 0 , x ) , std : : max ( 0 , y ) } <nl> + } ; <nl> + rt - > transformClientRectToPlatform ( & scissor ) ; <nl> + vkCmdSetScissor ( cmdbuffer , 0 , 1 , & scissor ) ; <nl> + <nl> / / Bind new descriptor sets if they need to change . <nl> VkDescriptorSet descriptors [ 2 ] ; <nl> VkPipelineLayout pipelineLayout ; <nl> mmm a / filament / src / PostProcessManager . cpp <nl> ppp b / filament / src / PostProcessManager . cpp <nl> FrameGraphId < FrameGraphTexture > PostProcessManager : : toneMapping ( FrameGraph & fg , <nl> <nl> pInstance - > commit ( driver ) ; <nl> <nl> - PipelineState pipeline ; <nl> - pipeline . rasterState = mTonemapping . getMaterial ( ) - > getRasterState ( ) ; <nl> const uint8_t variant = static_cast < uint8_t > ( <nl> - translucent ? <nl> - PostProcessVariant : : TRANSLUCENT : PostProcessVariant : : OPAQUE ) ; <nl> - pipeline . program = mTonemapping . getMaterial ( ) - > getProgram ( variant ) ; <nl> + translucent ? <nl> + PostProcessVariant : : TRANSLUCENT : PostProcessVariant : : OPAQUE ) ; <nl> + <nl> + PipelineState pipeline { <nl> + . program = mTonemapping . getMaterial ( ) - > getProgram ( variant ) , <nl> + . rasterState = mTonemapping . getMaterial ( ) - > getRasterState ( ) , <nl> + . scissor = pInstance - > getScissor ( ) <nl> + } ; <nl> <nl> auto const & target = resources . getRenderTarget ( data . rt ) ; <nl> driver . beginRenderPass ( target . target , target . params ) ; <nl> FrameGraphId < FrameGraphTexture > PostProcessManager : : fxaa ( FrameGraph & fg , <nl> <nl> pInstance - > commit ( driver ) ; <nl> <nl> - PipelineState pipeline ; <nl> - pipeline . rasterState = mFxaa . getMaterial ( ) - > getRasterState ( ) ; <nl> const uint8_t variant = static_cast < uint8_t > ( <nl> - translucent ? <nl> - PostProcessVariant : : TRANSLUCENT : PostProcessVariant : : OPAQUE ) ; <nl> - pipeline . program = mFxaa . getMaterial ( ) - > getProgram ( variant ) ; <nl> + translucent ? <nl> + PostProcessVariant : : TRANSLUCENT : PostProcessVariant : : OPAQUE ) ; <nl> + <nl> + PipelineState pipeline { <nl> + . program = mFxaa . getMaterial ( ) - > getProgram ( variant ) , <nl> + . rasterState = mFxaa . getMaterial ( ) - > getRasterState ( ) , <nl> + . scissor = pInstance - > getScissor ( ) <nl> + } ; <nl> <nl> auto const & target = resources . getRenderTarget ( data . rt ) ; <nl> driver . beginRenderPass ( target . target , target . params ) ; <nl> FrameGraphId < FrameGraphTexture > PostProcessManager : : ssao ( FrameGraph & fg , RenderP <nl> pipeline . program = mSSAO . getProgram ( ) ; <nl> pipeline . rasterState = mSSAO . getMaterial ( ) - > getRasterState ( ) ; <nl> pipeline . rasterState . depthFunc = RasterState : : DepthFunc : : G ; <nl> + pipeline . scissor = pInstance - > getScissor ( ) ; <nl> <nl> driver . beginRenderPass ( ssao . target , ssao . params ) ; <nl> pInstance - > use ( driver ) ; <nl> FrameGraphId < FrameGraphTexture > PostProcessManager : : mipmapPass ( FrameGraph & fg , <nl> pInstance - > setParameter ( " level " , uint32_t ( level ) ) ; <nl> pInstance - > commit ( driver ) ; <nl> <nl> - PipelineState pipeline ; <nl> - pipeline . program = mMipmapDepth . getProgram ( ) ; <nl> - pipeline . rasterState = mMipmapDepth . getMaterial ( ) - > getRasterState ( ) ; <nl> + PipelineState pipeline { <nl> + . program = mMipmapDepth . getProgram ( ) , <nl> + . rasterState = mMipmapDepth . getMaterial ( ) - > getRasterState ( ) , <nl> + . scissor = pInstance - > getScissor ( ) <nl> + } ; <nl> <nl> driver . beginRenderPass ( out . target , out . params ) ; <nl> pInstance - > use ( driver ) ; <nl> FrameGraphId < FrameGraphTexture > PostProcessManager : : blurPass ( FrameGraph & fg , <nl> pipeline . program = mBlur . getProgram ( ) ; <nl> pipeline . rasterState = mBlur . getMaterial ( ) - > getRasterState ( ) ; <nl> pipeline . rasterState . depthFunc = RasterState : : DepthFunc : : G ; <nl> + pipeline . scissor = pInstance - > getScissor ( ) ; <nl> <nl> driver . beginRenderPass ( blurred . target , blurred . params ) ; <nl> pInstance - > use ( driver ) ; <nl> mmm a / filament / src / RenderPass . cpp <nl> ppp b / filament / src / RenderPass . cpp <nl> void RenderPass : : recordDriverCommands ( FEngine : : DriverApi & driver , FScene & scene , <nl> if ( UTILS_UNLIKELY ( mi ! = info . mi ) ) { <nl> / / this is always taken the first time <nl> mi = info . mi ; <nl> + pipeline . scissor = mi - > getScissor ( ) ; <nl> * pPipelinePolygonOffset = mi - > getPolygonOffset ( ) ; <nl> ma = mi - > getMaterial ( ) ; <nl> mi - > use ( driver ) ; <nl> mmm a / filament / src / details / MaterialInstance . h <nl> ppp b / filament / src / details / MaterialInstance . h <nl> class FMaterialInstance : public MaterialInstance { <nl> if ( mSbHandle ) { <nl> driver . bindSamplers ( BindingPoints : : PER_MATERIAL_INSTANCE , mSbHandle ) ; <nl> } <nl> - driver . setViewportScissor ( mScissorRect . left , mScissorRect . bottom , <nl> - mScissorRect . width , mScissorRect . height ) ; <nl> } <nl> <nl> template < typename T > <nl> class FMaterialInstance : public MaterialInstance { <nl> } ; <nl> } <nl> <nl> + backend : : Viewport const & getScissor ( ) const noexcept { return mScissorRect ; } <nl> + <nl> void setPolygonOffset ( float scale , float constant ) noexcept { <nl> mPolygonOffset = { scale , constant } ; <nl> } <nl>
scissor is now part of PipelineState
google/filament
e068204876a7a9fa663838e6a5c3e9280d338d11
2019-09-13T20:58:29Z
mmm a / src / library . js <nl> ppp b / src / library . js <nl> LibraryManager . library = { <nl> [ ' i32 ' , ' tm_zone ' ] ] ) , <nl> / / Statically allocated time struct . <nl> __tm_current : ' allocate ( { { { Runtime . QUANTUM_SIZE } } } * 26 , " i8 " , ALLOC_STATIC ) ' , <nl> - / / Statically allocated timezone strings . <nl> - __tm_timezones : { } , <nl> + / / Statically allocated timezone string . We only use GMT as a timezone . <nl> + __tm_timezone : ' allocate ( intArrayFromString ( " GMT " ) , " i8 " , ALLOC_STATIC ) ' , <nl> / / Statically allocated time strings . <nl> __tm_formatted : ' allocate ( { { { Runtime . QUANTUM_SIZE } } } * 26 , " i8 " , ALLOC_STATIC ) ' , <nl> <nl> LibraryManager . library = { <nl> return _gmtime_r ( time , ___tm_current ) ; <nl> } , <nl> <nl> - gmtime_r__deps : [ ' __tm_struct_layout ' , ' __tm_timezones ' ] , <nl> + gmtime_r__deps : [ ' __tm_struct_layout ' , ' __tm_timezone ' ] , <nl> gmtime_r : function ( time , tmPtr ) { <nl> var date = new Date ( { { { makeGetValue ( ' time ' , 0 , ' i32 ' ) } } } * 1000 ) ; <nl> var offsets = ___tm_struct_layout ; <nl> LibraryManager . library = { <nl> start . setUTCMilliseconds ( 0 ) ; <nl> var yday = Math . floor ( ( date . getTime ( ) - start . getTime ( ) ) / ( 1000 * 60 * 60 * 24 ) ) ; <nl> { { { makeSetValue ( ' tmPtr ' , ' offsets . tm_yday ' , ' yday ' , ' i32 ' ) } } } <nl> - <nl> - var timezone = " GMT " ; <nl> - if ( ! ( timezone in ___tm_timezones ) ) { <nl> - ___tm_timezones [ timezone ] = allocate ( intArrayFromString ( timezone ) , ' i8 ' , ALLOC_NORMAL ) ; <nl> - } <nl> - { { { makeSetValue ( ' tmPtr ' , ' offsets . tm_zone ' , ' ___tm_timezones [ timezone ] ' , ' i32 ' ) } } } <nl> + { { { makeSetValue ( ' tmPtr ' , ' offsets . tm_zone ' , ' ___tm_timezone ' , ' i32 ' ) } } } <nl> <nl> return tmPtr ; <nl> } , <nl> LibraryManager . library = { <nl> return _localtime_r ( time , ___tm_current ) ; <nl> } , <nl> <nl> - localtime_r__deps : [ ' __tm_struct_layout ' , ' __tm_timezones ' , ' tzset ' ] , <nl> + localtime_r__deps : [ ' __tm_struct_layout ' , ' __tm_timezone ' , ' tzset ' ] , <nl> localtime_r : function ( time , tmPtr ) { <nl> _tzset ( ) ; <nl> var offsets = ___tm_struct_layout ; <nl> LibraryManager . library = { <nl> var dst = Number ( start . getTimezoneOffset ( ) ! = date . getTimezoneOffset ( ) ) ; <nl> { { { makeSetValue ( ' tmPtr ' , ' offsets . tm_isdst ' , ' dst ' , ' i32 ' ) } } } <nl> <nl> - var timezone = ' GMT ' ; / / XXX do not rely on browser timezone info , it is very unpredictable | date . toString ( ) . match ( / \ ( ( [ A - Z ] + ) \ ) / ) [ 1 ] ; <nl> - if ( ! ( timezone in ___tm_timezones ) ) { <nl> - ___tm_timezones [ timezone ] = allocate ( intArrayFromString ( timezone ) , ' i8 ' , ALLOC_NORMAL ) ; <nl> - } <nl> - { { { makeSetValue ( ' tmPtr ' , ' offsets . tm_zone ' , ' ___tm_timezones [ timezone ] ' , ' i32 ' ) } } } <nl> + { { { makeSetValue ( ' tmPtr ' , ' offsets . tm_zone ' , ' ___tm_timezone ' , ' i32 ' ) } } } <nl> <nl> return tmPtr ; <nl> } , <nl>
Merge pull request from waywardmonkeys / simplify - timezone
emscripten-core/emscripten
9bf72e56b5494cb5de102332d6e5c5e20082ff85
2013-09-05T01:57:24Z
mmm a / src / compiler / access - builder . cc <nl> ppp b / src / compiler / access - builder . cc <nl> FieldAccess AccessBuilder : : ForContextSlot ( size_t index ) { <nl> return access ; <nl> } <nl> <nl> - / / static <nl> - FieldAccess AccessBuilder : : ForContextExtensionScopeInfo ( ) { <nl> - FieldAccess access = { <nl> - kTaggedBase , ContextExtension : : kScopeInfoOffset , <nl> - Handle < Name > ( ) , MaybeHandle < Map > ( ) , <nl> - Type : : OtherInternal ( ) , MachineType : : AnyTagged ( ) , <nl> - kFullWriteBarrier } ; <nl> - return access ; <nl> - } <nl> - <nl> - / / static <nl> - FieldAccess AccessBuilder : : ForContextExtensionExtension ( ) { <nl> - FieldAccess access = { kTaggedBase , ContextExtension : : kExtensionOffset , <nl> - Handle < Name > ( ) , MaybeHandle < Map > ( ) , <nl> - Type : : Any ( ) , MachineType : : AnyTagged ( ) , <nl> - kFullWriteBarrier } ; <nl> - return access ; <nl> - } <nl> - <nl> / / static <nl> ElementAccess AccessBuilder : : ForFixedArrayElement ( ) { <nl> ElementAccess access = { kTaggedBase , FixedArray : : kHeaderSize , Type : : Any ( ) , <nl> mmm a / src / compiler / access - builder . h <nl> ppp b / src / compiler / access - builder . h <nl> class V8_EXPORT_PRIVATE AccessBuilder final <nl> / / Provides access to Context slots . <nl> static FieldAccess ForContextSlot ( size_t index ) ; <nl> <nl> - / / Provides access to ContextExtension fields . <nl> - static FieldAccess ForContextExtensionScopeInfo ( ) ; <nl> - static FieldAccess ForContextExtensionExtension ( ) ; <nl> - <nl> / / Provides access to FixedArray elements . <nl> static ElementAccess ForFixedArrayElement ( ) ; <nl> static ElementAccess ForFixedArrayElement ( <nl> mmm a / src / compiler / js - create - lowering . cc <nl> ppp b / src / compiler / js - create - lowering . cc <nl> Reduction JSCreateLowering : : ReduceJSCreateFunctionContext ( Node * node ) { <nl> Reduction JSCreateLowering : : ReduceJSCreateWithContext ( Node * node ) { <nl> DCHECK_EQ ( IrOpcode : : kJSCreateWithContext , node - > opcode ( ) ) ; <nl> Handle < ScopeInfo > scope_info = ScopeInfoOf ( node - > op ( ) ) ; <nl> - Node * object = NodeProperties : : GetValueInput ( node , 0 ) ; <nl> + Node * extension = NodeProperties : : GetValueInput ( node , 0 ) ; <nl> Node * effect = NodeProperties : : GetEffectInput ( node ) ; <nl> Node * control = NodeProperties : : GetControlInput ( node ) ; <nl> Node * context = NodeProperties : : GetContextInput ( node ) ; <nl> <nl> - AllocationBuilder aa ( jsgraph ( ) , effect , control ) ; <nl> - aa . Allocate ( ContextExtension : : kSize ) ; <nl> - aa . Store ( AccessBuilder : : ForMap ( ) , factory ( ) - > context_extension_map ( ) ) ; <nl> - aa . Store ( AccessBuilder : : ForContextExtensionScopeInfo ( ) , scope_info ) ; <nl> - aa . Store ( AccessBuilder : : ForContextExtensionExtension ( ) , object ) ; <nl> - Node * extension = aa . Finish ( ) ; <nl> - <nl> - AllocationBuilder a ( jsgraph ( ) , extension , control ) ; <nl> + AllocationBuilder a ( jsgraph ( ) , effect , control ) ; <nl> STATIC_ASSERT ( Context : : MIN_CONTEXT_SLOTS = = 4 ) ; / / Ensure fully covered . <nl> a . AllocateContext ( Context : : MIN_CONTEXT_SLOTS , factory ( ) - > with_context_map ( ) ) ; <nl> a . Store ( AccessBuilder : : ForContextSlot ( Context : : SCOPE_INFO_INDEX ) , scope_info ) ; <nl> Reduction JSCreateLowering : : ReduceJSCreateCatchContext ( Node * node ) { <nl> const CreateCatchContextParameters & parameters = <nl> CreateCatchContextParametersOf ( node - > op ( ) ) ; <nl> Handle < ScopeInfo > scope_info = parameters . scope_info ( ) ; <nl> + Handle < String > catch_name = parameters . catch_name ( ) ; <nl> Node * exception = NodeProperties : : GetValueInput ( node , 0 ) ; <nl> Node * effect = NodeProperties : : GetEffectInput ( node ) ; <nl> Node * control = NodeProperties : : GetControlInput ( node ) ; <nl> Node * context = NodeProperties : : GetContextInput ( node ) ; <nl> <nl> - AllocationBuilder aa ( jsgraph ( ) , effect , control ) ; <nl> - aa . Allocate ( ContextExtension : : kSize ) ; <nl> - aa . Store ( AccessBuilder : : ForMap ( ) , factory ( ) - > context_extension_map ( ) ) ; <nl> - aa . Store ( AccessBuilder : : ForContextExtensionScopeInfo ( ) , <nl> - parameters . scope_info ( ) ) ; <nl> - aa . Store ( AccessBuilder : : ForContextExtensionExtension ( ) , <nl> - parameters . catch_name ( ) ) ; <nl> - Node * extension = aa . Finish ( ) ; <nl> - <nl> - AllocationBuilder a ( jsgraph ( ) , extension , control ) ; <nl> + AllocationBuilder a ( jsgraph ( ) , effect , control ) ; <nl> STATIC_ASSERT ( Context : : MIN_CONTEXT_SLOTS = = 4 ) ; / / Ensure fully covered . <nl> a . AllocateContext ( Context : : MIN_CONTEXT_SLOTS + 1 , <nl> factory ( ) - > catch_context_map ( ) ) ; <nl> a . Store ( AccessBuilder : : ForContextSlot ( Context : : SCOPE_INFO_INDEX ) , scope_info ) ; <nl> a . Store ( AccessBuilder : : ForContextSlot ( Context : : PREVIOUS_INDEX ) , context ) ; <nl> - a . Store ( AccessBuilder : : ForContextSlot ( Context : : EXTENSION_INDEX ) , extension ) ; <nl> + a . Store ( AccessBuilder : : ForContextSlot ( Context : : EXTENSION_INDEX ) , catch_name ) ; <nl> a . Store ( AccessBuilder : : ForContextSlot ( Context : : NATIVE_CONTEXT_INDEX ) , <nl> jsgraph ( ) - > HeapConstant ( native_context ( ) ) ) ; <nl> a . Store ( AccessBuilder : : ForContextSlot ( Context : : THROWN_OBJECT_INDEX ) , <nl> mmm a / src / compiler / types . cc <nl> ppp b / src / compiler / types . cc <nl> Type : : bitset BitsetType : : Lub ( i : : Map * map ) { <nl> case WASM_SHARED_MODULE_DATA_TYPE : <nl> case LOAD_HANDLER_TYPE : <nl> case STORE_HANDLER_TYPE : <nl> - case CONTEXT_EXTENSION_TYPE : <nl> case ASYNC_GENERATOR_REQUEST_TYPE : <nl> case CODE_DATA_CONTAINER_TYPE : <nl> case CALLBACK_TASK_TYPE : <nl> mmm a / src / contexts . cc <nl> ppp b / src / contexts . cc <nl> JSObject * Context : : extension_object ( ) { <nl> IsEvalContext ( ) ) ; <nl> HeapObject * object = extension ( ) ; <nl> if ( object - > IsTheHole ( GetIsolate ( ) ) ) return nullptr ; <nl> - if ( IsBlockContext ( ) ) { <nl> - if ( ! object - > IsContextExtension ( ) ) return nullptr ; <nl> - object = JSObject : : cast ( ContextExtension : : cast ( object ) - > extension ( ) ) ; <nl> - } <nl> DCHECK ( object - > IsJSContextExtensionObject ( ) | | <nl> ( IsNativeContext ( ) & & object - > IsJSGlobalObject ( ) ) ) ; <nl> return JSObject : : cast ( object ) ; <nl> JSObject * Context : : extension_object ( ) { <nl> JSReceiver * Context : : extension_receiver ( ) { <nl> DCHECK ( IsNativeContext ( ) | | IsWithContext ( ) | | IsEvalContext ( ) | | <nl> IsFunctionContext ( ) | | IsBlockContext ( ) ) ; <nl> - return IsWithContext ( ) ? JSReceiver : : cast ( <nl> - ContextExtension : : cast ( extension ( ) ) - > extension ( ) ) <nl> - : extension_object ( ) ; <nl> + return IsWithContext ( ) ? JSReceiver : : cast ( extension ( ) ) : extension_object ( ) ; <nl> } <nl> <nl> ScopeInfo * Context : : scope_info ( ) { <nl> Module * Context : : module ( ) { <nl> <nl> String * Context : : catch_name ( ) { <nl> DCHECK ( IsCatchContext ( ) ) ; <nl> - return String : : cast ( ContextExtension : : cast ( extension ( ) ) - > extension ( ) ) ; <nl> + return String : : cast ( extension ( ) ) ; <nl> } <nl> <nl> <nl> Handle < Object > Context : : Lookup ( Handle < String > name , ContextLookupFlags flags , <nl> } else if ( context - > IsDebugEvaluateContext ( ) ) { <nl> / / Check materialized locals . <nl> Object * ext = context - > get ( EXTENSION_INDEX ) ; <nl> - if ( ext - > IsContextExtension ( ) ) { <nl> - Object * obj = ContextExtension : : cast ( ext ) - > extension ( ) ; <nl> - if ( obj - > IsJSReceiver ( ) ) { <nl> - Handle < JSReceiver > extension ( JSReceiver : : cast ( obj ) ) ; <nl> - LookupIterator it ( extension , name , extension ) ; <nl> - Maybe < bool > found = JSReceiver : : HasProperty ( & it ) ; <nl> - if ( found . FromMaybe ( false ) ) { <nl> - * attributes = NONE ; <nl> - return extension ; <nl> - } <nl> + if ( ext - > IsJSReceiver ( ) ) { <nl> + Handle < JSReceiver > extension ( JSReceiver : : cast ( ext ) ) ; <nl> + LookupIterator it ( extension , name , extension ) ; <nl> + Maybe < bool > found = JSReceiver : : HasProperty ( & it ) ; <nl> + if ( found . FromMaybe ( false ) ) { <nl> + * attributes = NONE ; <nl> + return extension ; <nl> } <nl> } <nl> / / Check the original context , but do not follow its context chain . <nl> mmm a / src / contexts . h <nl> ppp b / src / contexts . h <nl> class ScriptContextTable : public FixedArray { <nl> / / <nl> / / [ extension ] Additional data . <nl> / / <nl> - / / For catch contexts , it contains a ContextExtension object <nl> - / / consisting of the ScopeInfo and the name of the catch <nl> + / / For catch contexts , it contains the name of the catch <nl> / / variable . <nl> / / <nl> / / For module contexts , it contains the module object . <nl> / / <nl> - / / For block contexts , it may contain a ContextExtension <nl> - / / object consisting of the ScopeInfo and an " extension <nl> - / / object " ( see below ) . <nl> + / / For block contexts , it may contain an " extension object " <nl> + / / ( see below ) . <nl> / / <nl> - / / For with contexts , it contains a ContextExtension object <nl> - / / consisting of the ScopeInfo and an " extension object " . <nl> + / / For with contexts , it contains an " extension object " . <nl> / / <nl> / / An " extension object " is used to dynamically extend a <nl> / / context with additional variables , namely in the <nl> mmm a / src / deoptimizer . cc <nl> ppp b / src / deoptimizer . cc <nl> void TranslatedState : : InitializeCapturedObjectAt ( <nl> case BOILERPLATE_DESCRIPTION_TYPE : <nl> case HASH_TABLE_TYPE : <nl> case PROPERTY_ARRAY_TYPE : <nl> - case CONTEXT_EXTENSION_TYPE : <nl> InitializeObjectWithTaggedFieldsAt ( frame , & value_index , slot , map , <nl> no_allocation ) ; <nl> break ; <nl> void TranslatedState : : EnsureCapturedObjectAllocatedAt ( <nl> & value_index , worklist ) ; <nl> } <nl> <nl> - case CONTEXT_EXTENSION_TYPE : { <nl> - CHECK_EQ ( map - > instance_size ( ) , slot - > GetChildrenCount ( ) * kPointerSize ) ; <nl> - slot - > set_storage ( AllocateStorageFor ( slot ) ) ; <nl> - / / Make sure all the remaining children ( after the map ) are allocated . <nl> - return EnsureChildrenAllocated ( slot - > GetChildrenCount ( ) - 1 , frame , <nl> - & value_index , worklist ) ; <nl> - } <nl> - <nl> default : <nl> CHECK ( map - > IsJSObjectMap ( ) ) ; <nl> EnsureJSObjectAllocated ( slot , map ) ; <nl> mmm a / src / heap / factory . cc <nl> ppp b / src / heap / factory . cc <nl> Handle < Tuple3 > Factory : : NewTuple3 ( Handle < Object > value1 , Handle < Object > value2 , <nl> return result ; <nl> } <nl> <nl> - Handle < ContextExtension > Factory : : NewContextExtension ( <nl> - Handle < ScopeInfo > scope_info , Handle < Object > extension ) { <nl> - Handle < ContextExtension > result = Handle < ContextExtension > : : cast ( <nl> - NewStruct ( CONTEXT_EXTENSION_TYPE , TENURED ) ) ; <nl> - result - > set_scope_info ( * scope_info ) ; <nl> - result - > set_extension ( * extension ) ; <nl> - return result ; <nl> - } <nl> - <nl> Handle < ConstantElementsPair > Factory : : NewConstantElementsPair ( <nl> ElementsKind elements_kind , Handle < FixedArrayBase > constant_values ) { <nl> Handle < ConstantElementsPair > result = <nl> Handle < Context > Factory : : NewCatchContext ( Handle < Context > previous , <nl> Handle < String > name , <nl> Handle < Object > thrown_object ) { <nl> STATIC_ASSERT ( Context : : MIN_CONTEXT_SLOTS = = Context : : THROWN_OBJECT_INDEX ) ; <nl> - Handle < ContextExtension > extension = NewContextExtension ( scope_info , name ) ; <nl> Handle < Context > context = NewFixedArrayWithMap < Context > ( <nl> Heap : : kCatchContextMapRootIndex , Context : : MIN_CONTEXT_SLOTS + 1 ) ; <nl> context - > set_scope_info ( * scope_info ) ; <nl> context - > set_previous ( * previous ) ; <nl> - context - > set_extension ( * extension ) ; <nl> + context - > set_extension ( * name ) ; <nl> context - > set_native_context ( previous - > native_context ( ) ) ; <nl> context - > set ( Context : : THROWN_OBJECT_INDEX , * thrown_object ) ; <nl> return context ; <nl> Handle < Context > Factory : : NewDebugEvaluateContext ( Handle < Context > previous , <nl> Handle < StringSet > whitelist ) { <nl> STATIC_ASSERT ( Context : : WHITE_LIST_INDEX = = Context : : MIN_CONTEXT_SLOTS + 1 ) ; <nl> DCHECK ( scope_info - > IsDebugEvaluateScope ( ) ) ; <nl> - Handle < ContextExtension > context_extension = NewContextExtension ( <nl> - scope_info , extension . is_null ( ) ? Handle < Object > : : cast ( undefined_value ( ) ) <nl> - : Handle < Object > : : cast ( extension ) ) ; <nl> + Handle < HeapObject > ext = extension . is_null ( ) <nl> + ? Handle < HeapObject > : : cast ( the_hole_value ( ) ) <nl> + : Handle < HeapObject > : : cast ( extension ) ; <nl> Handle < Context > c = NewFixedArrayWithMap < Context > ( <nl> Heap : : kDebugEvaluateContextMapRootIndex , Context : : MIN_CONTEXT_SLOTS + 2 ) ; <nl> c - > set_scope_info ( * scope_info ) ; <nl> c - > set_previous ( * previous ) ; <nl> c - > set_native_context ( previous - > native_context ( ) ) ; <nl> - c - > set_extension ( * context_extension ) ; <nl> + c - > set_extension ( * ext ) ; <nl> if ( ! wrapped . is_null ( ) ) c - > set ( Context : : WRAPPED_CONTEXT_INDEX , * wrapped ) ; <nl> if ( ! whitelist . is_null ( ) ) c - > set ( Context : : WHITE_LIST_INDEX , * whitelist ) ; <nl> return c ; <nl> Handle < Context > Factory : : NewDebugEvaluateContext ( Handle < Context > previous , <nl> Handle < Context > Factory : : NewWithContext ( Handle < Context > previous , <nl> Handle < ScopeInfo > scope_info , <nl> Handle < JSReceiver > extension ) { <nl> - Handle < ContextExtension > context_extension = <nl> - NewContextExtension ( scope_info , extension ) ; <nl> Handle < Context > context = NewFixedArrayWithMap < Context > ( <nl> Heap : : kWithContextMapRootIndex , Context : : MIN_CONTEXT_SLOTS ) ; <nl> context - > set_scope_info ( * scope_info ) ; <nl> context - > set_previous ( * previous ) ; <nl> - context - > set_extension ( * context_extension ) ; <nl> + context - > set_extension ( * extension ) ; <nl> context - > set_native_context ( previous - > native_context ( ) ) ; <nl> return context ; <nl> } <nl> mmm a / src / heap / factory . h <nl> ppp b / src / heap / factory . h <nl> class V8_EXPORT_PRIVATE Factory { <nl> Handle < Tuple3 > NewTuple3 ( Handle < Object > value1 , Handle < Object > value2 , <nl> Handle < Object > value3 , PretenureFlag pretenure ) ; <nl> <nl> - / / Create a new ContextExtension struct . <nl> - Handle < ContextExtension > NewContextExtension ( Handle < ScopeInfo > scope_info , <nl> - Handle < Object > extension ) ; <nl> - <nl> / / Create a new ConstantElementsPair struct . <nl> Handle < ConstantElementsPair > NewConstantElementsPair ( <nl> ElementsKind elements_kind , Handle < FixedArrayBase > constant_values ) ; <nl> mmm a / src / heap / incremental - marking . cc <nl> ppp b / src / heap / incremental - marking . cc <nl> int IncrementalMarking : : VisitObject ( Map * map , HeapObject * obj ) { <nl> / / unsafe layout change . <nl> / / 4 . The object is materizalized by the deoptimizer . <nl> DCHECK ( obj - > IsHashTable ( ) | | obj - > IsPropertyArray ( ) | | <nl> - obj - > IsContextExtension ( ) | | obj - > IsFixedArray ( ) | | <nl> - obj - > IsJSObject ( ) | | obj - > IsString ( ) ) ; <nl> + obj - > IsFixedArray ( ) | | obj - > IsJSObject ( ) | | obj - > IsString ( ) ) ; <nl> } <nl> DCHECK ( marking_state ( ) - > IsBlack ( obj ) ) ; <nl> WhiteToGreyAndPush ( map ) ; <nl> mmm a / src / objects - debug . cc <nl> ppp b / src / objects - debug . cc <nl> void StoreHandler : : StoreHandlerVerify ( ) { <nl> / / TODO ( ishell ) : check handler integrity <nl> } <nl> <nl> - void ContextExtension : : ContextExtensionVerify ( ) { <nl> - CHECK ( IsContextExtension ( ) ) ; <nl> - VerifyObjectField ( kScopeInfoOffset ) ; <nl> - VerifyObjectField ( kExtensionOffset ) ; <nl> - } <nl> - <nl> void AccessorInfo : : AccessorInfoVerify ( ) { <nl> CHECK ( IsAccessorInfo ( ) ) ; <nl> VerifyPointer ( name ( ) ) ; <nl> mmm a / src / objects - inl . h <nl> ppp b / src / objects - inl . h <nl> CAST_ACCESSOR ( BigInt ) <nl> CAST_ACCESSOR ( BoilerplateDescription ) <nl> CAST_ACCESSOR ( Cell ) <nl> CAST_ACCESSOR ( ConstantElementsPair ) <nl> - CAST_ACCESSOR ( ContextExtension ) <nl> CAST_ACCESSOR ( DescriptorArray ) <nl> CAST_ACCESSOR ( EnumCache ) <nl> CAST_ACCESSOR ( FeedbackCell ) <nl> ACCESSORS ( Tuple2 , value1 , Object , kValue1Offset ) <nl> ACCESSORS ( Tuple2 , value2 , Object , kValue2Offset ) <nl> ACCESSORS ( Tuple3 , value3 , Object , kValue3Offset ) <nl> <nl> - ACCESSORS ( ContextExtension , scope_info , ScopeInfo , kScopeInfoOffset ) <nl> - ACCESSORS ( ContextExtension , extension , Object , kExtensionOffset ) <nl> - <nl> SMI_ACCESSORS ( ConstantElementsPair , elements_kind , kElementsKindOffset ) <nl> ACCESSORS ( ConstantElementsPair , constant_values , FixedArrayBase , <nl> kConstantValuesOffset ) <nl> mmm a / src / objects - printer . cc <nl> ppp b / src / objects - printer . cc <nl> void StoreHandler : : StoreHandlerPrint ( std : : ostream & os ) { / / NOLINT <nl> os < < " \ n " ; <nl> } <nl> <nl> - void ContextExtension : : ContextExtensionPrint ( std : : ostream & os ) { / / NOLINT <nl> - HeapObject : : PrintHeader ( os , " ContextExtension " ) ; <nl> - os < < " \ n - scope_info : " < < Brief ( scope_info ( ) ) ; <nl> - os < < " \ n - extension : " < < Brief ( extension ( ) ) ; <nl> - os < < " \ n " ; <nl> - } <nl> - <nl> void AccessorPair : : AccessorPairPrint ( std : : ostream & os ) { / / NOLINT <nl> HeapObject : : PrintHeader ( os , " AccessorPair " ) ; <nl> os < < " \ n - getter : " < < Brief ( getter ( ) ) ; <nl> mmm a / src / objects . h <nl> ppp b / src / objects . h <nl> const int kStubMinorKeyBits = kSmiValueSize - kStubMajorKeyBits - 1 ; <nl> V ( ALLOCATION_MEMENTO_TYPE ) \ <nl> V ( ALLOCATION_SITE_TYPE ) \ <nl> V ( ASYNC_GENERATOR_REQUEST_TYPE ) \ <nl> - V ( CONTEXT_EXTENSION_TYPE ) \ <nl> V ( DEBUG_INFO_TYPE ) \ <nl> V ( FUNCTION_TEMPLATE_INFO_TYPE ) \ <nl> V ( INTERCEPTOR_INFO_TYPE ) \ <nl> const int kStubMinorKeyBits = kSmiValueSize - kStubMajorKeyBits - 1 ; <nl> V ( ALLOCATION_MEMENTO , AllocationMemento , allocation_memento ) \ <nl> V ( ALLOCATION_SITE , AllocationSite , allocation_site ) \ <nl> V ( ASYNC_GENERATOR_REQUEST , AsyncGeneratorRequest , async_generator_request ) \ <nl> - V ( CONTEXT_EXTENSION , ContextExtension , context_extension ) \ <nl> V ( DEBUG_INFO , DebugInfo , debug_info ) \ <nl> V ( FUNCTION_TEMPLATE_INFO , FunctionTemplateInfo , function_template_info ) \ <nl> V ( INTERCEPTOR_INFO , InterceptorInfo , interceptor_info ) \ <nl> enum InstanceType : uint16_t { <nl> ALLOCATION_MEMENTO_TYPE , <nl> ALLOCATION_SITE_TYPE , <nl> ASYNC_GENERATOR_REQUEST_TYPE , <nl> - CONTEXT_EXTENSION_TYPE , <nl> DEBUG_INFO_TYPE , <nl> FUNCTION_TEMPLATE_INFO_TYPE , <nl> INTERCEPTOR_INFO_TYPE , <nl> class PrototypeInfo : public Struct { <nl> DISALLOW_IMPLICIT_CONSTRUCTORS ( PrototypeInfo ) ; <nl> } ; <nl> <nl> - / / Pair used to store both a ScopeInfo and an extension object in the extension <nl> - / / slot of a block , catch , or with context . Needed in the rare case where a <nl> - / / declaration block scope ( a " varblock " as used to desugar parameter <nl> - / / destructuring ) also contains a sloppy direct eval , or for with and catch <nl> - / / scopes . ( In no other case both are needed at the same time . ) <nl> - class ContextExtension : public Struct { <nl> - public : <nl> - / / [ scope_info ] : Scope info . <nl> - DECL_ACCESSORS ( scope_info , ScopeInfo ) <nl> - / / [ extension ] : Extension object . <nl> - DECL_ACCESSORS ( extension , Object ) <nl> - <nl> - DECL_CAST ( ContextExtension ) <nl> - <nl> - / / Dispatched behavior . <nl> - DECL_PRINTER ( ContextExtension ) <nl> - DECL_VERIFIER ( ContextExtension ) <nl> - <nl> - static const int kScopeInfoOffset = HeapObject : : kHeaderSize ; <nl> - static const int kExtensionOffset = kScopeInfoOffset + kPointerSize ; <nl> - static const int kSize = kExtensionOffset + kPointerSize ; <nl> - <nl> - private : <nl> - DISALLOW_IMPLICIT_CONSTRUCTORS ( ContextExtension ) ; <nl> - } ; <nl> - <nl> / / List of builtin functions we want to identify to improve code <nl> / / generation . <nl> / / <nl> mmm a / src / runtime / runtime - scopes . cc <nl> ppp b / src / runtime / runtime - scopes . cc <nl> Object * DeclareEvalHelper ( Isolate * isolate , Handle < String > name , <nl> object = <nl> isolate - > factory ( ) - > NewJSObject ( isolate - > context_extension_function ( ) ) ; <nl> <nl> - if ( context - > IsBlockContext ( ) ) { <nl> - Handle < ContextExtension > extension = <nl> - isolate - > factory ( ) - > NewContextExtension ( handle ( context - > scope_info ( ) ) , <nl> - object ) ; <nl> - context - > set_extension ( * extension ) ; <nl> - } else { <nl> - context - > set_extension ( * object ) ; <nl> - } <nl> + context - > set_extension ( * object ) ; <nl> } <nl> <nl> RETURN_FAILURE_ON_EXCEPTION ( isolate , JSObject : : SetOwnPropertyIgnoreAttributes ( <nl> mmm a / tools / v8heapconst . py <nl> ppp b / tools / v8heapconst . py <nl> <nl> 157 : " ALLOCATION_MEMENTO_TYPE " , <nl> 158 : " ALLOCATION_SITE_TYPE " , <nl> 159 : " ASYNC_GENERATOR_REQUEST_TYPE " , <nl> - 160 : " CONTEXT_EXTENSION_TYPE " , <nl> - 161 : " DEBUG_INFO_TYPE " , <nl> - 162 : " FUNCTION_TEMPLATE_INFO_TYPE " , <nl> - 163 : " INTERCEPTOR_INFO_TYPE " , <nl> - 164 : " INTERPRETER_DATA_TYPE " , <nl> - 165 : " MODULE_INFO_ENTRY_TYPE " , <nl> - 166 : " MODULE_TYPE " , <nl> - 167 : " OBJECT_TEMPLATE_INFO_TYPE " , <nl> - 168 : " PROMISE_CAPABILITY_TYPE " , <nl> - 169 : " PROMISE_REACTION_TYPE " , <nl> - 170 : " PROTOTYPE_INFO_TYPE " , <nl> - 171 : " SCRIPT_TYPE " , <nl> - 172 : " STACK_FRAME_INFO_TYPE " , <nl> - 173 : " TUPLE2_TYPE " , <nl> - 174 : " TUPLE3_TYPE " , <nl> - 175 : " WASM_COMPILED_MODULE_TYPE " , <nl> - 176 : " WASM_DEBUG_INFO_TYPE " , <nl> - 177 : " WASM_SHARED_MODULE_DATA_TYPE " , <nl> - 178 : " CALLABLE_TASK_TYPE " , <nl> - 179 : " CALLBACK_TASK_TYPE " , <nl> - 180 : " PROMISE_FULFILL_REACTION_JOB_TASK_TYPE " , <nl> - 181 : " PROMISE_REJECT_REACTION_JOB_TASK_TYPE " , <nl> - 182 : " PROMISE_RESOLVE_THENABLE_JOB_TASK_TYPE " , <nl> - 183 : " FIXED_ARRAY_TYPE " , <nl> - 184 : " BOILERPLATE_DESCRIPTION_TYPE " , <nl> - 185 : " DESCRIPTOR_ARRAY_TYPE " , <nl> - 186 : " HASH_TABLE_TYPE " , <nl> - 187 : " SCOPE_INFO_TYPE " , <nl> - 188 : " BLOCK_CONTEXT_TYPE " , <nl> - 189 : " CATCH_CONTEXT_TYPE " , <nl> - 190 : " DEBUG_EVALUATE_CONTEXT_TYPE " , <nl> - 191 : " EVAL_CONTEXT_TYPE " , <nl> - 192 : " FUNCTION_CONTEXT_TYPE " , <nl> - 193 : " MODULE_CONTEXT_TYPE " , <nl> - 194 : " NATIVE_CONTEXT_TYPE " , <nl> - 195 : " SCRIPT_CONTEXT_TYPE " , <nl> - 196 : " WITH_CONTEXT_TYPE " , <nl> - 197 : " WEAK_FIXED_ARRAY_TYPE " , <nl> - 198 : " TRANSITION_ARRAY_TYPE " , <nl> - 199 : " CALL_HANDLER_INFO_TYPE " , <nl> - 200 : " CELL_TYPE " , <nl> - 201 : " CODE_DATA_CONTAINER_TYPE " , <nl> - 202 : " FEEDBACK_CELL_TYPE " , <nl> - 203 : " FEEDBACK_VECTOR_TYPE " , <nl> - 204 : " LOAD_HANDLER_TYPE " , <nl> - 205 : " PROPERTY_ARRAY_TYPE " , <nl> - 206 : " PROPERTY_CELL_TYPE " , <nl> - 207 : " SHARED_FUNCTION_INFO_TYPE " , <nl> - 208 : " SMALL_ORDERED_HASH_MAP_TYPE " , <nl> - 209 : " SMALL_ORDERED_HASH_SET_TYPE " , <nl> - 210 : " STORE_HANDLER_TYPE " , <nl> - 211 : " WEAK_CELL_TYPE " , <nl> - 212 : " WEAK_ARRAY_LIST_TYPE " , <nl> + 160 : " DEBUG_INFO_TYPE " , <nl> + 161 : " FUNCTION_TEMPLATE_INFO_TYPE " , <nl> + 162 : " INTERCEPTOR_INFO_TYPE " , <nl> + 163 : " INTERPRETER_DATA_TYPE " , <nl> + 164 : " MODULE_INFO_ENTRY_TYPE " , <nl> + 165 : " MODULE_TYPE " , <nl> + 166 : " OBJECT_TEMPLATE_INFO_TYPE " , <nl> + 167 : " PROMISE_CAPABILITY_TYPE " , <nl> + 168 : " PROMISE_REACTION_TYPE " , <nl> + 169 : " PROTOTYPE_INFO_TYPE " , <nl> + 170 : " SCRIPT_TYPE " , <nl> + 171 : " STACK_FRAME_INFO_TYPE " , <nl> + 172 : " TUPLE2_TYPE " , <nl> + 173 : " TUPLE3_TYPE " , <nl> + 174 : " WASM_COMPILED_MODULE_TYPE " , <nl> + 175 : " WASM_DEBUG_INFO_TYPE " , <nl> + 176 : " WASM_SHARED_MODULE_DATA_TYPE " , <nl> + 177 : " CALLABLE_TASK_TYPE " , <nl> + 178 : " CALLBACK_TASK_TYPE " , <nl> + 179 : " PROMISE_FULFILL_REACTION_JOB_TASK_TYPE " , <nl> + 180 : " PROMISE_REJECT_REACTION_JOB_TASK_TYPE " , <nl> + 181 : " PROMISE_RESOLVE_THENABLE_JOB_TASK_TYPE " , <nl> + 182 : " FIXED_ARRAY_TYPE " , <nl> + 183 : " BOILERPLATE_DESCRIPTION_TYPE " , <nl> + 184 : " DESCRIPTOR_ARRAY_TYPE " , <nl> + 185 : " HASH_TABLE_TYPE " , <nl> + 186 : " SCOPE_INFO_TYPE " , <nl> + 187 : " BLOCK_CONTEXT_TYPE " , <nl> + 188 : " CATCH_CONTEXT_TYPE " , <nl> + 189 : " DEBUG_EVALUATE_CONTEXT_TYPE " , <nl> + 190 : " EVAL_CONTEXT_TYPE " , <nl> + 191 : " FUNCTION_CONTEXT_TYPE " , <nl> + 192 : " MODULE_CONTEXT_TYPE " , <nl> + 193 : " NATIVE_CONTEXT_TYPE " , <nl> + 194 : " SCRIPT_CONTEXT_TYPE " , <nl> + 195 : " WITH_CONTEXT_TYPE " , <nl> + 196 : " WEAK_FIXED_ARRAY_TYPE " , <nl> + 197 : " TRANSITION_ARRAY_TYPE " , <nl> + 198 : " CALL_HANDLER_INFO_TYPE " , <nl> + 199 : " CELL_TYPE " , <nl> + 200 : " CODE_DATA_CONTAINER_TYPE " , <nl> + 201 : " FEEDBACK_CELL_TYPE " , <nl> + 202 : " FEEDBACK_VECTOR_TYPE " , <nl> + 203 : " LOAD_HANDLER_TYPE " , <nl> + 204 : " PROPERTY_ARRAY_TYPE " , <nl> + 205 : " PROPERTY_CELL_TYPE " , <nl> + 206 : " SHARED_FUNCTION_INFO_TYPE " , <nl> + 207 : " SMALL_ORDERED_HASH_MAP_TYPE " , <nl> + 208 : " SMALL_ORDERED_HASH_SET_TYPE " , <nl> + 209 : " STORE_HANDLER_TYPE " , <nl> + 210 : " WEAK_CELL_TYPE " , <nl> + 211 : " WEAK_ARRAY_LIST_TYPE " , <nl> 1024 : " JS_PROXY_TYPE " , <nl> 1025 : " JS_GLOBAL_OBJECT_TYPE " , <nl> 1026 : " JS_GLOBAL_PROXY_TYPE " , <nl> <nl> ( " RO_SPACE " , 0x02201 ) : ( 138 , " FreeSpaceMap " ) , <nl> ( " RO_SPACE " , 0x02259 ) : ( 132 , " MetaMap " ) , <nl> ( " RO_SPACE " , 0x022e1 ) : ( 131 , " NullMap " ) , <nl> - ( " RO_SPACE " , 0x02359 ) : ( 185 , " DescriptorArrayMap " ) , <nl> - ( " RO_SPACE " , 0x023c1 ) : ( 183 , " FixedArrayMap " ) , <nl> - ( " RO_SPACE " , 0x02429 ) : ( 211 , " WeakCellMap " ) , <nl> + ( " RO_SPACE " , 0x02359 ) : ( 184 , " DescriptorArrayMap " ) , <nl> + ( " RO_SPACE " , 0x023c1 ) : ( 182 , " FixedArrayMap " ) , <nl> + ( " RO_SPACE " , 0x02429 ) : ( 210 , " WeakCellMap " ) , <nl> ( " RO_SPACE " , 0x024d1 ) : ( 152 , " OnePointerFillerMap " ) , <nl> ( " RO_SPACE " , 0x02539 ) : ( 152 , " TwoPointerFillerMap " ) , <nl> ( " RO_SPACE " , 0x025a1 ) : ( 131 , " UninitializedMap " ) , <nl> <nl> ( " RO_SPACE " , 0x02801 ) : ( 131 , " TheHoleMap " ) , <nl> ( " RO_SPACE " , 0x028c9 ) : ( 131 , " BooleanMap " ) , <nl> ( " RO_SPACE " , 0x029d9 ) : ( 136 , " ByteArrayMap " ) , <nl> - ( " RO_SPACE " , 0x02a41 ) : ( 183 , " FixedCOWArrayMap " ) , <nl> - ( " RO_SPACE " , 0x02aa9 ) : ( 186 , " HashTableMap " ) , <nl> + ( " RO_SPACE " , 0x02a41 ) : ( 182 , " FixedCOWArrayMap " ) , <nl> + ( " RO_SPACE " , 0x02aa9 ) : ( 185 , " HashTableMap " ) , <nl> ( " RO_SPACE " , 0x02b11 ) : ( 128 , " SymbolMap " ) , <nl> ( " RO_SPACE " , 0x02b79 ) : ( 72 , " OneByteStringMap " ) , <nl> - ( " RO_SPACE " , 0x02be1 ) : ( 187 , " ScopeInfoMap " ) , <nl> - ( " RO_SPACE " , 0x02c49 ) : ( 207 , " SharedFunctionInfoMap " ) , <nl> + ( " RO_SPACE " , 0x02be1 ) : ( 186 , " ScopeInfoMap " ) , <nl> + ( " RO_SPACE " , 0x02c49 ) : ( 206 , " SharedFunctionInfoMap " ) , <nl> ( " RO_SPACE " , 0x02cb1 ) : ( 133 , " CodeMap " ) , <nl> - ( " RO_SPACE " , 0x02d19 ) : ( 192 , " FunctionContextMap " ) , <nl> - ( " RO_SPACE " , 0x02d81 ) : ( 200 , " CellMap " ) , <nl> - ( " RO_SPACE " , 0x02de9 ) : ( 206 , " GlobalPropertyCellMap " ) , <nl> + ( " RO_SPACE " , 0x02d19 ) : ( 191 , " FunctionContextMap " ) , <nl> + ( " RO_SPACE " , 0x02d81 ) : ( 199 , " CellMap " ) , <nl> + ( " RO_SPACE " , 0x02de9 ) : ( 205 , " GlobalPropertyCellMap " ) , <nl> ( " RO_SPACE " , 0x02e51 ) : ( 135 , " ForeignMap " ) , <nl> - ( " RO_SPACE " , 0x02eb9 ) : ( 198 , " TransitionArrayMap " ) , <nl> - ( " RO_SPACE " , 0x02f21 ) : ( 203 , " FeedbackVectorMap " ) , <nl> + ( " RO_SPACE " , 0x02eb9 ) : ( 197 , " TransitionArrayMap " ) , <nl> + ( " RO_SPACE " , 0x02f21 ) : ( 202 , " FeedbackVectorMap " ) , <nl> ( " RO_SPACE " , 0x02f89 ) : ( 131 , " ArgumentsMarkerMap " ) , <nl> ( " RO_SPACE " , 0x03019 ) : ( 131 , " ExceptionMap " ) , <nl> ( " RO_SPACE " , 0x030a9 ) : ( 131 , " TerminationExceptionMap " ) , <nl> ( " RO_SPACE " , 0x03141 ) : ( 131 , " OptimizedOutMap " ) , <nl> ( " RO_SPACE " , 0x031d1 ) : ( 131 , " StaleRegisterMap " ) , <nl> - ( " RO_SPACE " , 0x03261 ) : ( 194 , " NativeContextMap " ) , <nl> - ( " RO_SPACE " , 0x032c9 ) : ( 193 , " ModuleContextMap " ) , <nl> - ( " RO_SPACE " , 0x03331 ) : ( 191 , " EvalContextMap " ) , <nl> - ( " RO_SPACE " , 0x03399 ) : ( 195 , " ScriptContextMap " ) , <nl> - ( " RO_SPACE " , 0x03401 ) : ( 188 , " BlockContextMap " ) , <nl> - ( " RO_SPACE " , 0x03469 ) : ( 189 , " CatchContextMap " ) , <nl> - ( " RO_SPACE " , 0x034d1 ) : ( 196 , " WithContextMap " ) , <nl> - ( " RO_SPACE " , 0x03539 ) : ( 190 , " DebugEvaluateContextMap " ) , <nl> - ( " RO_SPACE " , 0x035a1 ) : ( 183 , " ScriptContextTableMap " ) , <nl> + ( " RO_SPACE " , 0x03261 ) : ( 193 , " NativeContextMap " ) , <nl> + ( " RO_SPACE " , 0x032c9 ) : ( 192 , " ModuleContextMap " ) , <nl> + ( " RO_SPACE " , 0x03331 ) : ( 190 , " EvalContextMap " ) , <nl> + ( " RO_SPACE " , 0x03399 ) : ( 194 , " ScriptContextMap " ) , <nl> + ( " RO_SPACE " , 0x03401 ) : ( 187 , " BlockContextMap " ) , <nl> + ( " RO_SPACE " , 0x03469 ) : ( 188 , " CatchContextMap " ) , <nl> + ( " RO_SPACE " , 0x034d1 ) : ( 195 , " WithContextMap " ) , <nl> + ( " RO_SPACE " , 0x03539 ) : ( 189 , " DebugEvaluateContextMap " ) , <nl> + ( " RO_SPACE " , 0x035a1 ) : ( 182 , " ScriptContextTableMap " ) , <nl> ( " RO_SPACE " , 0x03609 ) : ( 151 , " FeedbackMetadataArrayMap " ) , <nl> - ( " RO_SPACE " , 0x03671 ) : ( 183 , " ArrayListMap " ) , <nl> + ( " RO_SPACE " , 0x03671 ) : ( 182 , " ArrayListMap " ) , <nl> ( " RO_SPACE " , 0x036d9 ) : ( 130 , " BigIntMap " ) , <nl> - ( " RO_SPACE " , 0x03741 ) : ( 184 , " BoilerplateDescriptionMap " ) , <nl> + ( " RO_SPACE " , 0x03741 ) : ( 183 , " BoilerplateDescriptionMap " ) , <nl> ( " RO_SPACE " , 0x037a9 ) : ( 137 , " BytecodeArrayMap " ) , <nl> - ( " RO_SPACE " , 0x03811 ) : ( 201 , " CodeDataContainerMap " ) , <nl> + ( " RO_SPACE " , 0x03811 ) : ( 200 , " CodeDataContainerMap " ) , <nl> ( " RO_SPACE " , 0x03879 ) : ( 150 , " FixedDoubleArrayMap " ) , <nl> - ( " RO_SPACE " , 0x038e1 ) : ( 186 , " GlobalDictionaryMap " ) , <nl> - ( " RO_SPACE " , 0x03949 ) : ( 202 , " ManyClosuresCellMap " ) , <nl> - ( " RO_SPACE " , 0x039b1 ) : ( 183 , " ModuleInfoMap " ) , <nl> + ( " RO_SPACE " , 0x038e1 ) : ( 185 , " GlobalDictionaryMap " ) , <nl> + ( " RO_SPACE " , 0x03949 ) : ( 201 , " ManyClosuresCellMap " ) , <nl> + ( " RO_SPACE " , 0x039b1 ) : ( 182 , " ModuleInfoMap " ) , <nl> ( " RO_SPACE " , 0x03a19 ) : ( 134 , " MutableHeapNumberMap " ) , <nl> - ( " RO_SPACE " , 0x03a81 ) : ( 186 , " NameDictionaryMap " ) , <nl> - ( " RO_SPACE " , 0x03ae9 ) : ( 202 , " NoClosuresCellMap " ) , <nl> - ( " RO_SPACE " , 0x03b51 ) : ( 186 , " NumberDictionaryMap " ) , <nl> - ( " RO_SPACE " , 0x03bb9 ) : ( 202 , " OneClosureCellMap " ) , <nl> - ( " RO_SPACE " , 0x03c21 ) : ( 186 , " OrderedHashMapMap " ) , <nl> - ( " RO_SPACE " , 0x03c89 ) : ( 186 , " OrderedHashSetMap " ) , <nl> - ( " RO_SPACE " , 0x03cf1 ) : ( 205 , " PropertyArrayMap " ) , <nl> - ( " RO_SPACE " , 0x03d59 ) : ( 199 , " SideEffectCallHandlerInfoMap " ) , <nl> - ( " RO_SPACE " , 0x03dc1 ) : ( 199 , " SideEffectFreeCallHandlerInfoMap " ) , <nl> - ( " RO_SPACE " , 0x03e29 ) : ( 186 , " SimpleNumberDictionaryMap " ) , <nl> - ( " RO_SPACE " , 0x03e91 ) : ( 183 , " SloppyArgumentsElementsMap " ) , <nl> - ( " RO_SPACE " , 0x03ef9 ) : ( 208 , " SmallOrderedHashMapMap " ) , <nl> - ( " RO_SPACE " , 0x03f61 ) : ( 209 , " SmallOrderedHashSetMap " ) , <nl> - ( " RO_SPACE " , 0x03fc9 ) : ( 186 , " StringTableMap " ) , <nl> - ( " RO_SPACE " , 0x04031 ) : ( 197 , " WeakFixedArrayMap " ) , <nl> - ( " RO_SPACE " , 0x04099 ) : ( 212 , " WeakArrayListMap " ) , <nl> + ( " RO_SPACE " , 0x03a81 ) : ( 185 , " NameDictionaryMap " ) , <nl> + ( " RO_SPACE " , 0x03ae9 ) : ( 201 , " NoClosuresCellMap " ) , <nl> + ( " RO_SPACE " , 0x03b51 ) : ( 185 , " NumberDictionaryMap " ) , <nl> + ( " RO_SPACE " , 0x03bb9 ) : ( 201 , " OneClosureCellMap " ) , <nl> + ( " RO_SPACE " , 0x03c21 ) : ( 185 , " OrderedHashMapMap " ) , <nl> + ( " RO_SPACE " , 0x03c89 ) : ( 185 , " OrderedHashSetMap " ) , <nl> + ( " RO_SPACE " , 0x03cf1 ) : ( 204 , " PropertyArrayMap " ) , <nl> + ( " RO_SPACE " , 0x03d59 ) : ( 198 , " SideEffectCallHandlerInfoMap " ) , <nl> + ( " RO_SPACE " , 0x03dc1 ) : ( 198 , " SideEffectFreeCallHandlerInfoMap " ) , <nl> + ( " RO_SPACE " , 0x03e29 ) : ( 185 , " SimpleNumberDictionaryMap " ) , <nl> + ( " RO_SPACE " , 0x03e91 ) : ( 182 , " SloppyArgumentsElementsMap " ) , <nl> + ( " RO_SPACE " , 0x03ef9 ) : ( 207 , " SmallOrderedHashMapMap " ) , <nl> + ( " RO_SPACE " , 0x03f61 ) : ( 208 , " SmallOrderedHashSetMap " ) , <nl> + ( " RO_SPACE " , 0x03fc9 ) : ( 185 , " StringTableMap " ) , <nl> + ( " RO_SPACE " , 0x04031 ) : ( 196 , " WeakFixedArrayMap " ) , <nl> + ( " RO_SPACE " , 0x04099 ) : ( 211 , " WeakArrayListMap " ) , <nl> ( " RO_SPACE " , 0x04101 ) : ( 106 , " NativeSourceStringMap " ) , <nl> ( " RO_SPACE " , 0x04169 ) : ( 64 , " StringMap " ) , <nl> ( " RO_SPACE " , 0x041d1 ) : ( 73 , " ConsOneByteStringMap " ) , <nl> <nl> ( " RO_SPACE " , 0x04d31 ) : ( 149 , " FixedBigUint64ArrayMap " ) , <nl> ( " RO_SPACE " , 0x04d99 ) : ( 148 , " FixedBigInt64ArrayMap " ) , <nl> ( " RO_SPACE " , 0x04e01 ) : ( 131 , " SelfReferenceMarkerMap " ) , <nl> - ( " RO_SPACE " , 0x04e81 ) : ( 173 , " Tuple2Map " ) , <nl> - ( " RO_SPACE " , 0x04ef9 ) : ( 171 , " ScriptMap " ) , <nl> - ( " RO_SPACE " , 0x04f61 ) : ( 163 , " InterceptorInfoMap " ) , <nl> + ( " RO_SPACE " , 0x04e81 ) : ( 172 , " Tuple2Map " ) , <nl> + ( " RO_SPACE " , 0x04ef9 ) : ( 170 , " ScriptMap " ) , <nl> + ( " RO_SPACE " , 0x04f61 ) : ( 162 , " InterceptorInfoMap " ) , <nl> ( " RO_SPACE " , 0x08e59 ) : ( 154 , " AccessorInfoMap " ) , <nl> ( " RO_SPACE " , 0x09069 ) : ( 153 , " AccessCheckInfoMap " ) , <nl> ( " RO_SPACE " , 0x090d1 ) : ( 155 , " AccessorPairMap " ) , <nl> <nl> ( " RO_SPACE " , 0x091a1 ) : ( 157 , " AllocationMementoMap " ) , <nl> ( " RO_SPACE " , 0x09209 ) : ( 158 , " AllocationSiteMap " ) , <nl> ( " RO_SPACE " , 0x09271 ) : ( 159 , " AsyncGeneratorRequestMap " ) , <nl> - ( " RO_SPACE " , 0x092d9 ) : ( 160 , " ContextExtensionMap " ) , <nl> - ( " RO_SPACE " , 0x09341 ) : ( 161 , " DebugInfoMap " ) , <nl> - ( " RO_SPACE " , 0x093a9 ) : ( 162 , " FunctionTemplateInfoMap " ) , <nl> - ( " RO_SPACE " , 0x09411 ) : ( 164 , " InterpreterDataMap " ) , <nl> - ( " RO_SPACE " , 0x09479 ) : ( 165 , " ModuleInfoEntryMap " ) , <nl> - ( " RO_SPACE " , 0x094e1 ) : ( 166 , " ModuleMap " ) , <nl> - ( " RO_SPACE " , 0x09549 ) : ( 167 , " ObjectTemplateInfoMap " ) , <nl> - ( " RO_SPACE " , 0x095b1 ) : ( 168 , " PromiseCapabilityMap " ) , <nl> - ( " RO_SPACE " , 0x09619 ) : ( 169 , " PromiseReactionMap " ) , <nl> - ( " RO_SPACE " , 0x09681 ) : ( 170 , " PrototypeInfoMap " ) , <nl> - ( " RO_SPACE " , 0x096e9 ) : ( 172 , " StackFrameInfoMap " ) , <nl> - ( " RO_SPACE " , 0x09751 ) : ( 174 , " Tuple3Map " ) , <nl> - ( " RO_SPACE " , 0x097b9 ) : ( 175 , " WasmCompiledModuleMap " ) , <nl> - ( " RO_SPACE " , 0x09821 ) : ( 176 , " WasmDebugInfoMap " ) , <nl> - ( " RO_SPACE " , 0x09889 ) : ( 177 , " WasmSharedModuleDataMap " ) , <nl> - ( " RO_SPACE " , 0x098f1 ) : ( 178 , " CallableTaskMap " ) , <nl> - ( " RO_SPACE " , 0x09959 ) : ( 179 , " CallbackTaskMap " ) , <nl> - ( " RO_SPACE " , 0x099c1 ) : ( 180 , " PromiseFulfillReactionJobTaskMap " ) , <nl> - ( " RO_SPACE " , 0x09a29 ) : ( 181 , " PromiseRejectReactionJobTaskMap " ) , <nl> - ( " RO_SPACE " , 0x09a91 ) : ( 182 , " PromiseResolveThenableJobTaskMap " ) , <nl> + ( " RO_SPACE " , 0x092d9 ) : ( 160 , " DebugInfoMap " ) , <nl> + ( " RO_SPACE " , 0x09341 ) : ( 161 , " FunctionTemplateInfoMap " ) , <nl> + ( " RO_SPACE " , 0x093a9 ) : ( 163 , " InterpreterDataMap " ) , <nl> + ( " RO_SPACE " , 0x09411 ) : ( 164 , " ModuleInfoEntryMap " ) , <nl> + ( " RO_SPACE " , 0x09479 ) : ( 165 , " ModuleMap " ) , <nl> + ( " RO_SPACE " , 0x094e1 ) : ( 166 , " ObjectTemplateInfoMap " ) , <nl> + ( " RO_SPACE " , 0x09549 ) : ( 167 , " PromiseCapabilityMap " ) , <nl> + ( " RO_SPACE " , 0x095b1 ) : ( 168 , " PromiseReactionMap " ) , <nl> + ( " RO_SPACE " , 0x09619 ) : ( 169 , " PrototypeInfoMap " ) , <nl> + ( " RO_SPACE " , 0x09681 ) : ( 171 , " StackFrameInfoMap " ) , <nl> + ( " RO_SPACE " , 0x096e9 ) : ( 173 , " Tuple3Map " ) , <nl> + ( " RO_SPACE " , 0x09751 ) : ( 174 , " WasmCompiledModuleMap " ) , <nl> + ( " RO_SPACE " , 0x097b9 ) : ( 175 , " WasmDebugInfoMap " ) , <nl> + ( " RO_SPACE " , 0x09821 ) : ( 176 , " WasmSharedModuleDataMap " ) , <nl> + ( " RO_SPACE " , 0x09889 ) : ( 177 , " CallableTaskMap " ) , <nl> + ( " RO_SPACE " , 0x098f1 ) : ( 178 , " CallbackTaskMap " ) , <nl> + ( " RO_SPACE " , 0x09959 ) : ( 179 , " PromiseFulfillReactionJobTaskMap " ) , <nl> + ( " RO_SPACE " , 0x099c1 ) : ( 180 , " PromiseRejectReactionJobTaskMap " ) , <nl> + ( " RO_SPACE " , 0x09a29 ) : ( 181 , " PromiseResolveThenableJobTaskMap " ) , <nl> ( " MAP_SPACE " , 0x02201 ) : ( 1057 , " ExternalMap " ) , <nl> ( " MAP_SPACE " , 0x02259 ) : ( 1072 , " JSMessageObjectMap " ) , <nl> } <nl>
Cleanup : Remove unnecessary ContextExtension wrapper
v8/v8
4c972d669a91351df0dd0e81a8481e602d703499
2018-05-04T09:24:17Z
mmm a / aten / src / TH / generic / THTensorMath . c <nl> ppp b / aten / src / TH / generic / THTensorMath . c <nl> void THTensor_ ( addmm ) ( THTensor * r_ , real beta , THTensor * t , real alpha , THTensor <nl> int64_t ldr__ = r__ - > stride [ ( transpose_r = = ' n ' ? 1 : 0 ) ] ; <nl> <nl> / * m1 * / <nl> - / * Need ldm1_ > = max ( 1 , ( transpose_m1 = = ' t ' ? m : k ) ) * / <nl> + / * Need ldm1_ > = max ( 1 , ( transpose_m1 = = ' n ' ? m : k ) ) * / <nl> if ( m1 - > stride [ ( transpose_r = = ' n ' ? 0 : 1 ) ] = = 1 & & <nl> - m1 - > stride [ ( transpose_r = = ' n ' ? 1 : 0 ) ] > = THMax ( 1 , k ) ) <nl> + m1 - > stride [ ( transpose_r = = ' n ' ? 1 : 0 ) ] > = THMax ( 1 , m ) ) <nl> { <nl> transpose_m1 = ' n ' ; <nl> m1_ = m1 ; <nl> } <nl> else if ( m1 - > stride [ ( transpose_r = = ' n ' ? 1 : 0 ) ] = = 1 & & <nl> - m1 - > stride [ ( transpose_r = = ' n ' ? 0 : 1 ) ] > = THMax ( 1 , m ) ) <nl> + m1 - > stride [ ( transpose_r = = ' n ' ? 0 : 1 ) ] > = THMax ( 1 , k ) ) <nl> { <nl> transpose_m1 = ' t ' ; <nl> m1_ = m1 ; <nl> void THTensor_ ( addmm ) ( THTensor * r_ , real beta , THTensor * t , real alpha , THTensor <nl> } <nl> <nl> / * m2 * / <nl> - / * Need ldm2_ > = max ( 1 , ( transpose_m2 = = ' t ' ? n : k ) ) * / <nl> + / * Need ldm2_ > = max ( 1 , ( transpose_m2 = = ' n ' ? k : n ) ) * / <nl> if ( m2 - > stride [ ( transpose_r = = ' n ' ? 0 : 1 ) ] = = 1 & & <nl> m2 - > stride [ ( transpose_r = = ' n ' ? 1 : 0 ) ] > = THMax ( 1 , k ) ) <nl> { <nl>
fix ( )
pytorch/pytorch
91efc30bfab50bf2a1bba7ddc09b3d57f67dc644
2018-02-05T18:58:29Z
mmm a / tensorflow / python / eager / function . py <nl> ppp b / tensorflow / python / eager / function . py <nl> def _call_flat ( self , args ) : <nl> <nl> if ( tape . should_record ( tensor_inputs ) or <nl> tape . should_record ( self . _captured_inputs ) ) : <nl> - return self . _backprop_call ( args ) <nl> + if context . executing_eagerly ( ) : <nl> + return self . _eager_backprop_call ( args ) <nl> + else : <nl> + return self . _backprop_call_with_delayed_rewrite ( args ) <nl> <nl> # Only need to override the gradient in graph mode and when we have outputs . <nl> if context . executing_eagerly ( ) or not self . outputs : <nl> def _register_gradient ( self , name ) : <nl> name : The name to register the gradient as . <nl> " " " <nl> @ ops . RegisterGradient ( name ) <nl> - def grad_fn ( op , * doutputs ) : # pylint : disable = unused - variable <nl> - " " " Gradients of this function . " " " <nl> - if self . _backward_graph_function is None : <nl> - self . _construct_backprop_function ( ) <nl> + def _registered_grad_fn ( op , * doutputs ) : # pylint : disable = unused - variable <nl> + return self . _grad_fn ( op , * doutputs ) <nl> <nl> - # pylint : disable = protected - access <nl> - self . _forward_function . add_to_graph ( op . graph ) <nl> - num_inference_outputs = self . _inference_function . _num_outputs <nl> - <nl> - # Rewrite an inference call op to be a forward call op <nl> - if op . get_attr ( " f " ) . name . encode ( ) = = self . _inference_function . name : <nl> - func = attr_value_pb2 . AttrValue ( <nl> - func = attr_value_pb2 . NameAttrList ( <nl> - name = self . _forward_function . name ) ) <nl> - op . _set_attr ( " f " , func ) <nl> - types = attr_value_pb2 . AttrValue . ListValue ( <nl> - type = self . _forward_function . _output_types ) <nl> - op . _set_attr ( " Tout " , attr_value_pb2 . AttrValue ( list = types ) ) <nl> - for i in range ( <nl> - num_inference_outputs , len ( self . _forward_function . _output_types ) ) : <nl> - t = ops . Tensor ( op , i , self . _forward_function . _output_types [ i ] ) <nl> - t . set_shape ( self . _forward_function . _output_shapes [ i ] ) <nl> - func_graph_output = self . _forward_function . _func_graph_outputs [ i ] <nl> - custom_gradient . copy_handle_data ( func_graph_output , t ) <nl> - op . _outputs . append ( t ) <nl> - # pylint : enable = protected - access <nl> - # Compute the gradients using the side outputs <nl> - side_outputs = op . outputs [ num_inference_outputs : ] <nl> - args = list ( doutputs [ : num_inference_outputs ] ) + list ( side_outputs ) <nl> - return self . _backward_graph_function . _call_flat ( # pylint : disable = protected - access <nl> - ( a for a in args if a is not None ) ) <nl> + def _grad_fn ( self , op , * doutputs ) : <nl> + " " " Gradients of this function . " " " <nl> + if self . _backward_graph_function is None : <nl> + self . _construct_backprop_function ( ) <nl> + <nl> + # pylint : disable = protected - access <nl> + self . _forward_function . add_to_graph ( op . graph ) <nl> + num_inference_outputs = self . _inference_function . _num_outputs <nl> + <nl> + # Rewrite an inference call op to be a forward call op <nl> + if op . get_attr ( " f " ) . name . encode ( ) = = self . _inference_function . name : <nl> + func = attr_value_pb2 . AttrValue ( <nl> + func = attr_value_pb2 . NameAttrList ( <nl> + name = self . _forward_function . name ) ) <nl> + op . _set_attr ( " f " , func ) <nl> + types = attr_value_pb2 . AttrValue . ListValue ( <nl> + type = self . _forward_function . _output_types ) <nl> + op . _set_attr ( " Tout " , attr_value_pb2 . AttrValue ( list = types ) ) <nl> + for i in range ( <nl> + num_inference_outputs , len ( self . _forward_function . _output_types ) ) : <nl> + t = ops . Tensor ( op , i , self . _forward_function . _output_types [ i ] ) <nl> + t . set_shape ( self . _forward_function . _output_shapes [ i ] ) <nl> + func_graph_output = self . _forward_function . _func_graph_outputs [ i ] <nl> + custom_gradient . copy_handle_data ( func_graph_output , t ) <nl> + op . _outputs . append ( t ) <nl> + # pylint : enable = protected - access <nl> + # Compute the gradients using the side outputs <nl> + side_outputs = op . outputs [ num_inference_outputs : ] <nl> + args = list ( doutputs [ : num_inference_outputs ] ) + list ( side_outputs ) <nl> + return self . _backward_graph_function . _call_flat ( # pylint : disable = protected - access <nl> + ( a for a in args if a is not None ) ) <nl> <nl> @ property <nl> def name ( self ) : <nl> def _construct_backprop_function ( self ) : <nl> self . _func_graph . outputs + backwards_graph_captures , <nl> forward_function_attr ) <nl> <nl> - def _backprop_call ( self , args ) : <nl> + def _eager_backprop_call ( self , args ) : <nl> " " " Calls the forward function and records the result on a tape . <nl> <nl> - ( Only records results on a tape if the function has outputs ) <nl> + This method fully constructs the forward and backward functions before <nl> + calling the function and recording them on the tape . <nl> + <nl> + ( Only records results on a tape if the function has outputs ) . <nl> <nl> Args : <nl> args : All inputs to the function , including resolved captured inputs <nl> def backward_function ( * args ) : <nl> args , backward_function ) <nl> return self . _build_call_outputs ( real_outputs ) <nl> <nl> + def _backprop_call_with_delayed_rewrite ( self , args ) : <nl> + " " " Calls the inference function and records the result on a tape . <nl> + <nl> + The recorded backwards function will construct the backwards graph and <nl> + rewrite the inference function to the forward function . This only happens <nl> + if the recorded backwards function ends up being used to compute gradients . <nl> + <nl> + This approach avoids constructing unnecessary graphs , but it only works if <nl> + we are calling this function when not executing eagerly . <nl> + <nl> + ( Only records results on a tape if the function has outputs ) <nl> + <nl> + Args : <nl> + args : All inputs to the function , including resolved captured inputs <nl> + <nl> + Returns : <nl> + The call output . <nl> + " " " <nl> + ctx = context . context ( ) <nl> + <nl> + if not self . _gradient_name : <nl> + self . _gradient_name = " PartitionedCall - % s " % ops . uid ( ) <nl> + self . _register_gradient ( self . _gradient_name ) <nl> + with ops . get_default_graph ( ) . gradient_override_map ( <nl> + { " PartitionedCall " : self . _gradient_name , <nl> + " StatefulPartitionedCall " : self . _gradient_name } ) : <nl> + outputs = self . _inference_function . call ( ctx , args ) <nl> + <nl> + if isinstance ( outputs , ops . Operation ) or outputs is None : <nl> + return outputs <nl> + <nl> + call_op = outputs [ 0 ] . op <nl> + <nl> + def backward_function ( * args ) : <nl> + return self . _grad_fn ( call_op , * args ) <nl> + <nl> + tape . record_operation ( self . _inference_function . signature . name , outputs , <nl> + args , backward_function ) <nl> + return self . _build_call_outputs ( outputs ) <nl> + <nl> def _build_call_outputs ( self , result ) : <nl> " " " Maps the fdef output list to actual output structure . <nl> <nl>
This CL avoids superfluous construction of backwards graphs for nested function calls . It delays construction of backwards graph to when a tape is actually used to compute a gradient .
tensorflow/tensorflow
5d013e9d011a13bcfca8e013690b1f0375e8bf49
2018-11-27T01:49:53Z
mmm a / src / video_core / macro_interpreter . cpp <nl> ppp b / src / video_core / macro_interpreter . cpp <nl> bool MacroInterpreter : : Step ( u32 offset , bool is_delay_slot ) { <nl> <nl> / / An instruction with the Exit flag will not actually <nl> / / cause an exit if it ' s executed inside a delay slot . <nl> - if ( opcode . is_exit & & ! is_delay_slot ) { <nl> + / / TODO ( Blinkhawk ) : Reversed to always exit . The behavior explained above requires further <nl> + / / testing on the MME code . <nl> + if ( opcode . is_exit ) { <nl> / / Exit has a delay slot , execute the next instruction <nl> Step ( offset , true ) ; <nl> return false ; <nl>
Merge pull request from FernandoS27 / revert - 2466
yuzu-emu/yuzu
73ee85e9ae63368719b3a651de1f91e6bf3e88aa
2019-05-19T20:23:06Z
mmm a / BUILD . gn <nl> ppp b / BUILD . gn <nl> action ( " js2c " ) { <nl> <nl> sources = [ <nl> " src / macros . py " , <nl> - " src / messages . h " , <nl> + " src / messages . h " , <nl> " src / runtime . js " , <nl> " src / v8natives . js " , <nl> " src / symbol . js " , <nl> action ( " js2c " ) { <nl> " src / regexp . js " , <nl> " src / arraybuffer . js " , <nl> " src / typedarray . js " , <nl> + " src / iterator - prototype . js " , <nl> " src / generator . js " , <nl> " src / object - observe . js " , <nl> " src / collection . js " , <nl> action ( " js2c_experimental " ) { <nl> <nl> sources = [ <nl> " src / macros . py " , <nl> - " src / messages . h " , <nl> + " src / messages . h " , <nl> " src / proxy . js " , <nl> " src / generator . js " , <nl> " src / harmony - array . js " , <nl> mmm a / src / array - iterator . js <nl> ppp b / src / array - iterator . js <nl> var $ arrayValues ; <nl> % CheckIsBootstrapping ( ) ; <nl> <nl> var GlobalArray = global . Array ; <nl> - var GlobalObject = global . Object ; <nl> <nl> macro TYPED_ARRAYS ( FUNCTION ) <nl> FUNCTION ( Uint8Array ) <nl> function ArrayKeys ( ) { <nl> } <nl> <nl> <nl> - % FunctionSetPrototype ( ArrayIterator , new GlobalObject ( ) ) ; <nl> + % FunctionSetPrototype ( ArrayIterator , { __proto__ : $ iteratorPrototype } ) ; <nl> % FunctionSetInstanceClassName ( ArrayIterator , ' Array Iterator ' ) ; <nl> <nl> $ installFunctions ( ArrayIterator . prototype , DONT_ENUM , [ <nl> mmm a / src / bootstrapper . cc <nl> ppp b / src / bootstrapper . cc <nl> bool Genesis : : InstallNatives ( ) { <nl> { <nl> / / Create generator meta - objects and install them on the builtins object . <nl> Handle < JSObject > builtins ( native_context ( ) - > builtins ( ) ) ; <nl> + Handle < JSObject > iterator_prototype = <nl> + factory ( ) - > NewJSObject ( isolate ( ) - > object_function ( ) , TENURED ) ; <nl> Handle < JSObject > generator_object_prototype = <nl> factory ( ) - > NewJSObject ( isolate ( ) - > object_function ( ) , TENURED ) ; <nl> Handle < JSObject > generator_function_prototype = <nl> factory ( ) - > NewJSObject ( isolate ( ) - > object_function ( ) , TENURED ) ; <nl> + SetObjectPrototype ( generator_object_prototype , iterator_prototype ) ; <nl> + JSObject : : AddProperty ( <nl> + builtins , factory ( ) - > InternalizeUtf8String ( " $ iteratorPrototype " ) , <nl> + iterator_prototype , <nl> + static_cast < PropertyAttributes > ( DONT_ENUM | DONT_DELETE | READ_ONLY ) ) ; <nl> JSObject : : AddProperty ( <nl> builtins , <nl> factory ( ) - > InternalizeUtf8String ( " GeneratorFunctionPrototype " ) , <nl> mmm a / src / collection - iterator . js <nl> ppp b / src / collection - iterator . js <nl> var $ setValues ; <nl> % CheckIsBootstrapping ( ) ; <nl> <nl> var GlobalMap = global . Map ; <nl> - var GlobalObject = global . Object ; <nl> var GlobalSet = global . Set ; <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> function SetIteratorNextJS ( ) { <nl> } <nl> <nl> <nl> - function SetIteratorSymbolIterator ( ) { <nl> - return this ; <nl> - } <nl> - <nl> - <nl> function SetEntries ( ) { <nl> if ( ! IS_SET ( this ) ) { <nl> throw MakeTypeError ( kIncompatibleMethodReceiver , <nl> function SetValues ( ) { <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> % SetCode ( SetIterator , SetIteratorConstructor ) ; <nl> - % FunctionSetPrototype ( SetIterator , new GlobalObject ( ) ) ; <nl> + % FunctionSetPrototype ( SetIterator , { __proto__ : $ iteratorPrototype } ) ; <nl> % FunctionSetInstanceClassName ( SetIterator , ' Set Iterator ' ) ; <nl> $ installFunctions ( SetIterator . prototype , DONT_ENUM , [ <nl> ' next ' , SetIteratorNextJS <nl> ] ) ; <nl> <nl> - $ setFunctionName ( SetIteratorSymbolIterator , symbolIterator ) ; <nl> - % AddNamedProperty ( SetIterator . prototype , symbolIterator , <nl> - SetIteratorSymbolIterator , DONT_ENUM ) ; <nl> % AddNamedProperty ( SetIterator . prototype , symbolToStringTag , <nl> " Set Iterator " , READ_ONLY | DONT_ENUM ) ; <nl> <nl> function MapIteratorConstructor ( map , kind ) { <nl> } <nl> <nl> <nl> - function MapIteratorSymbolIterator ( ) { <nl> - return this ; <nl> - } <nl> - <nl> - <nl> function MapIteratorNextJS ( ) { <nl> if ( ! IS_MAP_ITERATOR ( this ) ) { <nl> throw MakeTypeError ( kIncompatibleMethodReceiver , <nl> function MapValues ( ) { <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> % SetCode ( MapIterator , MapIteratorConstructor ) ; <nl> - % FunctionSetPrototype ( MapIterator , new GlobalObject ( ) ) ; <nl> + % FunctionSetPrototype ( MapIterator , { __proto__ : $ iteratorPrototype } ) ; <nl> % FunctionSetInstanceClassName ( MapIterator , ' Map Iterator ' ) ; <nl> $ installFunctions ( MapIterator . prototype , DONT_ENUM , [ <nl> ' next ' , MapIteratorNextJS <nl> ] ) ; <nl> <nl> - $ setFunctionName ( MapIteratorSymbolIterator , symbolIterator ) ; <nl> - % AddNamedProperty ( MapIterator . prototype , symbolIterator , <nl> - MapIteratorSymbolIterator , DONT_ENUM ) ; <nl> % AddNamedProperty ( MapIterator . prototype , symbolToStringTag , <nl> " Map Iterator " , READ_ONLY | DONT_ENUM ) ; <nl> <nl> mmm a / src / generator . js <nl> ppp b / src / generator . js <nl> function GeneratorObjectThrow ( exn ) { <nl> } <nl> <nl> <nl> - function GeneratorObjectIterator ( ) { <nl> - return this ; <nl> - } <nl> - <nl> - <nl> function GeneratorFunctionConstructor ( arg1 ) { / / length = = 1 <nl> var source = $ newFunctionString ( arguments , ' function * ' ) ; <nl> var global_proxy = % GlobalProxy ( GeneratorFunctionConstructor ) ; <nl> $ installFunctions ( GeneratorObjectPrototype , <nl> [ " next " , GeneratorObjectNext , <nl> " throw " , GeneratorObjectThrow ] ) ; <nl> <nl> - $ setFunctionName ( GeneratorObjectIterator , symbolIterator ) ; <nl> - % AddNamedProperty ( GeneratorObjectPrototype , symbolIterator , <nl> - GeneratorObjectIterator , DONT_ENUM | DONT_DELETE | READ_ONLY ) ; <nl> % AddNamedProperty ( GeneratorObjectPrototype , " constructor " , <nl> GeneratorFunctionPrototype , DONT_ENUM | READ_ONLY ) ; <nl> % AddNamedProperty ( GeneratorObjectPrototype , <nl> new file mode 100644 <nl> index 00000000000 . . 1c9314a0e3e <nl> mmm / dev / null <nl> ppp b / src / iterator - prototype . js <nl> <nl> + / / Copyright 2015 the V8 project authors . All rights reserved . <nl> + / / Use of this source code is governed by a BSD - style license that can be <nl> + / / found in the LICENSE file . <nl> + <nl> + var $ iteratorPrototype ; <nl> + <nl> + ( function ( global , shared , exports ) { <nl> + " use strict " ; <nl> + % CheckIsBootstrapping ( ) ; <nl> + <nl> + var GlobalObject = global . Object ; <nl> + <nl> + / / 25 . 1 . 2 . 1 % IteratorPrototype % [ @ @ iterator ] ( ) <nl> + function IteratorPrototypeIterator ( ) { <nl> + return this ; <nl> + } <nl> + <nl> + $ setFunctionName ( IteratorPrototypeIterator , symbolIterator ) ; <nl> + % AddNamedProperty ( $ iteratorPrototype , symbolIterator , <nl> + IteratorPrototypeIterator , DONT_ENUM ) ; <nl> + } ) <nl> mmm a / src / string - iterator . js <nl> ppp b / src / string - iterator . js <nl> <nl> <nl> % CheckIsBootstrapping ( ) ; <nl> <nl> - var GlobalObject = global . Object ; <nl> var GlobalString = global . String ; <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> function CreateStringIterator ( string ) { <nl> } <nl> <nl> <nl> - / / 21 . 1 . 5 . 2 . 2 % StringIteratorPrototype % [ @ @ iterator ] <nl> - function StringIteratorIterator ( ) { <nl> - return this ; <nl> - } <nl> - <nl> - <nl> / / 21 . 1 . 5 . 2 . 1 % StringIteratorPrototype % . next ( ) <nl> function StringIteratorNext ( ) { <nl> var iterator = $ toObject ( this ) ; <nl> function StringPrototypeIterator ( ) { <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> - % FunctionSetPrototype ( StringIterator , new GlobalObject ( ) ) ; <nl> + % FunctionSetPrototype ( StringIterator , { __proto__ : $ iteratorPrototype } ) ; <nl> % FunctionSetInstanceClassName ( StringIterator , ' String Iterator ' ) ; <nl> <nl> $ installFunctions ( StringIterator . prototype , DONT_ENUM , [ <nl> ' next ' , StringIteratorNext <nl> ] ) ; <nl> - $ setFunctionName ( StringIteratorIterator , symbolIterator ) ; <nl> - % AddNamedProperty ( StringIterator . prototype , symbolIterator , <nl> - StringIteratorIterator , DONT_ENUM ) ; <nl> % AddNamedProperty ( StringIterator . prototype , symbolToStringTag , <nl> " String Iterator " , READ_ONLY | DONT_ENUM ) ; <nl> <nl> mmm a / test / mjsunit / es6 / generators - runtime . js <nl> ppp b / test / mjsunit / es6 / generators - runtime . js <nl> function * g ( ) { yield 1 ; } <nl> var GeneratorFunctionPrototype = Object . getPrototypeOf ( g ) ; <nl> var GeneratorFunction = GeneratorFunctionPrototype . constructor ; <nl> var GeneratorObjectPrototype = GeneratorFunctionPrototype . prototype ; <nl> + var IteratorPrototype = Object . getPrototypeOf ( GeneratorObjectPrototype ) ; <nl> <nl> / / A generator function should have the same set of properties as any <nl> / / other function . <nl> TestGeneratorFunctionPrototype ( ) ; <nl> / / Functions that we associate with generator objects are actually defined by <nl> / / a common prototype . <nl> function TestGeneratorObjectPrototype ( ) { <nl> - assertSame ( Object . prototype , <nl> + assertSame ( IteratorPrototype , <nl> Object . getPrototypeOf ( GeneratorObjectPrototype ) ) ; <nl> assertSame ( GeneratorObjectPrototype , <nl> Object . getPrototypeOf ( ( function * ( ) { yield 1 } ) . prototype ) ) ; <nl> function TestGeneratorObjectPrototype ( ) { <nl> assertTrue ( throw_desc . writable ) ; <nl> assertFalse ( throw_desc . enumerable ) ; <nl> assertTrue ( throw_desc . configurable ) ; <nl> - <nl> - var iterator_desc = Object . getOwnPropertyDescriptor ( GeneratorObjectPrototype , <nl> - Symbol . iterator ) ; <nl> - assertTrue ( iterator_desc ! = = undefined ) ; <nl> - assertFalse ( iterator_desc . writable ) ; <nl> - assertFalse ( iterator_desc . enumerable ) ; <nl> - assertFalse ( iterator_desc . configurable ) ; <nl> - <nl> - / / The generator object ' s " iterator " function is just the identity . <nl> - assertSame ( iterator_desc . value . call ( 42 ) , 42 ) ; <nl> } <nl> TestGeneratorObjectPrototype ( ) ; <nl> <nl> new file mode 100644 <nl> index 00000000000 . . 0b266e9897a <nl> mmm / dev / null <nl> ppp b / test / mjsunit / es6 / iterator - prototype . js <nl> <nl> + / / Copyright 2014 the V8 project authors . All rights reserved . <nl> + / / Use of this source code is governed by a BSD - style license that can be <nl> + / / found in the LICENSE file . <nl> + <nl> + var arrayIteratorPrototype = [ ] . entries ( ) . __proto__ ; <nl> + var iteratorPrototype = arrayIteratorPrototype . __proto__ ; <nl> + <nl> + assertSame ( Object . prototype , Object . getPrototypeOf ( iteratorPrototype ) ) ; <nl> + assertTrue ( Object . isExtensible ( iteratorPrototype ) ) ; <nl> + assertSame ( 0 , Object . getOwnPropertyNames ( iteratorPrototype ) . length ) ; <nl> + assertSame ( 1 , Object . getOwnPropertySymbols ( iteratorPrototype ) . length ) ; <nl> + assertSame ( Symbol . iterator , <nl> + Object . getOwnPropertySymbols ( iteratorPrototype ) [ 0 ] ) ; <nl> + <nl> + var descr = Object . getOwnPropertyDescriptor ( iteratorPrototype , Symbol . iterator ) ; <nl> + assertTrue ( descr . configurable ) ; <nl> + assertFalse ( descr . enumerable ) ; <nl> + assertTrue ( descr . writable ) ; <nl> + <nl> + var iteratorFunction = descr . value ; <nl> + assertSame ( ' function ' , typeof iteratorFunction ) ; <nl> + assertSame ( 0 , iteratorFunction . length ) ; <nl> + assertSame ( ' [ Symbol . iterator ] ' , iteratorFunction . name ) ; <nl> + <nl> + var obj = { } ; <nl> + assertSame ( obj , iteratorFunction . call ( obj ) ) ; <nl> + assertSame ( iteratorPrototype , iteratorPrototype [ Symbol . iterator ] ( ) ) ; <nl> + <nl> + var mapIteratorPrototype = new Map ( ) . entries ( ) . __proto__ ; <nl> + var setIteratorPrototype = new Set ( ) . values ( ) . __proto__ ; <nl> + var stringIteratorPrototype = ' abc ' [ Symbol . iterator ] ( ) . __proto__ ; <nl> + assertSame ( iteratorPrototype , mapIteratorPrototype . __proto__ ) ; <nl> + assertSame ( iteratorPrototype , setIteratorPrototype . __proto__ ) ; <nl> + assertSame ( iteratorPrototype , stringIteratorPrototype . __proto__ ) ; <nl> + <nl> + var typedArrays = [ <nl> + Float32Array , <nl> + Float64Array , <nl> + Int16Array , <nl> + Int32Array , <nl> + Int8Array , <nl> + Uint16Array , <nl> + Uint32Array , <nl> + Uint8Array , <nl> + Uint8ClampedArray , <nl> + ] ; <nl> + <nl> + for ( var constructor of typedArrays ) { <nl> + var array = new constructor ( ) ; <nl> + var iterator = array [ Symbol . iterator ] ( ) ; <nl> + assertSame ( iteratorPrototype , iterator . __proto__ . __proto__ ) ; <nl> + } <nl> + <nl> + function * gen ( ) { } <nl> + assertSame ( iteratorPrototype , gen . prototype . __proto__ . __proto__ ) ; <nl> + var g = gen ( ) ; <nl> + assertSame ( gen . prototype , g . __proto__ ) ; <nl> + assertSame ( iteratorPrototype , g . __proto__ . __proto__ . __proto__ ) ; <nl> mmm a / tools / gyp / v8 . gyp <nl> ppp b / tools / gyp / v8 . gyp <nl> <nl> ' . . / . . / src / regexp . js ' , <nl> ' . . / . . / src / arraybuffer . js ' , <nl> ' . . / . . / src / typedarray . js ' , <nl> + ' . . / . . / src / iterator - prototype . js ' , <nl> ' . . / . . / src / generator . js ' , <nl> ' . . / . . / src / object - observe . js ' , <nl> ' . . / . . / src / collection . js ' , <nl>
[ es6 ] Iterators and generators should " extend " % IteratorPrototype %
v8/v8
834a8e9f637c175ad214a06aa6a262b73a90627d
2015-05-15T15:09:38Z
new file mode 100644 <nl> index 000000000000 . . b5ee885ddc3a <nl> mmm / dev / null <nl> ppp b / doc / release - notes - 19219 . md <nl> <nl> + # # # # Changes regarding misbehaving peers <nl> + <nl> + Peers that misbehave ( e . g . send us invalid blocks ) are now referred to as <nl> + discouraged nodes in log output , as they ' re not ( and weren ' t ) strictly banned : <nl> + incoming connections are still allowed from them , but they ' re preferred for <nl> + eviction . <nl> + <nl> + Furthermore , a few additional changes are introduced to how discouraged <nl> + addresses are treated : <nl> + <nl> + - Discouraging an address does not time out automatically after 24 hours <nl> + ( or the ` - bantime ` setting ) . Depending on traffic from other peers , <nl> + discouragement may time out at an indeterminate time . <nl> + <nl> + - Discouragement is not persisted over restarts . <nl> + <nl> + - There is no method to list discouraged addresses . They are not returned by <nl> + the ` listbanned ` RPC . That RPC also no longer reports the ` ban_reason ` <nl> + field , as ` " manually added " ` is the only remaining option . <nl> + <nl> + - Discouragement cannot be removed with the ` setban remove ` RPC command . <nl> + If you need to remove a discouragement , you can remove all discouragements by <nl> + stop - starting your node . <nl> mmm a / src / banman . cpp <nl> ppp b / src / banman . cpp <nl> int BanMan : : IsBannedLevel ( CNetAddr net_addr ) <nl> / / 0 - Not banned <nl> / / 1 - Automatic misbehavior ban <nl> / / 2 - Any other ban <nl> - int level = 0 ; <nl> auto current_time = GetTime ( ) ; <nl> LOCK ( m_cs_banned ) ; <nl> for ( const auto & it : m_banned ) { <nl> int BanMan : : IsBannedLevel ( CNetAddr net_addr ) <nl> CBanEntry ban_entry = it . second ; <nl> <nl> if ( current_time < ban_entry . nBanUntil & & sub_net . Match ( net_addr ) ) { <nl> - if ( ban_entry . banReason ! = BanReasonNodeMisbehaving ) return 2 ; <nl> - level = 1 ; <nl> + return 2 ; <nl> } <nl> } <nl> - return level ; <nl> + return m_discouraged . contains ( net_addr . GetAddrBytes ( ) ) ? 1 : 0 ; <nl> } <nl> <nl> bool BanMan : : IsBanned ( CNetAddr net_addr ) <nl> { <nl> auto current_time = GetTime ( ) ; <nl> LOCK ( m_cs_banned ) ; <nl> + if ( m_discouraged . contains ( net_addr . GetAddrBytes ( ) ) ) return true ; <nl> for ( const auto & it : m_banned ) { <nl> CSubNet sub_net = it . first ; <nl> CBanEntry ban_entry = it . second ; <nl> bool BanMan : : IsBanned ( CSubNet sub_net ) <nl> <nl> void BanMan : : Ban ( const CNetAddr & net_addr , const BanReason & ban_reason , int64_t ban_time_offset , bool since_unix_epoch ) <nl> { <nl> + if ( ban_reason = = BanReasonNodeMisbehaving ) { <nl> + LOCK ( m_cs_banned ) ; <nl> + m_discouraged . insert ( net_addr . GetAddrBytes ( ) ) ; <nl> + return ; <nl> + } <nl> CSubNet sub_net ( net_addr ) ; <nl> Ban ( sub_net , ban_reason , ban_time_offset , since_unix_epoch ) ; <nl> } <nl> <nl> void BanMan : : Ban ( const CSubNet & sub_net , const BanReason & ban_reason , int64_t ban_time_offset , bool since_unix_epoch ) <nl> { <nl> + assert ( ban_reason = = BanReasonManuallyAdded ) ; <nl> CBanEntry ban_entry ( GetTime ( ) , ban_reason ) ; <nl> <nl> int64_t normalized_ban_time_offset = ban_time_offset ; <nl> mmm a / src / banman . h <nl> ppp b / src / banman . h <nl> <nl> # define BITCOIN_BANMAN_H <nl> <nl> # include < addrdb . h > <nl> + # include < bloom . h > <nl> # include < fs . h > <nl> # include < net_types . h > / / For banmap_t <nl> # include < sync . h > <nl> class CClientUIInterface ; <nl> class CNetAddr ; <nl> class CSubNet ; <nl> <nl> - / / Denial - of - service detection / prevention <nl> - / / The idea is to detect peers that are behaving <nl> - / / badly and disconnect / ban them , but do it in a <nl> - / / one - coding - mistake - won ' t - shatter - the - entire - network <nl> - / / way . <nl> - / / IMPORTANT : There should be nothing I can give a <nl> - / / node that it will forward on that will make that <nl> - / / node ' s peers drop it . If there is , an attacker <nl> - / / can isolate a node and / or try to split the network . <nl> - / / Dropping a node for sending stuff that is invalid <nl> - / / now but might be valid in a later version is also <nl> - / / dangerous , because it can cause a network split <nl> - / / between nodes running old code and nodes running <nl> - / / new code . <nl> + / / Banman manages two related but distinct concepts : <nl> + / / <nl> + / / 1 . Banning . This is configured manually by the user , through the setban RPC . <nl> + / / If an address or subnet is banned , we never accept incoming connections from <nl> + / / it and never create outgoing connections to it . We won ' t gossip its address <nl> + / / to other peers in addr messages . Banned addresses and subnets are stored to <nl> + / / banlist . dat on shutdown and reloaded on startup . Banning can be used to <nl> + / / prevent connections with spy nodes or other griefers . <nl> + / / <nl> + / / 2 . Discouragement . If a peer misbehaves enough ( see Misbehaving ( ) in <nl> + / / net_processing . cpp ) , we ' ll mark that address as discouraged . We still allow <nl> + / / incoming connections from them , but they ' re preferred for eviction when <nl> + / / we receive new incoming connections . We never make outgoing connections to <nl> + / / them , and do not gossip their address to other peers . This is implemented as <nl> + / / a bloom filter . We can ( probabilistically ) test for membership , but can ' t <nl> + / / list all discouraged addresses or unmark them as discouraged . Discouragement <nl> + / / can prevent our limited connection slots being used up by incompatible <nl> + / / or broken peers . <nl> + / / <nl> + / / Neither banning nor discouragement are protections against denial - of - service <nl> + / / attacks , since if an attacker has a way to waste our resources and we <nl> + / / disconnect from them and ban that address , it ' s trivial for them to <nl> + / / reconnect from another IP address . <nl> + / / <nl> + / / Attempting to automatically disconnect or ban any class of peer carries the <nl> + / / risk of splitting the network . For example , if we banned / disconnected for a <nl> + / / transaction that fails a policy check and a future version changes the <nl> + / / policy check so the transaction is accepted , then that transaction could <nl> + / / cause the network to split between old nodes and new nodes . <nl> <nl> class BanMan <nl> { <nl> class BanMan <nl> CClientUIInterface * m_client_interface = nullptr ; <nl> CBanDB m_ban_db ; <nl> const int64_t m_default_ban_time ; <nl> + CRollingBloomFilter m_discouraged GUARDED_BY ( m_cs_banned ) { 50000 , 0 . 000001 } ; <nl> } ; <nl> <nl> # endif <nl> mmm a / src / init . cpp <nl> ppp b / src / init . cpp <nl> void SetupServerArgs ( NodeContext & node ) <nl> <nl> gArgs . AddArg ( " - addnode = < ip > " , " Add a node to connect to and attempt to keep the connection open ( see the ` addnode ` RPC command help for more info ) . This option can be specified multiple times to add multiple nodes . " , ArgsManager : : ALLOW_ANY | ArgsManager : : NETWORK_ONLY , OptionsCategory : : CONNECTION ) ; <nl> gArgs . AddArg ( " - asmap = < file > " , strprintf ( " Specify asn mapping used for bucketing of the peers ( default : % s ) . Relative paths will be prefixed by the net - specific datadir location . " , DEFAULT_ASMAP_FILENAME ) , ArgsManager : : ALLOW_ANY , OptionsCategory : : CONNECTION ) ; <nl> - gArgs . AddArg ( " - banscore = < n > " , strprintf ( " Threshold for disconnecting misbehaving peers ( default : % u ) " , DEFAULT_BANSCORE_THRESHOLD ) , ArgsManager : : ALLOW_ANY , OptionsCategory : : CONNECTION ) ; <nl> - gArgs . AddArg ( " - bantime = < n > " , strprintf ( " Number of seconds to keep misbehaving peers from reconnecting ( default : % u ) " , DEFAULT_MISBEHAVING_BANTIME ) , ArgsManager : : ALLOW_ANY , OptionsCategory : : CONNECTION ) ; <nl> + gArgs . AddArg ( " - banscore = < n > " , strprintf ( " Threshold for disconnecting and discouraging misbehaving peers ( default : % u ) " , DEFAULT_BANSCORE_THRESHOLD ) , ArgsManager : : ALLOW_ANY , OptionsCategory : : CONNECTION ) ; <nl> + gArgs . AddArg ( " - bantime = < n > " , strprintf ( " Default duration ( in seconds ) of manually configured bans ( default : % u ) " , DEFAULT_MISBEHAVING_BANTIME ) , ArgsManager : : ALLOW_ANY , OptionsCategory : : CONNECTION ) ; <nl> gArgs . AddArg ( " - bind = < addr > " , " Bind to given address and always listen on it . Use [ host ] : port notation for IPv6 " , ArgsManager : : ALLOW_ANY | ArgsManager : : NETWORK_ONLY , OptionsCategory : : CONNECTION ) ; <nl> gArgs . AddArg ( " - connect = < ip > " , " Connect only to the specified node ; - noconnect disables automatic connections ( the rules for this peer are the same as for - addnode ) . This option can be specified multiple times to connect to multiple nodes . " , ArgsManager : : ALLOW_ANY | ArgsManager : : NETWORK_ONLY , OptionsCategory : : CONNECTION ) ; <nl> gArgs . AddArg ( " - discover " , " Discover own IP addresses ( default : 1 when listening and no - externalip or - proxy ) " , ArgsManager : : ALLOW_ANY , OptionsCategory : : CONNECTION ) ; <nl> mmm a / src / net . cpp <nl> ppp b / src / net . cpp <nl> void CConnman : : AcceptConnection ( const ListenSocket & hListenSocket ) { <nl> <nl> int bannedlevel = m_banman ? m_banman - > IsBannedLevel ( addr ) : 0 ; <nl> <nl> - / / Don ' t accept connections from banned peers , but if our inbound slots aren ' t almost full , accept <nl> - / / if the only banning reason was an automatic misbehavior ban . <nl> - if ( ! NetPermissions : : HasFlag ( permissionFlags , NetPermissionFlags : : PF_NOBAN ) & & bannedlevel > ( ( nInbound + 1 < nMaxInbound ) ? 1 : 0 ) ) <nl> + / / Don ' t accept connections from banned peers . <nl> + if ( ! NetPermissions : : HasFlag ( permissionFlags , NetPermissionFlags : : PF_NOBAN ) & & bannedlevel = = 2 ) <nl> { <nl> LogPrint ( BCLog : : NET , " connection from % s dropped ( banned ) \ n " , addr . ToString ( ) ) ; <nl> CloseSocket ( hSocket ) ; <nl> return ; <nl> } <nl> <nl> + / / Only accept connections from discouraged peers if our inbound slots aren ' t ( almost ) full . <nl> + if ( ! NetPermissions : : HasFlag ( permissionFlags , NetPermissionFlags : : PF_NOBAN ) & & nInbound + 1 > = nMaxInbound & & bannedlevel > = 1 ) <nl> + { <nl> + LogPrint ( BCLog : : NET , " connection from % s dropped ( discouraged ) \ n " , addr . ToString ( ) ) ; <nl> + CloseSocket ( hSocket ) ; <nl> + return ; <nl> + } <nl> + <nl> if ( nInbound > = nMaxInbound ) <nl> { <nl> if ( ! AttemptToEvictConnection ( ) ) { <nl> mmm a / src / net_processing . cpp <nl> ppp b / src / net_processing . cpp <nl> unsigned int LimitOrphanTxSize ( unsigned int nMaxOrphans ) <nl> } <nl> <nl> / * * <nl> - * Mark a misbehaving peer to be banned depending upon the value of ` - banscore ` . <nl> + * Increment peer ' s misbehavior score . If the new value surpasses banscore ( specified on startup or by default ) , mark node to be discouraged , meaning the peer might be disconnected & added to the discouragement filter . <nl> * / <nl> void Misbehaving ( NodeId pnode , int howmuch , const std : : string & message ) EXCLUSIVE_LOCKS_REQUIRED ( cs_main ) <nl> { <nl> void Misbehaving ( NodeId pnode , int howmuch , const std : : string & message ) EXCLUSIV <nl> std : : string message_prefixed = message . empty ( ) ? " " : ( " : " + message ) ; <nl> if ( state - > nMisbehavior > = banscore & & state - > nMisbehavior - howmuch < banscore ) <nl> { <nl> - LogPrint ( BCLog : : NET , " % s : % s peer = % d ( % d - > % d ) BAN THRESHOLD EXCEEDED % s \ n " , __func__ , state - > name , pnode , state - > nMisbehavior - howmuch , state - > nMisbehavior , message_prefixed ) ; <nl> + LogPrint ( BCLog : : NET , " % s : % s peer = % d ( % d - > % d ) DISCOURAGE THRESHOLD EXCEEDED % s \ n " , __func__ , state - > name , pnode , state - > nMisbehavior - howmuch , state - > nMisbehavior , message_prefixed ) ; <nl> state - > fShouldBan = true ; <nl> } else <nl> LogPrint ( BCLog : : NET , " % s : % s peer = % d ( % d - > % d ) % s \ n " , __func__ , state - > name , pnode , state - > nMisbehavior - howmuch , state - > nMisbehavior , message_prefixed ) ; <nl> } <nl> <nl> / * * <nl> - * Potentially ban a node based on the contents of a BlockValidationState object <nl> + * Potentially mark a node discouraged based on the contents of a BlockValidationState object <nl> * <nl> * @ param [ in ] via_compact_block this bool is passed in because net_processing should <nl> * punish peers differently depending on whether the data was provided in a compact <nl> static bool MaybePunishNodeForBlock ( NodeId nodeid , const BlockValidationState & s <nl> break ; <nl> } <nl> <nl> - / / Ban outbound ( but not inbound ) peers if on an invalid chain . <nl> + / / Discourage outbound ( but not inbound ) peers if on an invalid chain . <nl> / / Exempt HB compact block peers and manual connections . <nl> if ( ! via_compact_block & & ! node_state - > m_is_inbound & & ! node_state - > m_is_manual_connection ) { <nl> Misbehaving ( nodeid , 100 , message ) ; <nl> static bool MaybePunishNodeForBlock ( NodeId nodeid , const BlockValidationState & s <nl> } <nl> <nl> / * * <nl> - * Potentially ban a node based on the contents of a TxValidationState object <nl> + * Potentially disconnect and discourage a node based on the contents of a TxValidationState object <nl> * <nl> * @ return Returns true if the peer was punished ( probably disconnected ) <nl> * / <nl> void PeerLogicValidation : : UpdatedBlockTip ( const CBlockIndex * pindexNew , const CB <nl> } <nl> <nl> / * * <nl> - * Handle invalid block rejection and consequent peer banning , maintain which <nl> + * Handle invalid block rejection and consequent peer discouragement , maintain which <nl> * peers announce compact blocks . <nl> * / <nl> void PeerLogicValidation : : BlockChecked ( const CBlock & block , const BlockValidationState & state ) { <nl> void ProcessMessage ( <nl> / / relayed before full validation ( see BIP 152 ) , so we don ' t want to disconnect <nl> / / the peer if the header turns out to be for an invalid block . <nl> / / Note that if a peer tries to build on an invalid chain , that <nl> - / / will be detected and the peer will be banned . <nl> + / / will be detected and the peer will be disconnected / discouraged . <nl> return ProcessHeadersMessage ( pfrom , connman , chainman , mempool , { cmpctblock . header } , chainparams , / * via_compact_block = * / true ) ; <nl> } <nl> <nl> void ProcessMessage ( <nl> / / 3 . the block is otherwise invalid ( eg invalid coinbase , <nl> / / block is too big , too many legacy sigops , etc ) . <nl> / / So if CheckBlock failed , # 3 is the only possibility . <nl> - / / Under BIP 152 , we don ' t DoS - ban unless proof of work is <nl> + / / Under BIP 152 , we don ' t discourage the peer unless proof of work is <nl> / / invalid ( we don ' t require all the stateless checks to have <nl> / / been run ) . This is handled below , so just treat this as <nl> / / though the block was successfully read , and rely on the <nl> bool PeerLogicValidation : : CheckIfBanned ( CNode & pnode ) <nl> else if ( pnode . m_manual_connection ) <nl> LogPrintf ( " Warning : not punishing manually - connected peer % s ! \ n " , pnode . addr . ToString ( ) ) ; <nl> else if ( pnode . addr . IsLocal ( ) ) { <nl> - / / Disconnect but don ' t ban _this_ local node <nl> - LogPrintf ( " Warning : disconnecting but not banning local peer % s ! \ n " , pnode . addr . ToString ( ) ) ; <nl> + / / Disconnect but don ' t discourage this local node <nl> + LogPrintf ( " Warning : disconnecting but not discouraging local peer % s ! \ n " , pnode . addr . ToString ( ) ) ; <nl> pnode . fDisconnect = true ; <nl> } else { <nl> / / Disconnect and ban all nodes sharing the address <nl> + LogPrintf ( " Disconnecting and discouraging peer % s ! \ n " , pnode . addr . ToString ( ) ) ; <nl> if ( m_banman ) { <nl> m_banman - > Ban ( pnode . addr , BanReasonNodeMisbehaving ) ; <nl> } <nl> mmm a / src / netaddress . h <nl> ppp b / src / netaddress . h <nl> class CNetAddr <nl> uint32_t GetMappedAS ( const std : : vector < bool > & asmap ) const ; <nl> <nl> std : : vector < unsigned char > GetGroup ( const std : : vector < bool > & asmap ) const ; <nl> + std : : vector < unsigned char > GetAddrBytes ( ) const { return { std : : begin ( ip ) , std : : end ( ip ) } ; } <nl> int GetReachabilityFrom ( const CNetAddr * paddrPartner = nullptr ) const ; <nl> <nl> explicit CNetAddr ( const struct in6_addr & pipv6Addr , const uint32_t scope = 0 ) ; <nl> mmm a / src / rpc / net . cpp <nl> ppp b / src / rpc / net . cpp <nl> static UniValue setban ( const JSONRPCRequest & request ) <nl> <nl> if ( strCommand = = " add " ) <nl> { <nl> - if ( isSubnet ? node . banman - > IsBanned ( subNet ) : node . banman - > IsBanned ( netAddr ) ) { <nl> + if ( ( isSubnet & & node . banman - > IsBanned ( subNet ) ) | | <nl> + ( ! isSubnet & & node . banman - > IsBannedLevel ( netAddr ) = = BanReasonManuallyAdded ) ) { <nl> throw JSONRPCError ( RPC_CLIENT_NODE_ALREADY_ADDED , " Error : IP / Subnet already banned " ) ; <nl> } <nl> <nl> static UniValue setban ( const JSONRPCRequest & request ) <nl> else if ( strCommand = = " remove " ) <nl> { <nl> if ( ! ( isSubnet ? node . banman - > Unban ( subNet ) : node . banman - > Unban ( netAddr ) ) ) { <nl> - throw JSONRPCError ( RPC_CLIENT_INVALID_IP_OR_SUBNET , " Error : Unban failed . Requested address / subnet was not previously banned . " ) ; <nl> + throw JSONRPCError ( RPC_CLIENT_INVALID_IP_OR_SUBNET , " Error : Unban failed . Requested address / subnet was not previously manually banned . " ) ; <nl> } <nl> } <nl> return NullUniValue ; <nl> static UniValue setban ( const JSONRPCRequest & request ) <nl> static UniValue listbanned ( const JSONRPCRequest & request ) <nl> { <nl> RPCHelpMan { " listbanned " , <nl> - " \ nList all banned IPs / Subnets . \ n " , <nl> + " \ nList all manually banned IPs / Subnets . \ n " , <nl> { } , <nl> RPCResult { RPCResult : : Type : : ARR , " " , " " , <nl> { <nl> static UniValue listbanned ( const JSONRPCRequest & request ) <nl> { RPCResult : : Type : : STR , " address " , " " } , <nl> { RPCResult : : Type : : NUM_TIME , " banned_until " , " " } , <nl> { RPCResult : : Type : : NUM_TIME , " ban_created " , " " } , <nl> - { RPCResult : : Type : : STR , " ban_reason " , " " } , <nl> } } , <nl> } } , <nl> RPCExamples { <nl> static UniValue listbanned ( const JSONRPCRequest & request ) <nl> rec . pushKV ( " address " , entry . first . ToString ( ) ) ; <nl> rec . pushKV ( " banned_until " , banEntry . nBanUntil ) ; <nl> rec . pushKV ( " ban_created " , banEntry . nCreateTime ) ; <nl> - rec . pushKV ( " ban_reason " , banEntry . banReasonToString ( ) ) ; <nl> <nl> bannedAddresses . push_back ( rec ) ; <nl> } <nl> mmm a / src / test / denialofservice_tests . cpp <nl> ppp b / src / test / denialofservice_tests . cpp <nl> BOOST_AUTO_TEST_CASE ( DoS_bantime ) <nl> } <nl> BOOST_CHECK ( banman - > IsBanned ( addr ) ) ; <nl> <nl> - SetMockTime ( nStartTime + 60 * 60 ) ; <nl> - BOOST_CHECK ( banman - > IsBanned ( addr ) ) ; <nl> - <nl> - SetMockTime ( nStartTime + 60 * 60 * 24 + 1 ) ; <nl> - BOOST_CHECK ( ! banman - > IsBanned ( addr ) ) ; <nl> - <nl> bool dummy ; <nl> peerLogic - > FinalizeNode ( dummyNode . GetId ( ) , dummy ) ; <nl> } <nl>
Replace automatic bans with discouragement filter
bitcoin/bitcoin
b691f2df5f7d443c0c9ee056ab94aa0fc19566d5
2020-07-04T03:43:55Z
mmm a / Telegram / SourceFiles / passport / passport_form_controller . cpp <nl> ppp b / Telegram / SourceFiles / passport / passport_form_controller . cpp <nl> namespace Passport { <nl> namespace { <nl> <nl> constexpr auto kDocumentScansLimit = 20 ; <nl> + constexpr auto kShortPollTimeout = TimeMs ( 3000 ) ; <nl> <nl> bool ForwardServiceErrorRequired ( const QString & error ) { <nl> return ( error = = qstr ( " BOT_INVALID " ) ) <nl> FormController : : FormController ( <nl> const FormRequest & request ) <nl> : _controller ( controller ) <nl> , _request ( PreprocessRequest ( request ) ) <nl> + , _shortPollTimer ( [ = ] { reloadPassword ( ) ; } ) <nl> , _view ( std : : make_unique < PanelController > ( this ) ) { <nl> } <nl> <nl> void FormController : : requestPassword ( ) { <nl> } <nl> <nl> void FormController : : passwordDone ( const MTPaccount_Password & result ) { <nl> - switch ( result . type ( ) ) { <nl> - case mtpc_account_noPassword : <nl> - parsePassword ( result . c_account_noPassword ( ) ) ; <nl> - break ; <nl> - <nl> - case mtpc_account_password : <nl> - parsePassword ( result . c_account_password ( ) ) ; <nl> - break ; <nl> - } <nl> - if ( ! _formRequestId ) { <nl> + const auto changed = [ & ] { <nl> + switch ( result . type ( ) ) { <nl> + case mtpc_account_noPassword : <nl> + return applyPassword ( result . c_account_noPassword ( ) ) ; <nl> + case mtpc_account_password : <nl> + return applyPassword ( result . c_account_password ( ) ) ; <nl> + } <nl> + Unexpected ( " Type in FormController : : passwordDone . " ) ; <nl> + } ( ) ; <nl> + if ( changed & & ! _formRequestId ) { <nl> showForm ( ) ; <nl> } <nl> + shortPollEmailConfirmation ( ) ; <nl> + } <nl> + <nl> + void FormController : : shortPollEmailConfirmation ( ) { <nl> + if ( _password . unconfirmedPattern . isEmpty ( ) ) { <nl> + _shortPollTimer . cancel ( ) ; <nl> + return ; <nl> + } <nl> + _shortPollTimer . callOnce ( kShortPollTimeout ) ; <nl> } <nl> <nl> void FormController : : showForm ( ) { <nl> void FormController : : showForm ( ) { <nl> } <nl> } <nl> <nl> - void FormController : : parsePassword ( const MTPDaccount_noPassword & result ) { <nl> - _password = PasswordSettings ( ) ; <nl> - _password . unconfirmedPattern = qs ( result . vemail_unconfirmed_pattern ) ; <nl> - _password . newSalt = bytes : : make_vector ( result . vnew_salt . v ) ; <nl> - _password . newSecureSalt = bytes : : make_vector ( result . vnew_secure_salt . v ) ; <nl> + bool FormController : : applyPassword ( const MTPDaccount_noPassword & result ) { <nl> + auto settings = PasswordSettings ( ) ; <nl> + settings . unconfirmedPattern = qs ( result . vemail_unconfirmed_pattern ) ; <nl> + settings . newSalt = bytes : : make_vector ( result . vnew_salt . v ) ; <nl> + settings . newSecureSalt = bytes : : make_vector ( result . vnew_secure_salt . v ) ; <nl> openssl : : AddRandomSeed ( bytes : : make_span ( result . vsecure_random . v ) ) ; <nl> + return applyPassword ( std : : move ( settings ) ) ; <nl> } <nl> <nl> - void FormController : : parsePassword ( const MTPDaccount_password & result ) { <nl> - _password = PasswordSettings ( ) ; <nl> - _password . hint = qs ( result . vhint ) ; <nl> - _password . hasRecovery = mtpIsTrue ( result . vhas_recovery ) ; <nl> - _password . salt = bytes : : make_vector ( result . vcurrent_salt . v ) ; <nl> - _password . unconfirmedPattern = qs ( result . vemail_unconfirmed_pattern ) ; <nl> - _password . newSalt = bytes : : make_vector ( result . vnew_salt . v ) ; <nl> - _password . newSecureSalt = bytes : : make_vector ( result . vnew_secure_salt . v ) ; <nl> + bool FormController : : applyPassword ( const MTPDaccount_password & result ) { <nl> + auto settings = PasswordSettings ( ) ; <nl> + settings . hint = qs ( result . vhint ) ; <nl> + settings . hasRecovery = mtpIsTrue ( result . vhas_recovery ) ; <nl> + settings . salt = bytes : : make_vector ( result . vcurrent_salt . v ) ; <nl> + settings . unconfirmedPattern = qs ( result . vemail_unconfirmed_pattern ) ; <nl> + settings . newSalt = bytes : : make_vector ( result . vnew_salt . v ) ; <nl> + settings . newSecureSalt = bytes : : make_vector ( result . vnew_secure_salt . v ) ; <nl> openssl : : AddRandomSeed ( bytes : : make_span ( result . vsecure_random . v ) ) ; <nl> + return applyPassword ( std : : move ( settings ) ) ; <nl> + } <nl> + <nl> + bool FormController : : applyPassword ( PasswordSettings & & settings ) { <nl> + if ( _password ! = settings ) { <nl> + _password = std : : move ( settings ) ; <nl> + return true ; <nl> + } <nl> + return false ; <nl> } <nl> <nl> void FormController : : cancel ( ) { <nl> mmm a / Telegram / SourceFiles / passport / passport_form_controller . h <nl> ppp b / Telegram / SourceFiles / passport / passport_form_controller . h <nl> struct PasswordSettings { <nl> QString unconfirmedPattern ; <nl> QString confirmedEmail ; <nl> bool hasRecovery = false ; <nl> + <nl> + bool operator = = ( const PasswordSettings & other ) const { <nl> + return ( salt = = other . salt ) <nl> + & & ( newSalt = = other . newSalt ) <nl> + & & ( newSecureSalt = = other . newSecureSalt ) <nl> + & & ( hint = = other . hint ) <nl> + & & ( unconfirmedPattern = = other . unconfirmedPattern ) <nl> + & & ( confirmedEmail = = other . confirmedEmail ) <nl> + & & ( hasRecovery = = other . hasRecovery ) ; <nl> + } <nl> + bool operator ! = ( const PasswordSettings & other ) const { <nl> + return ! ( * this = = other ) ; <nl> + } <nl> } ; <nl> <nl> struct FileKey { <nl> class FormController : private MTP : : Sender , public base : : has_weak_ptr { <nl> const std : : vector < EditFile > & source ) const ; <nl> <nl> void passwordDone ( const MTPaccount_Password & result ) ; <nl> - void parsePassword ( const MTPDaccount_noPassword & settings ) ; <nl> - void parsePassword ( const MTPDaccount_password & settings ) ; <nl> + bool applyPassword ( const MTPDaccount_noPassword & settings ) ; <nl> + bool applyPassword ( const MTPDaccount_password & settings ) ; <nl> + bool applyPassword ( PasswordSettings & & settings ) ; <nl> bytes : : vector passwordHashForAuth ( bytes : : const_span password ) const ; <nl> void validateSecureSecret ( <nl> bytes : : const_span salt , <nl> class FormController : private MTP : : Sender , public base : : has_weak_ptr { <nl> void suggestReset ( bytes : : vector password ) ; <nl> void suggestRestart ( ) ; <nl> void cancelAbort ( ) ; <nl> + void shortPollEmailConfirmation ( ) ; <nl> <nl> not_null < Window : : Controller * > _controller ; <nl> FormRequest _request ; <nl> class FormController : private MTP : : Sender , public base : : has_weak_ptr { <nl> bool _submitSuccess = false ; <nl> bool _suggestingRestart = false ; <nl> QString _serviceErrorText ; <nl> + base : : Timer _shortPollTimer ; <nl> <nl> rpl : : lifetime _uploaderSubscriptions ; <nl> rpl : : lifetime _lifetime ; <nl>
Short poll email confirmation in passport .
telegramdesktop/tdesktop
395f22063bae6b7663ddcde1d9313f1371868d4b
2018-06-03T20:16:37Z
mmm a / src / Storages / MergeTree / BackgroundProcessList . h <nl> ppp b / src / Storages / MergeTree / BackgroundProcessList . h <nl> <nl> namespace DB <nl> { <nl> <nl> - / / / Common code for background processes lists , like system . merges and system . fetches <nl> + / / / Common code for background processes lists , like system . merges and system . replicated_fetches <nl> / / / Look at examples in MergeList and ReplicatedFetchList <nl> <nl> template < typename ListElement , typename Info > <nl> mmm a / src / Storages / MergeTree / DataPartsExchange . cpp <nl> ppp b / src / Storages / MergeTree / DataPartsExchange . cpp <nl> std : : string getEndpointId ( const std : : string & node_id ) <nl> return " DataPartsExchange : " + node_id ; <nl> } <nl> <nl> - / / / Simple functor for tracking fetch progress in system . fetches table . <nl> + / / / Simple functor for tracking fetch progress in system . replicated_fetches table . <nl> struct ReplicatedFetchReadCallback <nl> { <nl> ReplicatedFetchList : : Entry & replicated_fetch_entry ; <nl> mmm a / src / Storages / System / StorageSystemReplicatedFetches . h <nl> ppp b / src / Storages / System / StorageSystemReplicatedFetches . h <nl> namespace DB <nl> <nl> class Context ; <nl> <nl> - / / / system . fetches table . Takes data from context . getReplicatedFetchList ( ) <nl> + / / / system . replicated_fetches table . Takes data from context . getReplicatedFetchList ( ) <nl> class StorageSystemReplicatedFetches final : public ext : : shared_ptr_helper < StorageSystemReplicatedFetches > , public IStorageSystemOneBlock < StorageSystemReplicatedFetches > <nl> { <nl> friend struct ext : : shared_ptr_helper < StorageSystemReplicatedFetches > ; <nl>
Fix comments
ClickHouse/ClickHouse
6253d1466abd894ccf3b678cb64368ce922e9862
2020-10-27T13:09:14Z
mmm a / dbms / src / Interpreters / Join . h <nl> ppp b / dbms / src / Interpreters / Join . h <nl> class Join <nl> bool dispatch ( Func & & func ) <nl> { <nl> if ( overwrite ) <nl> + { <nl> return static_for < 0 , KINDS . size ( ) > ( [ & ] ( auto i ) <nl> { <nl> if ( kind = = KINDS [ i ] & & strictness = = ASTTableJoin : : Strictness : : Any ) <nl> class Join <nl> } <nl> return false ; <nl> } ) ; <nl> + } <nl> else <nl> + { <nl> return static_for < 0 , KINDS . size ( ) * STRICTNESSES . size ( ) > ( [ & ] ( auto ij ) <nl> { <nl> / / NOTE : Avoid using nested static loop as GCC and CLANG have bugs in different ways <nl> class Join <nl> } <nl> return false ; <nl> } ) ; <nl> + } <nl> } <nl> <nl> template < typename Func > <nl>
Update Join . h
ClickHouse/ClickHouse
27a0c37d7773d4392065cb45a72c8681d65847b9
2019-01-14T21:41:35Z
mmm a / xbmc / filesystem / AFPDirectory . cpp <nl> ppp b / xbmc / filesystem / AFPDirectory . cpp <nl> CAFPDirectory : : ~ CAFPDirectory ( void ) <nl> } <nl> <nl> bool CAFPDirectory : : ResolveSymlink ( const CStdString & dirName , const CStdString & fileName , <nl> - struct stat * stat , CStdString & resolvedName ) <nl> + struct stat * stat , CURL & resolvedUrl ) <nl> { <nl> CSingleLock lock ( gAfpConnection ) ; <nl> int ret = 0 ; <nl> bool CAFPDirectory : : ResolveSymlink ( const CStdString & dirName , const CStdString <nl> URIUtils : : AddSlashAtEnd ( fullpath ) ; <nl> fullpath + = fileName ; <nl> <nl> + resolvedUrl . Reset ( ) ; <nl> + resolvedUrl . SetProtocol ( " afp " ) ; <nl> + resolvedUrl . SetHostName ( gAfpConnection . GetConnectedIp ( ) ) ; <nl> + <nl> ret = gAfpConnection . GetImpl ( ) - > afp_wrap_readlink ( gAfpConnection . GetVolume ( ) , fullpath . c_str ( ) , resolvedLink , MAX_PATH ) ; <nl> <nl> if ( ret = = 0 ) <nl> { <nl> - struct stat tmpBuffer = { 0 } ; <nl> fullpath = dirName ; <nl> URIUtils : : AddSlashAtEnd ( fullpath ) ; <nl> fullpath . append ( resolvedLink ) ; <nl> <nl> - ret = gAfpConnection . GetImpl ( ) - > afp_wrap_getattr ( gAfpConnection . GetVolume ( ) , fullpath . c_str ( ) , & tmpBuffer ) ; <nl> + if ( resolvedLink [ 0 ] = = ' / ' ) <nl> + { <nl> + / / use the special stat function for using an extra context <nl> + / / because we are inside of a dir traversation <nl> + / / and just can ' t change the global nfs context here <nl> + / / without destroying something . . . <nl> + fullpath = resolvedLink ; <nl> + fullpath = fullpath . Right ( fullpath . length ( ) - 1 ) ; <nl> + resolvedUrl . SetFileName ( fullpath ) ; <nl> + ret = gAfpConnection . stat ( resolvedUrl , stat ) ; <nl> + if ( ret < 0 ) <nl> + { <nl> + URIUtils : : AddSlashAtEnd ( fullpath ) ; <nl> + resolvedUrl . SetFileName ( fullpath ) ; <nl> + ret = gAfpConnection . stat ( resolvedUrl , stat ) ; <nl> + } <nl> + } <nl> + else <nl> + { <nl> + ret = gAfpConnection . GetImpl ( ) - > afp_wrap_getattr ( gAfpConnection . GetVolume ( ) , fullpath . c_str ( ) , stat ) ; <nl> + resolvedUrl . SetFileName ( gAfpConnection . GetUrl ( ) - > volumename + fullpath ) ; <nl> + } <nl> <nl> if ( ret ! = 0 ) <nl> { <nl> CLog : : Log ( LOGERROR , " AFP : Failed to stat ( % s ) on link resolve % s \ n " , fullpath . c_str ( ) , strerror ( errno ) ) ; <nl> retVal = false ; ; <nl> } <nl> - else <nl> - { <nl> - memcpy ( stat , & tmpBuffer , sizeof ( struct stat ) ) ; <nl> - } <nl> - resolvedName = resolvedLink ; <nl> } <nl> else <nl> { <nl> bool CAFPDirectory : : GetDirectory ( const CStdString & strPath , CFileItemList & items <nl> for ( size_t i = 0 ; i < vecEntries . size ( ) ; i + + ) <nl> { <nl> CachedDirEntry aDir = vecEntries [ i ] ; <nl> - CStdString resolvedLink ; <nl> - <nl> / / We use UTF - 8 internally , as does AFP <nl> CStdString strFile = aDir . name ; <nl> + CStdString myStrPath ( strPath ) ; <nl> + URIUtils : : AddSlashAtEnd ( myStrPath ) ; / / be sure the dir ends with a slash <nl> + CStdString path ( myStrPath + strFile ) ; <nl> <nl> if ( ! strFile . Equals ( " . " ) & & ! strFile . Equals ( " . . " ) & & ! strFile . Equals ( " lost + found " ) ) <nl> { <nl> bool CAFPDirectory : : GetDirectory ( const CStdString & strPath , CFileItemList & items <nl> / / resolve symlinks <nl> if ( S_ISLNK ( info . st_mode ) ) <nl> { <nl> - if ( ! ResolveSymlink ( strDirName , strFile , & info , resolvedLink ) ) <nl> + CURL linkUrl ; <nl> + if ( ! ResolveSymlink ( strDirName , strFile , & info , linkUrl ) ) <nl> { <nl> continue ; <nl> } <nl> - aDir . name = resolvedLink . c_str ( ) ; <nl> + path = linkUrl . Get ( ) ; <nl> } <nl> <nl> bIsDir = ( info . st_mode & S_IFDIR ) ? true : false ; <nl> bool CAFPDirectory : : GetDirectory ( const CStdString & strPath , CFileItemList & items <nl> } <nl> <nl> CFileItemPtr pItem ( new CFileItem ( strFile ) ) ; <nl> - <nl> + pItem - > m_dateTime = localTime ; <nl> + pItem - > m_dwSize = iSize ; <nl> + <nl> if ( bIsDir ) <nl> { <nl> - URIUtils : : AddSlashAtEnd ( aDir . name ) ; <nl> - pItem - > SetPath ( strPath + aDir . name ) ; <nl> + URIUtils : : AddSlashAtEnd ( path ) ; <nl> pItem - > m_bIsFolder = true ; <nl> - pItem - > m_dateTime = localTime ; <nl> } <nl> else <nl> { <nl> - pItem - > SetPath ( strPath + aDir . name ) ; <nl> pItem - > m_bIsFolder = false ; <nl> - pItem - > m_dwSize = iSize ; <nl> - pItem - > m_dateTime = localTime ; <nl> } <nl> <nl> if ( ! aDir . name . empty ( ) & & aDir . name [ 0 ] = = ' . ' ) <nl> { <nl> pItem - > SetProperty ( " file : hidden " , true ) ; <nl> } <nl> - <nl> + <nl> + pItem - > SetPath ( path ) ; <nl> items . Add ( pItem ) ; <nl> } <nl> } <nl> mmm a / xbmc / filesystem / AFPDirectory . h <nl> ppp b / xbmc / filesystem / AFPDirectory . h <nl> class CAFPDirectory : public IDirectory <nl> private : <nl> afp_file_info * OpenDir ( const CURL & url , CStdString & strAuth ) ; <nl> bool ResolveSymlink ( const CStdString & dirName , const CStdString & fileName , <nl> - struct stat * stat , CStdString & resolvedName ) ; <nl> + struct stat * stat , CURL & resolvedUrl ) ; <nl> } ; <nl> } <nl> mmm a / xbmc / filesystem / DllLibAfp . h <nl> ppp b / xbmc / filesystem / DllLibAfp . h <nl> class DllLibAfpInterface <nl> virtual int init_uams ( void ) = 0 ; <nl> virtual int afp_main_quick_startup ( pthread_t * thread ) = 0 ; <nl> virtual int afp_unmount_all_volumes ( struct afp_server * server ) = 0 ; <nl> + virtual int afp_unmount_volume ( struct afp_volume * volume ) = 0 ; <nl> virtual struct afp_volume * find_volume_by_name ( struct afp_server * server , const char * volname ) = 0 ; <nl> virtual int afp_connect_volume ( struct afp_volume * volume , struct afp_server * server , char * mesg , unsigned int * l , unsigned int max ) = 0 ; <nl> virtual int afp_parse_url ( struct afp_url * url , const char * toparse , int verbose ) = 0 ; <nl> class DllLibAfp : public DllDynamic , DllLibAfpInterface <nl> DEFINE_METHOD1 ( void , libafpclient_register , ( struct libafpclient * p1 ) ) <nl> DEFINE_METHOD1 ( int , afp_main_quick_startup , ( pthread_t * p1 ) ) <nl> DEFINE_METHOD1 ( int , afp_unmount_all_volumes , ( struct afp_server * p1 ) ) <nl> + DEFINE_METHOD1 ( int , afp_unmount_volume , ( struct afp_volume * p1 ) ) <nl> DEFINE_METHOD1 ( unsigned int , find_uam_by_name , ( const char * p1 ) ) <nl> DEFINE_METHOD1 ( char * , uam_bitmap_to_string , ( unsigned int p1 ) ) <nl> DEFINE_METHOD1 ( void , afp_default_url , ( struct afp_url * p1 ) ) <nl> class DllLibAfp : public DllDynamic , DllLibAfpInterface <nl> RESOLVE_METHOD_RENAME ( libafpclient_register , libafpclient_register ) <nl> RESOLVE_METHOD_RENAME ( afp_main_quick_startup , afp_main_quick_startup ) <nl> RESOLVE_METHOD_RENAME ( afp_unmount_all_volumes , afp_unmount_all_volumes ) <nl> + RESOLVE_METHOD_RENAME ( afp_unmount_all_volumes , afp_unmount_all_volumes ) <nl> RESOLVE_METHOD_RENAME ( find_volume_by_name , find_volume_by_name ) <nl> RESOLVE_METHOD_RENAME ( afp_connect_volume , afp_connect_volume ) <nl> RESOLVE_METHOD_RENAME ( afp_parse_url , afp_parse_url ) <nl> mmm a / xbmc / filesystem / FileAFP . cpp <nl> ppp b / xbmc / filesystem / FileAFP . cpp <nl> <nl> # include " threads / SingleLock . h " <nl> # include " utils / log . h " <nl> # include " utils / TimeUtils . h " <nl> - # include " DllLibAfp . h " <nl> <nl> using namespace XFILE ; <nl> <nl> void CAfpConnection : : disconnectVolume ( ) <nl> } <nl> <nl> / / taken from cmdline tool <nl> - bool CAfpConnection : : connectVolume ( const char * volumename ) <nl> + bool CAfpConnection : : connectVolume ( const char * volumename , struct afp_volume * & pVolume ) <nl> { <nl> bool ret = false ; <nl> if ( strlen ( volumename ) ! = 0 ) <nl> bool CAfpConnection : : connectVolume ( const char * volumename ) <nl> unsigned int len = 0 ; <nl> char mesg [ 1024 ] ; <nl> <nl> - if ( ( m_pAfpVol = m_pLibAfp - > find_volume_by_name ( m_pAfpServer , volumename ) ) = = NULL ) <nl> + if ( ( pVolume = m_pLibAfp - > find_volume_by_name ( m_pAfpServer , volumename ) ) = = NULL ) <nl> { <nl> CLog : : Log ( LOGDEBUG , " AFP : Could not find a volume called % s \ n " , volumename ) ; <nl> } <nl> else <nl> { <nl> - m_pAfpVol - > mapping = AFP_MAPPING_LOGINIDS ; <nl> - m_pAfpVol - > extra_flags | = VOLUME_EXTRA_FLAGS_NO_LOCKING ; <nl> + pVolume - > mapping = AFP_MAPPING_LOGINIDS ; <nl> + pVolume - > extra_flags | = VOLUME_EXTRA_FLAGS_NO_LOCKING ; <nl> <nl> - if ( m_pLibAfp - > afp_connect_volume ( m_pAfpVol , m_pAfpServer , mesg , & len , 1024 ) ) <nl> + if ( m_pLibAfp - > afp_connect_volume ( pVolume , m_pAfpServer , mesg , & len , 1024 ) ) <nl> { <nl> - CLog : : Log ( LOGDEBUG , " AFP : Could not access volume % s ( error : % s ) \ n " , m_pAfpVol - > volume_name , mesg ) ; <nl> - m_pAfpVol = NULL ; <nl> + CLog : : Log ( LOGDEBUG , " AFP : Could not access volume % s ( error : % s ) \ n " , pVolume - > volume_name , mesg ) ; <nl> + pVolume = NULL ; <nl> } <nl> else <nl> { <nl> - CLog : : Log ( LOGDEBUG , " AFP : Connected to volume % s \ n " , m_pAfpVol - > volume_name_printable ) ; <nl> + CLog : : Log ( LOGDEBUG , " AFP : Connected to volume % s \ n " , pVolume - > volume_name_printable ) ; <nl> ret = true ; <nl> } <nl> } <nl> CAfpConnection : : afpConnnectError CAfpConnection : : Connect ( const CURL & url ) <nl> if ( serverChanged ) <nl> { <nl> disconnectVolume ( ) ; / / disconnect old volume <nl> - connectVolume ( m_pAfpUrl - > volumename ) ; / / connect new volume <nl> + connectVolume ( m_pAfpUrl - > volumename , m_pAfpVol ) ; / / connect new volume <nl> } <nl> return AfpOk ; <nl> } <nl> <nl> + int CAfpConnection : : stat ( const CURL & url , struct stat * statbuff ) <nl> + { <nl> + CSingleLock lock ( * this ) ; <nl> + CStdString strPath = gAfpConnection . GetPath ( url ) ; <nl> + struct afp_volume * pTmpVol = NULL ; <nl> + struct afp_url tmpurl ; <nl> + int iResult = - 1 ; <nl> + CURL nonConstUrl ( getAuthenticatedPath ( url ) ) ; / / we need a editable copy of the url <nl> + <nl> + if ( ! initLib ( ) | | ! m_pAfpServer ) <nl> + return - 1 ; <nl> + <nl> + m_pLibAfp - > afp_default_url ( & tmpurl ) ; <nl> + <nl> + / / first , try to parse the URL <nl> + if ( m_pLibAfp - > afp_parse_url ( & tmpurl , nonConstUrl . Get ( ) . c_str ( ) , 0 ) ! = 0 ) <nl> + { <nl> + / / Okay , this isn ' t a real URL <nl> + CLog : : Log ( LOGDEBUG , " AFP : Could not parse url : % s ! \ n " , nonConstUrl . Get ( ) . c_str ( ) ) ; <nl> + return - 1 ; <nl> + } <nl> + <nl> + / / if no username and password is set - use no user authent uam <nl> + if ( strlen ( tmpurl . password ) = = 0 & & strlen ( tmpurl . username ) = = 0 ) <nl> + { <nl> + / / try anonymous <nl> + strncpy ( tmpurl . uamname , " No User Authent " , sizeof ( tmpurl . uamname ) ) ; <nl> + CLog : : Log ( LOGDEBUG , " AFP : Using anonymous authentication . " ) ; <nl> + } <nl> + else if ( ( nonConstUrl . GetPassWord ( ) . IsEmpty ( ) | | nonConstUrl . GetUserName ( ) . IsEmpty ( ) ) ) <nl> + { <nl> + / / this is our current url object whe are connected to ( at least we try ) <nl> + return - 1 ; <nl> + } <nl> + <nl> + / / we got a password in the url <nl> + if ( ! nonConstUrl . GetPassWord ( ) . IsEmpty ( ) ) <nl> + { <nl> + / / copy password because afp_parse_url just puts garbage into the password field : ( <nl> + strncpy ( tmpurl . password , nonConstUrl . GetPassWord ( ) . c_str ( ) , 127 ) ; <nl> + } <nl> + <nl> + / / connect new volume <nl> + if ( connectVolume ( tmpurl . volumename , pTmpVol ) & & pTmpVol ) <nl> + { <nl> + iResult = m_pLibAfp - > afp_wrap_getattr ( pTmpVol , strPath . c_str ( ) , statbuff ) ; <nl> + / / unmount single volume crashs <nl> + / / we will get rid of the mounted volume <nl> + / / once the context is changed in connect function <nl> + / / ppppooooorrrr ! ! <nl> + / / m_pLibAfp - > afp_unmount_volume ( pTmpVol ) ; <nl> + } <nl> + return iResult ; <nl> + } <nl> + <nl> CStdString CAfpConnection : : GetPath ( const CURL & url ) <nl> { <nl> struct afp_url tmpurl ; <nl> mmm a / xbmc / filesystem / FileAFP . h <nl> ppp b / xbmc / filesystem / FileAFP . h <nl> <nl> # include " IFile . h " <nl> # include " URL . h " <nl> # include " threads / CriticalSection . h " <nl> + # include " DllLibAfp . h " <nl> <nl> / / libafpclient includes <nl> # ifdef __cplusplus <nl> extern " C " { <nl> <nl> CStdString URLEncode ( CStdString str ) ; <nl> <nl> - struct libafpclient ; <nl> - struct afp_server ; <nl> - struct afp_file_info ; <nl> - struct afp_volume ; <nl> - struct afp_url ; <nl> - class DllLibAfp ; <nl> - <nl> class CAfpConnection : public CCriticalSection <nl> { <nl> public : <nl> class CAfpConnection : public CCriticalSection <nl> struct afp_url * GetUrl ( ) { return m_pAfpUrl ; } ; <nl> CStdString GetPath ( const CURL & url ) ; <nl> DllLibAfp * GetImpl ( ) { return m_pLibAfp ; } <nl> + <nl> + const char * GetConnectedIp ( ) const { if ( m_pAfpUrl ) return m_pAfpUrl - > servername ; else return " " ; } <nl> + <nl> + / / special stat which uses its own context <nl> + / / needed for getting intervolume symlinks to work <nl> + / / it uses the same global server connection <nl> + / / but its own volume <nl> + int stat ( const CURL & url , struct stat * statbuff ) ; <nl> <nl> private : <nl> bool initLib ( void ) ; <nl> - bool connectVolume ( const char * volumename ) ; <nl> + bool connectVolume ( const char * volumename , struct afp_volume * & pVolume ) ; <nl> void disconnectVolume ( void ) ; <nl> CStdString getAuthenticatedPath ( const CURL & url ) ; <nl> <nl>
[ afp ] - resolve symlinks which might even point to another volume ( works only on absolute symlink destinations ! )
xbmc/xbmc
c6a1a3b9149d1cd5612954bd61ce704e7d4433a8
2011-10-01T01:05:45Z
mmm a / src / MainWindow . cpp <nl> ppp b / src / MainWindow . cpp <nl> <nl> # include " MainWindow . h " <nl> # include " ui_MainWindow . h " <nl> <nl> + # include " Application . h " <nl> # include " EditIndexDialog . h " <nl> # include " AboutDialog . h " <nl> # include " EditTableDialog . h " <nl> <nl> # include < QShortcut > <nl> # include < QTextCodec > <nl> # include < QOpenGLWidget > <nl> + # include < QUrlQuery > <nl> <nl> MainWindow : : MainWindow ( QWidget * parent ) <nl> : QMainWindow ( parent ) , <nl> void MainWindow : : on_actionWiki_triggered ( ) <nl> QDesktopServices : : openUrl ( QUrl ( " https : / / github . com / sqlitebrowser / sqlitebrowser / wiki " ) ) ; <nl> } <nl> <nl> + / / ' Help | Bug report . . . ' link will add the system information and set the label ' bug ' automatically to the issue <nl> void MainWindow : : on_actionBug_report_triggered ( ) <nl> { <nl> - QDesktopServices : : openUrl ( QUrl ( " https : / / github . com / sqlitebrowser / sqlitebrowser / issues / new " ) ) ; <nl> + const QString version = Application : : versionString ( ) ; <nl> + const QString os = QSysInfo : : prettyProductName ( ) ; <nl> + const QString kernelType = QSysInfo : : kernelType ( ) ; <nl> + const QString kernelVersion = QSysInfo : : kernelVersion ( ) ; <nl> + const QString arch = QSysInfo : : currentCpuArchitecture ( ) ; <nl> + const QString body = QString ( " \ n \ n \ n \ n \ n \ n \ n \ n > DB4S v % 1 on % 2 ( % 3 / % 4 ) [ % 5 ] " ) . arg ( version , os , kernelType , kernelVersion , arch ) ; <nl> + <nl> + QUrlQuery query ; <nl> + query . addQueryItem ( " labels " , " bug " ) ; <nl> + query . addQueryItem ( " body " , body ) ; <nl> + <nl> + QUrl url ( " https : / / github . com / sqlitebrowser / sqlitebrowser / issues / new " ) ; <nl> + url . setQuery ( query ) ; <nl> + QDesktopServices : : openUrl ( url ) ; <nl> } <nl> <nl> void MainWindow : : on_actionSqlCipherFaq_triggered ( ) <nl>
Update Report bug link to include the system information ( )
sqlitebrowser/sqlitebrowser
817de2d3f55b4337cd89d0428395b2acb9bbf861
2018-05-16T17:01:13Z
mmm a / src / mongo / embedded / stitch_support / stitch_support_test . cpp <nl> ppp b / src / mongo / embedded / stitch_support / stitch_support_test . cpp <nl> <nl> # include " mongo / bson / json . h " <nl> # include " mongo / unittest / unittest . h " <nl> # include " mongo / util / quick_exit . h " <nl> + # include " mongo / util / scopeguard . h " <nl> <nl> namespace { <nl> <nl> using mongo : : fromjson ; <nl> + using mongo : : makeGuard ; <nl> + using mongo : : ScopeGuard ; <nl> <nl> class StitchSupportTest : public mongo : : unittest : : Test { <nl> protected : <nl> class StitchSupportTest : public mongo : : unittest : : Test { <nl> collator = <nl> stitch_support_v1_collator_create ( lib , fromjson ( collatorObj ) . objdata ( ) , nullptr ) ; <nl> } <nl> + ON_BLOCK_EXIT ( [ collator ] { stitch_support_v1_collator_destroy ( collator ) ; } ) ; <nl> <nl> stitch_support_v1_matcher * matcher = nullptr ; <nl> if ( match ) { <nl> class StitchSupportTest : public mongo : : unittest : : Test { <nl> stitch_support_v1_matcher_create ( lib , fromjson ( match ) . objdata ( ) , collator , nullptr ) ; <nl> ASSERT ( matcher ) ; <nl> } <nl> + ON_BLOCK_EXIT ( [ matcher ] { stitch_support_v1_matcher_destroy ( matcher ) ; } ) ; <nl> <nl> stitch_support_v1_update * update = stitch_support_v1_update_create ( <nl> lib , <nl> class StitchSupportTest : public mongo : : unittest : : Test { <nl> collator , <nl> status ) ; <nl> ASSERT ( update ) ; <nl> + ON_BLOCK_EXIT ( [ update ] { stitch_support_v1_update_destroy ( update ) ; } ) ; <nl> <nl> char * updateResult = stitch_support_v1_update_apply ( <nl> update , fromjson ( document ) . objdata ( ) , updateDetails , status ) ; <nl> - ASSERT_EQ ( 0 , stitch_support_v1_status_get_code ( status ) ) ; <nl> + ASSERT_EQ ( 0 , stitch_support_v1_status_get_code ( status ) ) <nl> + < < stitch_support_v1_status_get_error ( status ) < < " : " <nl> + < < stitch_support_v1_status_get_explanation ( status ) ; <nl> ASSERT ( updateResult ) ; <nl> - <nl> - stitch_support_v1_update_destroy ( update ) ; <nl> - stitch_support_v1_matcher_destroy ( matcher ) ; <nl> - stitch_support_v1_collator_destroy ( collator ) ; <nl> + ON_BLOCK_EXIT ( [ updateResult ] { free ( updateResult ) ; } ) ; <nl> <nl> ASSERT_BSONOBJ_EQ ( mongo : : BSONObj ( updateResult ) , expectedResult ) ; <nl> - <nl> - free ( updateResult ) ; <nl> } <nl> <nl> const std : : string getModifiedPaths ( ) { <nl>
SERVER - 37829 clean up service context on test assertion
mongodb/mongo
8380f273705cb6cb8705526dfbdfb01ad022de8e
2019-01-15T22:00:50Z
mmm a / vendor / brightray <nl> ppp b / vendor / brightray <nl> @ @ - 1 + 1 @ @ <nl> - Subproject commit 7c9915847e84076b5444ee945e6dc2904fb345d1 <nl> + Subproject commit 29bd72a7537ffb99775e3e56ad5662fd4a1bfed0 <nl>
Update brightray for win7 crash of using notification
electron/electron
d582ddf790969527155e3dd6ccda3eaebb8d1327
2015-11-10T09:44:14Z
mmm a / googletest / include / gtest / gtest - typed - test . h <nl> ppp b / googletest / include / gtest / gtest - typed - test . h <nl> TYPED_TEST_SUITE ( FooTest , MyTypes ) ; <nl> / / Then , use TYPED_TEST ( ) instead of TEST_F ( ) to define as many typed <nl> / / tests for this test suite as you want . <nl> TYPED_TEST ( FooTest , DoesBlah ) { <nl> - / / Inside a test , refer to TypeParam to get the type parameter . <nl> - / / Since we are inside a derived class template , C + + requires use to <nl> - / / visit the members of FooTest via ' this ' . <nl> + / / Inside a test , refer to the special name TypeParam to get the type <nl> + / / parameter . Since we are inside a derived class template , C + + requires <nl> + / / us to visit the members of FooTest via ' this ' . <nl> TypeParam n = this - > value_ ; <nl> <nl> / / To visit static members of the fixture , add the TestFixture : : <nl>
Merge pull request from kuzkry : adjustment - of - similar - comments
google/googletest
4e29e48840e611ecbef33d10960d7480d2e9034a
2019-08-02T18:16:53Z
mmm a / system / settings / darwin_ios . xml <nl> ppp b / system / settings / darwin_ios . xml <nl> <nl> < setting id = " videoplayer . adjustrefreshrate " > <nl> < visible > false < / visible > <nl> < / setting > <nl> - < setting id = " videoplayer . pauseafterrefreshchange " > <nl> - < visible > false < / visible > <nl> - < / setting > <nl> < / group > <nl> < / category > <nl> < category id = " videoacceleration " > <nl> <nl> < setting id = " videoscreen . blankdisplays " > <nl> < visible > false < / visible > <nl> < / setting > <nl> + < setting id = " videoscreen . delayrefreshchange " > <nl> + < visible > false < / visible > <nl> + < / setting > <nl> < / group > <nl> < / category > <nl> < category id = " audiooutput " > <nl>
IOS : update videoplayer . pauseafterrefreshchange to videoscreen . delayrefreshchange
xbmc/xbmc
ad14c09d089a77163b2fc543bf718caa52a2227c
2016-04-01T14:20:24Z
mmm a / templates / tools / dockerfile / gcp_api_libraries . include <nl> ppp b / templates / tools / dockerfile / gcp_api_libraries . include <nl> <nl> # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> RUN pip install - - upgrade google - api - python - client oauth2client <nl> mmm a / templates / tools / dockerfile / python_debian10 . include <nl> ppp b / templates / tools / dockerfile / python_debian10 . include <nl> <nl> FROM debian : 10 <nl> <nl> < % include file = " . / apt_get_basic . include " / > <nl> - < % include file = " . / gcp_api_libraries . include " / > <nl> < % include file = " . / apt_get_python_27 . include " / > <nl> + < % include file = " . / gcp_api_libraries . include " / > <nl> < % include file = " . / run_tests_addons . include " / > <nl> mmm a / templates / tools / dockerfile / python_deps . include <nl> ppp b / templates / tools / dockerfile / python_deps . include <nl> <nl> RUN apt - get update & & apt - get install - y $ { ' \ \ ' } <nl> python - all - dev $ { ' \ \ ' } <nl> python3 - all - dev $ { ' \ \ ' } <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> mmm a / templates / tools / dockerfile / python_stretch . include <nl> ppp b / templates / tools / dockerfile / python_stretch . include <nl> <nl> FROM debian : stretch <nl> <nl> < % include file = " . / apt_get_basic . include " / > <nl> - < % include file = " . / gcp_api_libraries . include " / > <nl> < % include file = " . / apt_get_python_27 . include " / > <nl> + < % include file = " . / gcp_api_libraries . include " / > <nl> # Add Debian ' buster ' repository , we will need it for installing newer versions of python <nl> RUN echo ' deb http : / / ftp . de . debian . org / debian buster main ' > > / etc / apt / sources . list <nl> RUN echo ' APT : : Default - Release " stretch " ; ' | tee - a / etc / apt / apt . conf . d / 00local <nl> mmm a / templates / tools / dockerfile / test / csharp_stretch_x64 / Dockerfile . template <nl> ppp b / templates / tools / dockerfile / test / csharp_stretch_x64 / Dockerfile . template <nl> <nl> FROM debian : stretch <nl> <nl> < % include file = " . . / . . / apt_get_basic . include " / > <nl> - < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / python_deps . include " / > <nl> + < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / csharp_deps . include " / > <nl> < % include file = " . . / . . / csharp_dotnetcli_deps . include " / > <nl> < % include file = " . . / . . / run_tests_addons . include " / > <nl> mmm a / templates / tools / dockerfile / test / cxx_buster_x64 / Dockerfile . template <nl> ppp b / templates / tools / dockerfile / test / cxx_buster_x64 / Dockerfile . template <nl> <nl> FROM debian : buster <nl> <nl> < % include file = " . . / . . / apt_get_basic . include " / > <nl> - < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / python_deps . include " / > <nl> + < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / cxx_deps . include " / > <nl> < % include file = " . . / . . / run_tests_addons . include " / > <nl> <nl> mmm a / templates / tools / dockerfile / test / cxx_jessie_x64 / Dockerfile . template <nl> ppp b / templates / tools / dockerfile / test / cxx_jessie_x64 / Dockerfile . template <nl> <nl> < % include file = " . . / . . / debian_jessie_header . include " / > <nl> <nl> < % include file = " . . / . . / apt_get_basic . include " / > <nl> - < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / python_deps . include " / > <nl> + < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / cxx_deps . include " / > <nl> < % include file = " . . / . . / cmake_jessie_backports . include " / > <nl> < % include file = " . . / . . / run_tests_addons . include " / > <nl> mmm a / templates / tools / dockerfile / test / cxx_jessie_x86 / Dockerfile . template <nl> ppp b / templates / tools / dockerfile / test / cxx_jessie_x86 / Dockerfile . template <nl> <nl> RUN sed - i ' / deb http : \ / \ / http . debian . net \ / debian jessie - updates main / d ' / etc / apt / sources . list <nl> <nl> < % include file = " . . / . . / apt_get_basic . include " / > <nl> - < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / python_deps . include " / > <nl> + < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / cxx_deps . include " / > <nl> < % include file = " . . / . . / run_tests_addons . include " / > <nl> < % include file = " . . / . . / cmake_jessie_backports . include " / > <nl> mmm a / templates / tools / dockerfile / test / cxx_sanitizers_jessie_x64 / Dockerfile . template <nl> ppp b / templates / tools / dockerfile / test / cxx_sanitizers_jessie_x64 / Dockerfile . template <nl> <nl> RUN sed - i ' / deb http : \ / \ / httpredir . debian . org \ / debian jessie - updates main / d ' / etc / apt / sources . list <nl> <nl> < % include file = " . . / . . / apt_get_basic . include " / > <nl> - < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / python_deps . include " / > <nl> + < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> # = = = = = = = = = = = = = = = = = <nl> # C + + dependencies ( purposely excluding Clang because it ' s part of the base image ) <nl> RUN apt - get update & & apt - get - y install libgflags - dev libgtest - dev libc + + - dev & & apt - get clean <nl> mmm a / templates / tools / dockerfile / test / cxx_ubuntu1404_x64 / Dockerfile . template <nl> ppp b / templates / tools / dockerfile / test / cxx_ubuntu1404_x64 / Dockerfile . template <nl> <nl> FROM ubuntu : 14 . 04 <nl> <nl> < % include file = " . . / . . / apt_get_basic . include " / > <nl> - < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / python_deps . include " / > <nl> + < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / cxx_deps . include " / > <nl> < % include file = " . . / . . / run_tests_addons . include " / > <nl> # Define the default command . <nl> mmm a / templates / tools / dockerfile / test / cxx_ubuntu1604_x64 / Dockerfile . template <nl> ppp b / templates / tools / dockerfile / test / cxx_ubuntu1604_x64 / Dockerfile . template <nl> <nl> FROM ubuntu : 16 . 04 <nl> <nl> < % include file = " . . / . . / apt_get_basic . include " / > <nl> - < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / python_deps . include " / > <nl> + < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / cxx_deps . include " / > <nl> < % include file = " . . / . . / run_tests_addons . include " / > <nl> <nl> mmm a / templates / tools / dockerfile / test / cxx_ubuntu1804_x64 / Dockerfile . template <nl> ppp b / templates / tools / dockerfile / test / cxx_ubuntu1804_x64 / Dockerfile . template <nl> <nl> FROM ubuntu : 18 . 04 <nl> <nl> < % include file = " . . / . . / apt_get_basic . include " / > <nl> - < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / python_deps . include " / > <nl> + < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / cxx_deps . include " / > <nl> < % include file = " . . / . . / run_tests_addons . include " / > <nl> <nl> mmm a / templates / tools / dockerfile / test / fuzzer / Dockerfile . template <nl> ppp b / templates / tools / dockerfile / test / fuzzer / Dockerfile . template <nl> <nl> < % include file = " . . / . . / debian_jessie_header . include " / > <nl> <nl> < % include file = " . . / . . / apt_get_basic . include " / > <nl> - < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / python_deps . include " / > <nl> + < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / cxx_deps . include " / > <nl> < % include file = " . . / . . / cmake_jessie_backports . include " / > <nl> < % include file = " . . / . . / clang_update . include " / > <nl> mmm a / templates / tools / dockerfile / test / node_jessie_x64 / Dockerfile . template <nl> ppp b / templates / tools / dockerfile / test / node_jessie_x64 / Dockerfile . template <nl> <nl> < % include file = " . . / . . / debian_jessie_header . include " / > <nl> <nl> < % include file = " . . / . . / apt_get_basic . include " / > <nl> - < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> <nl> # Install Electron apt dependencies <nl> RUN apt - get update & & apt - get install - y $ { ' \ \ ' } <nl> <nl> xvfb <nl> <nl> < % include file = " . . / . . / python_deps . include " / > <nl> + < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / node_deps . include " / > <nl> < % include file = " . . / . . / run_tests_addons . include " / > <nl> # Install Mako to generate files in grpc / grpc - node <nl> mmm a / templates / tools / dockerfile / test / php7_jessie_x64 / Dockerfile . template <nl> ppp b / templates / tools / dockerfile / test / php7_jessie_x64 / Dockerfile . template <nl> <nl> < % include file = " . . / . . / debian_jessie_header . include " / > <nl> <nl> < % include file = " . . / . . / php7_deps . include " / > <nl> - < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / python_deps . include " / > <nl> + < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / php_valgrind . include " / > <nl> < % include file = " . . / . . / run_tests_addons . include " / > <nl> # Define the default command . <nl> mmm a / templates / tools / dockerfile / test / php_jessie_x64 / Dockerfile . template <nl> ppp b / templates / tools / dockerfile / test / php_jessie_x64 / Dockerfile . template <nl> <nl> < % include file = " . . / . . / debian_jessie_header . include " / > <nl> <nl> < % include file = " . . / . . / apt_get_basic . include " / > <nl> - < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / python_deps . include " / > <nl> + < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / php_deps . include " / > <nl> < % include file = " . . / . . / run_tests_addons . include " / > <nl> # Define the default command . <nl> mmm a / templates / tools / dockerfile / test / ruby_jessie_x64 / Dockerfile . template <nl> ppp b / templates / tools / dockerfile / test / ruby_jessie_x64 / Dockerfile . template <nl> <nl> < % include file = " . . / . . / debian_jessie_header . include " / > <nl> <nl> < % include file = " . . / . . / apt_get_basic . include " / > <nl> - < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / python_deps . include " / > <nl> + < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / ruby_deps . include " / > <nl> < % include file = " . . / . . / run_tests_addons . include " / > <nl> # Define the default command . <nl> mmm a / tools / dockerfile / grpc_clang_tidy / Dockerfile <nl> ppp b / tools / dockerfile / grpc_clang_tidy / Dockerfile <nl> ENV CLANG_TIDY = clang - tidy - 6 . 0 <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> mmm a / tools / dockerfile / interoptest / grpc_interop_csharp / Dockerfile <nl> ppp b / tools / dockerfile / interoptest / grpc_interop_csharp / Dockerfile <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> mmm a / tools / dockerfile / interoptest / grpc_interop_csharpcoreclr / Dockerfile <nl> ppp b / tools / dockerfile / interoptest / grpc_interop_csharpcoreclr / Dockerfile <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> mmm a / tools / dockerfile / interoptest / grpc_interop_cxx / Dockerfile <nl> ppp b / tools / dockerfile / interoptest / grpc_interop_cxx / Dockerfile <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> mmm a / tools / dockerfile / interoptest / grpc_interop_go / Dockerfile <nl> ppp b / tools / dockerfile / interoptest / grpc_interop_go / Dockerfile <nl> RUN ln - s / usr / local / go / bin / go / usr / local / bin <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> mmm a / tools / dockerfile / interoptest / grpc_interop_go1 . 11 / Dockerfile <nl> ppp b / tools / dockerfile / interoptest / grpc_interop_go1 . 11 / Dockerfile <nl> RUN ln - s / usr / local / go / bin / go / usr / local / bin <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> mmm a / tools / dockerfile / interoptest / grpc_interop_go1 . 7 / Dockerfile <nl> ppp b / tools / dockerfile / interoptest / grpc_interop_go1 . 7 / Dockerfile <nl> RUN ln - s / usr / local / go / bin / go / usr / local / bin <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> mmm a / tools / dockerfile / interoptest / grpc_interop_go1 . 8 / Dockerfile <nl> ppp b / tools / dockerfile / interoptest / grpc_interop_go1 . 8 / Dockerfile <nl> RUN ln - s / usr / local / go / bin / go / usr / local / bin <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> mmm a / tools / dockerfile / interoptest / grpc_interop_http2 / Dockerfile <nl> ppp b / tools / dockerfile / interoptest / grpc_interop_http2 / Dockerfile <nl> RUN ln - s / usr / local / go / bin / go / usr / local / bin <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> mmm a / tools / dockerfile / interoptest / grpc_interop_node / Dockerfile <nl> ppp b / tools / dockerfile / interoptest / grpc_interop_node / Dockerfile <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> mmm a / tools / dockerfile / interoptest / grpc_interop_python / Dockerfile <nl> ppp b / tools / dockerfile / interoptest / grpc_interop_python / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # Install Python 2 . 7 <nl> RUN apt - get update & & apt - get install - y python2 . 7 python - all - dev <nl> RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # Add Debian ' buster ' repository , we will need it for installing newer versions of python <nl> RUN echo ' deb http : / / ftp . de . debian . org / debian buster main ' > > / etc / apt / sources . list <nl> RUN echo ' APT : : Default - Release " stretch " ; ' | tee - a / etc / apt / apt . conf . d / 00local <nl> mmm a / tools / dockerfile / interoptest / grpc_interop_pythonasyncio / Dockerfile <nl> ppp b / tools / dockerfile / interoptest / grpc_interop_pythonasyncio / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # Install Python 2 . 7 <nl> RUN apt - get update & & apt - get install - y python2 . 7 python - all - dev <nl> RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # Add Debian ' buster ' repository , we will need it for installing newer versions of python <nl> RUN echo ' deb http : / / ftp . de . debian . org / debian buster main ' > > / etc / apt / sources . list <nl> RUN echo ' APT : : Default - Release " stretch " ; ' | tee - a / etc / apt / apt . conf . d / 00local <nl> mmm a / tools / dockerfile / interoptest / grpc_interop_ruby / Dockerfile <nl> ppp b / tools / dockerfile / interoptest / grpc_interop_ruby / Dockerfile <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> mmm a / tools / dockerfile / test / bazel / Dockerfile <nl> ppp b / tools / dockerfile / test / bazel / Dockerfile <nl> RUN apt - get update & & apt - get - y install \ <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> mmm a / tools / dockerfile / test / csharp_stretch_x64 / Dockerfile <nl> ppp b / tools / dockerfile / test / csharp_stretch_x64 / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # = = = = = = = = = = = = = = = = = = = = <nl> # Python dependencies <nl> <nl> RUN pip install - - upgrade google - api - python - client oauth2client <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # = = = = = = = = = = = = = = = = <nl> # C # dependencies <nl> <nl> mmm a / tools / dockerfile / test / cxx_buster_x64 / Dockerfile <nl> ppp b / tools / dockerfile / test / cxx_buster_x64 / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # = = = = = = = = = = = = = = = = = = = = <nl> # Python dependencies <nl> <nl> RUN pip install - - upgrade google - api - python - client oauth2client <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # = = = = = = = = = = = = = = = = = <nl> # C + + dependencies <nl> RUN apt - get update & & apt - get - y install libgflags - dev libgtest - dev libc + + - dev clang & & apt - get clean <nl> mmm a / tools / dockerfile / test / cxx_jessie_x64 / Dockerfile <nl> ppp b / tools / dockerfile / test / cxx_jessie_x64 / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # = = = = = = = = = = = = = = = = = = = = <nl> # Python dependencies <nl> <nl> RUN pip install - - upgrade google - api - python - client oauth2client <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # = = = = = = = = = = = = = = = = = <nl> # C + + dependencies <nl> RUN apt - get update & & apt - get - y install libgflags - dev libgtest - dev libc + + - dev clang & & apt - get clean <nl> mmm a / tools / dockerfile / test / cxx_jessie_x86 / Dockerfile <nl> ppp b / tools / dockerfile / test / cxx_jessie_x86 / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # = = = = = = = = = = = = = = = = = = = = <nl> # Python dependencies <nl> <nl> RUN pip install - - upgrade google - api - python - client oauth2client <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # = = = = = = = = = = = = = = = = = <nl> # C + + dependencies <nl> RUN apt - get update & & apt - get - y install libgflags - dev libgtest - dev libc + + - dev clang & & apt - get clean <nl> mmm a / tools / dockerfile / test / cxx_sanitizers_jessie_x64 / Dockerfile <nl> ppp b / tools / dockerfile / test / cxx_sanitizers_jessie_x64 / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # = = = = = = = = = = = = = = = = = = = = <nl> # Python dependencies <nl> <nl> RUN pip install - - upgrade google - api - python - client oauth2client <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # = = = = = = = = = = = = = = = = = <nl> # C + + dependencies ( purposely excluding Clang because it ' s part of the base image ) <nl> RUN apt - get update & & apt - get - y install libgflags - dev libgtest - dev libc + + - dev & & apt - get clean <nl> mmm a / tools / dockerfile / test / cxx_ubuntu1404_x64 / Dockerfile <nl> ppp b / tools / dockerfile / test / cxx_ubuntu1404_x64 / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # = = = = = = = = = = = = = = = = = = = = <nl> # Python dependencies <nl> <nl> RUN pip install - - upgrade google - api - python - client oauth2client <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # = = = = = = = = = = = = = = = = = <nl> # C + + dependencies <nl> RUN apt - get update & & apt - get - y install libgflags - dev libgtest - dev libc + + - dev clang & & apt - get clean <nl> mmm a / tools / dockerfile / test / cxx_ubuntu1604_x64 / Dockerfile <nl> ppp b / tools / dockerfile / test / cxx_ubuntu1604_x64 / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # = = = = = = = = = = = = = = = = = = = = <nl> # Python dependencies <nl> <nl> RUN pip install - - upgrade google - api - python - client oauth2client <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # = = = = = = = = = = = = = = = = = <nl> # C + + dependencies <nl> RUN apt - get update & & apt - get - y install libgflags - dev libgtest - dev libc + + - dev clang & & apt - get clean <nl> mmm a / tools / dockerfile / test / cxx_ubuntu1804_x64 / Dockerfile <nl> ppp b / tools / dockerfile / test / cxx_ubuntu1804_x64 / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # = = = = = = = = = = = = = = = = = = = = <nl> # Python dependencies <nl> <nl> RUN pip install - - upgrade google - api - python - client oauth2client <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # = = = = = = = = = = = = = = = = = <nl> # C + + dependencies <nl> RUN apt - get update & & apt - get - y install libgflags - dev libgtest - dev libc + + - dev clang & & apt - get clean <nl> mmm a / tools / dockerfile / test / fuzzer / Dockerfile <nl> ppp b / tools / dockerfile / test / fuzzer / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # = = = = = = = = = = = = = = = = = = = = <nl> # Python dependencies <nl> <nl> RUN pip install - - upgrade google - api - python - client oauth2client <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # = = = = = = = = = = = = = = = = = <nl> # C + + dependencies <nl> RUN apt - get update & & apt - get - y install libgflags - dev libgtest - dev libc + + - dev clang & & apt - get clean <nl> mmm a / tools / dockerfile / test / node_jessie_x64 / Dockerfile <nl> ppp b / tools / dockerfile / test / node_jessie_x64 / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> <nl> # Install Electron apt dependencies <nl> RUN apt - get update & & apt - get install - y \ <nl> RUN apt - get update & & apt - get install - y \ <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # = = = = = = = = = = = = = = = = = = <nl> # Node dependencies <nl> <nl> mmm a / tools / dockerfile / test / php7_jessie_x64 / Dockerfile <nl> ppp b / tools / dockerfile / test / php7_jessie_x64 / Dockerfile <nl> RUN cd / var / local / git / php - src \ <nl> & & make \ <nl> & & make install <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # = = = = = = = = = = = = = = = = = = = = <nl> # Python dependencies <nl> <nl> RUN pip install - - upgrade google - api - python - client oauth2client <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # = = = = = = = = = = = = = = = = = <nl> # PHP Test dependencies <nl> <nl> mmm a / tools / dockerfile / test / php_jessie_x64 / Dockerfile <nl> ppp b / tools / dockerfile / test / php_jessie_x64 / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # = = = = = = = = = = = = = = = = = = = = <nl> # Python dependencies <nl> <nl> RUN pip install - - upgrade google - api - python - client oauth2client <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # = = = = = = = = = = = = = = = = = <nl> # PHP dependencies <nl> <nl> mmm a / tools / dockerfile / test / python_stretch_2 . 7_x64 / Dockerfile <nl> ppp b / tools / dockerfile / test / python_stretch_2 . 7_x64 / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # Install Python 2 . 7 <nl> RUN apt - get update & & apt - get install - y python2 . 7 python - all - dev <nl> RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # Add Debian ' buster ' repository , we will need it for installing newer versions of python <nl> RUN echo ' deb http : / / ftp . de . debian . org / debian buster main ' > > / etc / apt / sources . list <nl> RUN echo ' APT : : Default - Release " stretch " ; ' | tee - a / etc / apt / apt . conf . d / 00local <nl> mmm a / tools / dockerfile / test / python_stretch_3 . 5_x64 / Dockerfile <nl> ppp b / tools / dockerfile / test / python_stretch_3 . 5_x64 / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # Install Python 2 . 7 <nl> RUN apt - get update & & apt - get install - y python2 . 7 python - all - dev <nl> RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # Add Debian ' buster ' repository , we will need it for installing newer versions of python <nl> RUN echo ' deb http : / / ftp . de . debian . org / debian buster main ' > > / etc / apt / sources . list <nl> RUN echo ' APT : : Default - Release " stretch " ; ' | tee - a / etc / apt / apt . conf . d / 00local <nl> mmm a / tools / dockerfile / test / python_stretch_3 . 6_x64 / Dockerfile <nl> ppp b / tools / dockerfile / test / python_stretch_3 . 6_x64 / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # Install Python 2 . 7 <nl> RUN apt - get update & & apt - get install - y python2 . 7 python - all - dev <nl> RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # Add Debian ' buster ' repository , we will need it for installing newer versions of python <nl> RUN echo ' deb http : / / ftp . de . debian . org / debian buster main ' > > / etc / apt / sources . list <nl> RUN echo ' APT : : Default - Release " stretch " ; ' | tee - a / etc / apt / apt . conf . d / 00local <nl> mmm a / tools / dockerfile / test / python_stretch_3 . 7_x64 / Dockerfile <nl> ppp b / tools / dockerfile / test / python_stretch_3 . 7_x64 / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # Install Python 2 . 7 <nl> RUN apt - get update & & apt - get install - y python2 . 7 python - all - dev <nl> RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # Add Debian ' buster ' repository , we will need it for installing newer versions of python <nl> RUN echo ' deb http : / / ftp . de . debian . org / debian buster main ' > > / etc / apt / sources . list <nl> RUN echo ' APT : : Default - Release " stretch " ; ' | tee - a / etc / apt / apt . conf . d / 00local <nl> mmm a / tools / dockerfile / test / python_stretch_3 . 8_x64 / Dockerfile <nl> ppp b / tools / dockerfile / test / python_stretch_3 . 8_x64 / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # Install Python 2 . 7 <nl> RUN apt - get update & & apt - get install - y python2 . 7 python - all - dev <nl> RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # Add Debian ' buster ' repository , we will need it for installing newer versions of python <nl> RUN echo ' deb http : / / ftp . de . debian . org / debian buster main ' > > / etc / apt / sources . list <nl> RUN echo ' APT : : Default - Release " stretch " ; ' | tee - a / etc / apt / apt . conf . d / 00local <nl> mmm a / tools / dockerfile / test / python_stretch_default_x64 / Dockerfile <nl> ppp b / tools / dockerfile / test / python_stretch_default_x64 / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # Install Python 2 . 7 <nl> RUN apt - get update & & apt - get install - y python2 . 7 python - all - dev <nl> RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # Add Debian ' buster ' repository , we will need it for installing newer versions of python <nl> RUN echo ' deb http : / / ftp . de . debian . org / debian buster main ' > > / etc / apt / sources . list <nl> RUN echo ' APT : : Default - Release " stretch " ; ' | tee - a / etc / apt / apt . conf . d / 00local <nl> mmm a / tools / dockerfile / test / ruby_jessie_x64 / Dockerfile <nl> ppp b / tools / dockerfile / test / ruby_jessie_x64 / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # = = = = = = = = = = = = = = = = = = = = <nl> # Python dependencies <nl> <nl> RUN pip install - - upgrade google - api - python - client oauth2client <nl> RUN apt - get update & & apt - get install - y \ <nl> python - all - dev \ <nl> python3 - all - dev \ <nl> - python - pip <nl> + python - setuptools <nl> <nl> # Install Python packages from PyPI <nl> + RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> RUN pip install - - upgrade pip = = 19 . 3 . 1 <nl> RUN pip install virtualenv = = 16 . 7 . 9 <nl> RUN pip install futures = = 2 . 2 . 0 enum34 = = 1 . 0 . 4 protobuf = = 3 . 5 . 2 . post1 six = = 1 . 10 . 0 twisted = = 17 . 5 . 0 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> # = = = = = = = = = = = = = = = = = = <nl> # Ruby dependencies <nl> <nl> mmm a / tools / dockerfile / test / sanity / Dockerfile <nl> ppp b / tools / dockerfile / test / sanity / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> # Build profiling <nl> RUN apt - get update & & apt - get install - y time & & apt - get clean <nl> <nl> - # Google Cloud platform API libraries <nl> - RUN apt - get update & & apt - get install - y python - pip & & apt - get clean <nl> - RUN pip install - - upgrade google - api - python - client oauth2client <nl> - <nl> # Install Python 2 . 7 <nl> RUN apt - get update & & apt - get install - y python2 . 7 python - all - dev <nl> RUN curl https : / / bootstrap . pypa . io / get - pip . py | python2 . 7 <nl> <nl> + # Google Cloud platform API libraries <nl> + RUN pip install - - upgrade google - api - python - client oauth2client <nl> + <nl> <nl> RUN mkdir / var / local / jenkins <nl> <nl>
Fix run_tests pip install error
grpc/grpc
7d8f295ab0c0be7452ab6ce07300d7c3129fc5c4
2020-05-13T17:59:09Z
mmm a / src / hydrogen . cc <nl> ppp b / src / hydrogen . cc <nl> void HOptimizedGraphBuilder : : VisitArithmeticExpression ( BinaryOperation * expr ) { <nl> <nl> <nl> void HOptimizedGraphBuilder : : HandleLiteralCompareTypeof ( CompareOperation * expr , <nl> - HTypeof * typeof_expr , <nl> + Expression * sub_expr , <nl> Handle < String > check ) { <nl> - / / Note : The HTypeof itself is removed during canonicalization , if possible . <nl> - HValue * value = typeof_expr - > value ( ) ; <nl> + CHECK_ALIVE ( VisitForValue ( sub_expr ) ) ; <nl> + HValue * value = Pop ( ) ; <nl> HTypeofIsAndBranch * instr = new ( zone ( ) ) HTypeofIsAndBranch ( value , check ) ; <nl> instr - > set_position ( expr - > position ( ) ) ; <nl> return ast_context ( ) - > ReturnControl ( instr , expr - > id ( ) ) ; <nl> } <nl> <nl> <nl> - static bool MatchLiteralCompareNil ( HValue * left , <nl> - Token : : Value op , <nl> - HValue * right , <nl> - Handle < Object > nil , <nl> - HValue * * expr ) { <nl> - if ( left - > IsConstant ( ) & & <nl> - HConstant : : cast ( left ) - > handle ( ) . is_identical_to ( nil ) & & <nl> - Token : : IsEqualityOp ( op ) ) { <nl> - * expr = right ; <nl> - return true ; <nl> - } <nl> - return false ; <nl> - } <nl> - <nl> - <nl> - static bool MatchLiteralCompareTypeof ( HValue * left , <nl> - Token : : Value op , <nl> - HValue * right , <nl> - HTypeof * * typeof_expr , <nl> - Handle < String > * check ) { <nl> - if ( left - > IsTypeof ( ) & & <nl> - Token : : IsEqualityOp ( op ) & & <nl> - right - > IsConstant ( ) & & <nl> - HConstant : : cast ( right ) - > handle ( ) - > IsString ( ) ) { <nl> - * typeof_expr = HTypeof : : cast ( left ) ; <nl> - * check = Handle < String > : : cast ( HConstant : : cast ( right ) - > handle ( ) ) ; <nl> - return true ; <nl> - } <nl> - return false ; <nl> - } <nl> - <nl> - <nl> - static bool IsLiteralCompareTypeof ( HValue * left , <nl> - Token : : Value op , <nl> - HValue * right , <nl> - HTypeof * * typeof_expr , <nl> - Handle < String > * check ) { <nl> - return MatchLiteralCompareTypeof ( left , op , right , typeof_expr , check ) | | <nl> - MatchLiteralCompareTypeof ( right , op , left , typeof_expr , check ) ; <nl> - } <nl> - <nl> - <nl> - static bool IsLiteralCompareNil ( HValue * left , <nl> - Token : : Value op , <nl> - HValue * right , <nl> - Handle < Object > nil , <nl> - HValue * * expr ) { <nl> - return MatchLiteralCompareNil ( left , op , right , nil , expr ) | | <nl> - MatchLiteralCompareNil ( right , op , left , nil , expr ) ; <nl> - } <nl> - <nl> - <nl> static bool IsLiteralCompareBool ( HValue * left , <nl> Token : : Value op , <nl> HValue * right ) { <nl> void HOptimizedGraphBuilder : : VisitCompareOperation ( CompareOperation * expr ) { <nl> ASSERT ( ! HasStackOverflow ( ) ) ; <nl> ASSERT ( current_block ( ) ! = NULL ) ; <nl> ASSERT ( current_block ( ) - > HasPredecessor ( ) ) ; <nl> + <nl> + / / Check for a few fast cases . The AST visiting behavior must be in sync <nl> + / / with the full codegen : We don ' t push both left and right values onto <nl> + / / the expression stack when one side is a special - case literal . <nl> + Expression * sub_expr = NULL ; <nl> + Handle < String > check ; <nl> + if ( expr - > IsLiteralCompareTypeof ( & sub_expr , & check ) ) { <nl> + return HandleLiteralCompareTypeof ( expr , sub_expr , check ) ; <nl> + } <nl> + if ( expr - > IsLiteralCompareUndefined ( & sub_expr ) ) { <nl> + return HandleLiteralCompareNil ( expr , sub_expr , kUndefinedValue ) ; <nl> + } <nl> + if ( expr - > IsLiteralCompareNull ( & sub_expr ) ) { <nl> + return HandleLiteralCompareNil ( expr , sub_expr , kNullValue ) ; <nl> + } <nl> + <nl> if ( IsClassOfTest ( expr ) ) { <nl> CallRuntime * call = expr - > left ( ) - > AsCallRuntime ( ) ; <nl> ASSERT ( call - > arguments ( ) - > length ( ) = = 1 ) ; <nl> void HOptimizedGraphBuilder : : VisitCompareOperation ( CompareOperation * expr ) { <nl> HValue * left = Pop ( ) ; <nl> Token : : Value op = expr - > op ( ) ; <nl> <nl> - HTypeof * typeof_expr = NULL ; <nl> - Handle < String > check ; <nl> - if ( IsLiteralCompareTypeof ( left , op , right , & typeof_expr , & check ) ) { <nl> - return HandleLiteralCompareTypeof ( expr , typeof_expr , check ) ; <nl> - } <nl> - HValue * sub_expr = NULL ; <nl> - Factory * f = isolate ( ) - > factory ( ) ; <nl> - if ( IsLiteralCompareNil ( left , op , right , f - > undefined_value ( ) , & sub_expr ) ) { <nl> - return HandleLiteralCompareNil ( expr , sub_expr , kUndefinedValue ) ; <nl> - } <nl> - if ( IsLiteralCompareNil ( left , op , right , f - > null_value ( ) , & sub_expr ) ) { <nl> - return HandleLiteralCompareNil ( expr , sub_expr , kNullValue ) ; <nl> - } <nl> if ( IsLiteralCompareBool ( left , op , right ) ) { <nl> HCompareObjectEqAndBranch * result = <nl> new ( zone ( ) ) HCompareObjectEqAndBranch ( left , right ) ; <nl> void HOptimizedGraphBuilder : : VisitCompareOperation ( CompareOperation * expr ) { <nl> <nl> <nl> void HOptimizedGraphBuilder : : HandleLiteralCompareNil ( CompareOperation * expr , <nl> - HValue * value , <nl> + Expression * sub_expr , <nl> NilValue nil ) { <nl> ASSERT ( ! HasStackOverflow ( ) ) ; <nl> ASSERT ( current_block ( ) ! = NULL ) ; <nl> ASSERT ( current_block ( ) - > HasPredecessor ( ) ) ; <nl> ASSERT ( expr - > op ( ) = = Token : : EQ | | expr - > op ( ) = = Token : : EQ_STRICT ) ; <nl> + CHECK_ALIVE ( VisitForValue ( sub_expr ) ) ; <nl> + HValue * value = Pop ( ) ; <nl> HIfContinuation continuation ; <nl> if ( expr - > op ( ) = = Token : : EQ_STRICT ) { <nl> IfBuilder if_nil ( this ) ; <nl> mmm a / src / hydrogen . h <nl> ppp b / src / hydrogen . h <nl> class HOptimizedGraphBuilder : public HGraphBuilder , public AstVisitor { <nl> SmallMapList * types , <nl> Handle < String > name ) ; <nl> void HandleLiteralCompareTypeof ( CompareOperation * expr , <nl> - HTypeof * typeof_expr , <nl> + Expression * sub_expr , <nl> Handle < String > check ) ; <nl> void HandleLiteralCompareNil ( CompareOperation * expr , <nl> - HValue * value , <nl> + Expression * sub_expr , <nl> NilValue nil ) ; <nl> <nl> HInstruction * BuildStringCharCodeAt ( HValue * context , <nl> new file mode 100644 <nl> index 00000000000 . . 75832ab4beb <nl> mmm / dev / null <nl> ppp b / test / mjsunit / regress / regress - crbug - 260345 . js <nl> <nl> + / / Copyright 2013 the V8 project authors . All rights reserved . <nl> + / / Redistribution and use in source and binary forms , with or without <nl> + / / modification , are permitted provided that the following conditions are <nl> + / / met : <nl> + / / <nl> + / / * Redistributions of source code must retain the above copyright <nl> + / / notice , this list of conditions and the following disclaimer . <nl> + / / * Redistributions in binary form must reproduce the above <nl> + / / copyright notice , this list of conditions and the following <nl> + / / disclaimer in the documentation and / or other materials provided <nl> + / / with the distribution . <nl> + / / * Neither the name of Google Inc . nor the names of its <nl> + / / contributors may be used to endorse or promote products derived <nl> + / / from this software without specific prior written permission . <nl> + / / <nl> + / / THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS <nl> + / / " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT <nl> + / / LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR <nl> + / / A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT <nl> + / / OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , <nl> + / / SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT <nl> + / / LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , <nl> + / / DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY <nl> + / / THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT <nl> + / / ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE <nl> + / / OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . <nl> + <nl> + var steps = 100000 ; <nl> + var undefined_values = [ undefined , " go on " ] ; <nl> + var null_values = [ null , " go on " ] ; <nl> + <nl> + function get_undefined_object ( i ) { <nl> + return undefined_values [ ( i / steps ) | 0 ] ; <nl> + } <nl> + <nl> + function test_undefined ( ) { <nl> + var objects = 0 ; <nl> + for ( var i = 0 ; i < 2 * steps ; i + + ) { <nl> + undefined = = get_undefined_object ( i ) & & objects + + ; <nl> + } <nl> + return objects ; <nl> + } <nl> + <nl> + assertEquals ( steps , test_undefined ( ) ) ; <nl> + <nl> + <nl> + function get_null_object ( i ) { <nl> + return null_values [ ( i / steps ) | 0 ] ; <nl> + } <nl> + <nl> + function test_null ( ) { <nl> + var objects = 0 ; <nl> + for ( var i = 0 ; i < 2 * steps ; i + + ) { <nl> + null = = get_null_object ( i ) & & objects + + ; <nl> + } <nl> + return objects ; <nl> + } <nl> + <nl> + assertEquals ( steps , test_null ( ) ) ; <nl>
Synchronize Compare - Literal behavior in FullCodegen and Hydrogen
v8/v8
22f2fd83977afc9fc813bb86c48023d44fcda5ea
2013-07-17T13:13:38Z
mmm a / Marlin / Marlin_main . cpp <nl> ppp b / Marlin / Marlin_main . cpp <nl> <nl> - / * - * - c + + - * - * / <nl> - <nl> - / * <nl> - Reprap firmware based on Sprinter and grbl . <nl> - Copyright ( C ) 2011 Camiel Gubbels / Erik van der Zalm <nl> - <nl> - This program is free software : you can redistribute it and / or modify <nl> - it under the terms of the GNU General Public License as published by <nl> - the Free Software Foundation , either version 3 of the License , or <nl> - ( at your option ) any later version . <nl> - <nl> - This program is distributed in the hope that it will be useful , <nl> - but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> - GNU General Public License for more details . <nl> - <nl> - You should have received a copy of the GNU General Public License <nl> - along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> - * / <nl> - <nl> - / * <nl> - This firmware is a mashup between Sprinter and grbl . <nl> - ( https : / / github . com / kliment / Sprinter ) <nl> - ( https : / / github . com / simen / grbl / tree ) <nl> - <nl> - It has preliminary support for Matthew Roberts advance algorithm <nl> - http : / / reprap . org / pipermail / reprap - dev / 2011 - May / 003323 . html <nl> + / * * <nl> + * Marlin Firmware <nl> + * <nl> + * Based on Sprinter and grbl . <nl> + * Copyright ( C ) 2011 Camiel Gubbels / Erik van der Zalm <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU General Public License as published by <nl> + * the Free Software Foundation , either version 3 of the License , or <nl> + * ( at your option ) any later version . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * About Marlin <nl> + * <nl> + * This firmware is a mashup between Sprinter and grbl . <nl> + * - https : / / github . com / kliment / Sprinter <nl> + * - https : / / github . com / simen / grbl / tree <nl> + * <nl> + * It has preliminary support for Matthew Roberts advance algorithm <nl> + * - http : / / reprap . org / pipermail / reprap - dev / 2011 - May / 003323 . html <nl> * / <nl> <nl> # include " Marlin . h " <nl> <nl> * - http : / / objects . reprap . org / wiki / Mendel_User_Manual : _RepRapGCodes <nl> * <nl> * Help us document these G - codes online : <nl> + * - http : / / www . marlinfirmware . org / index . php / G - Code <nl> * - http : / / reprap . org / wiki / G - code <nl> - * - https : / / github . com / MarlinFirmware / Marlin / wiki / Marlin - G - Code <nl> - * / <nl> - <nl> - / * * <nl> + * <nl> + * mmmmmmmmmmmmmmm - - <nl> * Implemented Codes <nl> - * mmmmmmmmmmmmmmmmmm - <nl> + * mmmmmmmmmmmmmmm - - <nl> * <nl> * " G " Codes <nl> * <nl> <nl> * M205 - advanced settings : minimum travel speed S = while printing T = travel only , B = minimum segment time X = maximum xy jerk , Z = maximum Z jerk , E = maximum E jerk <nl> * M206 - Set additional homing offset <nl> * M207 - Set retract length S [ positive mm ] F [ feedrate mm / min ] Z [ additional zlift / hop ] , stays in mm regardless of M200 setting <nl> - * M208 - Set recover = unretract length S [ positive mm surplus to the M207 S * ] F [ feedrate mm / sec ] <nl> + * M208 - Set recover = unretract length S [ positive mm surplus to the M207 S * ] F [ feedrate mm / min ] <nl> * M209 - S < 1 = true / 0 = false > enable automatic retract detect if the slicer did not support G10 / 11 : every normal extrude - only move will be classified as retract depending on the direction . <nl> * M218 - Set hotend offset ( in mm ) : T < extruder_number > X < offset_on_X > Y < offset_on_Y > <nl> * M220 - Set speed factor override percentage : S < factor in percent > <nl> <nl> * <nl> * M928 - Start SD logging ( M928 filename . g ) - ended by M29 <nl> * M999 - Restart after being stopped by error <nl> + * <nl> + * " T " Codes <nl> + * <nl> + * T0 - T3 - Select a tool by index ( usually an extruder ) [ F < mm / min > ] <nl> + * <nl> * / <nl> <nl> # ifdef SDSUPPORT <nl> mmm a / Marlin / stepper . cpp <nl> ppp b / Marlin / stepper . cpp <nl> <nl> - / * <nl> - stepper . c - stepper motor driver : executes motion plans using stepper motors <nl> - Part of Grbl <nl> - <nl> - Copyright ( c ) 2009 - 2011 Simen Svale Skogsrud <nl> - <nl> - Grbl is free software : you can redistribute it and / or modify <nl> - it under the terms of the GNU General Public License as published by <nl> - the Free Software Foundation , either version 3 of the License , or <nl> - ( at your option ) any later version . <nl> - <nl> - Grbl is distributed in the hope that it will be useful , <nl> - but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> - GNU General Public License for more details . <nl> - <nl> - You should have received a copy of the GNU General Public License <nl> - along with Grbl . If not , see < http : / / www . gnu . org / licenses / > . <nl> - * / <nl> + / * * <nl> + * stepper . cpp - stepper motor driver : executes motion plans using stepper motors <nl> + * Marlin Firmware <nl> + * <nl> + * Derived from Grbl <nl> + * Copyright ( c ) 2009 - 2011 Simen Svale Skogsrud <nl> + * <nl> + * Grbl is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU General Public License as published by <nl> + * the Free Software Foundation , either version 3 of the License , or <nl> + * ( at your option ) any later version . <nl> + * <nl> + * Grbl is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU General Public License <nl> + * along with Grbl . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * / <nl> <nl> / * The timer calculations of this module informed by the ' RepRap cartesian firmware ' by Zack Smith <nl> and Philipp Tiefenbacher . * / <nl>
Update headings in Marlin_main . cpp and stepper . cpp
MarlinFirmware/Marlin
072625ccadf763ecef74e49792682ca42b83b605
2015-05-17T08:44:53Z
mmm a / stdlib / public / Darwin / Foundation / CharacterSet . swift <nl> ppp b / stdlib / public / Darwin / Foundation / CharacterSet . swift <nl> <nl> <nl> @ _exported import Foundation / / Clang module <nl> import CoreFoundation <nl> - import _SwiftCoreFoundationOverlayShims <nl> + @ _implementationOnly import _SwiftCoreFoundationOverlayShims <nl> @ _implementationOnly import _SwiftFoundationOverlayShims <nl> <nl> private func _utfRangeToCFRange ( _ inRange : Range < Unicode . Scalar > ) - > CFRange { <nl> mmm a / stdlib / public / Darwin / Foundation / Data . swift <nl> ppp b / stdlib / public / Darwin / Foundation / Data . swift <nl> internal func __NSDataIsCompact ( _ data : NSData ) - > Bool { <nl> <nl> @ _exported import Foundation / / Clang module <nl> @ _implementationOnly import _SwiftFoundationOverlayShims <nl> - import _SwiftCoreFoundationOverlayShims <nl> + @ _implementationOnly import _SwiftCoreFoundationOverlayShims <nl> <nl> internal func __NSDataIsCompact ( _ data : NSData ) - > Bool { <nl> if # available ( OSX 10 . 10 , iOS 8 . 0 , tvOS 9 . 0 , watchOS 2 . 0 , * ) { <nl> mmm a / stdlib / public / Darwin / Foundation / Date . swift <nl> ppp b / stdlib / public / Darwin / Foundation / Date . swift <nl> <nl> <nl> @ _exported import Foundation / / Clang module <nl> import CoreFoundation <nl> - import _SwiftCoreFoundationOverlayShims <nl> + @ _implementationOnly import _SwiftCoreFoundationOverlayShims <nl> <nl> / * * <nl> ` Date ` represents a single point in time . <nl> mmm a / stdlib / public / Darwin / Foundation / DateInterval . swift <nl> ppp b / stdlib / public / Darwin / Foundation / DateInterval . swift <nl> <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> @ _exported import Foundation / / Clang module <nl> - import _SwiftCoreFoundationOverlayShims <nl> + @ _implementationOnly import _SwiftCoreFoundationOverlayShims <nl> <nl> / / / DateInterval represents a closed date interval in the form of [ startDate , endDate ] . It is possible for the start and end dates to be the same with a duration of 0 . DateInterval does not support reverse intervals i . e . intervals where the duration is less than 0 and the end date occurs earlier in time than the start date . <nl> @ available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * ) <nl> mmm a / stdlib / public / Darwin / Foundation / Decimal . swift <nl> ppp b / stdlib / public / Darwin / Foundation / Decimal . swift <nl> <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> @ _exported import Foundation / / Clang module <nl> - import _SwiftCoreFoundationOverlayShims <nl> + @ _implementationOnly import _SwiftCoreFoundationOverlayShims <nl> <nl> extension Decimal { <nl> public typealias RoundingMode = NSDecimalNumber . RoundingMode <nl> mmm a / stdlib / public / Darwin / Foundation / Measurement . swift <nl> ppp b / stdlib / public / Darwin / Foundation / Measurement . swift <nl> <nl> import CoreFoundation <nl> # else <nl> @ _exported import Foundation / / Clang module <nl> - import _SwiftCoreFoundationOverlayShims <nl> + @ _implementationOnly import _SwiftCoreFoundationOverlayShims <nl> # endif <nl> <nl> / / / A ` Measurement ` is a model type that holds a ` Double ` value associated with a ` Unit ` . <nl> mmm a / stdlib / public / Darwin / Foundation / UUID . swift <nl> ppp b / stdlib / public / Darwin / Foundation / UUID . swift <nl> <nl> <nl> @ _exported import Foundation / / Clang module <nl> import Darwin . uuid <nl> - import _SwiftCoreFoundationOverlayShims <nl> + @ _implementationOnly import _SwiftCoreFoundationOverlayShims <nl> <nl> / / / Represents UUID strings , which can be used to uniquely identify types , interfaces , and other items . <nl> @ available ( macOS 10 . 8 , iOS 6 . 0 , * ) <nl>
[ Foundation ] Switch to private imports of CoreFoundation shims
apple/swift
846e957278aeac991c6b3b52a75767d6ad5a5383
2020-01-22T21:26:27Z
mmm a / contracts / eosio . token / eosio . token . cpp <nl> ppp b / contracts / eosio . token / eosio . token . cpp <nl> void token : : issue ( account_name to , asset quantity , string memo ) <nl> require_auth ( st . issuer ) ; <nl> eosio_assert ( quantity . is_valid ( ) , " invalid quantity " ) ; <nl> eosio_assert ( quantity . amount > 0 , " must issue positive quantity " ) ; <nl> + <nl> + if ( quantity . symbol . precision ( ) ! = st . supply . symbol . precision ( ) ) <nl> + quantity . adjust_precision ( st . supply . symbol ) ; <nl> + <nl> eosio_assert ( quantity < = st . max_supply - st . supply , " quantity exceeds available supply " ) ; <nl> <nl> statstable . modify ( st , 0 , [ & ] ( auto & s ) { <nl> mmm a / unittests / currency_tests . cpp <nl> ppp b / unittests / currency_tests . cpp <nl> class currency_tester : public TESTER { <nl> return trace ; <nl> } <nl> <nl> + auto issue ( const account_name & to , const std : : string & quantity , const std : : string & memo = " " ) { <nl> + auto trace = push_action ( N ( eosio . token ) , N ( issue ) , mutable_variant_object ( ) <nl> + ( " to " , to ) <nl> + ( " quantity " , quantity ) <nl> + ( " memo " , memo ) <nl> + ) ; <nl> + produce_block ( ) ; <nl> + return trace ; <nl> + } <nl> + <nl> currency_tester ( ) <nl> : TESTER ( ) , abi_ser ( json : : from_string ( eosio_token_abi ) . as < abi_def > ( ) ) <nl> { <nl> BOOST_FIXTURE_TEST_CASE ( test_input_quantity , currency_tester ) try { <nl> eosio_assert_message_is ( " asset symbol has higher precision than expected " ) ) ; <nl> } <nl> <nl> + / / transfer using different symbol name fails <nl> + { <nl> + BOOST_REQUIRE_THROW ( transfer ( N ( alice ) , N ( carl ) , " 20 . 50 USD " ) , fc : : assert_exception ) ; <nl> + } <nl> + <nl> + / / issue to alice using right precision <nl> + { <nl> + auto trace = issue ( N ( alice ) , " 25 . 0256 CUR " ) ; <nl> + <nl> + BOOST_CHECK_EQUAL ( true , chain_has_transaction ( trace - > id ) ) ; <nl> + BOOST_CHECK_EQUAL ( asset : : from_string ( " 112 . 0256 CUR " ) , get_balance ( N ( alice ) ) ) ; <nl> + } <nl> + <nl> + / / issue to alice again using lower precision <nl> + { <nl> + auto trace = issue ( N ( alice ) , " 21 . 03 CUR " ) ; <nl> + <nl> + BOOST_CHECK_EQUAL ( true , chain_has_transaction ( trace - > id ) ) ; <nl> + BOOST_CHECK_EQUAL ( asset : : from_string ( " 133 . 0556 CUR " ) , get_balance ( N ( alice ) ) ) ; <nl> + } <nl> + <nl> + / / no decimal point <nl> + { <nl> + auto trace = issue ( N ( alice ) , " 67 CUR " ) ; <nl> + <nl> + BOOST_CHECK_EQUAL ( true , chain_has_transaction ( trace - > id ) ) ; <nl> + BOOST_CHECK_EQUAL ( asset : : from_string ( " 200 . 0556 CUR " ) , get_balance ( N ( alice ) ) ) ; <nl> + } <nl> + <nl> + / / issue using higher precision fails <nl> + { <nl> + BOOST_REQUIRE_EXCEPTION ( issue ( N ( alice ) , " 5 . 340067 CUR " ) , fc : : assert_exception , <nl> + eosio_assert_message_is ( " asset symbol has higher precision than expected " ) ) ; <nl> + } <nl> + <nl> } FC_LOG_AND_RETHROW ( ) / / / test_currency <nl> <nl> BOOST_AUTO_TEST_SUITE_END ( ) <nl>
Fix for - issue and transfer quantities are processed the same way
EOSIO/eos
3b8e6d17f34f54f92065b9dbb9f333e690986965
2018-05-03T22:07:01Z
new file mode 100644 <nl> index 000000000000 . . adc62c8f4d87 <nl> mmm / dev / null <nl> ppp b / jstests / noPassthroughWithMongod / dropindexes_duplicate_fields . js <nl> <nl> + / * <nl> + * Test that dropIndexes does not return a message containing multiple " nIndexesWas " fields . <nl> + * <nl> + * @ tags : [ requires_wiredtiger ] <nl> + * / <nl> + <nl> + ( function ( ) { <nl> + " use strict " ; <nl> + <nl> + let oldRes , newRes ; <nl> + let coll = db . dropindexes_duplicate_fields ; <nl> + <nl> + try { <nl> + / / Repeat 100 times for the sake of probabilities <nl> + for ( let i = 0 ; i < 100 ; i + + ) { <nl> + coll . drop ( ) ; <nl> + assert . commandWorked ( coll . insert ( { x : 1 } ) ) ; <nl> + assert . commandWorked ( coll . createIndex ( { " x " : 1 } ) ) ; <nl> + <nl> + assert . commandWorked ( db . adminCommand ( <nl> + { configureFailPoint : ' WTWriteConflictException ' , mode : { activationProbability : 0 . 1 } } ) ) ; <nl> + <nl> + / / Will blow up if writeConflictRetry causes duplicate fields to be appended to result <nl> + let res = db . runCommand ( { dropIndexes : coll . getName ( ) , index : { " x " : 1 } } ) ; <nl> + if ( ! oldRes & & ! newRes ) { <nl> + oldRes = res ; <nl> + } else if ( oldRes & & ! newRes ) { <nl> + newRes = res ; <nl> + } else { <nl> + oldRes = newRes ; <nl> + newRes = res ; <nl> + } <nl> + <nl> + assert . commandWorked ( newRes ? newRes : oldRes ) ; <nl> + <nl> + / / Responses between runs should be the same independent of a WriteConflict <nl> + if ( oldRes & & newRes ) { <nl> + assert . eq ( oldRes , newRes ) ; <nl> + } <nl> + <nl> + assert . commandWorked ( <nl> + db . adminCommand ( { configureFailPoint : ' WTWriteConflictException ' , mode : " off " } ) ) ; <nl> + } <nl> + } finally { <nl> + assert . commandWorked ( <nl> + db . adminCommand ( { configureFailPoint : ' WTWriteConflictException ' , mode : " off " } ) ) ; <nl> + } <nl> + } ) ( ) ; <nl> mmm a / src / mongo / db / catalog / drop_indexes . cpp <nl> ppp b / src / mongo / db / catalog / drop_indexes . cpp <nl> Status dropIndexes ( OperationContext * opCtx , <nl> WriteUnitOfWork wunit ( opCtx ) ; <nl> OldClientContext ctx ( opCtx , nss . ns ( ) ) ; <nl> <nl> - Status status = wrappedRun ( opCtx , collection , cmdObj , result ) ; <nl> + / / Use an empty BSONObjBuilder to avoid duplicate appends to result on retry loops . <nl> + BSONObjBuilder tempObjBuilder ; <nl> + Status status = wrappedRun ( opCtx , collection , cmdObj , & tempObjBuilder ) ; <nl> if ( ! status . isOK ( ) ) { <nl> return status ; <nl> } <nl> <nl> wunit . commit ( ) ; <nl> + <nl> + result - > appendElementsUnique ( tempObjBuilder . done ( ) ) ; / / This append will only happen once . <nl> return Status : : OK ( ) ; <nl> } ) ; <nl> } <nl>
SERVER - 43052 Sanitize writeConflictRetry loops for duplicate fields in result
mongodb/mongo
d832971810c64029c66c1376ce34d47aebba6455
2019-09-13T20:02:10Z
mmm a / hphp / hack / src / errors / errors . ml <nl> ppp b / hphp / hack / src / errors / errors . ml <nl> let format_substring_underline <nl> else <nl> String . length first_context_line - start_column <nl> in <nl> - let underline = String . make underline_width ' ^ ' in <nl> + let underline = String . make ( max underline_width 1 ) ' ^ ' in <nl> let underline_padding = <nl> if Option . is_some first_context_line then <nl> String . make start_column ' ' <nl> new file mode 100644 <nl> index 00000000000 . . 5002222e935 <nl> mmm / dev / null <nl> ppp b / hphp / hack / test / error_formatting / zero_width_syntax_err . php <nl> <nl> + < ? hh / / strict <nl> + <nl> + class Foo extends { } <nl> new file mode 100644 <nl> index 00000000000 . . 57ef039e624 <nl> mmm / dev / null <nl> ppp b / hphp / hack / test / error_formatting / zero_width_syntax_err . php . exp <nl> <nl> + Parsing [ 1002 ] A type specifier is expected here . <nl> + - - > zero_width_syntax_err . php <nl> + 3 | class Foo extends { } <nl> + | ^ <nl> + <nl> + Parsing [ 1002 ] Encountered unexpected text ' ' , was expecting a type hint . <nl> + - - > zero_width_syntax_err . php <nl> + 3 | class Foo extends { } <nl> + | ^ <nl> + <nl> + 2 errors found . <nl>
Show an underline on zero - wdith error positions
facebook/hhvm
4eb18b654e3c8fbd22d0fea0b3327ac3e423e756
2019-11-07T11:22:32Z
mmm a / docs / docs / release_notes . xml <nl> ppp b / docs / docs / release_notes . xml <nl> <nl> New Stuff : <nl> - Matrix related <nl> - Added QR , LU , Cholesky , and eigenvalue decomposition class objects <nl> + - Added overloads for rowm ( ) and colm ( ) that allow you to pick out <nl> + less than an entire vector <nl> + - Added the lowerm ( ) and upperm ( ) functions <nl> + - Added the const_temp_matrix class <nl> <nl> Non - Backwards Compatible Changes : <nl> - Renamed the cholesky_decomposition ( ) function to chol ( ) <nl> <nl> Bug fixes : <nl> + - Fixed some errors in the requirements for calling the new rowm ( ) and <nl> + colm ( ) functions . <nl> + - Fixed dlib : : abs ( ) so that it returns the right type when used <nl> + with complex matrices . <nl> <nl> Other : <nl> - Added an example program that shows how to use the optimization <nl> - functions <nl> + functions . <nl> + - Gave the matrix object the ability to factor expressions containing <nl> + trans ( ) function calls into more efficient forms . <nl> + - Generally cleaned up the matrix code <nl> < / current > <nl> <nl> < ! - - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - - > <nl> mmm a / docs / todo . txt <nl> ppp b / docs / todo . txt <nl> <nl> <nl> <nl> - add overloads for svd for small fixed size matricies <nl> - <nl> <nl> <nl> maybe add a function to find the distance between two column vectors <nl>
updated the docs
davisking/dlib
d0ec0fbeeb83670ad8c7183ebfef6282259daf6f
2009-02-04T00:30:31Z
mmm a / lib / Sema / TypeCheckConstraints . cpp <nl> ppp b / lib / Sema / TypeCheckConstraints . cpp <nl> LookupResult & ConstraintSystem : : lookupMember ( Type base , Identifier name ) { <nl> result - > filter ( [ & ] ( ValueDecl * decl ) - > bool { <nl> return known . insert ( getDynamicResultSignature ( decl , selectors ) ) . second ; <nl> } ) ; <nl> + <nl> + return * result ; <nl> } <nl> <nl> ConstraintLocator * ConstraintSystem : : getConstraintLocator ( <nl>
Fix missing part from r9551 .
apple/swift
a49878dd06002e08b6525225c1f56619bbc07748
2013-10-21T20:07:35Z
mmm a / include / swift / AST / TypeCheckRequests . h <nl> ppp b / include / swift / AST / TypeCheckRequests . h <nl> class LazyStoragePropertyRequest : <nl> bool isCached ( ) const { return true ; } <nl> } ; <nl> <nl> + / / / Request to type check the body of the given function . <nl> + / / / <nl> + / / / Produces true if an error occurred , false otherwise . <nl> + / / / FIXME : it would be far better to return the type - checked body . <nl> + class TypeCheckFunctionBodyRequest : <nl> + public SimpleRequest < TypeCheckFunctionBodyRequest , <nl> + bool ( AbstractFunctionDecl * ) , <nl> + CacheKind : : Cached > { <nl> + public : <nl> + using SimpleRequest : : SimpleRequest ; <nl> + <nl> + private : <nl> + friend SimpleRequest ; <nl> + <nl> + / / Evaluation . <nl> + llvm : : Expected < bool > <nl> + evaluate ( Evaluator & evaluator , AbstractFunctionDecl * func ) const ; <nl> + <nl> + public : <nl> + bool isCached ( ) const { return true ; } <nl> + } ; <nl> + <nl> / / Allow AnyValue to compare two Type values , even though Type doesn ' t <nl> / / support = = . <nl> template < > <nl> mmm a / include / swift / AST / TypeCheckerTypeIDZone . def <nl> ppp b / include / swift / AST / TypeCheckerTypeIDZone . def <nl> SWIFT_TYPEID ( SelfAccessKindRequest ) <nl> SWIFT_TYPEID ( IsGetterMutatingRequest ) <nl> SWIFT_TYPEID ( IsSetterMutatingRequest ) <nl> SWIFT_TYPEID ( OpaqueReadOwnershipRequest ) <nl> - SWIFT_TYPEID ( LazyStoragePropertyRequest ) <nl> \ No newline at end of file <nl> + SWIFT_TYPEID ( LazyStoragePropertyRequest ) <nl> + SWIFT_TYPEID ( TypeCheckFunctionBodyRequest ) <nl> mmm a / lib / Sema / TypeCheckStmt . cpp <nl> ppp b / lib / Sema / TypeCheckStmt . cpp <nl> <nl> # include " swift / AST / NameLookup . h " <nl> # include " swift / AST / ParameterList . h " <nl> # include " swift / AST / PrettyStackTrace . h " <nl> + # include " swift / AST / TypeCheckRequests . h " <nl> # include " swift / Basic / Range . h " <nl> # include " swift / Basic / STLExtras . h " <nl> # include " swift / Basic / SourceManager . h " <nl> bool TypeChecker : : typeCheckAbstractFunctionBodyUntil ( AbstractFunctionDecl * AFD , <nl> } <nl> <nl> bool TypeChecker : : typeCheckAbstractFunctionBody ( AbstractFunctionDecl * AFD ) { <nl> - / / HACK : don ' t type - check the same function body twice . This is <nl> - / / supposed to be handled by just not enqueuing things twice , <nl> - / / but that gets tricky with synthesized function bodies . <nl> - validateDecl ( AFD ) ; <nl> - ( void ) AFD - > getBody ( ) ; <nl> + return evaluateOrDefault ( Context . evaluator , <nl> + TypeCheckFunctionBodyRequest { AFD } , <nl> + true ) ; <nl> + } <nl> <nl> - if ( AFD - > isBodyTypeChecked ( ) ) <nl> + llvm : : Expected < bool > <nl> + TypeCheckFunctionBodyRequest : : evaluate ( Evaluator & evaluator , <nl> + AbstractFunctionDecl * func ) const { <nl> + ASTContext & ctx = func - > getASTContext ( ) ; <nl> + if ( ! func - > hasInterfaceType ( ) ) { <nl> + TypeChecker & tc = * static_cast < TypeChecker * > ( ctx . getLazyResolver ( ) ) ; <nl> + tc . validateDecl ( func ) ; <nl> + } <nl> + <nl> + / / HACK : don ' t type - check the same function body twice . This will eventually <nl> + / / be handled by the request - evaluator ' s caching mechanism . <nl> + ( void ) func - > getBody ( ) ; <nl> + if ( func - > isBodyTypeChecked ( ) ) <nl> return false ; <nl> <nl> - FrontendStatsTracer StatsTracer ( Context . Stats , " typecheck - fn " , AFD ) ; <nl> - PrettyStackTraceDecl StackEntry ( " type - checking " , AFD ) ; <nl> + FrontendStatsTracer StatsTracer ( ctx . Stats , " typecheck - fn " , func ) ; <nl> + PrettyStackTraceDecl StackEntry ( " type - checking " , func ) ; <nl> <nl> - if ( Context . Stats ) <nl> - Context . Stats - > getFrontendCounters ( ) . NumFunctionsTypechecked + + ; <nl> + if ( ctx . Stats ) <nl> + ctx . Stats - > getFrontendCounters ( ) . NumFunctionsTypechecked + + ; <nl> <nl> Optional < FunctionBodyTimer > timer ; <nl> - if ( DebugTimeFunctionBodies | | WarnLongFunctionBodies ) <nl> - timer . emplace ( AFD , DebugTimeFunctionBodies , WarnLongFunctionBodies ) ; <nl> + TypeChecker & tc = * static_cast < TypeChecker * > ( ctx . getLazyResolver ( ) ) ; <nl> + if ( tc . DebugTimeFunctionBodies | | tc . WarnLongFunctionBodies ) <nl> + timer . emplace ( func , tc . DebugTimeFunctionBodies , tc . WarnLongFunctionBodies ) ; <nl> <nl> - requestRequiredNominalTypeLayoutForParameters ( AFD - > getParameters ( ) ) ; <nl> + tc . requestRequiredNominalTypeLayoutForParameters ( func - > getParameters ( ) ) ; <nl> <nl> - bool error = typeCheckAbstractFunctionBodyUntil ( AFD , SourceLoc ( ) ) ; <nl> - AFD - > setBodyTypeCheckedIfPresent ( ) ; <nl> + bool error = tc . typeCheckAbstractFunctionBodyUntil ( func , SourceLoc ( ) ) ; <nl> + func - > setBodyTypeCheckedIfPresent ( ) ; <nl> <nl> if ( error ) <nl> return true ; <nl> <nl> - if ( AFD - > getBody ( ) ) <nl> - performAbstractFuncDeclDiagnostics ( * this , AFD ) ; <nl> + if ( func - > getBody ( ) ) <nl> + performAbstractFuncDeclDiagnostics ( tc , func ) ; <nl> <nl> return false ; <nl> } <nl> mmm a / lib / Sema / TypeChecker . h <nl> ppp b / lib / Sema / TypeChecker . h <nl> class TypeChecker final : public LazyResolver { <nl> TypeChecker ( ASTContext & Ctx ) ; <nl> friend class ASTContext ; <nl> friend class constraints : : ConstraintSystem ; <nl> - <nl> + friend class TypeCheckFunctionBodyRequest ; <nl> + <nl> public : <nl> / / / Create a new type checker instance for the given ASTContext , if it <nl> / / / doesn ' t already have one . <nl>
[ Type checker ] Add a request for type checking a function body .
apple/swift
df5759cd31461210082adc8d6793414dfabbc14f
2019-07-11T05:01:31Z
mmm a / scripts / ci . baseline . txt <nl> ppp b / scripts / ci . baseline . txt <nl> moos - essential : arm64 - windows = fail <nl> moos - essential : x64 - windows = fail <nl> moos - essential : x86 - windows = fail <nl> moos - essential : x64 - linux = ignore <nl> - mosquitto : x64 - windows - static = fail <nl> mozjpeg : arm64 - windows = skip <nl> mozjpeg : arm - uwp = skip <nl> mozjpeg : x64 - linux = skip <nl>
Update ci . baseline . txt
microsoft/vcpkg
7828fa848f4d0ad8d3c26020068eb629fce9f27e
2020-04-01T02:44:39Z
mmm a / docs / SIL . rst <nl> ppp b / docs / SIL . rst <nl> alloc_ref <nl> ` ` ` ` ` ` ` ` ` <nl> : : <nl> <nl> - sil - instruction : : = ' alloc_ref ' ( ' [ ' ' objc ' ' ] ' ) ? sil - type <nl> + sil - instruction : : = ' alloc_ref ' ( ' [ ' ' objc ' ' ] ' ) ? ( ' [ ' ' stack ' ' ] ' ) ? sil - type <nl> <nl> - % 1 = alloc_ref $ T <nl> + % 1 = alloc_ref [ stack ] $ T <nl> / / $ T must be a reference type <nl> / / % 1 has type $ T <nl> <nl> Allocates an object of reference type ` ` T ` ` . The object will be initialized <nl> with retain count 1 ; its state will be otherwise uninitialized . The <nl> optional ` ` objc ` ` attribute indicates that the object should be <nl> allocated using Objective - C ' s allocation methods ( ` ` + allocWithZone : ` ` ) . <nl> + The optional ` ` stack ` ` attribute indicates that the object can be allocated <nl> + on the stack instead on the heap . In this case the instruction must have <nl> + balanced with a ` ` dealloc_ref [ stack ] ` ` instruction to mark the end of the <nl> + object ' s lifetime . <nl> + Note that the ` ` stack ` ` attribute only specifies that stack allocation is <nl> + possible . The final decision on stack allocation is done during llvm IR <nl> + generation . This is because the decision also depends on the object size , <nl> + which is not necessarily known at SIL level . <nl> <nl> alloc_ref_dynamic <nl> ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` <nl> dealloc_ref <nl> ` ` ` ` ` ` ` ` ` ` ` <nl> : : <nl> <nl> - sil - instruction : : = ' dealloc_ref ' sil - operand <nl> + sil - instruction : : = ' dealloc_ref ' ( ' [ ' ' stack ' ' ] ' ) ? sil - operand <nl> <nl> - dealloc_ref % 0 : $ T <nl> + dealloc_ref [ stack ] % 0 : $ T <nl> / / $ T must be a class type <nl> <nl> Deallocates an uninitialized class type instance , bypassing the reference <nl> This does not destroy stored properties of the instance . The contents <nl> of stored properties must be fully uninitialized at the time <nl> ` ` dealloc_ref ` ` is applied . <nl> <nl> + The ` ` stack ` ` attribute indicates that the instruction is the balanced <nl> + deallocation of its operand which must be a ` ` alloc_ref [ stack ] ` ` . <nl> + In this case the instruction marks the end of the object ' s lifetime but <nl> + has no other effect . <nl> + <nl> dealloc_partial_ref <nl> ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` <nl> : : <nl> mmm a / include / swift / SIL / SILBuilder . h <nl> ppp b / include / swift / SIL / SILBuilder . h <nl> class SILBuilder { <nl> return insert ( new ( F . getModule ( ) ) AllocStackInst ( Loc , elementType , F ) ) ; <nl> } <nl> <nl> - AllocRefInst * createAllocRef ( SILLocation Loc , SILType elementType , bool objc ) { <nl> + AllocRefInst * createAllocRef ( SILLocation Loc , SILType elementType , bool objc , <nl> + bool canAllocOnStack = false ) { <nl> / / AllocRefInsts expand to function calls and can therefore not be <nl> / / counted towards the function prologue . <nl> assert ( ! Loc . isInPrologue ( ) ) ; <nl> - return insert ( new ( F . getModule ( ) ) AllocRefInst ( Loc , elementType , F , objc ) ) ; <nl> + return insert ( new ( F . getModule ( ) ) AllocRefInst ( Loc , elementType , F , objc , <nl> + canAllocOnStack ) ) ; <nl> } <nl> <nl> AllocRefDynamicInst * createAllocRefDynamic ( SILLocation loc , SILValue operand , <nl> class SILBuilder { <nl> DeallocStackInst * createDeallocStack ( SILLocation loc , SILValue operand ) { <nl> return insert ( new ( F . getModule ( ) ) DeallocStackInst ( loc , operand ) ) ; <nl> } <nl> - DeallocRefInst * createDeallocRef ( SILLocation loc , SILValue operand ) { <nl> - return insert ( new ( F . getModule ( ) ) DeallocRefInst ( loc , operand ) ) ; <nl> + DeallocRefInst * createDeallocRef ( SILLocation loc , SILValue operand , <nl> + bool canBeOnStack = false ) { <nl> + return insert ( new ( F . getModule ( ) ) DeallocRefInst ( loc , operand , canBeOnStack ) ) ; <nl> } <nl> DeallocPartialRefInst * createDeallocPartialRef ( SILLocation loc , <nl> SILValue operand , <nl> mmm a / include / swift / SIL / SILInstruction . h <nl> ppp b / include / swift / SIL / SILInstruction . h <nl> class SILInstruction : public ValueBase , public llvm : : ilist_node < SILInstruction > { <nl> return getMemoryBehavior ( ) ! = MemoryBehavior : : None ; <nl> } <nl> <nl> + / / / Returns true if the result of this instruction is a pointer to stack <nl> + / / / allocated memory . In this case there must be an adjacent deallocating <nl> + / / / instruction . <nl> + bool isAllocatingStack ( ) const ; <nl> + <nl> + / / / Returns true if this is the deallocation of a stack allocating instruction . <nl> + / / / The first operand must be the allocating instruction . <nl> + bool isDeallocatingStack ( ) const ; <nl> + <nl> static bool classof ( const ValueBase * V ) { <nl> return V - > getKind ( ) > = ValueKind : : First_SILInstruction & & <nl> V - > getKind ( ) < = ValueKind : : Last_SILInstruction ; <nl> class AllocationInst : public SILInstruction { <nl> } <nl> } ; <nl> <nl> + / / / Base class for allocation / deallocation instructions where the allocation <nl> + / / / can be promoted to the stack . <nl> + / / / Note that IRGen can still decide to _not_ promote the allocation on the <nl> + / / / stack . <nl> + class StackPromotable { <nl> + <nl> + / / / If true , the allocation can be done on the stack ( the final decision is <nl> + / / / in IRGen ) . <nl> + bool OnStack = false ; <nl> + <nl> + public : <nl> + StackPromotable ( bool OnStack ) : OnStack ( OnStack ) { } <nl> + <nl> + bool canAllocOnStack ( ) const { return OnStack ; } <nl> + <nl> + void setStackAllocatable ( ) { OnStack = true ; } <nl> + } ; <nl> + <nl> / / / AllocStackInst - This represents the allocation of an unboxed ( i . e . , no <nl> / / / reference count ) stack memory . The memory is provided uninitialized . <nl> class AllocStackInst : public AllocationInst { <nl> class AllocStackInst : public AllocationInst { <nl> / / / AllocRefInst - This represents the primitive allocation of an instance <nl> / / / of a reference type . Aside from the reference count , the instance is <nl> / / / returned uninitialized . <nl> - class AllocRefInst : public AllocationInst { <nl> + class AllocRefInst : public AllocationInst , public StackPromotable { <nl> friend class SILBuilder ; <nl> bool ObjC ; <nl> <nl> - AllocRefInst ( SILLocation loc , SILType type , SILFunction & F , bool objc ) ; <nl> + AllocRefInst ( SILLocation loc , SILType type , SILFunction & F , bool objc , <nl> + bool canBeOnStack ) ; <nl> public : <nl> <nl> SILType getType ( unsigned i = 0 ) const { return ValueBase : : getType ( i ) ; } <nl> class DeallocStackInst : <nl> / / / most derived type of the allocated instance . <nl> class DeallocRefInst : <nl> public UnaryInstructionBase < ValueKind : : DeallocRefInst , DeallocationInst , <nl> - / * HAS_RESULT * / false > { <nl> + / * HAS_RESULT * / false > , <nl> + public StackPromotable { <nl> friend class SILBuilder ; <nl> <nl> private : <nl> - DeallocRefInst ( SILLocation Loc , SILValue Operand ) <nl> - : UnaryInstructionBase ( Loc , Operand ) { } <nl> + DeallocRefInst ( SILLocation Loc , SILValue Operand , bool canBeOnStack = false ) <nl> + : UnaryInstructionBase ( Loc , Operand ) , StackPromotable ( canBeOnStack ) { } <nl> } ; <nl> <nl> / / / Deallocate memory for a reference type instance from a failure path of a <nl> mmm a / include / swift / Serialization / ModuleFormat . h <nl> ppp b / include / swift / Serialization / ModuleFormat . h <nl> const uint16_t VERSION_MAJOR = 0 ; <nl> / / / To ensure that two separate changes don ' t silently get merged into one <nl> / / / in source control , you should also update the comment to briefly <nl> / / / describe what change you made . <nl> - const uint16_t VERSION_MINOR = 220 ; / / Last change : remove dealloc_ref ' s kind attribute <nl> + const uint16_t VERSION_MINOR = 221 ; / / Last change : add stack allocation attributes <nl> <nl> using DeclID = Fixnum < 31 > ; <nl> using DeclIDField = BCFixed < 31 > ; <nl> mmm a / lib / Parse / ParseSIL . cpp <nl> ppp b / lib / Parse / ParseSIL . cpp <nl> static SILLinkage resolveSILLinkage ( Optional < SILLinkage > linkage , <nl> } <nl> } <nl> <nl> - / / / Parse an option attribute ( ' [ ' Expected ' ] ' ) ? <nl> - static bool parseSILOptional ( bool & Result , SILParser & SP , StringRef Expected ) { <nl> + static bool parseSILOptional ( StringRef & Result , SILParser & SP ) { <nl> if ( SP . P . consumeIf ( tok : : l_square ) ) { <nl> Identifier Id ; <nl> SP . parseSILIdentifier ( Id , diag : : expected_in_attribute_list ) ; <nl> - if ( Id . str ( ) ! = Expected ) <nl> - return true ; <nl> SP . P . parseToken ( tok : : r_square , diag : : expected_in_attribute_list ) ; <nl> + Result = Id . str ( ) ; <nl> + return true ; <nl> + } <nl> + return false ; <nl> + } <nl> + <nl> + / / / Parse an option attribute ( ' [ ' Expected ' ] ' ) ? <nl> + static bool parseSILOptional ( bool & Result , SILParser & SP , StringRef Expected ) { <nl> + StringRef Optional ; <nl> + if ( parseSILOptional ( Optional , SP ) ) { <nl> + if ( Optional ! = Expected ) <nl> + return true ; <nl> Result = true ; <nl> } <nl> return false ; <nl> bool SILParser : : parseSILInstruction ( SILBasicBlock * BB ) { <nl> case ValueKind : : AllocRefInst : <nl> case ValueKind : : MetatypeInst : { <nl> bool IsObjC = false ; <nl> - if ( Opcode = = ValueKind : : AllocRefInst & & <nl> - parseSILOptional ( IsObjC , * this , " objc " ) ) <nl> - return true ; <nl> + bool OnStack = false ; <nl> + StringRef Optional ; <nl> + while ( parseSILOptional ( Optional , * this ) ) { <nl> + if ( Optional = = " objc " ) { <nl> + IsObjC = true ; <nl> + } else if ( Optional = = " stack " ) { <nl> + OnStack = true ; <nl> + } else { <nl> + return true ; <nl> + } <nl> + } <nl> <nl> SILType Ty ; <nl> if ( parseSILType ( Ty ) ) <nl> bool SILParser : : parseSILInstruction ( SILBasicBlock * BB ) { <nl> if ( Opcode = = ValueKind : : AllocStackInst ) <nl> ResultVal = B . createAllocStack ( InstLoc , Ty ) ; <nl> else if ( Opcode = = ValueKind : : AllocRefInst ) <nl> - ResultVal = B . createAllocRef ( InstLoc , Ty , IsObjC ) ; <nl> + ResultVal = B . createAllocRef ( InstLoc , Ty , IsObjC , OnStack ) ; <nl> else { <nl> assert ( Opcode = = ValueKind : : MetatypeInst ) ; <nl> ResultVal = B . createMetatype ( InstLoc , Ty ) ; <nl> bool SILParser : : parseSILInstruction ( SILBasicBlock * BB ) { <nl> ResultVal = B . createDeallocStack ( InstLoc , Val ) ; <nl> break ; <nl> case ValueKind : : DeallocRefInst : { <nl> + bool OnStack = false ; <nl> + if ( parseSILOptional ( OnStack , * this , " stack " ) ) <nl> + return true ; <nl> + <nl> if ( parseTypedValueRef ( Val ) ) <nl> return true ; <nl> - ResultVal = B . createDeallocRef ( InstLoc , Val ) ; <nl> + ResultVal = B . createDeallocRef ( InstLoc , Val , OnStack ) ; <nl> break ; <nl> } <nl> case ValueKind : : DeallocPartialRefInst : { <nl> mmm a / lib / SIL / SILInstruction . cpp <nl> ppp b / lib / SIL / SILInstruction . cpp <nl> namespace { <nl> } ; <nl> } <nl> <nl> + bool SILInstruction : : isAllocatingStack ( ) const { <nl> + if ( isa < AllocStackInst > ( this ) ) <nl> + return true ; <nl> + <nl> + if ( auto * ARI = dyn_cast < AllocRefInst > ( this ) ) { <nl> + if ( ARI - > canAllocOnStack ( ) ) <nl> + return true ; <nl> + } <nl> + return false ; <nl> + } <nl> + <nl> + bool SILInstruction : : isDeallocatingStack ( ) const { <nl> + if ( isa < DeallocStackInst > ( this ) ) <nl> + return true ; <nl> + <nl> + if ( auto * DRI = dyn_cast < DeallocRefInst > ( this ) ) { <nl> + if ( DRI - > canAllocOnStack ( ) ) <nl> + return true ; <nl> + } <nl> + return false ; <nl> + } <nl> + <nl> + <nl> / / / Create a new copy of this instruction , which retains all of the operands <nl> / / / and other information of this one . If an insertion point is specified , <nl> / / / then the new instruction is inserted before the specified point , otherwise <nl> mmm a / lib / SIL / SILInstructions . cpp <nl> ppp b / lib / SIL / SILInstructions . cpp <nl> VarDecl * AllocStackInst : : getDecl ( ) const { <nl> } <nl> <nl> AllocRefInst : : AllocRefInst ( SILLocation loc , SILType elementType , SILFunction & F , <nl> - bool objc ) <nl> - : AllocationInst ( ValueKind : : AllocRefInst , loc , elementType ) , ObjC ( objc ) { <nl> + bool objc , bool canBeOnStack ) <nl> + : AllocationInst ( ValueKind : : AllocRefInst , loc , elementType ) , <nl> + StackPromotable ( canBeOnStack ) , ObjC ( objc ) { <nl> } <nl> <nl> <nl> mmm a / lib / SIL / SILPrinter . cpp <nl> ppp b / lib / SIL / SILPrinter . cpp <nl> class SILPrinter : public SILVisitor < SILPrinter > { <nl> * this < < " alloc_ref " ; <nl> if ( ARI - > isObjC ( ) ) <nl> * this < < " [ objc ] " ; <nl> + if ( ARI - > canAllocOnStack ( ) ) <nl> + * this < < " [ stack ] " ; <nl> * this < < ARI - > getType ( ) ; <nl> } <nl> <nl> class SILPrinter : public SILVisitor < SILPrinter > { <nl> * this < < " dealloc_stack " < < getIDAndType ( DI - > getOperand ( ) ) ; <nl> } <nl> void visitDeallocRefInst ( DeallocRefInst * DI ) { <nl> - * this < < " dealloc_ref " < < getIDAndType ( DI - > getOperand ( ) ) ; <nl> + * this < < " dealloc_ref " ; <nl> + if ( DI - > canAllocOnStack ( ) ) <nl> + * this < < " [ stack ] " ; <nl> + * this < < getIDAndType ( DI - > getOperand ( ) ) ; <nl> } <nl> void visitDeallocPartialRefInst ( DeallocPartialRefInst * DPI ) { <nl> * this < < " dealloc_partial_ref " ; <nl> mmm a / lib / SIL / Verifier . cpp <nl> ppp b / lib / SIL / Verifier . cpp <nl> class SILVerifier : public SILVerifierBase < SILVerifier > { <nl> } <nl> <nl> void verifyStackHeight ( SILFunction * F ) { <nl> - llvm : : DenseMap < SILBasicBlock * , std : : vector < AllocStackInst * > > visitedBBs ; <nl> + llvm : : DenseMap < SILBasicBlock * , std : : vector < SILInstruction * > > visitedBBs ; <nl> SmallVector < SILBasicBlock * , 16 > Worklist ; <nl> visitedBBs [ F - > begin ( ) ] = { } ; <nl> Worklist . push_back ( F - > begin ( ) ) ; <nl> while ( ! Worklist . empty ( ) ) { <nl> SILBasicBlock * BB = Worklist . pop_back_val ( ) ; <nl> - std : : vector < AllocStackInst * > stack = visitedBBs [ BB ] ; <nl> + std : : vector < SILInstruction * > stack = visitedBBs [ BB ] ; <nl> for ( SILInstruction & i : * BB ) { <nl> CurInstruction = & i ; <nl> <nl> - if ( auto alloc = dyn_cast < AllocStackInst > ( & i ) ) { <nl> - stack . push_back ( alloc ) ; <nl> + if ( i . isAllocatingStack ( ) ) { <nl> + stack . push_back ( & i ) ; <nl> } <nl> - if ( auto dealloc = dyn_cast < DeallocStackInst > ( & i ) ) { <nl> - SILValue op = dealloc - > getOperand ( ) ; <nl> + if ( i . isDeallocatingStack ( ) ) { <nl> + SILValue op = i . getOperand ( 0 ) ; <nl> require ( op . getResultNumber ( ) = = 0 , <nl> - " dealloc_stack operand is not local storage of alloc_inst " ) ; <nl> + " stack dealloc operand is not local storage of stack alloc " ) ; <nl> require ( ! stack . empty ( ) , <nl> - " dealloc_stack with empty stack " ) ; <nl> + " stack dealloc with empty stack " ) ; <nl> require ( op . getDef ( ) = = stack . back ( ) , <nl> - " dealloc_stack does not match most recent alloc_stack " ) ; <nl> + " stack dealloc does not match most recent stack alloc " ) ; <nl> stack . pop_back ( ) ; <nl> } <nl> if ( isa < ReturnInst > ( & i ) | | isa < AutoreleaseReturnInst > ( & i ) | | <nl> isa < ThrowInst > ( & i ) ) { <nl> require ( stack . empty ( ) , <nl> - " return with alloc_stacks that haven ' t been deallocated " ) ; <nl> + " return with stack allocs that haven ' t been deallocated " ) ; <nl> } <nl> if ( auto term = dyn_cast < TermInst > ( & i ) ) { <nl> for ( auto & successor : term - > getSuccessors ( ) ) { <nl> mmm a / lib / Serialization / DeserializeSIL . cpp <nl> ppp b / lib / Serialization / DeserializeSIL . cpp <nl> bool SILDeserializer : : readSILInstruction ( SILFunction * Fn , SILBasicBlock * BB , <nl> } <nl> break ; <nl> } <nl> - case ValueKind : : AllocRefInst : <nl> + case ValueKind : : AllocRefInst : { <nl> assert ( RecordKind = = SIL_ONE_TYPE_VALUES & & <nl> " Layout should be OneTypeValues . " ) ; <nl> assert ( ListOfValues . size ( ) > = 1 & & " Not enough values " ) ; <nl> + unsigned Value = ListOfValues [ 0 ] ; <nl> ResultVal = Builder . createAllocRef ( <nl> Loc , <nl> getSILType ( MF - > getType ( TyID ) , ( SILValueCategory ) TyCategory ) , <nl> - ListOfValues [ 0 ] ) ; <nl> + ( bool ) ( Value & 1 ) , ( bool ) ( ( Value > > 1 ) & 1 ) ) ; <nl> break ; <nl> + } <nl> case ValueKind : : AllocRefDynamicInst : { <nl> assert ( RecordKind = = SIL_ONE_TYPE_ONE_OPERAND & & <nl> " Layout should be OneTypeOneOperand . " ) ; <nl> bool SILDeserializer : : readSILInstruction ( SILFunction * Fn , SILBasicBlock * BB , <nl> } <nl> case ValueKind : : DeallocRefInst : { <nl> auto Ty = MF - > getType ( TyID ) ; <nl> + bool OnStack = ( bool ) Attr ; <nl> ResultVal = Builder . createDeallocRef ( Loc , <nl> getLocalValue ( ValID , ValResNum , <nl> - getSILType ( Ty , ( SILValueCategory ) TyCategory ) ) ) ; <nl> + getSILType ( Ty , ( SILValueCategory ) TyCategory ) ) , OnStack ) ; <nl> break ; <nl> } <nl> case ValueKind : : DeallocPartialRefInst : { <nl> mmm a / lib / Serialization / SerializeSIL . cpp <nl> ppp b / lib / Serialization / SerializeSIL . cpp <nl> void SILSerializer : : writeSILInstruction ( const SILInstruction & SI ) { <nl> case ValueKind : : AllocRefInst : { <nl> const AllocRefInst * ARI = cast < AllocRefInst > ( & SI ) ; <nl> unsigned abbrCode = SILAbbrCodes [ SILOneTypeValuesLayout : : Code ] ; <nl> - ValueID Args [ 1 ] = { ARI - > isObjC ( ) } ; <nl> + ValueID Args [ 1 ] = { ( unsigned ) ARI - > isObjC ( ) | <nl> + ( ( unsigned ) ARI - > canAllocOnStack ( ) < < 1 ) } ; <nl> SILOneTypeValuesLayout : : emitRecord ( Out , ScratchRecord , abbrCode , <nl> ( unsigned ) SI . getKind ( ) , <nl> S . addTypeRef ( <nl> void SILSerializer : : writeSILInstruction ( const SILInstruction & SI ) { <nl> Attr = LWI - > isTake ( ) ; <nl> else if ( auto * MUI = dyn_cast < MarkUninitializedInst > ( & SI ) ) <nl> Attr = ( unsigned ) MUI - > getKind ( ) ; <nl> + else if ( auto * DRI = dyn_cast < DeallocRefInst > ( & SI ) ) <nl> + Attr = ( unsigned ) DRI - > canAllocOnStack ( ) ; <nl> writeOneOperandLayout ( SI . getKind ( ) , Attr , SI . getOperand ( 0 ) ) ; <nl> break ; <nl> } <nl> mmm a / test / SILPasses / verifier_reject . sil <nl> ppp b / test / SILPasses / verifier_reject . sil <nl> <nl> <nl> import Builtin <nl> <nl> - / / CHECK : SIL verification failed : return with alloc_stacks that haven ' t been deallocated : stack . empty ( ) <nl> + / / CHECK : SIL verification failed : return with stack allocs that haven ' t been deallocated : stack . empty ( ) <nl> <nl> sil @ fail1 : $ @ convention ( thin ) ( Builtin . Int1 ) - > ( ) { <nl> bb0 ( % 0 : $ Builtin . Int1 ) : <nl>
SIL : Add stack attributes to alloc_ref and dealloc_ref .
apple/swift
ee988e21cb3c61069eb7bf3e9a965fa3cdc6603e
2015-10-27T15:29:20Z
mmm a / Marlin / Marlin_main . cpp <nl> ppp b / Marlin / Marlin_main . cpp <nl> inline void gcode_G28 ( ) { <nl> do_blocking_move_to ( MANUAL_X_HOME_POS , MANUAL_Y_HOME_POS , Z_RAISE_AFTER_PROBING ) ; <nl> st_synchronize ( ) ; <nl> <nl> + # ifndef DELTA <nl> if ( verbose_level > 0 ) <nl> plan_bed_level_matrix . debug ( " \ n \ nBed Level Correction Matrix : " ) ; <nl> <nl> - # ifndef DELTA <nl> / / Correct the Z height difference from z - probe position and hotend tip position . <nl> / / The Z height on homing is measured by Z - Probe , but the probe is quite far from the hotend . <nl> / / When the bed is uneven , this height must be corrected . <nl>
Fix debug message
MarlinFirmware/Marlin
0d593ab7c1d9f9d22008f9f27b640069aeb5c4b6
2015-03-08T07:41:31Z
mmm a / src / Makefile . test . include <nl> ppp b / src / Makefile . test . include <nl> bitcoin_test_clean : FORCE <nl> rm - f $ ( CLEAN_BITCOIN_TEST ) $ ( test_test_bitcoin_OBJECTS ) $ ( TEST_BINARY ) <nl> <nl> check - local : $ ( BITCOIN_TESTS : . cpp = . cpp . test ) <nl> + if BUILD_BITCOIN_TX <nl> @ echo " Running test / util / bitcoin - util - test . py . . . " <nl> $ ( PYTHON ) $ ( top_builddir ) / test / util / bitcoin - util - test . py <nl> + endif <nl> @ echo " Running test / util / rpcauth - test . py . . . " <nl> $ ( PYTHON ) $ ( top_builddir ) / test / util / rpcauth - test . py <nl> $ ( AM_V_at ) $ ( MAKE ) $ ( AM_MAKEFLAGS ) - C secp256k1 check <nl>
Bugfix : Only run bitcoin - tx tests when bitcoin - tx is enabled
bitcoin/bitcoin
a2a04a5abb347d52b3ef473f7c80c3c0ffc67a2f
2018-09-13T11:48:25Z
mmm a / configure . ac <nl> ppp b / configure . ac <nl> AC_CHECK_FUNCS ( [ gettimeofday setrlimit inet_ntoa iswprint memchr memset nl_langi <nl> <nl> AC_SEARCH_LIBS ( [ clock_gettime ] , [ rt ] , [ AC_DEFINE ( [ HAVE_CLOCK_GETTIME ] , [ 1 ] , [ Define if clock_gettime is available . ] ) ] ) <nl> <nl> - AS_IF ( [ test x " $ __CYGWIN__ " ! = x & & test x " $ TINFO_CPPFLAGS " = x ] , <nl> - [ AC_SUBST ( [ CPPFLAGS ] , [ " $ CPPFLAGS - I / usr / include / ncurses " ] ) ] ) <nl> - <nl> PKG_CHECK_MODULES ( [ TINFO ] , [ tinfo ] , , <nl> [ PKG_CHECK_MODULES ( [ TINFO ] , [ ncurses ] , , <nl> [ AX_CHECK_LIBRARY ( [ TINFO ] , [ curses . h ] , [ tinfo ] , <nl> PKG_CHECK_MODULES ( [ TINFO ] , [ tinfo ] , , <nl> [ AX_CHECK_LIBRARY ( [ NCURSES ] , [ curses . h ] , [ ncurses ] , <nl> [ AC_SUBST ( [ TINFO_CFLAGS ] , [ " $ TINFO_CPPFLAGS " ] ) <nl> AC_SUBST ( [ TINFO_LIBS ] , [ " $ TINFO_LDFLAGS - lncurses " ] ) ] , <nl> - [ AC_MSG_ERROR ( [ Unable to find libtinfo or libncurses ] ) ] ) ] ) ] ) ] ) <nl> + [ AC_SUBST ( [ CPPFLAGS ] , [ " $ CPPFLAGS - I / usr / include / ncurses " ] ) <nl> + AX_CHECK_LIBRARY ( [ CYGWINNCURSES ] , [ term . h ] , [ ncurses ] , <nl> + [ AC_SUBST ( [ TINFO_CFLAGS ] , [ " $ TINFO_CPPFLAGS - I / usr / include / ncurses " ] ) <nl> + AC_SUBST ( [ TINFO_LIBS ] , [ " $ TINFO_LDFLAGS - lncurses " ] ) ] , <nl> + [ AC_MSG_ERROR ( [ Unable to find libtinfo or libncurses . ] ) ] ) ] ) ] ) ] ) ] ) <nl> <nl> AC_CHECK_DECL ( [ forkpty ] , <nl> [ AC_DEFINE ( [ FORKPTY_IN_LIBUTIL ] , [ 1 ] , <nl>
Rewrite Cygwin test again
mobile-shell/mosh
3ccfe64bfbe5c150999a9336680c5c75a2fa8238
2012-04-24T22:04:01Z
mmm a / lib / Immediate / Immediate . cpp <nl> ppp b / lib / Immediate / Immediate . cpp <nl> int swift : : RunImmediately ( CompilerInstance & CI , const ProcessCmdLine & CmdLine , <nl> using ArgOverride = void ( * ) ( const char * * , int ) ; <nl> # if defined ( _WIN32 ) <nl> auto module = static_cast < HMODULE > ( stdlib ) ; <nl> - auto emplaceProcessArgs = static_cast < ArgOverride > ( <nl> + auto emplaceProcessArgs = reinterpret_cast < ArgOverride > ( <nl> GetProcAddress ( module , " _swift_stdlib_overrideUnsafeArgvArgc " ) ) ; <nl> if ( emplaceProcessArgs = = nullptr ) <nl> return - 1 ; <nl>
Fix clang - cl error compiling Immediate . cpp on Windows
apple/swift
d80a2220bd0c8d7615d326aaec33c9cb256af558
2016-12-08T13:17:22Z
mmm a / xbmc / interfaces / json - rpc / FileItemHandler . cpp <nl> ppp b / xbmc / interfaces / json - rpc / FileItemHandler . cpp <nl> void CFileItemHandler : : FillDetails ( ISerializable * info , CFileItemPtr item , const <nl> { <nl> CStdString fanart ; <nl> if ( item - > HasProperty ( " fanart_image " ) ) <nl> - fanart = item - > GetProperty ( " fanart_image " ) . asString ( ) ; <nl> + fanart = CTextureCache : : Get ( ) . CheckAndCacheImage ( item - > GetProperty ( " fanart_image " ) . asString ( ) ) ; <nl> if ( fanart . empty ( ) ) <nl> fanart = item - > GetCachedFanart ( ) ; <nl> if ( ! fanart . empty ( ) ) <nl> mmm a / xbmc / video / VideoInfoTag . cpp <nl> ppp b / xbmc / video / VideoInfoTag . cpp <nl> <nl> # include " utils / StringUtils . h " <nl> # include " utils / Variant . h " <nl> # include " utils / CharsetConverter . h " <nl> + # include " TextureCache . h " <nl> # include " filesystem / File . h " <nl> <nl> # include < sstream > <nl> void CVideoInfoTag : : Serialize ( CVariant & value ) <nl> CVariant actor ; <nl> actor [ " name " ] = m_cast [ i ] . strName ; <nl> actor [ " role " ] = m_cast [ i ] . strRole ; <nl> - if ( ! m_cast [ i ] . thumb . IsEmpty ( ) ) <nl> - actor [ " thumbnail " ] = m_cast [ i ] . thumb ; <nl> + if ( ! m_cast [ i ] . thumb . IsEmpty ( ) ) / / TODO : json - rpc should use real URLs just like everywhere else <nl> + actor [ " thumbnail " ] = CTextureCache : : Get ( ) . CheckAndCacheImage ( m_cast [ i ] . thumb ) ; <nl> value [ " cast " ] . push_back ( actor ) ; <nl> } <nl> value [ " set " ] = m_set ; <nl>
use the cached version of textures for JSON - RPC
xbmc/xbmc
2683aefb5d7a3752b192b1f2e9fcfeeab009ae2a
2012-05-08T06:38:21Z
mmm a / src / wasm / wasm - interpreter . cc <nl> ppp b / src / wasm / wasm - interpreter . cc <nl> class ThreadImpl { <nl> * len + = imm . length ; <nl> return true ; <nl> } <nl> + case kExprTableFill : { <nl> + TableIndexImmediate < Decoder : : kNoValidate > imm ( decoder , <nl> + code - > at ( pc + 1 ) ) ; <nl> + HandleScope handle_scope ( isolate_ ) ; <nl> + auto count = Pop ( ) . to < uint32_t > ( ) ; <nl> + auto value = Pop ( ) . to_anyref ( ) ; <nl> + auto start = Pop ( ) . to < uint32_t > ( ) ; <nl> + <nl> + auto table = handle ( <nl> + WasmTableObject : : cast ( instance_object_ - > tables ( ) . get ( imm . index ) ) , <nl> + isolate_ ) ; <nl> + uint32_t table_size = table - > current_length ( ) ; <nl> + if ( start > table_size ) { <nl> + DoTrap ( kTrapTableOutOfBounds , pc ) ; <nl> + return false ; <nl> + } <nl> + <nl> + / / Even when table . fill goes out - of - bounds , as many entries as possible <nl> + / / are put into the table . Only afterwards we trap . <nl> + uint32_t fill_count = std : : min ( count , table_size - start ) ; <nl> + WasmTableObject : : Fill ( isolate_ , table , start , value , fill_count ) ; <nl> + <nl> + if ( fill_count < count ) { <nl> + DoTrap ( kTrapTableOutOfBounds , pc ) ; <nl> + return false ; <nl> + } <nl> + * len + = imm . length ; <nl> + return true ; <nl> + } <nl> default : <nl> FATAL ( " Unknown or unimplemented opcode # % d : % s " , code - > start [ pc ] , <nl> OpcodeName ( code - > start [ pc ] ) ) ; <nl> new file mode 100644 <nl> index 00000000000 . . ed9c48b406e <nl> mmm / dev / null <nl> ppp b / test / mjsunit / wasm / table - fill - interpreter . js <nl> <nl> + / / Copyright 2019 the V8 project authors . All rights reserved . <nl> + / / Use of this source code is governed by a BSD - style license that can be <nl> + / / found in the LICENSE file . <nl> + <nl> + / / Flags : - - expose - wasm - - experimental - wasm - anyref <nl> + / / Flags : - - wasm - interpret - all <nl> + <nl> + / / This is just a wrapper for an existing reference types test case that runs <nl> + / / with the - - wasm - interpret - all flag added . If we ever decide to add a test <nl> + / / variant for this , then we can remove this file . <nl> + <nl> + load ( " test / mjsunit / wasm / table - fill . js " ) ; <nl>
[ wasm ] Support table . fill in the interpreter
v8/v8
1df62c8a572532653d7722777e12ed7900fd238f
2019-07-11T14:00:09Z
mmm a / aten / src / THC / THCNumerics . cuh <nl> ppp b / aten / src / THC / THCNumerics . cuh <nl> struct THCNumerics < float > { <nl> static inline __host__ __device__ float sqrt ( float a ) { return sqrtf ( a ) ; } <nl> static inline __host__ __device__ float acos ( float a ) { return acosf ( a ) ; } <nl> static inline __host__ __device__ float cosh ( float a ) { return coshf ( a ) ; } <nl> - static inline __host__ __device__ float acosh ( float a ) { return acoshf ( a ) ; } <nl> - static inline __host__ __device__ float asinh ( float a ) { return asinhf ( a ) ; } <nl> static inline __host__ __device__ float tan ( float a ) { return tanf ( a ) ; } <nl> static inline __host__ __device__ float atan ( float a ) { return atanf ( a ) ; } <nl> static inline __host__ __device__ float tanh ( float a ) { return tanhf ( a ) ; } <nl> struct THCNumerics < double > { <nl> static inline __host__ __device__ double sqrt ( double a ) { return : : sqrt ( a ) ; } <nl> static inline __host__ __device__ double acos ( double a ) { return : : acos ( a ) ; } <nl> static inline __host__ __device__ double cosh ( double a ) { return : : cosh ( a ) ; } <nl> - static inline __host__ __device__ double acosh ( double a ) { return : : acosh ( a ) ; } <nl> - static inline __host__ __device__ double asinh ( double a ) { return : : asinh ( a ) ; } <nl> static inline __host__ __device__ double tan ( double a ) { return : : tan ( a ) ; } <nl> static inline __host__ __device__ double atan ( double a ) { return : : atan ( a ) ; } <nl> static inline __host__ __device__ double tanh ( double a ) { return : : tanh ( a ) ; } <nl>
Remove definitions of acosh and asinh from TH ( )
pytorch/pytorch
19ac5929e2b41f04261b010991e48f45cfd33d86
2019-11-04T19:56:25Z
mmm a / xbmc / FileSystem / FileShoutcast . cpp <nl> ppp b / xbmc / FileSystem / FileShoutcast . cpp <nl> extern " C " <nl> } <nl> # endif <nl> <nl> - const int SHOUTCASTTIMEOUT = 100 ; <nl> + const int SHOUTCASTTIMEOUT = 10 ; <nl> static CRingBuffer m_ringbuf ; <nl> <nl> static FileState m_fileState ; <nl>
reduced shoutcast timeout from 100s to 10s
xbmc/xbmc
a7702dd400822df479d86bbb13a124f57ce634fd
2009-12-17T18:54:25Z
mmm a / db / compaction . cc <nl> ppp b / db / compaction . cc <nl> <nl> <nl> # include " db / column_family . h " <nl> # include " util / logging . h " <nl> + # include " util / sync_point . h " <nl> <nl> namespace rocksdb { <nl> <nl> void Compaction : : GenerateFileLevels ( ) { <nl> } <nl> } <nl> <nl> + bool Compaction : : InputCompressionMatchesOutput ( ) const { <nl> + int base_level = input_version_ - > storage_info ( ) - > base_level ( ) ; <nl> + bool matches = ( GetCompressionType ( * cfd_ - > ioptions ( ) , start_level_ , <nl> + base_level ) = = output_compression_ ) ; <nl> + if ( matches ) { <nl> + TEST_SYNC_POINT ( " Compaction : : InputCompressionMatchesOutput : Matches " ) ; <nl> + return true ; <nl> + } <nl> + TEST_SYNC_POINT ( " Compaction : : InputCompressionMatchesOutput : DidntMatch " ) ; <nl> + return false ; <nl> + } <nl> + <nl> bool Compaction : : IsTrivialMove ( ) const { <nl> / / Avoid a move if there is lots of overlapping grandparent data . <nl> / / Otherwise , the move could create a parent file that will require <nl> / / a very expensive merge later on . <nl> / / If start_level_ = = output_level_ , the purpose is to force compaction <nl> / / filter to be applied to that level , and thus cannot be a trivia move . <nl> - return ( start_level_ ! = output_level_ & & <nl> - num_input_levels ( ) = = 2 & & <nl> - num_input_files ( 0 ) = = 1 & & <nl> - num_input_files ( 1 ) = = 0 & & <nl> + return ( start_level_ ! = output_level_ & & num_input_levels ( ) = = 2 & & <nl> + num_input_files ( 0 ) = = 1 & & num_input_files ( 1 ) = = 0 & & <nl> input ( 0 , 0 ) - > fd . GetPathId ( ) = = GetOutputPathId ( ) & & <nl> + InputCompressionMatchesOutput ( ) & & <nl> TotalFileSize ( grandparents_ ) < = max_grandparent_overlap_bytes_ ) ; <nl> } <nl> <nl> mmm a / db / compaction . h <nl> ppp b / db / compaction . h <nl> class Compaction { <nl> / / In case of compaction error , reset the nextIndex that is used <nl> / / to pick up the next file to be compacted from files_by_size_ <nl> void ResetNextCompactionIndex ( ) ; <nl> + <nl> + / / Does input compression match the output compression ? <nl> + bool InputCompressionMatchesOutput ( ) const ; <nl> } ; <nl> <nl> / / Utility function <nl> mmm a / db / compaction_picker . cc <nl> ppp b / db / compaction_picker . cc <nl> uint64_t TotalCompensatedFileSize ( const std : : vector < FileMetaData * > & files ) { <nl> return sum ; <nl> } <nl> <nl> + } / / anonymous namespace <nl> + <nl> / / Determine compression type , based on user options , level of the output <nl> / / file and whether compression is disabled . <nl> / / If enable_compression is false , then compression is always disabled no <nl> uint64_t TotalCompensatedFileSize ( const std : : vector < FileMetaData * > & files ) { <nl> / / Otherwise , the compression type is determined based on options and level . <nl> CompressionType GetCompressionType ( const ImmutableCFOptions & ioptions , <nl> int level , int base_level , <nl> - const bool enable_compression = true ) { <nl> + const bool enable_compression ) { <nl> if ( ! enable_compression ) { <nl> / / disable compression <nl> return kNoCompression ; <nl> CompressionType GetCompressionType ( const ImmutableCFOptions & ioptions , <nl> } <nl> } <nl> <nl> - <nl> - } / / anonymous namespace <nl> - <nl> CompactionPicker : : CompactionPicker ( const ImmutableCFOptions & ioptions , <nl> const InternalKeyComparator * icmp ) <nl> : ioptions_ ( ioptions ) , icmp_ ( icmp ) { } <nl> mmm a / db / compaction_picker . h <nl> ppp b / db / compaction_picker . h <nl> class NullCompactionPicker : public CompactionPicker { <nl> } ; <nl> # endif / / ! ROCKSDB_LITE <nl> <nl> + CompressionType GetCompressionType ( const ImmutableCFOptions & ioptions , <nl> + int level , int base_level , <nl> + const bool enable_compression = true ) ; <nl> + <nl> } / / namespace rocksdb <nl> mmm a / db / db_impl . cc <nl> ppp b / db / db_impl . cc <nl> Status DBImpl : : BackgroundCompaction ( bool * madeProgress , JobContext * job_context , <nl> c - > num_input_files ( 0 ) ) ; <nl> * madeProgress = true ; <nl> } else if ( ! is_manual & & c - > IsTrivialMove ( ) ) { <nl> + TEST_SYNC_POINT ( " DBImpl : : BackgroundCompaction : TrivialMove " ) ; <nl> / / Instrument for event update <nl> / / TODO ( yhchiang ) : add op details for showing trivial - move . <nl> ThreadStatusUtil : : SetColumnFamily ( c - > column_family_data ( ) ) ; <nl> Status DBImpl : : BackgroundCompaction ( bool * madeProgress , JobContext * job_context , <nl> / / Clear Instrument <nl> ThreadStatusUtil : : ResetThreadStatus ( ) ; <nl> } else { <nl> + TEST_SYNC_POINT ( " DBImpl : : BackgroundCompaction : NonTrivial " ) ; <nl> auto yield_callback = [ & ] ( ) { <nl> return CallFlushDuringCompaction ( c - > column_family_data ( ) , <nl> * c - > mutable_cf_options ( ) , job_context , <nl> mmm a / db / db_test . cc <nl> ppp b / db / db_test . cc <nl> TEST_F ( DBTest , EmptyCompactedDB ) { <nl> Close ( ) ; <nl> } <nl> <nl> + TEST_F ( DBTest , CompressLevelCompaction ) { <nl> + Options options = CurrentOptions ( ) ; <nl> + options . compaction_style = kCompactionStyleLevel ; <nl> + options . write_buffer_size = 100 < < 10 ; / / 100KB <nl> + options . level0_file_num_compaction_trigger = 2 ; <nl> + options . num_levels = 4 ; <nl> + options . max_bytes_for_level_base = 400 * 1024 ; <nl> + / / First two levels have no compression , so that a trivial move between <nl> + / / them will be allowed . Level 2 has Zlib compression so that a trivial <nl> + / / move to level 3 will not be allowed <nl> + options . compression_per_level = { kNoCompression , kNoCompression , <nl> + kZlibCompression } ; <nl> + int matches = 0 , didnt_match = 0 , trivial_move = 0 , non_trivial = 0 ; <nl> + <nl> + rocksdb : : SyncPoint : : GetInstance ( ) - > SetCallBack ( <nl> + " Compaction : : InputCompressionMatchesOutput : Matches " , <nl> + [ & ] ( ) { matches + + ; } ) ; <nl> + rocksdb : : SyncPoint : : GetInstance ( ) - > SetCallBack ( <nl> + " Compaction : : InputCompressionMatchesOutput : DidntMatch " , <nl> + [ & ] ( ) { didnt_match + + ; } ) ; <nl> + rocksdb : : SyncPoint : : GetInstance ( ) - > SetCallBack ( <nl> + " DBImpl : : BackgroundCompaction : NonTrivial " , [ & ] ( ) { non_trivial + + ; } ) ; <nl> + rocksdb : : SyncPoint : : GetInstance ( ) - > SetCallBack ( <nl> + " DBImpl : : BackgroundCompaction : TrivialMove " , [ & ] ( ) { trivial_move + + ; } ) ; <nl> + rocksdb : : SyncPoint : : GetInstance ( ) - > EnableProcessing ( ) ; <nl> + <nl> + Reopen ( options ) ; <nl> + <nl> + Random rnd ( 301 ) ; <nl> + int key_idx = 0 ; <nl> + <nl> + / / First three 110KB files are going to level 0 <nl> + / / After that , ( 100K , 200K ) <nl> + for ( int num = 0 ; num < 3 ; num + + ) { <nl> + GenerateNewFile ( & rnd , & key_idx ) ; <nl> + } <nl> + <nl> + / / Another 110KB triggers a compaction to 400K file to fill up level 0 <nl> + GenerateNewFile ( & rnd , & key_idx ) ; <nl> + ASSERT_EQ ( 4 , GetSstFileCount ( dbname_ ) ) ; <nl> + <nl> + / / ( 1 , 4 ) <nl> + GenerateNewFile ( & rnd , & key_idx ) ; <nl> + ASSERT_EQ ( " 1 , 4 " , FilesPerLevel ( 0 ) ) ; <nl> + <nl> + / / ( 1 , 4 , 1 ) <nl> + GenerateNewFile ( & rnd , & key_idx ) ; <nl> + ASSERT_EQ ( " 1 , 4 , 1 " , FilesPerLevel ( 0 ) ) ; <nl> + <nl> + / / ( 1 , 4 , 2 ) <nl> + GenerateNewFile ( & rnd , & key_idx ) ; <nl> + ASSERT_EQ ( " 1 , 4 , 2 " , FilesPerLevel ( 0 ) ) ; <nl> + <nl> + / / ( 1 , 4 , 3 ) <nl> + GenerateNewFile ( & rnd , & key_idx ) ; <nl> + ASSERT_EQ ( " 1 , 4 , 3 " , FilesPerLevel ( 0 ) ) ; <nl> + <nl> + / / ( 1 , 4 , 4 ) <nl> + GenerateNewFile ( & rnd , & key_idx ) ; <nl> + ASSERT_EQ ( " 1 , 4 , 4 " , FilesPerLevel ( 0 ) ) ; <nl> + <nl> + / / ( 1 , 4 , 5 ) <nl> + GenerateNewFile ( & rnd , & key_idx ) ; <nl> + ASSERT_EQ ( " 1 , 4 , 5 " , FilesPerLevel ( 0 ) ) ; <nl> + <nl> + / / ( 1 , 4 , 6 ) <nl> + GenerateNewFile ( & rnd , & key_idx ) ; <nl> + ASSERT_EQ ( " 1 , 4 , 6 " , FilesPerLevel ( 0 ) ) ; <nl> + <nl> + / / ( 1 , 4 , 7 ) <nl> + GenerateNewFile ( & rnd , & key_idx ) ; <nl> + ASSERT_EQ ( " 1 , 4 , 7 " , FilesPerLevel ( 0 ) ) ; <nl> + <nl> + / / ( 1 , 4 , 8 ) <nl> + GenerateNewFile ( & rnd , & key_idx ) ; <nl> + ASSERT_EQ ( " 1 , 4 , 8 " , FilesPerLevel ( 0 ) ) ; <nl> + <nl> + ASSERT_EQ ( matches , 12 ) ; <nl> + ASSERT_EQ ( didnt_match , 8 ) ; <nl> + ASSERT_EQ ( trivial_move , 12 ) ; <nl> + ASSERT_EQ ( non_trivial , 8 ) ; <nl> + <nl> + rocksdb : : SyncPoint : : GetInstance ( ) - > DisableProcessing ( ) ; <nl> + <nl> + for ( int i = 0 ; i < key_idx ; i + + ) { <nl> + auto v = Get ( Key ( i ) ) ; <nl> + ASSERT_NE ( v , " NOT_FOUND " ) ; <nl> + ASSERT_TRUE ( v . size ( ) = = 1 | | v . size ( ) = = 10000 ) ; <nl> + } <nl> + <nl> + Reopen ( options ) ; <nl> + <nl> + for ( int i = 0 ; i < key_idx ; i + + ) { <nl> + auto v = Get ( Key ( i ) ) ; <nl> + ASSERT_NE ( v , " NOT_FOUND " ) ; <nl> + ASSERT_TRUE ( v . size ( ) = = 1 | | v . size ( ) = = 10000 ) ; <nl> + } <nl> + <nl> + Destroy ( options ) ; <nl> + } <nl> + <nl> } / / namespace rocksdb <nl> <nl> int main ( int argc , char * * argv ) { <nl>
Disallow trivial move if compression level is different
facebook/rocksdb
afbafeaeaebfd27a0f3e992fee8e0c57d07658fa
2015-04-02T18:06:30Z
mmm a / lib / IRGen / IRGenSIL . cpp <nl> ppp b / lib / IRGen / IRGenSIL . cpp <nl> visitIsUniqueOrPinnedInst ( swift : : IsUniqueOrPinnedInst * i ) { <nl> <nl> void IRGenSILFunction : : visitIsEscapingClosureInst ( <nl> swift : : IsEscapingClosureInst * i ) { <nl> - assert ( i - > getOperand ( ) - > getType ( ) . is < SILFunctionType > ( ) & & <nl> - i - > getOperand ( ) <nl> - - > getType ( ) <nl> - . getAs < SILFunctionType > ( ) <nl> - - > getExtInfo ( ) <nl> - . hasContext ( ) & & <nl> - " Must have a closure operand " ) ; <nl> + / / The closure operand is allowed to be an optional closure . <nl> + auto operandType = i - > getOperand ( ) - > getType ( ) ; <nl> + if ( operandType . getOptionalObjectType ( ) ) <nl> + operandType = operandType . getOptionalObjectType ( ) ; <nl> + <nl> + auto fnType = operandType . getAs < SILFunctionType > ( ) ; <nl> + assert ( fnType - > getExtInfo ( ) . hasContext ( ) & & " Must have a closure operand " ) ; <nl> + <nl> + / / This code relies on that an optional < ( ) - > ( ) > ' s tag fits in the function <nl> + / / pointer . <nl> + auto & TI = cast < LoadableTypeInfo > ( getTypeInfo ( operandType ) ) ; <nl> + assert ( TI . mayHaveExtraInhabitants ( IGM ) & & <nl> + " Must have extra inhabitants to be able to handle the optional " <nl> + " closure case " ) ; <nl> <nl> Explosion closure = getLoweredExplosion ( i - > getOperand ( ) ) ; <nl> auto func = closure . claimNext ( ) ; <nl> ( void ) func ; <nl> auto context = closure . claimNext ( ) ; <nl> - <nl> + assert ( closure . empty ( ) ) ; <nl> + if ( context - > getType ( ) - > isIntegerTy ( ) ) <nl> + context = Builder . CreateIntToPtr ( context , IGM . RefCountedPtrTy ) ; <nl> auto result = emitIsEscapingClosureCall ( context , i - > getLoc ( ) . getSourceLoc ( ) ) ; <nl> Explosion out ; <nl> out . add ( result ) ; <nl> mmm a / lib / SIL / SILVerifier . cpp <nl> ppp b / lib / SIL / SILVerifier . cpp <nl> class SILVerifier : public SILVerifierBase < SILVerifier > { <nl> } <nl> <nl> void checkIsEscapingClosureInst ( IsEscapingClosureInst * IEC ) { <nl> - auto fnType = IEC - > getOperand ( ) - > getType ( ) . getAs < SILFunctionType > ( ) ; <nl> + / / The closure operand is allowed to be an optional closure . <nl> + auto operandType = IEC - > getOperand ( ) - > getType ( ) ; <nl> + if ( operandType . getOptionalObjectType ( ) ) <nl> + operandType = operandType . getOptionalObjectType ( ) ; <nl> + <nl> + auto fnType = operandType . getAs < SILFunctionType > ( ) ; <nl> require ( fnType & & fnType - > getExtInfo ( ) . hasContext ( ) & & <nl> ! fnType - > isNoEscape ( ) & & <nl> fnType - > getExtInfo ( ) . getRepresentation ( ) = = <nl>
SIL : Allow is_escaping_closure on optional closure types
apple/swift
16c4d650e72a4a671c6c74a3a2494d90ae45f4c7
2018-05-01T14:24:19Z
mmm a / include / swift / AST / TypeRepr . h <nl> ppp b / include / swift / AST / TypeRepr . h <nl> class SimpleIdentTypeRepr : public ComponentIdentTypeRepr { <nl> SimpleIdentTypeRepr ( SourceLoc Loc , Identifier Id ) <nl> : ComponentIdentTypeRepr ( TypeReprKind : : SimpleIdent , Loc , Id ) { } <nl> <nl> + / / SmallVector : : emplace_back will never need to call this because <nl> + / / we reserve the right size , but it does try statically . <nl> SimpleIdentTypeRepr ( const SimpleIdentTypeRepr & repr ) <nl> - : SimpleIdentTypeRepr ( repr . getLoc ( ) , repr . getIdentifier ( ) ) { } <nl> + : SimpleIdentTypeRepr ( repr . getLoc ( ) , repr . getIdentifier ( ) ) { <nl> + llvm_unreachable ( " should not be called dynamically " ) ; <nl> + } <nl> <nl> static bool classof ( const TypeRepr * T ) { <nl> return T - > getKind ( ) = = TypeReprKind : : SimpleIdent ; <nl> class FixedTypeRepr : public TypeRepr { <nl> FixedTypeRepr ( Type Ty , SourceLoc Loc ) <nl> : TypeRepr ( TypeReprKind : : Fixed ) , Ty ( Ty ) , Loc ( Loc ) { } <nl> <nl> - FixedTypeRepr ( const FixedTypeRepr & repr ) <nl> - : FixedTypeRepr ( repr . Ty , repr . Loc ) { } <nl> + / / SmallVector : : emplace_back will never need to call this because <nl> + / / we reserve the right size , but it does try statically . <nl> + FixedTypeRepr ( const FixedTypeRepr & repr ) : FixedTypeRepr ( repr . Ty , repr . Loc ) { <nl> + llvm_unreachable ( " should not be called dynamically " ) ; <nl> + } <nl> <nl> / / / Retrieve the location . <nl> SourceLoc getLoc ( ) const { return Loc ; } <nl>
Make use of copy constructors called statically but not dynamically an error
apple/swift
de570e1cdd8b906687722bdc438378ae6fc3dffa
2017-03-13T14:17:17Z
mmm a / data / pref . xml <nl> ppp b / data / pref . xml <nl> <nl> < option id = " data_recovery " type = " bool " default = " true " / > <nl> < option id = " data_recovery_period " type = " double " default = " 2 . 0 " / > <nl> < option id = " keep_edited_sprite_data " type = " bool " default = " true " / > <nl> - < option id = " keep_edited_sprite_data_lifespan " type = " int " default = " 7 " / > <nl> + < option id = " keep_edited_sprite_data_for " type = " int " default = " 7 " / > <nl> + < option id = " keep_closed_sprite_on_memory " type = " bool " default = " true " / > <nl> + < option id = " keep_closed_sprite_on_memory_for " type = " double " default = " 15 . 0 " / > <nl> < option id = " show_full_path " type = " bool " default = " true " / > <nl> < option id = " timeline_position " type = " TimelinePosition " default = " TimelinePosition : : BOTTOM " / > <nl> < option id = " timeline_layer_panel_width " type = " int " default = " 100 " / > <nl> mmm a / data / strings / en . ini <nl> ppp b / data / strings / en . ini <nl> Aseprite <nl> END <nl> restart_by_preferences_save_recovery_data_period = Automatically save recovery data every X minutes <nl> restart_by_preferences_keep_edited_sprite_data_lifespan = Keep edited sprite data for X days <nl> + restart_by_preferences_keep_closed_sprite_on_memory_for = Keep closed sprite on memory for X minutes <nl> restore_all_shortcuts = < < < END <nl> Warning <nl> < < Do you want to restore all keyboard shortcuts <nl> Check this option to get <nl> this old menus behavior . <nl> END <nl> color_bar_entries_separator = Draw a separation between each palette entry <nl> + recover_files = Recover Files <nl> auto_save_recovery_data = Automatically save recovery data every <nl> auto_save_recovery_data_tooltip = < < < END <nl> With this option you can recover your documents <nl> END <nl> 10_minutes = 10 Minutes <nl> 15_minutes = 15 Minutes <nl> 30_minutes = 30 Minutes <nl> + 1_hour = 1 Hour <nl> + 4_hours = 4 Hours <nl> + 8_hours = 8 Hours <nl> keep_edited_sprite_data = Keep edited sprite data for <nl> keep_edited_sprite_data_tooltip = < < < END <nl> With this option you can re - open edited documents <nl> show_full_path_tooltip = < < < END <nl> Uncheck this option if you would prefer to hide <nl> full path on UI ( e . g . useful for live streaming ) <nl> END <nl> + keep_closed_sprite_on_memory = Keep closed sprite on memory for <nl> + keep_closed_sprite_on_memory_tooltip = < < < END <nl> + When you close a sprite , it will be kept on memory just in case if you <nl> + have closed the sprite by mistake , so you can " undo " the close action <nl> + using " File > Reopen Closed File " menu option . <nl> + END <nl> default_extension_for = Default extension for : <nl> save_default_extension = File > Save : <nl> export_image_default_extension = File > Export ( one image ) : <nl> mmm a / data / widgets / options . xml <nl> ppp b / data / widgets / options . xml <nl> <nl> text = " @ . color_bar_entries_separator " <nl> tooltip = " @ . color_bar_entries_separator " <nl> pref = " color_bar . entries_separator " / > <nl> - < grid columns = " 2 " > <nl> - < check id = " enable_data_recovery " <nl> - text = " @ . auto_save_recovery_data " <nl> - tooltip = " @ . auto_save_recovery_data_tooltip " / > <nl> - < combobox id = " data_recovery_period " > <nl> - < listitem text = " @ . 10_seconds " value = " 0 . 1667 " / > <nl> - < listitem text = " @ . 30_seconds " value = " 0 . 5 " / > <nl> - < listitem text = " @ . 1_minute " value = " 1 " / > <nl> - < listitem text = " @ . 2_minutes " value = " 2 " / > <nl> - < listitem text = " @ . 5_minutes " value = " 5 " / > <nl> - < listitem text = " @ . 10_minutes " value = " 10 " / > <nl> - < listitem text = " @ . 15_minutes " value = " 15 " / > <nl> - < listitem text = " @ . 30_minutes " value = " 30 " / > <nl> - < / combobox > <nl> - < check id = " keep_edited_sprite_data " <nl> - text = " @ . keep_edited_sprite_data " <nl> - tooltip = " @ . keep_edited_sprite_data_tooltip " / > <nl> - < combobox id = " keep_edited_sprite_data_lifespan " > <nl> - < listitem text = " @ . 1_day " value = " 1 " / > <nl> - < listitem text = " @ . 2_days " value = " 2 " / > <nl> - < listitem text = " @ . 3_days " value = " 3 " / > <nl> - < listitem text = " @ . 1_week " value = " 7 " / > <nl> - < listitem text = " @ . 2_weeks " value = " 14 " / > <nl> - < listitem text = " @ . 1_month " value = " 30 " / > <nl> - < / combobox > <nl> - < / grid > <nl> + <nl> < separator horizontal = " true " / > <nl> < link id = " locate_file " text = " @ . locate_file " / > <nl> < link id = " locate_crash_folder " text = " @ . locate_crash_folder " / > <nl> <nl> < ! - - Files - - > <nl> < vbox id = " section_files " > <nl> < separator text = " @ . section_files " horizontal = " true " / > <nl> - <nl> < label text = " @ . default_extension_for " / > <nl> < grid columns = " 2 " > <nl> < label text = " @ . save_default_extension " / > <nl> <nl> text = " @ . show_full_path " <nl> tooltip = " @ . show_full_path_tooltip " / > <nl> < / grid > <nl> + <nl> + < separator text = " @ . recover_files " horizontal = " true " / > <nl> + < grid columns = " 2 " > <nl> + < check id = " enable_data_recovery " <nl> + text = " @ . auto_save_recovery_data " <nl> + tooltip = " @ . auto_save_recovery_data_tooltip " / > <nl> + < combobox id = " data_recovery_period " > <nl> + < listitem text = " @ . 10_seconds " value = " 0 . 1667 " / > <nl> + < listitem text = " @ . 30_seconds " value = " 0 . 5 " / > <nl> + < listitem text = " @ . 1_minute " value = " 1 " / > <nl> + < listitem text = " @ . 2_minutes " value = " 2 " / > <nl> + < listitem text = " @ . 5_minutes " value = " 5 " / > <nl> + < listitem text = " @ . 10_minutes " value = " 10 " / > <nl> + < listitem text = " @ . 15_minutes " value = " 15 " / > <nl> + < listitem text = " @ . 30_minutes " value = " 30 " / > <nl> + < / combobox > <nl> + < check id = " keep_edited_sprite_data " <nl> + text = " @ . keep_edited_sprite_data " <nl> + tooltip = " @ . keep_edited_sprite_data_tooltip " / > <nl> + < combobox id = " keep_edited_sprite_data_for " > <nl> + < listitem text = " @ . 1_day " value = " 1 " / > <nl> + < listitem text = " @ . 2_days " value = " 2 " / > <nl> + < listitem text = " @ . 3_days " value = " 3 " / > <nl> + < listitem text = " @ . 1_week " value = " 7 " / > <nl> + < listitem text = " @ . 2_weeks " value = " 14 " / > <nl> + < listitem text = " @ . 1_month " value = " 30 " / > <nl> + < / combobox > <nl> + < check id = " keep_closed_sprite_on_memory " <nl> + text = " @ . keep_closed_sprite_on_memory " <nl> + tooltip = " @ . keep_closed_sprite_on_memory_tooltip " / > <nl> + < combobox id = " keep_closed_sprite_on_memory_for " > <nl> + < listitem text = " @ . 10_seconds " value = " 0 . 1667 " / > <nl> + < listitem text = " @ . 30_seconds " value = " 0 . 5 " / > <nl> + < listitem text = " @ . 1_minute " value = " 1 " / > <nl> + < listitem text = " @ . 2_minutes " value = " 2 " / > <nl> + < listitem text = " @ . 5_minutes " value = " 5 " / > <nl> + < listitem text = " @ . 10_minutes " value = " 10 " / > <nl> + < listitem text = " @ . 15_minutes " value = " 15 " / > <nl> + < listitem text = " @ . 30_minutes " value = " 30 " / > <nl> + < listitem text = " @ . 1_hour " value = " 60 " / > <nl> + < listitem text = " @ . 4_hours " value = " 240 " / > <nl> + < listitem text = " @ . 8_hours " value = " 480 " / > <nl> + < / combobox > <nl> + < / grid > <nl> + <nl> < / vbox > <nl> <nl> < ! - - Color - - > <nl> mmm a / src / app / CMakeLists . txt <nl> ppp b / src / app / CMakeLists . txt <nl> if ( ENABLE_UI ) <nl> set ( ui_app_files <nl> app_brushes . cpp <nl> app_menus . cpp <nl> + closed_docs . cpp <nl> commands / cmd_about . cpp <nl> commands / cmd_add_color . cpp <nl> commands / cmd_advanced_mode . cpp <nl> mmm a / src / app / app . cpp <nl> ppp b / src / app / app . cpp <nl> void App : : run ( ) <nl> / / Destroy all documents from the UIContext . <nl> std : : vector < Doc * > docs ; <nl> # ifdef ENABLE_UI <nl> - for ( Doc * doc : m_modules - > m_context . closedDocs ( ) ) <nl> + for ( Doc * doc : m_modules - > m_context . getAndRemoveAllClosedDocs ( ) ) <nl> docs . push_back ( doc ) ; <nl> # endif <nl> for ( Doc * doc : m_modules - > m_context . documents ( ) ) <nl> new file mode 100644 <nl> index 000000000 . . 6620da301 <nl> mmm / dev / null <nl> ppp b / src / app / closed_docs . cpp <nl> <nl> + / / Aseprite <nl> + / / Copyright ( C ) 2019 Igara Studio S . A . <nl> + / / <nl> + / / This program is distributed under the terms of <nl> + / / the End - User License Agreement for Aseprite . <nl> + <nl> + # ifdef HAVE_CONFIG_H <nl> + # include " config . h " <nl> + # endif <nl> + <nl> + # include " app / closed_docs . h " <nl> + # include " app / doc . h " <nl> + # include " app / pref / preferences . h " <nl> + <nl> + # include < algorithm > <nl> + # include < limits > <nl> + <nl> + # define CLOSEDOC_TRACE ( . . . ) <nl> + <nl> + namespace app { <nl> + <nl> + ClosedDocs : : ClosedDocs ( ) <nl> + : m_done ( false ) <nl> + { <nl> + CLOSEDOC_TRACE ( " CLOSEDOC : Init " ) ; <nl> + <nl> + const auto & pref = Preferences : : instance ( ) ; <nl> + if ( pref . general . dataRecovery ( ) ) <nl> + m_dataRecoveryPeriodMSecs = int ( 1000 . 0 * 60 . 0 * pref . general . dataRecoveryPeriod ( ) ) ; <nl> + else <nl> + m_dataRecoveryPeriodMSecs = 0 ; <nl> + <nl> + if ( pref . general . keepClosedSpriteOnMemory ( ) ) <nl> + m_keepClosedDocAliveForMSecs = int ( 1000 . 0 * 60 . 0 * pref . general . keepClosedSpriteOnMemoryFor ( ) ) ; <nl> + else <nl> + m_keepClosedDocAliveForMSecs = 0 ; <nl> + } <nl> + <nl> + ClosedDocs : : ~ ClosedDocs ( ) <nl> + { <nl> + CLOSEDOC_TRACE ( " CLOSEDOC : Exit " ) ; <nl> + <nl> + if ( m_thread . joinable ( ) ) { <nl> + CLOSEDOC_TRACE ( " CLOSEDOC : Join thread " ) ; <nl> + <nl> + m_done = true ; <nl> + m_cv . notify_one ( ) ; <nl> + m_thread . join ( ) ; <nl> + <nl> + CLOSEDOC_TRACE ( " CLOSEDOC : Join done " ) ; <nl> + } <nl> + <nl> + ASSERT ( m_docs . empty ( ) ) ; <nl> + } <nl> + <nl> + bool ClosedDocs : : hasClosedDocs ( ) <nl> + { <nl> + bool result ; <nl> + { <nl> + std : : unique_lock < std : : mutex > lock ( m_mutex ) ; <nl> + result = ! m_docs . empty ( ) ; <nl> + } <nl> + CLOSEDOC_TRACE ( " CLOSEDOC : Has closed docs ? " , <nl> + ( result ? " true " : " false " ) ) ; <nl> + return result ; <nl> + } <nl> + <nl> + void ClosedDocs : : addClosedDoc ( Doc * doc ) <nl> + { <nl> + CLOSEDOC_TRACE ( " CLOSEDOC : Add closed doc " , doc ) ; <nl> + <nl> + ASSERT ( doc ! = nullptr ) ; <nl> + ASSERT ( doc - > context ( ) = = nullptr ) ; <nl> + <nl> + ClosedDoc closedDoc = { doc , base : : current_tick ( ) } ; <nl> + <nl> + std : : unique_lock < std : : mutex > lock ( m_mutex ) ; <nl> + m_docs . insert ( m_docs . begin ( ) , std : : move ( closedDoc ) ) ; <nl> + <nl> + if ( ! m_thread . joinable ( ) ) <nl> + m_thread = std : : thread ( [ this ] { backgroundThread ( ) ; } ) ; <nl> + else <nl> + m_cv . notify_one ( ) ; <nl> + } <nl> + <nl> + Doc * ClosedDocs : : reopenLastClosedDoc ( ) <nl> + { <nl> + Doc * doc = nullptr ; <nl> + { <nl> + std : : unique_lock < std : : mutex > lock ( m_mutex ) ; <nl> + if ( ! m_docs . empty ( ) ) { <nl> + doc = m_docs . front ( ) . doc ; <nl> + m_docs . erase ( m_docs . begin ( ) ) ; <nl> + } <nl> + CLOSEDOC_TRACE ( " - > " , doc ) ; <nl> + } <nl> + CLOSEDOC_TRACE ( " CLOSEDOC : Reopen last closed doc " , doc ) ; <nl> + return doc ; <nl> + } <nl> + <nl> + std : : vector < Doc * > ClosedDocs : : getAndRemoveAllClosedDocs ( ) <nl> + { <nl> + std : : vector < Doc * > docs ; <nl> + { <nl> + std : : unique_lock < std : : mutex > lock ( m_mutex ) ; <nl> + CLOSEDOC_TRACE ( " CLOSEDOC : Get and remove all closed " , m_docs . size ( ) , " docs " ) ; <nl> + for ( const ClosedDoc & closedDoc : m_docs ) <nl> + docs . push_back ( closedDoc . doc ) ; <nl> + m_docs . clear ( ) ; <nl> + m_done = true ; <nl> + m_cv . notify_one ( ) ; <nl> + } <nl> + return docs ; <nl> + } <nl> + <nl> + void ClosedDocs : : backgroundThread ( ) <nl> + { <nl> + CLOSEDOC_TRACE ( " CLOSEDOC : [ BG ] Background thread start " ) ; <nl> + <nl> + std : : unique_lock < std : : mutex > lock ( m_mutex ) ; <nl> + while ( ! m_done ) { <nl> + base : : tick_t now = base : : current_tick ( ) ; <nl> + base : : tick_t waitForMSecs = std : : numeric_limits < base : : tick_t > : : max ( ) ; <nl> + <nl> + for ( auto it = m_docs . begin ( ) ; it ! = m_docs . end ( ) ; ) { <nl> + const ClosedDoc & closedDoc = * it ; <nl> + <nl> + base : : tick_t diff = now - closedDoc . timestamp ; <nl> + if ( diff > = m_keepClosedDocAliveForMSecs ) { <nl> + if ( m_dataRecoveryPeriodMSecs = = 0 | | <nl> + closedDoc . doc - > isFullyBackedUp ( ) ) { <nl> + / / Finally delete the document ( this is the place where we <nl> + / / delete all documents created / loaded by the user ) <nl> + CLOSEDOC_TRACE ( " CLOSEDOC : [ BG ] Delete doc " , closedDoc . doc ) ; <nl> + delete closedDoc . doc ; <nl> + it = m_docs . erase ( it ) ; <nl> + } <nl> + else { <nl> + waitForMSecs = std : : min ( waitForMSecs , m_dataRecoveryPeriodMSecs ) ; <nl> + + + it ; <nl> + } <nl> + } <nl> + else { <nl> + waitForMSecs = std : : min ( waitForMSecs , m_keepClosedDocAliveForMSecs - diff ) ; <nl> + + + it ; <nl> + } <nl> + } <nl> + <nl> + if ( waitForMSecs < std : : numeric_limits < base : : tick_t > : : max ( ) ) { <nl> + CLOSEDOC_TRACE ( " CLOSEDOC : [ BG ] Wait for " , waitForMSecs , " milliseconds " ) ; <nl> + <nl> + ASSERT ( ! m_docs . empty ( ) ) ; <nl> + m_cv . wait_for ( lock , std : : chrono : : milliseconds ( waitForMSecs ) ) ; <nl> + } <nl> + else { <nl> + CLOSEDOC_TRACE ( " CLOSEDOC : [ BG ] Wait for condition variable " ) ; <nl> + <nl> + ASSERT ( m_docs . empty ( ) ) ; <nl> + m_cv . wait ( lock ) ; <nl> + } <nl> + } <nl> + <nl> + CLOSEDOC_TRACE ( " CLOSEDOC : [ BG ] Background thread end " ) ; <nl> + } <nl> + <nl> + } / / namespace app <nl> new file mode 100644 <nl> index 000000000 . . c0b74e9e5 <nl> mmm / dev / null <nl> ppp b / src / app / closed_docs . h <nl> <nl> + / / Aseprite <nl> + / / Copyright ( C ) 2019 Igara Studio S . A . <nl> + / / <nl> + / / This program is distributed under the terms of <nl> + / / the End - User License Agreement for Aseprite . <nl> + <nl> + # ifndef APP_CLOSED_DOCS_H_INCLUDED <nl> + # define APP_CLOSED_DOCS_H_INCLUDED <nl> + # pragma once <nl> + <nl> + # include " base / time . h " <nl> + <nl> + # include < condition_variable > <nl> + # include < mutex > <nl> + # include < thread > <nl> + # include < vector > <nl> + <nl> + namespace app { <nl> + <nl> + class Doc ; <nl> + <nl> + / / Handle the list of closed docs : <nl> + / / * When a document is closed , we keep it for some time so the user <nl> + / / can undo the close command without losing the undo history . <nl> + / / * For the first closed document , a thread is launched to wait <nl> + / / until we can definitely delete the doc after X minutes ( like a <nl> + / / garbage collector ) . <nl> + / / * If the document was not restore , we delete it from memory , if <nl> + / / the document was restore , we remove it from the m_docs . <nl> + class ClosedDocs { <nl> + public : <nl> + ClosedDocs ( ) ; <nl> + ~ ClosedDocs ( ) ; <nl> + <nl> + bool hasClosedDocs ( ) ; <nl> + void addClosedDoc ( Doc * doc ) ; <nl> + Doc * reopenLastClosedDoc ( ) ; <nl> + <nl> + / / Called at the very end to get all closed docs , remove them from <nl> + / / the list of closed docs , and stop the thread . <nl> + std : : vector < Doc * > getAndRemoveAllClosedDocs ( ) ; <nl> + <nl> + private : <nl> + void backgroundThread ( ) ; <nl> + <nl> + struct ClosedDoc { <nl> + Doc * doc ; <nl> + base : : tick_t timestamp ; <nl> + } ; <nl> + <nl> + bool m_done ; <nl> + base : : tick_t m_dataRecoveryPeriodMSecs ; <nl> + base : : tick_t m_keepClosedDocAliveForMSecs ; <nl> + std : : vector < ClosedDoc > m_docs ; <nl> + std : : mutex m_mutex ; <nl> + std : : condition_variable m_cv ; <nl> + std : : thread m_thread ; <nl> + } ; <nl> + <nl> + } / / namespace app <nl> + <nl> + # endif <nl> mmm a / src / app / commands / cmd_options . cpp <nl> ppp b / src / app / commands / cmd_options . cpp <nl> class OptionsWindow : public app : : gen : : Options { <nl> if ( m_pref . general . keepEditedSpriteData ( ) ) <nl> keepEditedSpriteData ( ) - > setSelected ( true ) ; <nl> <nl> + if ( m_pref . general . keepClosedSpriteOnMemory ( ) ) <nl> + keepClosedSpriteOnMemory ( ) - > setSelected ( true ) ; <nl> + <nl> if ( m_pref . general . showFullPath ( ) ) <nl> showFullPath ( ) - > setSelected ( true ) ; <nl> <nl> class OptionsWindow : public app : : gen : : Options { <nl> dataRecoveryPeriod ( ) - > findItemIndexByValue ( <nl> base : : convert_to < std : : string > ( m_pref . general . dataRecoveryPeriod ( ) ) ) ) ; <nl> <nl> - keepEditedSpriteDataLifespan ( ) - > setSelectedItemIndex ( <nl> - keepEditedSpriteDataLifespan ( ) - > findItemIndexByValue ( <nl> - base : : convert_to < std : : string > ( m_pref . general . keepEditedSpriteDataLifespan ( ) ) ) ) ; <nl> + keepEditedSpriteDataFor ( ) - > setSelectedItemIndex ( <nl> + keepEditedSpriteDataFor ( ) - > findItemIndexByValue ( <nl> + base : : convert_to < std : : string > ( m_pref . general . keepEditedSpriteDataFor ( ) ) ) ) ; <nl> + <nl> + keepClosedSpriteOnMemoryFor ( ) - > setSelectedItemIndex ( <nl> + keepClosedSpriteOnMemoryFor ( ) - > findItemIndexByValue ( <nl> + base : : convert_to < std : : string > ( m_pref . general . keepClosedSpriteOnMemoryFor ( ) ) ) ) ; <nl> <nl> if ( m_pref . editor . zoomFromCenterWithWheel ( ) ) <nl> zoomFromCenterWithWheel ( ) - > setSelected ( true ) ; <nl> class OptionsWindow : public app : : gen : : Options { <nl> warnings + = " < < - " + Strings : : alerts_restart_by_preferences_save_recovery_data_period ( ) ; <nl> } <nl> <nl> - int newLifespan = base : : convert_to < int > ( keepEditedSpriteDataLifespan ( ) - > getValue ( ) ) ; <nl> + int newLifespan = base : : convert_to < int > ( keepEditedSpriteDataFor ( ) - > getValue ( ) ) ; <nl> if ( keepEditedSpriteData ( ) - > isSelected ( ) ! = m_pref . general . keepEditedSpriteData ( ) | | <nl> - newLifespan ! = m_pref . general . keepEditedSpriteDataLifespan ( ) ) { <nl> + newLifespan ! = m_pref . general . keepEditedSpriteDataFor ( ) ) { <nl> m_pref . general . keepEditedSpriteData ( keepEditedSpriteData ( ) - > isSelected ( ) ) ; <nl> - m_pref . general . keepEditedSpriteDataLifespan ( newLifespan ) ; <nl> + m_pref . general . keepEditedSpriteDataFor ( newLifespan ) ; <nl> <nl> warnings + = " < < - " + Strings : : alerts_restart_by_preferences_keep_edited_sprite_data_lifespan ( ) ; <nl> } <nl> <nl> + newLifespan = base : : convert_to < int > ( keepClosedSpriteOnMemoryFor ( ) - > getValue ( ) ) ; <nl> + if ( keepClosedSpriteOnMemory ( ) - > isSelected ( ) ! = m_pref . general . keepClosedSpriteOnMemory ( ) | | <nl> + newLifespan ! = m_pref . general . keepClosedSpriteOnMemoryFor ( ) ) { <nl> + m_pref . general . keepClosedSpriteOnMemory ( keepClosedSpriteOnMemory ( ) - > isSelected ( ) ) ; <nl> + m_pref . general . keepClosedSpriteOnMemoryFor ( newLifespan ) ; <nl> + <nl> + warnings + = " < < - " + Strings : : alerts_restart_by_preferences_keep_closed_sprite_on_memory_for ( ) ; <nl> + } <nl> + <nl> m_pref . editor . zoomFromCenterWithWheel ( zoomFromCenterWithWheel ( ) - > isSelected ( ) ) ; <nl> m_pref . editor . zoomFromCenterWithKeys ( zoomFromCenterWithKeys ( ) - > isSelected ( ) ) ; <nl> m_pref . editor . showScrollbars ( showScrollbars ( ) - > isSelected ( ) ) ; <nl> mmm a / src / app / commands / cmd_reopen_closed_file . cpp <nl> ppp b / src / app / commands / cmd_reopen_closed_file . cpp <nl> ReopenClosedFileCommand : : ReopenClosedFileCommand ( ) <nl> bool ReopenClosedFileCommand : : onEnabled ( Context * ctx ) <nl> { <nl> if ( auto uiCtx = dynamic_cast < UIContext * > ( ctx ) ) { <nl> - const auto & docs = uiCtx - > closedDocs ( ) ; <nl> - return ( ! docs . empty ( ) ) ; <nl> + return uiCtx - > hasClosedDocs ( ) ; <nl> } <nl> return false ; <nl> } <nl> <nl> void ReopenClosedFileCommand : : onExecute ( Context * ctx ) <nl> { <nl> - if ( auto uiCtx = dynamic_cast < UIContext * > ( ctx ) ) { <nl> - const auto & docs = uiCtx - > closedDocs ( ) ; <nl> - if ( ! docs . empty ( ) ) <nl> - uiCtx - > reopenClosedDoc ( docs . front ( ) ) ; <nl> - } <nl> + if ( auto uiCtx = dynamic_cast < UIContext * > ( ctx ) ) <nl> + uiCtx - > reopenLastClosedDoc ( ) ; <nl> } <nl> <nl> Command * CommandFactory : : createReopenClosedFileCommand ( ) <nl> mmm a / src / app / crash / backup_observer . cpp <nl> ppp b / src / app / crash / backup_observer . cpp <nl> void BackupObserver : : onRemoveDocument ( Doc * doc ) <nl> std : : unique_lock < std : : mutex > lock ( m_mutex ) ; <nl> base : : remove_from_container ( m_documents , doc ) ; <nl> } <nl> - if ( m_config - > keepEditedSpriteData ) <nl> + if ( m_config - > keepEditedSpriteDataFor > 0 ) <nl> m_closedDocs . push_back ( doc ) ; <nl> else <nl> m_session - > removeDocument ( doc ) ; <nl> void BackupObserver : : backgroundThread ( ) <nl> while ( ! m_done ) { <nl> m_wakeup . wait_for ( lock , std : : chrono : : seconds ( waitFor ) ) ; <nl> <nl> - TRACE ( " RECO : Start backup process for % d documents \ n " , m_documents . size ( ) ) ; <nl> + TRACE ( " RECO : Start backup process for % d documents \ n " , <nl> + m_documents . size ( ) + m_closedDocs . size ( ) ) ; <nl> <nl> SwitchBackupIcon icon ; <nl> base : : Chrono chrono ; <nl> void BackupObserver : : backgroundThread ( ) <nl> if ( ! m_closedDocs . empty ( ) ) { <nl> for ( auto it = m_closedDocs . begin ( ) ; it ! = m_closedDocs . end ( ) ; ) { <nl> Doc * doc = * it ; <nl> - if ( saveDocData ( doc ) ) <nl> + <nl> + TRACE ( " RECO : Save backup data for % p . . . \ n " , doc ) ; <nl> + <nl> + if ( saveDocData ( doc ) ) { <nl> + TRACE ( " RECO : Doc % p is fully backed up \ n " , doc ) ; <nl> + <nl> it = m_closedDocs . erase ( it ) ; <nl> + doc - > markAsBackedUp ( ) ; <nl> + } <nl> else { <nl> somethingLocked = true ; <nl> + + it ; <nl> bool BackupObserver : : saveDocData ( Doc * doc ) <nl> else if ( ! m_session - > saveDocumentChanges ( doc ) ) { <nl> TRACE ( " RECO : Document ' % d ' backup was canceled by UI \ n " , doc - > id ( ) ) ; <nl> } <nl> - # ifdef TEST_BACKUP_INTEGRITY <nl> else { <nl> + # ifdef TEST_BACKUP_INTEGRITY <nl> DocReader reader ( doc , 500 ) ; <nl> std : : unique_ptr < Doc > copy ( <nl> m_session - > restoreBackupDocById ( doc - > id ( ) , nullptr ) ) ; <nl> bool BackupObserver : : saveDocData ( Doc * doc ) <nl> else { <nl> TRACE ( " RECO : No differences \ n " ) ; <nl> } <nl> + # endif <nl> return true ; <nl> } <nl> - # endif <nl> } <nl> catch ( const std : : exception & ) { <nl> TRACE ( " RECO : Document ' % d ' is locked \ n " , doc - > id ( ) ) ; <nl> mmm a / src / app / crash / data_recovery . cpp <nl> ppp b / src / app / crash / data_recovery . cpp <nl> DataRecovery : : DataRecovery ( Context * ctx ) <nl> { <nl> auto & pref = Preferences : : instance ( ) ; <nl> m_config . dataRecoveryPeriod = pref . general . dataRecoveryPeriod ( ) ; <nl> - m_config . keepEditedSpriteData = pref . general . keepEditedSpriteData ( ) ; <nl> - m_config . keepEditedSpriteDataLifespan = pref . general . keepEditedSpriteDataLifespan ( ) ; <nl> + if ( pref . general . keepEditedSpriteData ( ) ) <nl> + m_config . keepEditedSpriteDataFor = pref . general . keepEditedSpriteDataFor ( ) ; <nl> + else <nl> + m_config . keepEditedSpriteDataFor = 0 ; <nl> <nl> ResourceFinder rf ; <nl> rf . includeUserDir ( base : : join_path ( " sessions " , " . " ) . c_str ( ) ) ; <nl> mmm a / src / app / crash / recovery_config . h <nl> ppp b / src / app / crash / recovery_config . h <nl> namespace crash { <nl> / / avoid accessing to Preferences from a non - UI thread . <nl> struct RecoveryConfig { <nl> double dataRecoveryPeriod ; <nl> - bool keepEditedSpriteData ; <nl> - int keepEditedSpriteDataLifespan ; <nl> + int keepEditedSpriteDataFor ; <nl> } ; <nl> <nl> } / / namespace crash <nl> mmm a / src / app / crash / session . cpp <nl> ppp b / src / app / crash / session . cpp <nl> bool Session : : isCrashedSession ( ) <nl> <nl> bool Session : : isOldSession ( ) <nl> { <nl> - if ( ! m_config - > keepEditedSpriteData ) <nl> + if ( m_config - > keepEditedSpriteDataFor < = 0 ) <nl> return true ; <nl> <nl> std : : string verfile = verFilename ( ) ; <nl> if ( ! base : : is_file ( verfile ) ) <nl> return true ; <nl> <nl> - int lifespan = m_config - > keepEditedSpriteDataLifespan ; <nl> + int lifespanDays = m_config - > keepEditedSpriteDataFor ; <nl> base : : Time sessionTime = base : : get_modification_time ( verfile ) ; <nl> <nl> - return ( sessionTime . addDays ( lifespan ) < base : : current_time ( ) ) ; <nl> + return ( sessionTime . addDays ( lifespanDays ) < base : : current_time ( ) ) ; <nl> } <nl> <nl> bool Session : : isEmpty ( ) <nl> void Session : : close ( ) <nl> <nl> / / If we don ' t have to keep the sprite data , just remove it from <nl> / / the disk . <nl> - if ( ! m_config - > keepEditedSpriteData ) <nl> + if ( m_config - > keepEditedSpriteDataFor = = 0 ) <nl> removeFromDisk ( ) ; <nl> } <nl> catch ( const std : : exception & ) { <nl> mmm a / src / app / doc . cpp <nl> ppp b / src / app / doc . cpp <nl> void Doc : : setContext ( Context * ctx ) <nl> removeFromContext ( ) ; <nl> <nl> m_ctx = ctx ; <nl> - if ( ctx ) <nl> + if ( ctx ) { <nl> + / / Remove the flag that indicates that this doc is fully backed <nl> + / / up , because now we are inside a context , so the user can change <nl> + / / it again and the backup will be outdated . <nl> + if ( m_flags & kFullyBackedUp ) <nl> + m_flags ^ = kFullyBackedUp ; <nl> + <nl> ctx - > documents ( ) . add ( this ) ; <nl> + } <nl> <nl> onContextChanged ( ) ; <nl> } <nl> void Doc : : setInhibitBackup ( const bool inhibitBackup ) <nl> m_flags & = ~ kInhibitBackup ; <nl> } <nl> <nl> + void Doc : : markAsBackedUp ( ) <nl> + { <nl> + m_flags | = kFullyBackedUp ; <nl> + } <nl> + <nl> + bool Doc : : isFullyBackedUp ( ) const <nl> + { <nl> + return ( m_flags & kFullyBackedUp ? true : false ) ; <nl> + } <nl> + <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / Loaded options from file <nl> <nl> mmm a / src / app / doc . h <nl> ppp b / src / app / doc . h <nl> namespace app { <nl> kAssociatedToFile = 1 , / / This sprite is associated to a file in the file - system <nl> kMaskVisible = 2 , / / The mask wasn ' t hidden by the user <nl> kInhibitBackup = 4 , / / Inhibit the backup process <nl> + kFullyBackedUp = 8 , / / Full backup was done <nl> } ; <nl> public : <nl> Doc ( Sprite * sprite ) ; <nl> namespace app { <nl> bool inhibitBackup ( ) const ; <nl> void setInhibitBackup ( const bool inhibitBackup ) ; <nl> <nl> + void markAsBackedUp ( ) ; <nl> + bool isFullyBackedUp ( ) const ; <nl> + <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / Loaded options from file <nl> <nl> mmm a / src / app / ui_context . cpp <nl> ppp b / src / app / ui_context . cpp <nl> <nl> # include " config . h " <nl> # endif <nl> <nl> + # include " app / ui_context . h " <nl> + <nl> # include " app / app . h " <nl> # include " app / doc . h " <nl> # include " app / modules / editors . h " <nl> <nl> # include " app / ui / timeline / timeline . h " <nl> # include " app / ui / workspace . h " <nl> # include " app / ui / workspace_tabs . h " <nl> - # include " app / ui_context . h " <nl> # include " base / mutex . h " <nl> # include " doc / sprite . h " <nl> <nl> Editor * UIContext : : activeEditor ( ) <nl> return NULL ; <nl> } <nl> <nl> - void UIContext : : reopenClosedDoc ( Doc * doc ) <nl> + bool UIContext : : hasClosedDocs ( ) <nl> + { <nl> + return m_closedDocs . hasClosedDocs ( ) ; <nl> + } <nl> + <nl> + void UIContext : : reopenLastClosedDoc ( ) <nl> { <nl> - auto it = std : : find ( m_closedDocs . begin ( ) , m_closedDocs . end ( ) , doc ) ; <nl> - ASSERT ( it ! = m_closedDocs . end ( ) ) ; <nl> - if ( it ! = m_closedDocs . end ( ) ) <nl> - m_closedDocs . erase ( it ) ; <nl> + if ( Doc * doc = m_closedDocs . reopenLastClosedDoc ( ) ) { <nl> + / / Put the document in the context again . <nl> + doc - > setContext ( this ) ; <nl> + } <nl> + } <nl> <nl> - / / Put the document in the context again . <nl> - doc - > setContext ( this ) ; <nl> + std : : vector < Doc * > UIContext : : getAndRemoveAllClosedDocs ( ) <nl> + { <nl> + return m_closedDocs . getAndRemoveAllClosedDocs ( ) ; <nl> } <nl> <nl> void UIContext : : onAddDocument ( Doc * doc ) <nl> void UIContext : : onCloseDocument ( Doc * doc ) <nl> { <nl> ASSERT ( doc ! = nullptr ) ; <nl> ASSERT ( doc - > context ( ) = = nullptr ) ; <nl> - m_closedDocs . insert ( m_closedDocs . begin ( ) , doc ) ; <nl> + <nl> + m_closedDocs . addClosedDoc ( doc ) ; <nl> } <nl> <nl> } / / namespace app <nl> mmm a / src / app / ui_context . h <nl> ppp b / src / app / ui_context . h <nl> <nl> # define APP_UI_CONTEXT_H_INCLUDED <nl> # pragma once <nl> <nl> + # include " app / closed_docs . h " <nl> # include " app / context . h " <nl> # include " app / docs_observer . h " <nl> <nl> namespace app { <nl> / / new one if it ' s necessary . <nl> Editor * getEditorFor ( Doc * document ) ; <nl> <nl> - / / Returns the list of closed docs in this session . <nl> - const std : : vector < Doc * > & closedDocs ( ) const { return m_closedDocs ; } <nl> - void reopenClosedDoc ( Doc * doc ) ; <nl> + bool hasClosedDocs ( ) ; <nl> + void reopenLastClosedDoc ( ) ; <nl> + std : : vector < Doc * > getAndRemoveAllClosedDocs ( ) ; <nl> <nl> protected : <nl> void onAddDocument ( Doc * doc ) override ; <nl> namespace app { <nl> <nl> private : <nl> DocView * m_lastSelectedView ; <nl> - std : : vector < Doc * > m_closedDocs ; <nl> + ClosedDocs m_closedDocs ; <nl> <nl> static UIContext * m_instance ; <nl> } ; <nl>
New option to configure how much time we keep a closed sprite on RAM
aseprite/aseprite
c7d1e4a47205a7a6122a5b54b52179b7de6aee9e
2019-06-07T16:17:21Z
mmm a / cmake / CPackConfig . cmake <nl> ppp b / cmake / CPackConfig . cmake <nl> if ( CPACK_GENERATOR MATCHES " RPM " ) <nl> set ( CPACK_COMPONENTS_ALL clients - el6 server - el6 ) <nl> else ( ) <nl> message ( STATUS " Building EL7 components " ) <nl> - set ( CPACK_COMPONENTS_ALL clients - el7 server - el7 ) <nl> + set ( CPACK_COMPONENTS_ALL clients - el7 server - el7 clients - versioned server - versioned ) <nl> endif ( ) <nl> set ( CPACK_RESOURCE_FILE_README $ { CMAKE_SOURCE_DIR } / README . md ) <nl> set ( CPACK_RESOURCE_FILE_LICENSE $ { CMAKE_SOURCE_DIR } / LICENSE ) <nl> elseif ( CPACK_GENERATOR MATCHES " DEB " ) <nl> set ( CPACK_PACKAGING_INSTALL_PREFIX " / " ) <nl> - set ( CPACK_COMPONENTS_ALL clients - deb server - deb ) <nl> + set ( CPACK_COMPONENTS_ALL clients - deb server - deb clients - versioned server - versioned ) <nl> set ( CPACK_RESOURCE_FILE_README $ { CMAKE_SOURCE_DIR } / README . md ) <nl> set ( CPACK_RESOURCE_FILE_LICENSE $ { CMAKE_SOURCE_DIR } / LICENSE ) <nl> elseif ( CPACK_GENERATOR MATCHES " productbuild " ) <nl> new file mode 100644 <nl> index 0000000000 . . 02365b69cb <nl> mmm / dev / null <nl> ppp b / cmake / FDBInstall . cmake <nl> <nl> + function ( fdb_install_packages ) <nl> + set ( FDB_INSTALL_PACKAGES $ { ARGV } PARENT_SCOPE ) <nl> + endfunction ( ) <nl> + <nl> + function ( fdb_install_dirs ) <nl> + set ( FDB_INSTALL_DIRS $ { ARGV } PARENT_SCOPE ) <nl> + endfunction ( ) <nl> + <nl> + function ( install_symlink_impl ) <nl> + if ( NOT WIN32 ) <nl> + set ( options " " ) <nl> + set ( one_value_options TO DESTINATION ) <nl> + set ( multi_value_options COMPONENTS ) <nl> + cmake_parse_arguments ( SYM " $ { options } " " $ { one_value_options } " " $ { multi_value_options } " " $ { ARGN } " ) <nl> + <nl> + file ( MAKE_DIRECTORY $ { CMAKE_CURRENT_BINARY_DIR } / symlinks ) <nl> + get_filename_component ( fname $ { SYM_DESTINATION } NAME ) <nl> + get_filename_component ( dest_dir $ { SYM_DESTINATION } DIRECTORY ) <nl> + set ( sl $ { CMAKE_CURRENT_BINARY_DIR } / symlinks / $ { fname } ) <nl> + execute_process ( COMMAND $ { CMAKE_COMMAND } - E create_symlink $ { SYM_TO } $ { sl } ) <nl> + foreach ( component IN LISTS SYM_COMPONENTS ) <nl> + install ( FILES $ { sl } DESTINATION $ { dest_dir } COMPONENT $ { component } ) <nl> + endforeach ( ) <nl> + endif ( ) <nl> + endfunction ( ) <nl> + <nl> + function ( install_symlink ) <nl> + if ( NOT WIN32 AND NOT OPEN_FOR_IDE ) <nl> + set ( options " " ) <nl> + set ( one_value_options COMPONENT LINK_DIR FILE_DIR LINK_NAME FILE_NAME ) <nl> + set ( multi_value_options " " ) <nl> + cmake_parse_arguments ( IN " $ { options } " " $ { one_value_options } " " $ { multi_value_options } " " $ { ARGN } " ) <nl> + <nl> + set ( rel_path " " ) <nl> + string ( REGEX MATCHALL " \ \ / " slashes " $ { IN_LINK_NAME } " ) <nl> + foreach ( ignored IN LISTS slashes ) <nl> + set ( rel_path " . . / $ { rel_path } " ) <nl> + endforeach ( ) <nl> + if ( " $ { IN_FILE_DIR } " MATCHES " bin " ) <nl> + if ( " $ { IN_LINK_DIR } " MATCHES " lib " ) <nl> + install_symlink_impl ( <nl> + TO " . . / $ { rel_path } bin / $ { IN_FILE_NAME } " <nl> + DESTINATION " lib / $ { IN_LINK_NAME } " <nl> + COMPONENTS " $ { IN_COMPONENT } - tgz " ) <nl> + install_symlink_impl ( <nl> + TO " . . / $ { rel_path } bin / $ { IN_FILE_NAME } " <nl> + DESTINATION " usr / lib64 / $ { IN_LINK_NAME } " <nl> + COMPONENTS " $ { IN_COMPONENT } - el6 " <nl> + " $ { IN_COMPONENT } - el7 " <nl> + " $ { IN_COMPONENT } - deb " ) <nl> + install_symlink_impl ( <nl> + TO " . . / $ { rel_path } bin / $ { IN_FILE_NAME } " <nl> + DESTINATION " usr / lib64 / $ { IN_LINK_NAME } " <nl> + COMPONENTS " $ { IN_COMPONENT } - deb " ) <nl> + elseif ( " $ { IN_LINK_DIR } " MATCHES " bin " ) <nl> + install_symlink_impl ( <nl> + TO " . . / $ { rel_path } bin / $ { IN_FILE_NAME } " <nl> + DESTINATION " bin / $ { IN_LINK_NAME } " <nl> + COMPONENTS " $ { IN_COMPONENT } - tgz " ) <nl> + install_symlink_impl ( <nl> + TO " . . / $ { rel_path } bin / $ { IN_FILE_NAME } " <nl> + DESTINATION " usr / bin / $ { IN_LINK_NAME } " <nl> + COMPONENTS " $ { IN_COMPONENT } - el6 " <nl> + " $ { IN_COMPONENT } - el7 " <nl> + " $ { IN_COMPONENT } - deb " ) <nl> + elseif ( " $ { IN_LINK_DIR } " MATCHES " fdbmonitor " ) <nl> + install_symlink_impl ( <nl> + TO " . . / . . / $ { rel_path } bin / $ { IN_FILE_NAME } " <nl> + DESTINATION " lib / foundationdb / $ { IN_LINK_NAME } " <nl> + COMPONENTS " $ { IN_COMPONENT } - tgz " ) <nl> + install_symlink_impl ( <nl> + TO " . . / . . / $ { rel_path } bin / $ { IN_FILE_NAME } " <nl> + DESTINATION " usr / lib / foundationdb / $ { IN_LINK_NAME } " <nl> + COMPONENTS " $ { IN_COMPONENT } - el6 " <nl> + " $ { IN_COMPONENT } - el7 " <nl> + " $ { IN_COMPONENT } - deb " ) <nl> + else ( ) <nl> + message ( FATAL_ERROR " Unknown LINK_DIR $ { IN_LINK_DIR } " ) <nl> + endif ( ) <nl> + else ( ) <nl> + message ( FATAL_ERROR " Unknown FILE_DIR $ { IN_FILE_DIR } " ) <nl> + endif ( ) <nl> + endif ( ) <nl> + endfunction ( ) <nl> + <nl> + function ( symlink_files ) <nl> + if ( NOT WIN32 ) <nl> + set ( options " " ) <nl> + set ( one_value_options LOCATION SOURCE ) <nl> + set ( multi_value_options TARGETS ) <nl> + cmake_parse_arguments ( SYM " $ { options } " " $ { one_value_options } " " $ { multi_value_options } " " $ { ARGN } " ) <nl> + <nl> + file ( MAKE_DIRECTORY $ { CMAKE_BINARY_DIR } / $ { SYM_LOCATION } ) <nl> + foreach ( component IN LISTS SYM_TARGETS ) <nl> + execute_process ( COMMAND $ { CMAKE_COMMAND } - E create_symlink $ { SYM_SOURCE } $ { CMAKE_BINARY_DIR } / $ { SYM_LOCATION } / $ { component } WORKING_DIRECTORY $ { CMAKE_BINARY_DIR } / $ { SYM_LOCATION } ) <nl> + endforeach ( ) <nl> + endif ( ) <nl> + endfunction ( ) <nl> + <nl> + function ( pop_front ) <nl> + if ( ARGC LESS 2 ) <nl> + message ( FATAL_ERROR " USAGE : pop_front ( < list > < out - var > [ < count > ] ) " ) <nl> + endif ( ) <nl> + set ( count $ { ARGV2 } ) <nl> + if ( NOT count ) <nl> + set ( count 1 ) <nl> + endif ( ) <nl> + set ( result ) <nl> + foreach ( elem IN LISTS $ { ARGV0 } ) <nl> + if ( count GREATER 0 ) <nl> + math ( EXPR count " $ { count } - 1 " ) <nl> + else ( ) <nl> + list ( APPEND result $ { elem } ) <nl> + endif ( ) <nl> + endforeach ( ) <nl> + set ( $ { ARGV1 } $ { result } PARENT_SCOPE ) <nl> + endfunction ( ) <nl> + <nl> + function ( install_destinations ) <nl> + if ( NOT ARGV0 ) <nl> + message ( FATAL_ERROR " No package passed " ) <nl> + endif ( ) <nl> + set ( package $ { ARGV0 } ) <nl> + set ( REST_ARGS $ { ARGV } ) <nl> + pop_front ( REST_ARGS REST_ARGS ) <nl> + list ( FIND FDB_INSTALL_PACKAGES $ { package } idx ) <nl> + if ( idx LESS 0 ) <nl> + message ( FATAL_ERROR " Package $ { package } does not exist " ) <nl> + endif ( ) <nl> + cmake_parse_arguments ( MY " " " $ { FDB_INSTALL_DIRS } " " " $ { REST_ARGS } ) <nl> + foreach ( dir IN LISTS FDB_INSTALL_DIRS ) <nl> + if ( MY_ $ { dir } ) <nl> + set ( var $ { MY_ $ { dir } } ) <nl> + set ( __install_dest_ $ { package } _ $ { dir } $ { MY_ $ { dir } } PARENT_SCOPE ) <nl> + endif ( ) <nl> + endforeach ( ) <nl> + endfunction ( ) <nl> + <nl> + function ( get_install_dest ) <nl> + if ( ARGC LESS 3 ) <nl> + message ( FATAL_ERROR " USAGE : get_install_dest ( < pkg > < dir > < out - var > [ < var - name > ] ) " ) <nl> + endif ( ) <nl> + set ( package $ { ARGV0 } ) <nl> + set ( dir $ { ARGV1 } ) <nl> + set ( out $ { ARGV2 } ) <nl> + set ( $ { out } $ { __install_dest_ $ { package } _ $ { dir } } PARENT_SCOPE ) <nl> + if ( ARGV3 ) <nl> + set ( $ { ARGV3 } " __install_dest_ $ { package } _ $ { dir } " ) <nl> + endif ( ) <nl> + endfunction ( ) <nl> + <nl> + function ( print_install_destinations ) <nl> + foreach ( pkg IN LISTS FDB_INSTALL_PACKAGES ) <nl> + message ( STATUS " Destinations for $ { pkg } " ) <nl> + set ( old_indent $ { CMAKE_MESSAGE_INDENT } ) <nl> + set ( CMAKE_MESSAGE_INDENT " $ { CMAKE_MESSAGE_INDENT } " ) <nl> + foreach ( dir IN LISTS FDB_INSTALL_DIRS ) <nl> + get_install_dest ( $ { pkg } $ { dir } d ) <nl> + message ( STATUS " $ { dir } - > $ { d } " ) <nl> + endforeach ( ) <nl> + set ( CMAKE_MESSAGE_INDENT $ { old_indent } ) <nl> + endforeach ( ) <nl> + endfunction ( ) <nl> + <nl> + function ( get_install_var ) <nl> + if ( NOT ARGC EQUAL 3 ) <nl> + message ( FATAL_ERROR " USAGE : get_install_var ( < pkg > < dir > < out - var > ) " ) <nl> + endif ( ) <nl> + set ( $ { ARGV2 } " __install_dest_ $ { ARGV0 } _ $ { ARGV1 } " PARENT_SCOPE ) <nl> + endfunction ( ) <nl> + <nl> + function ( copy_install_destinations ) <nl> + if ( ARGC LESS 2 ) <nl> + message ( FATAL_ERROR " USAGE : copy_install_destinations ( < from > < to > [ PREFIX prefix ] ) " ) <nl> + endif ( ) <nl> + set ( from $ { ARGV0 } ) <nl> + set ( to $ { ARGV1 } ) <nl> + set ( REST_ARGS $ { ARGV } ) <nl> + pop_front ( REST_ARGS REST_ARGS 2 ) <nl> + cmake_parse_arguments ( MY " " " PREFIX " " " $ { REST_ARGS } ) <nl> + foreach ( dir IN LISTS FDB_INSTALL_DIRS ) <nl> + get_install_dest ( $ { from } $ { dir } d ) <nl> + get_install_var ( $ { to } $ { dir } name ) <nl> + if ( MY_PREFIX ) <nl> + set ( d " $ { MY_PREFIX } $ { d } " ) <nl> + endif ( ) <nl> + set ( $ { name } $ { d } PARENT_SCOPE ) <nl> + endforeach ( ) <nl> + endfunction ( ) <nl> + <nl> + function ( fdb_configure_and_install ) <nl> + if ( NOT WIN32 AND NOT OPEN_FOR_IDE ) <nl> + set ( one_value_options COMPONENT DESTINATION FILE DESTINATION_SUFFIX ) <nl> + cmake_parse_arguments ( IN " $ { options } " " $ { one_value_options } " " $ { multi_value_options } " " $ { ARGN } " ) <nl> + foreach ( pkg IN LISTS FDB_INSTALL_PACKAGES ) <nl> + string ( TOLOWER " $ { pkg } " package ) <nl> + string ( TOUPPER " $ { IN_DESTINATION } " destination ) <nl> + get_install_dest ( $ { pkg } INCLUDE INCLUDE_DIR ) <nl> + get_install_dest ( $ { pkg } INCLUDE LIB_DIR ) <nl> + get_install_dest ( $ { pkg } $ { destination } install_path ) <nl> + string ( REGEX REPLACE " \ . in $ " " " name " $ { IN_FILE } " ) <nl> + get_filename_component ( name " $ { name } " NAME ) <nl> + set ( generated_file_name " $ { generated_dir } / $ { package } / $ { name } " ) <nl> + configure_file ( " $ { IN_FILE } " " $ { generated_file_name } " @ ONLY ) <nl> + install ( <nl> + FILES " $ { generated_file_name } " <nl> + DESTINATION " $ { install_path } $ { IN_DESTINATION_SUFFIX } " <nl> + COMPONENT " $ { IN_COMPONENT } - $ { package } " ) <nl> + endforeach ( ) <nl> + endif ( ) <nl> + endfunction ( ) <nl> + <nl> + function ( fdb_install ) <nl> + if ( NOT WIN32 AND NOT OPEN_FOR_IDE ) <nl> + set ( one_value_options COMPONENT DESTINATION EXPORT DESTINATION_SUFFIX ) <nl> + set ( multi_value_options TARGETS FILES PROGRAMS DIRECTORY ) <nl> + cmake_parse_arguments ( IN " $ { options } " " $ { one_value_options } " " $ { multi_value_options } " " $ { ARGN } " ) <nl> + <nl> + set ( install_export 0 ) <nl> + if ( IN_TARGETS ) <nl> + set ( args TARGETS $ { IN_TARGETS } ) <nl> + elseif ( IN_FILES ) <nl> + set ( args FILES $ { IN_FILES } ) <nl> + elseif ( IN_PROGRAMS ) <nl> + set ( args PROGRAMS $ { IN_PROGRAMS } ) <nl> + elseif ( IN_DIRECTORY ) <nl> + set ( args DIRECTORY $ { IN_DIRECTORY } ) <nl> + elseif ( IN_EXPORT ) <nl> + set ( install_export 1 ) <nl> + else ( ) <nl> + message ( FATAL_ERROR " Expected FILES , PROGRAMS , DIRECTORY , or TARGETS " ) <nl> + endif ( ) <nl> + string ( TOUPPER " $ { IN_DESTINATION } " destination ) <nl> + foreach ( pkg IN LISTS FDB_INSTALL_PACKAGES ) <nl> + get_install_dest ( $ { pkg } $ { destination } install_path ) <nl> + string ( TOLOWER " $ { pkg } " package ) <nl> + if ( install_export ) <nl> + install ( <nl> + EXPORT " $ { IN_EXPORT } - $ { package } " <nl> + DESTINATION " $ { install_path } $ { IN_DESTINATION_SUFFIX } " <nl> + FILE " $ { IN_EXPORT } . cmake " <nl> + COMPONENT " $ { IN_COMPONENT } - $ { package } " ) <nl> + else ( ) <nl> + set ( export_args " " ) <nl> + if ( IN_EXPORT ) <nl> + set ( export_args EXPORT " $ { IN_EXPORT } - $ { package } " ) <nl> + endif ( ) <nl> + if ( NOT $ { install_path } STREQUAL " " ) <nl> + install ( <nl> + $ { args } <nl> + $ { export_args } <nl> + DESTINATION " $ { install_path } $ { IN_DESTINATION_SUFFIX } " <nl> + COMPONENT " $ { IN_COMPONENT } - $ { package } " ) <nl> + endif ( ) <nl> + endif ( ) <nl> + endforeach ( ) <nl> + endif ( ) <nl> + endfunction ( ) <nl> mmm a / cmake / InstallLayout . cmake <nl> ppp b / cmake / InstallLayout . cmake <nl> <nl> - # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> - # Helper Functions <nl> - # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + include ( FDBInstall ) <nl> <nl> - function ( install_symlink_impl ) <nl> - if ( NOT WIN32 ) <nl> - set ( options " " ) <nl> - set ( one_value_options TO DESTINATION ) <nl> - set ( multi_value_options COMPONENTS ) <nl> - cmake_parse_arguments ( SYM " $ { options } " " $ { one_value_options } " " $ { multi_value_options } " " $ { ARGN } " ) <nl> - <nl> - file ( MAKE_DIRECTORY $ { CMAKE_CURRENT_BINARY_DIR } / symlinks ) <nl> - get_filename_component ( fname $ { SYM_DESTINATION } NAME ) <nl> - get_filename_component ( dest_dir $ { SYM_DESTINATION } DIRECTORY ) <nl> - set ( sl $ { CMAKE_CURRENT_BINARY_DIR } / symlinks / $ { fname } ) <nl> - execute_process ( COMMAND $ { CMAKE_COMMAND } - E create_symlink $ { SYM_TO } $ { sl } ) <nl> - foreach ( component IN LISTS SYM_COMPONENTS ) <nl> - install ( FILES $ { sl } DESTINATION $ { dest_dir } COMPONENT $ { component } ) <nl> - endforeach ( ) <nl> - endif ( ) <nl> - endfunction ( ) <nl> - <nl> - function ( install_symlink ) <nl> - if ( NOT WIN32 AND NOT OPEN_FOR_IDE ) <nl> - set ( options " " ) <nl> - set ( one_value_options COMPONENT LINK_DIR FILE_DIR LINK_NAME FILE_NAME ) <nl> - set ( multi_value_options " " ) <nl> - cmake_parse_arguments ( IN " $ { options } " " $ { one_value_options } " " $ { multi_value_options } " " $ { ARGN } " ) <nl> - <nl> - set ( rel_path " " ) <nl> - string ( REGEX MATCHALL " \ \ / " slashes " $ { IN_LINK_NAME } " ) <nl> - foreach ( ignored IN LISTS slashes ) <nl> - set ( rel_path " . . / $ { rel_path } " ) <nl> - endforeach ( ) <nl> - if ( " $ { IN_FILE_DIR } " MATCHES " bin " ) <nl> - if ( " $ { IN_LINK_DIR } " MATCHES " lib " ) <nl> - install_symlink_impl ( <nl> - TO " . . / $ { rel_path } bin / $ { IN_FILE_NAME } " <nl> - DESTINATION " lib / $ { IN_LINK_NAME } " <nl> - COMPONENTS " $ { IN_COMPONENT } - tgz " ) <nl> - install_symlink_impl ( <nl> - TO " . . / $ { rel_path } bin / $ { IN_FILE_NAME } " <nl> - DESTINATION " usr / lib64 / $ { IN_LINK_NAME } " <nl> - COMPONENTS " $ { IN_COMPONENT } - el6 " <nl> - " $ { IN_COMPONENT } - el7 " <nl> - " $ { IN_COMPONENT } - deb " ) <nl> - install_symlink_impl ( <nl> - TO " . . / $ { rel_path } bin / $ { IN_FILE_NAME } " <nl> - DESTINATION " usr / lib64 / $ { IN_LINK_NAME } " <nl> - COMPONENTS " $ { IN_COMPONENT } - deb " ) <nl> - elseif ( " $ { IN_LINK_DIR } " MATCHES " bin " ) <nl> - install_symlink_impl ( <nl> - TO " . . / $ { rel_path } bin / $ { IN_FILE_NAME } " <nl> - DESTINATION " bin / $ { IN_LINK_NAME } " <nl> - COMPONENTS " $ { IN_COMPONENT } - tgz " ) <nl> - install_symlink_impl ( <nl> - TO " . . / $ { rel_path } bin / $ { IN_FILE_NAME } " <nl> - DESTINATION " usr / bin / $ { IN_LINK_NAME } " <nl> - COMPONENTS " $ { IN_COMPONENT } - el6 " <nl> - " $ { IN_COMPONENT } - el7 " <nl> - " $ { IN_COMPONENT } - deb " ) <nl> - elseif ( " $ { IN_LINK_DIR } " MATCHES " fdbmonitor " ) <nl> - install_symlink_impl ( <nl> - TO " . . / . . / $ { rel_path } bin / $ { IN_FILE_NAME } " <nl> - DESTINATION " lib / foundationdb / $ { IN_LINK_NAME } " <nl> - COMPONENTS " $ { IN_COMPONENT } - tgz " ) <nl> - install_symlink_impl ( <nl> - TO " . . / . . / $ { rel_path } bin / $ { IN_FILE_NAME } " <nl> - DESTINATION " usr / lib / foundationdb / $ { IN_LINK_NAME } " <nl> - COMPONENTS " $ { IN_COMPONENT } - el6 " <nl> - " $ { IN_COMPONENT } - el7 " <nl> - " $ { IN_COMPONENT } - deb " ) <nl> - else ( ) <nl> - message ( FATAL_ERROR " Unknown LINK_DIR $ { IN_LINK_DIR } " ) <nl> - endif ( ) <nl> - else ( ) <nl> - message ( FATAL_ERROR " Unknown FILE_DIR $ { IN_FILE_DIR } " ) <nl> - endif ( ) <nl> - endif ( ) <nl> - endfunction ( ) <nl> - <nl> - function ( symlink_files ) <nl> - if ( NOT WIN32 ) <nl> - set ( options " " ) <nl> - set ( one_value_options LOCATION SOURCE ) <nl> - set ( multi_value_options TARGETS ) <nl> - cmake_parse_arguments ( SYM " $ { options } " " $ { one_value_options } " " $ { multi_value_options } " " $ { ARGN } " ) <nl> - <nl> - file ( MAKE_DIRECTORY $ { CMAKE_BINARY_DIR } / $ { SYM_LOCATION } ) <nl> - foreach ( component IN LISTS SYM_TARGETS ) <nl> - execute_process ( COMMAND $ { CMAKE_COMMAND } - E create_symlink $ { SYM_SOURCE } $ { CMAKE_BINARY_DIR } / $ { SYM_LOCATION } / $ { component } WORKING_DIRECTORY $ { CMAKE_BINARY_DIR } / $ { SYM_LOCATION } ) <nl> - endforeach ( ) <nl> - endif ( ) <nl> - endfunction ( ) <nl> + fdb_install_packages ( TGZ DEB EL6 EL7 PM VERSIONED ) <nl> + fdb_install_dirs ( BIN SBIN LIB FDBMONITOR INCLUDE ETC LOG DATA ) <nl> + message ( STATUS " FDB_INSTALL_DIRS - > $ { FDB_INSTALL_DIRS } " ) <nl> <nl> # ' map ' from ( destination , package ) to path <nl> # format vars like install_destination_for_ $ { destination } _ $ { package } <nl> - set ( install_destination_for_bin_tgz " bin " ) <nl> - set ( install_destination_for_bin_deb " usr / bin " ) <nl> - set ( install_destination_for_bin_el6 " usr / bin " ) <nl> - set ( install_destination_for_bin_el7 " usr / bin " ) <nl> - set ( install_destination_for_bin_pm " usr / local / bin " ) <nl> - set ( install_destination_for_sbin_tgz " sbin " ) <nl> - set ( install_destination_for_sbin_deb " usr / sbin " ) <nl> - set ( install_destination_for_sbin_el6 " usr / sbin " ) <nl> - set ( install_destination_for_sbin_el7 " usr / sbin " ) <nl> - set ( install_destination_for_sbin_pm " usr / local / libexec " ) <nl> - set ( install_destination_for_lib_tgz " lib " ) <nl> - set ( install_destination_for_lib_deb " usr / lib " ) <nl> - set ( install_destination_for_lib_el6 " usr / lib64 " ) <nl> - set ( install_destination_for_lib_el7 " usr / lib64 " ) <nl> - set ( install_destination_for_lib_pm " lib " ) <nl> - set ( install_destination_for_fdbmonitor_tgz " sbin " ) <nl> - set ( install_destination_for_fdbmonitor_deb " usr / lib / foundationdb " ) <nl> - set ( install_destination_for_fdbmonitor_el6 " usr / lib / foundationdb " ) <nl> - set ( install_destination_for_fdbmonitor_el7 " usr / lib / foundationdb " ) <nl> - set ( install_destination_for_fdbmonitor_pm " usr / local / libexec " ) <nl> - set ( install_destination_for_include_tgz " include " ) <nl> - set ( install_destination_for_include_deb " usr / include " ) <nl> - set ( install_destination_for_include_el6 " usr / include " ) <nl> - set ( install_destination_for_include_el7 " usr / include " ) <nl> - set ( install_destination_for_include_pm " usr / local / include " ) <nl> - set ( install_destination_for_etc_tgz " etc / foundationdb " ) <nl> - set ( install_destination_for_etc_deb " etc / foundationdb " ) <nl> - set ( install_destination_for_etc_el6 " etc / foundationdb " ) <nl> - set ( install_destination_for_etc_el7 " etc / foundationdb " ) <nl> - set ( install_destination_for_etc_pm " usr / local / etc / foundationdb " ) <nl> - set ( install_destination_for_log_tgz " log / foundationdb " ) <nl> - set ( install_destination_for_log_deb " var / log / foundationdb " ) <nl> - set ( install_destination_for_log_el6 " var / log / foundationdb " ) <nl> - set ( install_destination_for_log_el7 " var / log / foundationdb " ) <nl> - set ( install_destination_for_log_pm " " ) <nl> - set ( install_destination_for_data_tgz " lib / foundationdb " ) <nl> - set ( install_destination_for_data_deb " var / lib / foundationdb / data " ) <nl> - set ( install_destination_for_data_el6 " var / lib / foundationdb / data " ) <nl> - set ( install_destination_for_data_el7 " var / lib / foundationdb / data " ) <nl> - set ( install_destination_for_data_pm " " ) <nl> + install_destinations ( TGZ <nl> + BIN bin <nl> + SBIN sbin <nl> + LIB lib <nl> + FDBMONITOR sbin <nl> + INCLUDE include <nl> + ETC etc / foundationdb <nl> + LOG log / foundationdb <nl> + DATA lib / foundationdb ) <nl> + copy_install_destinations ( TGZ VERSIONED PREFIX " usr / lib / foundationdb - $ { PROJECT_VERSION } / " ) <nl> + install_destinations ( DEB <nl> + BIN usr / bin <nl> + SBIN usr / sbin <nl> + LIB usr / lib <nl> + FDBMONITOR usr / lib / foundationdb <nl> + INCLUDE usr / include <nl> + ETC etc / foundationdb <nl> + LOG var / log / foundationdb <nl> + DATA var / lib / foundationdb ) <nl> + copy_install_destinations ( DEB EL6 ) <nl> + install_destinations ( EL6 LIB usr / lib64 ) <nl> + copy_install_destinations ( EL6 EL7 ) <nl> + install_destinations ( PM <nl> + BIN usr / local / bin <nl> + SBIN usr / local / sbin <nl> + LIB lib <nl> + FDBMONITOR usr / local / libexec <nl> + INCLUDE usr / local / include <nl> + ETC usr / local / etc / foundationdb ) <nl> + <nl> + # This can be used for debugging in case above is behaving funky <nl> + # print_install_destinations ( ) <nl> <nl> set ( generated_dir " $ { CMAKE_CURRENT_BINARY_DIR } / generated " ) <nl> - function ( fdb_configure_and_install ) <nl> - if ( NOT WIN32 AND NOT OPEN_FOR_IDE ) <nl> - set ( one_value_options COMPONENT DESTINATION FILE DESTINATION_SUFFIX ) <nl> - cmake_parse_arguments ( IN " $ { options } " " $ { one_value_options } " " $ { multi_value_options } " " $ { ARGN } " ) <nl> - foreach ( package tgz deb el6 el7 pm ) <nl> - set ( INCLUDE_DIR " $ { install_destination_for_include_ $ { package } } " ) <nl> - set ( LIB_DIR " $ { install_destination_for_lib_ $ { package } } " ) <nl> - set ( install_path " $ { install_destination_for_ $ { IN_DESTINATION } _ $ { package } } " ) <nl> - string ( REGEX REPLACE " \ . in $ " " " name " $ { IN_FILE } " ) <nl> - get_filename_component ( name " $ { name } " NAME ) <nl> - set ( generated_file_name " $ { generated_dir } / $ { package } / $ { name } " ) <nl> - configure_file ( " $ { IN_FILE } " " $ { generated_file_name } " @ ONLY ) <nl> - install ( <nl> - FILES " $ { generated_file_name } " <nl> - DESTINATION " $ { install_path } $ { IN_DESTINATION_SUFFIX } " <nl> - COMPONENT " $ { IN_COMPONENT } - $ { package } " ) <nl> - endforeach ( ) <nl> - endif ( ) <nl> - endfunction ( ) <nl> - <nl> - function ( fdb_install ) <nl> - if ( NOT WIN32 AND NOT OPEN_FOR_IDE ) <nl> - set ( one_value_options COMPONENT DESTINATION EXPORT DESTINATION_SUFFIX ) <nl> - set ( multi_value_options TARGETS FILES PROGRAMS DIRECTORY ) <nl> - cmake_parse_arguments ( IN " $ { options } " " $ { one_value_options } " " $ { multi_value_options } " " $ { ARGN } " ) <nl> - <nl> - set ( install_export 0 ) <nl> - if ( IN_TARGETS ) <nl> - set ( args TARGETS $ { IN_TARGETS } ) <nl> - elseif ( IN_FILES ) <nl> - set ( args FILES $ { IN_FILES } ) <nl> - elseif ( IN_PROGRAMS ) <nl> - set ( args PROGRAMS $ { IN_PROGRAMS } ) <nl> - elseif ( IN_DIRECTORY ) <nl> - set ( args DIRECTORY $ { IN_DIRECTORY } ) <nl> - elseif ( IN_EXPORT ) <nl> - set ( install_export 1 ) <nl> - else ( ) <nl> - message ( FATAL_ERROR " Expected FILES , PROGRAMS , DIRECTORY , or TARGETS " ) <nl> - endif ( ) <nl> - foreach ( package tgz deb el6 el7 pm ) <nl> - set ( install_path " $ { install_destination_for_ $ { IN_DESTINATION } _ $ { package } } " ) <nl> - if ( install_export ) <nl> - install ( <nl> - EXPORT " $ { IN_EXPORT } - $ { package } " <nl> - DESTINATION " $ { install_path } $ { IN_DESTINATION_SUFFIX } " <nl> - FILE " $ { IN_EXPORT } . cmake " <nl> - COMPONENT " $ { IN_COMPONENT } - $ { package } " ) <nl> - else ( ) <nl> - set ( export_args " " ) <nl> - if ( IN_EXPORT ) <nl> - set ( export_args EXPORT " $ { IN_EXPORT } - $ { package } " ) <nl> - endif ( ) <nl> - if ( NOT $ { install_path } STREQUAL " " ) <nl> - install ( <nl> - $ { args } <nl> - $ { export_args } <nl> - DESTINATION " $ { install_path } $ { IN_DESTINATION_SUFFIX } " <nl> - COMPONENT " $ { IN_COMPONENT } - $ { package } " ) <nl> - endif ( ) <nl> - endif ( ) <nl> - endforeach ( ) <nl> - endif ( ) <nl> - endfunction ( ) <nl> <nl> if ( APPLE ) <nl> set ( CPACK_GENERATOR TGZ productbuild ) <nl> set ( CPACK_COMPONENT_SERVER - EL7_DEPENDS clients - el7 ) <nl> set ( CPACK_COMPONENT_SERVER - DEB_DEPENDS clients - deb ) <nl> set ( CPACK_COMPONENT_SERVER - TGZ_DEPENDS clients - tgz ) <nl> set ( CPACK_COMPONENT_SERVER - PM_DEPENDS clients - pm ) <nl> + set ( CPACK_COMPONENT_SERVER - VERSIONED_DEPENDS clients - versioned ) <nl> <nl> set ( CPACK_COMPONENT_SERVER - EL6_DISPLAY_NAME " foundationdb - server " ) <nl> set ( CPACK_COMPONENT_SERVER - EL7_DISPLAY_NAME " foundationdb - server " ) <nl> set ( CPACK_COMPONENT_SERVER - DEB_DISPLAY_NAME " foundationdb - server " ) <nl> set ( CPACK_COMPONENT_SERVER - TGZ_DISPLAY_NAME " foundationdb - server " ) <nl> set ( CPACK_COMPONENT_SERVER - PM_DISPLAY_NAME " foundationdb - server " ) <nl> + set ( CPACK_COMPONENT_SERVER - VERSIONED_DISPLAY_NAME " foundationdb - server - $ { PROJECT_VERSION } " ) <nl> <nl> set ( CPACK_COMPONENT_CLIENTS - EL6_DISPLAY_NAME " foundationdb - clients " ) <nl> set ( CPACK_COMPONENT_CLIENTS - EL7_DISPLAY_NAME " foundationdb - clients " ) <nl> set ( CPACK_COMPONENT_CLIENTS - DEB_DISPLAY_NAME " foundationdb - clients " ) <nl> set ( CPACK_COMPONENT_CLIENTS - TGZ_DISPLAY_NAME " foundationdb - clients " ) <nl> set ( CPACK_COMPONENT_CLIENTS - PM_DISPLAY_NAME " foundationdb - clients " ) <nl> + set ( CPACK_COMPONENT_CLIENTS - VERSIONED_DISPLAY_NAME " foundationdb - clients - $ { PROJECT_VERSION } " ) <nl> <nl> <nl> # MacOS needs a file exiension for the LICENSE file <nl> set ( CPACK_RPM_CLIENTS - EL6_PACKAGE_NAME " foundationdb - clients " ) <nl> set ( CPACK_RPM_CLIENTS - EL7_PACKAGE_NAME " foundationdb - clients " ) <nl> set ( CPACK_RPM_SERVER - EL6_PACKAGE_NAME " foundationdb - server " ) <nl> set ( CPACK_RPM_SERVER - EL7_PACKAGE_NAME " foundationdb - server " ) <nl> + set ( CPACK_RPM_SERVER - VERSIONED_PACKAGE_NAME " foundationdb - server - $ { PROJECT_VERSION } " ) <nl> <nl> set ( CPACK_RPM_CLIENTS - EL6_FILE_NAME " $ { rpm - clients - filename } . el6 . x86_64 . rpm " ) <nl> set ( CPACK_RPM_CLIENTS - EL7_FILE_NAME " $ { rpm - clients - filename } . el7 . x86_64 . rpm " ) <nl> + set ( CPACK_RPM_CLIENTS - VERSIONED_FILE_NAME " $ { rpm - clients - filename } . versioned . x86_64 . rpm " ) <nl> set ( CPACK_RPM_SERVER - EL6_FILE_NAME " $ { rpm - server - filename } . el6 . x86_64 . rpm " ) <nl> set ( CPACK_RPM_SERVER - EL7_FILE_NAME " $ { rpm - server - filename } . el7 . x86_64 . rpm " ) <nl> + set ( CPACK_RPM_SERVER - VERSIONED_FILE_NAME " $ { rpm - server - filename } . versioned . x86_64 . rpm " ) <nl> <nl> set ( CPACK_RPM_CLIENTS - EL6_DEBUGINFO_FILE_NAME " $ { rpm - clients - filename } . el6 - debuginfo . x86_64 . rpm " ) <nl> set ( CPACK_RPM_CLIENTS - EL7_DEBUGINFO_FILE_NAME " $ { rpm - clients - filename } . el7 - debuginfo . x86_64 . rpm " ) <nl> + set ( CPACK_RPM_CLIENTS - VERSIONED_DEBUGINFO_FILE_NAME " $ { rpm - clients - filename } . versioned - debuginfo . x86_64 . rpm " ) <nl> set ( CPACK_RPM_SERVER - EL6_DEBUGINFO_FILE_NAME " $ { rpm - server - filename } . el6 - debuginfo . x86_64 . rpm " ) <nl> set ( CPACK_RPM_SERVER - EL7_DEBUGINFO_FILE_NAME " $ { rpm - server - filename } . el7 - debuginfo . x86_64 . rpm " ) <nl> + set ( CPACK_RPM_SERVER - VERSIONED_DEBUGINFO_FILE_NAME " $ { rpm - server - filename } . versioned - debuginfo . x86_64 . rpm " ) <nl> <nl> file ( MAKE_DIRECTORY " $ { CMAKE_BINARY_DIR } / packaging / emptydir " ) <nl> fdb_install ( DIRECTORY " $ { CMAKE_BINARY_DIR } / packaging / emptydir / " DESTINATION data COMPONENT server ) <nl> set ( CPACK_RPM_CLIENTS - EL7_USER_FILELIST " % dir / etc / foundationdb " ) <nl> set ( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION <nl> " / usr / sbin " <nl> " / usr / share / java " <nl> + " / usr / lib " <nl> " / usr / lib64 / cmake " <nl> " / etc / foundationdb " <nl> " / usr / lib64 / pkgconfig " <nl> set ( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION <nl> " / lib / systemd / system " <nl> " / etc / rc . d / init . d " ) <nl> set ( CPACK_RPM_DEBUGINFO_PACKAGE $ { GENERATE_DEBUG_PACKAGES } ) <nl> - # set ( CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX / usr / src ) <nl> + # set ( CPACK_RPM_BUILD_SOURCE_FDB_INSTALL_DIRS_PREFIX / usr / src ) <nl> set ( CPACK_RPM_COMPONENT_INSTALL ON ) <nl> <nl> set ( CPACK_RPM_CLIENTS - EL6_PRE_INSTALL_SCRIPT_FILE <nl> set ( CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON ) <nl> <nl> set ( CPACK_DEBIAN_SERVER - DEB_PACKAGE_NAME " foundationdb - server " ) <nl> set ( CPACK_DEBIAN_CLIENTS - DEB_PACKAGE_NAME " foundationdb - clients " ) <nl> + set ( CPACK_DEBIAN_SERVER - VERSIONED_PACKAGE_NAME " foundationdb - server - $ { PROJECT_VERSION } " ) <nl> + set ( CPACK_DEBIAN_CLIENTS - VERSIONED_PACKAGE_NAME " foundationdb - clients - $ { PROJECT_VERSION } " ) <nl> <nl> set ( CPACK_DEBIAN_SERVER - DEB_PACKAGE_DEPENDS " adduser , libc6 ( > = 2 . 12 ) , foundationdb - clients ( = $ { FDB_VERSION } ) " ) <nl> set ( CPACK_DEBIAN_SERVER - DEB_PACKAGE_RECOMMENDS " python ( > = 2 . 6 ) " ) <nl> mmm a / flow / flat_buffers . h <nl> ppp b / flow / flat_buffers . h <nl> struct TraverseMessageTypes : Context { <nl> / / we don ' t need to check for recursion here because the next call <nl> / / to operator ( ) will do that and we don ' t generate a vtable for the <nl> / / vector - like type itself <nl> - T t ; <nl> + T t { } ; <nl> ( * this ) ( t ) ; <nl> } <nl> <nl> struct TraverseMessageTypes : Context { <nl> private : <nl> template < class T , class . . . Ts > <nl> void union_helper ( pack < T , Ts . . . > ) { <nl> - T t ; <nl> + T t { } ; <nl> ( * this ) ( t ) ; <nl> union_helper ( pack < Ts . . . > { } ) ; <nl> } <nl>
CPack refactoring and introduction of multiversion
apple/foundationdb
b4c59e0a02052b4b1b79ad6e761ad206579dcd43
2020-10-28T18:55:15Z
mmm a / editor / code_editor . cpp <nl> ppp b / editor / code_editor . cpp <nl> bool FindReplaceBar : : _search ( uint32_t p_flags , int p_from_line , int p_from_col ) <nl> result_col = col ; <nl> <nl> _update_results_count ( ) ; <nl> - set_error ( vformat ( TTR ( " Found % d match ( es ) . " ) , results_count ) ) ; <nl> } else { <nl> result_line = - 1 ; <nl> result_col = - 1 ; <nl> text_edit - > set_search_text ( " " ) ; <nl> text_edit - > set_search_flags ( p_flags ) ; <nl> text_edit - > set_current_search_result ( line , col ) ; <nl> - set_error ( text . empty ( ) ? " " : TTR ( " No Matches " ) ) ; <nl> } <nl> <nl> + _update_matches_label ( ) ; <nl> + <nl> return found ; <nl> } <nl> <nl> void FindReplaceBar : : _update_results_count ( ) { <nl> } <nl> } <nl> <nl> + void FindReplaceBar : : _update_matches_label ( ) { <nl> + <nl> + if ( search_text - > get_text ( ) . empty ( ) | | results_count = = - 1 ) { <nl> + matches_label - > hide ( ) ; <nl> + } else { <nl> + matches_label - > show ( ) ; <nl> + <nl> + matches_label - > add_color_override ( " font_color " , results_count > 0 ? Color ( 1 , 1 , 1 ) : EditorNode : : get_singleton ( ) - > get_gui_base ( ) - > get_color ( " error_color " , " Editor " ) ) ; <nl> + matches_label - > set_text ( vformat ( results_count = = 1 ? TTR ( " % d match . " ) : TTR ( " % d matches . " ) , results_count ) ) ; <nl> + } <nl> + } <nl> + <nl> bool FindReplaceBar : : search_current ( ) { <nl> <nl> uint32_t flags = 0 ; <nl> void FindReplaceBar : : _hide_bar ( ) { <nl> text_edit - > set_search_text ( " " ) ; <nl> result_line = - 1 ; <nl> result_col = - 1 ; <nl> - set_error ( " " ) ; <nl> hide ( ) ; <nl> } <nl> <nl> FindReplaceBar : : FindReplaceBar ( ) { <nl> <nl> vbc_lineedit = memnew ( VBoxContainer ) ; <nl> add_child ( vbc_lineedit ) ; <nl> + vbc_lineedit - > set_alignment ( ALIGN_CENTER ) ; <nl> vbc_lineedit - > set_h_size_flags ( SIZE_EXPAND_FILL ) ; <nl> VBoxContainer * vbc_button = memnew ( VBoxContainer ) ; <nl> add_child ( vbc_button ) ; <nl> FindReplaceBar : : FindReplaceBar ( ) { <nl> <nl> HBoxContainer * hbc_button_search = memnew ( HBoxContainer ) ; <nl> vbc_button - > add_child ( hbc_button_search ) ; <nl> + hbc_button_search - > set_alignment ( ALIGN_END ) ; <nl> hbc_button_replace = memnew ( HBoxContainer ) ; <nl> vbc_button - > add_child ( hbc_button_replace ) ; <nl> + hbc_button_replace - > set_alignment ( ALIGN_END ) ; <nl> <nl> HBoxContainer * hbc_option_search = memnew ( HBoxContainer ) ; <nl> vbc_option - > add_child ( hbc_option_search ) ; <nl> FindReplaceBar : : FindReplaceBar ( ) { <nl> search_text - > connect ( " text_changed " , this , " _search_text_changed " ) ; <nl> search_text - > connect ( " text_entered " , this , " _search_text_entered " ) ; <nl> <nl> + matches_label = memnew ( Label ) ; <nl> + hbc_button_search - > add_child ( matches_label ) ; <nl> + matches_label - > hide ( ) ; <nl> + <nl> find_prev = memnew ( ToolButton ) ; <nl> hbc_button_search - > add_child ( find_prev ) ; <nl> find_prev - > set_focus_mode ( FOCUS_NONE ) ; <nl> mmm a / editor / code_editor . h <nl> ppp b / editor / code_editor . h <nl> class FindReplaceBar : public HBoxContainer { <nl> GDCLASS ( FindReplaceBar , HBoxContainer ) ; <nl> <nl> LineEdit * search_text ; <nl> + Label * matches_label ; <nl> ToolButton * find_prev ; <nl> ToolButton * find_next ; <nl> CheckBox * case_sensitive ; <nl> class FindReplaceBar : public HBoxContainer { <nl> <nl> void _get_search_from ( int & r_line , int & r_col ) ; <nl> void _update_results_count ( ) ; <nl> + void _update_matches_label ( ) ; <nl> <nl> void _show_search ( ) ; <nl> void _hide_bar ( ) ; <nl> mmm a / editor / editor_help . cpp <nl> ppp b / editor / editor_help . cpp <nl> void FindBar : : _update_results_count ( ) { <nl> <nl> void FindBar : : _update_matches_label ( ) { <nl> <nl> - if ( results_count > 0 ) { <nl> - matches_label - > show ( ) ; <nl> - <nl> - matches_label - > add_color_override ( " font_color " , Color ( 1 , 1 , 1 ) ) ; <nl> - matches_label - > set_text ( vformat ( TTR ( " Found % d match ( es ) . " ) , results_count ) ) ; <nl> - } else if ( search_text - > get_text ( ) . empty ( ) ) { <nl> - <nl> + if ( search_text - > get_text ( ) . empty ( ) | | results_count = = - 1 ) { <nl> matches_label - > hide ( ) ; <nl> } else { <nl> matches_label - > show ( ) ; <nl> <nl> - matches_label - > add_color_override ( " font_color " , EditorNode : : get_singleton ( ) - > get_gui_base ( ) - > get_color ( " error_color " , " Editor " ) ) ; <nl> - matches_label - > set_text ( TTR ( " No Matches " ) ) ; <nl> + matches_label - > add_color_override ( " font_color " , results_count > 0 ? Color ( 1 , 1 , 1 ) : EditorNode : : get_singleton ( ) - > get_gui_base ( ) - > get_color ( " error_color " , " Editor " ) ) ; <nl> + matches_label - > set_text ( vformat ( results_count = = 1 ? TTR ( " % d match . " ) : TTR ( " % d matches . " ) , results_count ) ) ; <nl> } <nl> } <nl> <nl>
Make the script search have a proper matches counter
godotengine/godot
95a8b2b5d9cc7d9a2b4302a9259a3035b572cd35
2019-08-13T12:29:49Z
mmm a / atom / browser / ui / certificate_trust_win . cc <nl> ppp b / atom / browser / ui / certificate_trust_win . cc <nl> <nl> <nl> # include " atom / browser / ui / certificate_trust . h " <nl> <nl> - # include < windows . h > / / windows . h must be included first <nl> # include < wincrypt . h > <nl> + # include < windows . h > <nl> <nl> namespace certificate_trust { <nl> <nl>
and the order here matters apparently
electron/electron
1439a1e322efcfeb8e6b21a7556bdd7c0c7f358f
2017-04-21T02:23:50Z
mmm a / src / DHTMessageTracker . cc <nl> ppp b / src / DHTMessageTracker . cc <nl> DHTMessageTracker : : messageArrived <nl> A2_LOG_DEBUG ( fmt ( " RTT is % s " , util : : itos ( rtt ) . c_str ( ) ) ) ; <nl> message - > getRemoteNode ( ) - > updateRTT ( rtt ) ; <nl> SharedHandle < DHTMessageCallback > callback = entry - > getCallback ( ) ; <nl> + if ( ! ( * targetNode = = * message - > getRemoteNode ( ) ) ) { <nl> + / / Node ID has changed . Drop previous node ID from <nl> + / / DHTRoutingTable <nl> + A2_LOG_DEBUG <nl> + ( fmt ( " Node ID has changed : old : % s , new : % s " , <nl> + util : : toHex ( targetNode - > getID ( ) , DHT_ID_LENGTH ) . c_str ( ) , <nl> + util : : toHex ( message - > getRemoteNode ( ) - > getID ( ) , <nl> + DHT_ID_LENGTH ) . c_str ( ) ) ) ; <nl> + routingTable_ - > dropNode ( targetNode ) ; <nl> + } <nl> return std : : make_pair ( message , callback ) ; <nl> } catch ( RecoverableException & e ) { <nl> handleTimeoutEntry ( entry ) ; <nl>
Drop old node from DHT routing table if node ID has changed .
aria2/aria2
2dba2f86a43414d706287a5a0fa12aa6573a59d2
2011-01-06T15:20:58Z
mmm a / include / swift / AST / Expr . h <nl> ppp b / include / swift / AST / Expr . h <nl> class MetatypeConversionExpr : public ImplicitConversionExpr { <nl> } <nl> } ; <nl> <nl> - / / ArrayUpcastConversionExpr - Convert an Array < U > to an Array < T > , where <nl> - / / U is a subtype of T . <nl> - class ArrayUpcastConversionExpr : public ImplicitConversionExpr { <nl> + / / / CollectionUpcastConversionExpr - Convert a collection whose <nl> + / / / elements have some type T to the same kind of collection whose <nl> + / / / elements have type U , where U is a subtype of T . <nl> + class CollectionUpcastConversionExpr : public ImplicitConversionExpr { <nl> public : <nl> - ArrayUpcastConversionExpr ( Expr * subExpr , Type type ) <nl> - : ImplicitConversionExpr ( ExprKind : : ArrayUpcastConversion , subExpr , type ) { } <nl> + CollectionUpcastConversionExpr ( Expr * subExpr , Type type ) <nl> + : ImplicitConversionExpr ( <nl> + ExprKind : : CollectionUpcastConversion , subExpr , type ) { } <nl> <nl> static bool classof ( const Expr * E ) { <nl> - return E - > getKind ( ) = = ExprKind : : ArrayUpcastConversion ; <nl> + return E - > getKind ( ) = = ExprKind : : CollectionUpcastConversion ; <nl> } <nl> } ; <nl> <nl> - / / ArrayBridgedConversionExpr - Convert an Array < U > to an Array < T > , where <nl> - / / T is bridged to U . <nl> - class ArrayBridgedConversionExpr : public ImplicitConversionExpr { <nl> + / / / CollectionBridgedConversionExpr - Convert a collection whose <nl> + / / / elements have some type T to the same kind of collection whose <nl> + / / / elements have type U , where T is bridges to U . <nl> + class CollectionBridgedConversionExpr : public ImplicitConversionExpr { <nl> public : <nl> / / / Keep track of whether or not the type being bridged to conforms to the <nl> / / / _ConditionallyBridgedToObjectiveC protocol . <nl> bool isConditionallyBridged = false ; <nl> <nl> - ArrayBridgedConversionExpr ( Expr * subExpr , Type type ) <nl> - : ImplicitConversionExpr ( ExprKind : : ArrayBridgedConversion , subExpr , type ) { } <nl> + CollectionBridgedConversionExpr ( Expr * subExpr , Type type ) <nl> + : ImplicitConversionExpr ( ExprKind : : CollectionBridgedConversion , subExpr , <nl> + type ) { } <nl> <nl> static bool classof ( const Expr * E ) { <nl> - return E - > getKind ( ) = = ExprKind : : ArrayBridgedConversion ; <nl> + return E - > getKind ( ) = = ExprKind : : CollectionBridgedConversion ; <nl> } <nl> } ; <nl> <nl> mmm a / include / swift / AST / ExprNodes . def <nl> ppp b / include / swift / AST / ExprNodes . def <nl> ABSTRACT_EXPR ( ImplicitConversion , Expr ) <nl> EXPR ( CovariantFunctionConversion , ImplicitConversionExpr ) <nl> EXPR ( CovariantReturnConversion , ImplicitConversionExpr ) <nl> EXPR ( MetatypeConversion , ImplicitConversionExpr ) <nl> - EXPR ( ArrayUpcastConversion , ImplicitConversionExpr ) <nl> - EXPR ( ArrayBridgedConversion , ImplicitConversionExpr ) <nl> + EXPR ( CollectionUpcastConversion , ImplicitConversionExpr ) <nl> + EXPR ( CollectionBridgedConversion , ImplicitConversionExpr ) <nl> ABSTRACT_EXPR ( AnyErasure , ImplicitConversionExpr ) <nl> EXPR ( Erasure , AnyErasureExpr ) <nl> EXPR ( MetatypeErasure , AnyErasureExpr ) <nl> mmm a / lib / AST / ASTDumper . cpp <nl> ppp b / lib / AST / ASTDumper . cpp <nl> class PrintExpr : public ExprVisitor < PrintExpr > { <nl> printRec ( E - > getSubExpr ( ) ) ; <nl> OS < < ' ) ' ; <nl> } <nl> - void visitArrayUpcastConversionExpr ( ArrayUpcastConversionExpr * E ) { <nl> - printCommon ( E , " array_upcast_expr " ) < < ' \ n ' ; <nl> + void visitCollectionUpcastConversionExpr ( CollectionUpcastConversionExpr * E ) { <nl> + printCommon ( E , " collection_upcast_expr " ) < < ' \ n ' ; <nl> printRec ( E - > getSubExpr ( ) ) ; <nl> OS < < ' ) ' ; <nl> } <nl> class PrintExpr : public ExprVisitor < PrintExpr > { <nl> printRec ( E - > getSubExpr ( ) ) ; <nl> OS < < ' ) ' ; <nl> } <nl> - void visitArrayBridgedConversionExpr ( ArrayBridgedConversionExpr * E ) { <nl> - printCommon ( E , " array_bridged_conversion_expr " ) < < ' \ n ' ; <nl> + void visitCollectionBridgedConversionExpr ( CollectionBridgedConversionExpr * E ) { <nl> + printCommon ( E , " collection_bridged_conversion_expr " ) < < ' \ n ' ; <nl> printRec ( E - > getSubExpr ( ) ) ; <nl> OS < < ' ) ' ; <nl> } <nl> mmm a / lib / AST / Verifier . cpp <nl> ppp b / lib / AST / Verifier . cpp <nl> struct ASTNodeBase { } ; <nl> verifyCheckedBase ( E ) ; <nl> } <nl> <nl> - void verifyChecked ( ArrayUpcastConversionExpr * E ) { <nl> + void verifyChecked ( CollectionUpcastConversionExpr * E ) { <nl> verifyChecked ( E - > getSubExpr ( ) ) ; <nl> verifyCheckedBase ( E ) ; <nl> } <nl> <nl> - void verifyChecked ( ArrayBridgedConversionExpr * E ) { <nl> + void verifyChecked ( CollectionBridgedConversionExpr * E ) { <nl> verifyChecked ( E - > getSubExpr ( ) ) ; <nl> verifyCheckedBase ( E ) ; <nl> } <nl> mmm a / lib / SILGen / SILGenExpr . cpp <nl> ppp b / lib / SILGen / SILGenExpr . cpp <nl> namespace { <nl> RValue visitDerivedToBaseExpr ( DerivedToBaseExpr * E , SGFContext C ) ; <nl> RValue visitMetatypeConversionExpr ( MetatypeConversionExpr * E , <nl> SGFContext C ) ; <nl> - RValue visitArrayUpcastConversionExpr ( ArrayUpcastConversionExpr * E , <nl> - SGFContext C ) ; <nl> - RValue visitArrayBridgedConversionExpr ( ArrayBridgedConversionExpr * E , <nl> - SGFContext C ) ; <nl> + RValue visitCollectionUpcastConversionExpr ( <nl> + CollectionUpcastConversionExpr * E , <nl> + SGFContext C ) ; <nl> + RValue visitCollectionBridgedConversionExpr ( <nl> + CollectionBridgedConversionExpr * E , <nl> + SGFContext C ) ; <nl> RValue visitArchetypeToSuperExpr ( ArchetypeToSuperExpr * E , SGFContext C ) ; <nl> RValue visitFunctionConversionExpr ( FunctionConversionExpr * E , <nl> SGFContext C ) ; <nl> RValue RValueEmitter : : visitDerivedToBaseExpr ( DerivedToBaseExpr * E , <nl> return RValue ( SGF , E , ManagedValue ( converted , original . getCleanup ( ) ) ) ; <nl> } <nl> <nl> - RValue RValueEmitter : : <nl> - visitMetatypeConversionExpr ( MetatypeConversionExpr * E , <nl> + RValue RValueEmitter : : visitMetatypeConversionExpr ( MetatypeConversionExpr * E , <nl> SGFContext C ) { <nl> SILValue metaBase = <nl> SGF . emitRValueAsSingleValue ( E - > getSubExpr ( ) ) . getUnmanagedValue ( ) ; <nl> visitMetatypeConversionExpr ( MetatypeConversionExpr * E , <nl> } <nl> <nl> RValue RValueEmitter : : <nl> - visitArrayUpcastConversionExpr ( ArrayUpcastConversionExpr * E , <nl> - SGFContext C ) { <nl> + visitCollectionUpcastConversionExpr ( CollectionUpcastConversionExpr * E , <nl> + SGFContext C ) { <nl> <nl> SILLocation loc = RegularLocation ( E ) ; <nl> <nl> RValue RValueEmitter : : visitArrayDowncastExpr ( ArrayDowncastExpr * E , <nl> } <nl> <nl> RValue RValueEmitter : : <nl> - visitArrayBridgedConversionExpr ( ArrayBridgedConversionExpr * E , <nl> - SGFContext C ) { <nl> + visitCollectionBridgedConversionExpr ( CollectionBridgedConversionExpr * E , <nl> + SGFContext C ) { <nl> <nl> SILLocation loc = RegularLocation ( E ) ; <nl> <nl> mmm a / lib / Sema / CSApply . cpp <nl> ppp b / lib / Sema / CSApply . cpp <nl> Expr * ExprRewriter : : coerceToType ( Expr * expr , Type toType , <nl> assert ( ! bridgedVerbatim & & " Should be an upcast " ) ; <nl> <nl> / / Otherwise , it ' s a bridged upcast . <nl> - auto upcast = new ( tc . Context ) ArrayBridgedConversionExpr ( expr , toType ) ; <nl> + auto upcast = new ( tc . Context ) CollectionBridgedConversionExpr ( expr , <nl> + toType ) ; <nl> upcast - > isConditionallyBridged = isConditionallyBridged ; <nl> return upcast ; <nl> } <nl> Expr * ExprRewriter : : coerceToType ( Expr * expr , Type toType , <nl> dc , <nl> cs . getBaseTypeForArrayType ( fromType . getPointer ( ) ) ) . second & & <nl> " Cannot upcast array of non - bridged - verbatim type " ) ; <nl> - return new ( tc . Context ) ArrayUpcastConversionExpr ( expr , toType ) ; <nl> + return new ( tc . Context ) CollectionUpcastConversionExpr ( expr , toType ) ; <nl> } <nl> <nl> case ConversionRestrictionKind : : User : <nl> mmm a / lib / Sema / CSRanking . cpp <nl> ppp b / lib / Sema / CSRanking . cpp <nl> void ConstraintSystem : : increaseScore ( ScoreKind kind ) { <nl> log < < " non - default literal " ; <nl> break ; <nl> <nl> - case SK_ArrayUpcastConversion : <nl> - log < < " array upcast conversion " ; <nl> + case SK_CollectionUpcastConversion : <nl> + log < < " collection upcast conversion " ; <nl> break ; <nl> - case SK_ArrayBridgedConversion : <nl> - log < < " array bridged conversion " ; <nl> + case SK_CollectionBridgedConversion : <nl> + log < < " collection bridged conversion " ; <nl> break ; <nl> } <nl> log < < " ) \ n " ; <nl> mmm a / lib / Sema / CSSimplify . cpp <nl> ppp b / lib / Sema / CSSimplify . cpp <nl> ConstraintSystem : : simplifyRestrictedConstraint ( ConversionRestrictionKind restric <nl> return SolutionKind : : Error ; <nl> } <nl> <nl> - increaseScore ( SK_ArrayUpcastConversion ) ; <nl> + increaseScore ( SK_CollectionUpcastConversion ) ; <nl> addContextualScore ( ) ; <nl> assert ( matchKind > = TypeMatchKind : : Conversion ) ; <nl> <nl> ConstraintSystem : : simplifyRestrictedConstraint ( ConversionRestrictionKind restric <nl> return SolutionKind : : Unsolved ; <nl> } <nl> <nl> - increaseScore ( SK_ArrayBridgedConversion ) ; <nl> + increaseScore ( SK_CollectionBridgedConversion ) ; <nl> addContextualScore ( ) ; <nl> assert ( matchKind > = TypeMatchKind : : Conversion ) ; <nl> <nl> mmm a / lib / Sema / ConstraintSystem . h <nl> ppp b / lib / Sema / ConstraintSystem . h <nl> enum ScoreKind { <nl> SK_FunctionConversion , <nl> / / / A literal expression bound to a non - default literal type . <nl> SK_NonDefaultLiteral , <nl> - / / / An implicit bridged conversion between array types . <nl> - SK_ArrayBridgedConversion , <nl> - / / / An implicit upcast conversion between array types . <nl> - SK_ArrayUpcastConversion , <nl> + / / / An implicit bridged conversion between collection types . <nl> + SK_CollectionBridgedConversion , <nl> + / / / An implicit upcast conversion between collection types . <nl> + SK_CollectionUpcastConversion , <nl> } ; <nl> <nl> / / / The number of score kinds . <nl> mmm a / lib / Sema / MiscDiagnostics . cpp <nl> ppp b / lib / Sema / MiscDiagnostics . cpp <nl> static void diagModuleOrMetatypeValue ( TypeChecker & TC , const Expr * E ) { <nl> case ExprKind : : CovariantFunctionConversion : <nl> case ExprKind : : CovariantReturnConversion : <nl> case ExprKind : : MetatypeConversion : <nl> - case ExprKind : : ArrayUpcastConversion : <nl> - case ExprKind : : ArrayBridgedConversion : <nl> + case ExprKind : : CollectionUpcastConversion : <nl> + case ExprKind : : CollectionBridgedConversion : <nl> case ExprKind : : Erasure : <nl> case ExprKind : : MetatypeErasure : <nl> case ExprKind : : DerivedToBase : <nl> mmm a / stdlib / core / Dictionary . swift <nl> ppp b / stdlib / core / Dictionary . swift <nl> <nl> / / Syntax for bridging <nl> / / mmmmmmmmmmmmmmmmmm - <nl> / / <nl> - / / There are two implict conversions : <nl> + / / There are two implicit conversions : <nl> / / <nl> / / * ` NSDictionary ` converts to ` Dictionary < NSObject , AnyObject > ` , <nl> / / * ` Dictionary < K , V > ` converts to ` NSDictionary ` . <nl>
Rename array upcast / bridge expressions to " collection " .
apple/swift
5ca3882b064ea3111343485cb9f8b5645241e905
2014-06-12T21:41:55Z
mmm a / modules / imgproc / include / opencv2 / imgproc . hpp <nl> ppp b / modules / imgproc / include / opencv2 / imgproc . hpp <nl> enum { MORPH_RECT = 0 , <nl> } ; <nl> <nl> / / ! interpolation algorithm <nl> - enum { INTER_NEAREST = 0 , / / ! < nearest neighbor interpolation <nl> - INTER_LINEAR = 1 , / / ! < bilinear interpolation <nl> - INTER_CUBIC = 2 , / / ! < bicubic interpolation <nl> - INTER_AREA = 3 , / / ! < area - based ( or super ) interpolation <nl> - INTER_LANCZOS4 = 4 , / / ! < Lanczos interpolation over 8x8 neighborhood <nl> - <nl> - INTER_MAX = 7 , / / ! < mask for interpolation codes <nl> - WARP_INVERSE_MAP = 16 <nl> + enum { INTER_NEAREST = 0 , / / ! < nearest neighbor interpolation <nl> + INTER_LINEAR = 1 , / / ! < bilinear interpolation <nl> + INTER_CUBIC = 2 , / / ! < bicubic interpolation <nl> + INTER_AREA = 3 , / / ! < area - based ( or super ) interpolation <nl> + INTER_LANCZOS4 = 4 , / / ! < Lanczos interpolation over 8x8 neighborhood <nl> + <nl> + INTER_MAX = 7 , / / ! < mask for interpolation codes <nl> + WARP_FILL_OUTLIERS = 8 , <nl> + WARP_INVERSE_MAP = 16 <nl> } ; <nl> <nl> enum { INTER_BITS = 5 , <nl> CV_EXPORTS_W Mat getAffineTransform ( InputArray src , InputArray dst ) ; <nl> CV_EXPORTS_W void getRectSubPix ( InputArray image , Size patchSize , <nl> Point2f center , OutputArray patch , int patchType = - 1 ) ; <nl> <nl> + / / ! computes the log polar transform <nl> + CV_EXPORTS_W void logPolar ( InputArray src , OutputArray dst , <nl> + Point2f center , double M , int flags ) ; <nl> + <nl> + / / ! computes the linear polar transform <nl> + CV_EXPORTS_W void linearPolar ( InputArray src , OutputArray dst , <nl> + Point2f center , double maxRadius , int flags ) ; <nl> + <nl> / / ! computes the integral image <nl> CV_EXPORTS_W void integral ( InputArray src , OutputArray sum , int sdepth = - 1 ) ; <nl> <nl> mmm a / modules / imgproc / src / imgwarp . cpp <nl> ppp b / modules / imgproc / src / imgwarp . cpp <nl> cvLogPolar ( const CvArr * srcarr , CvArr * dstarr , <nl> cvRemap ( src , dst , mapx , mapy , flags , cvScalarAll ( 0 ) ) ; <nl> } <nl> <nl> + void cv : : logPolar ( InputArray _src , OutputArray _dst , <nl> + Point2f center , double M , int flags ) <nl> + { <nl> + Mat src = _src . getMat ( ) ; <nl> + _dst . create ( src . size ( ) , src . type ( ) ) ; <nl> + CvMat c_src = src , c_dst = _dst . getMat ( ) ; <nl> + cvLogPolar ( & c_src , & c_dst , center , M , flags ) ; <nl> + } <nl> <nl> / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> Linear - Polar Transform <nl> void cvLinearPolar ( const CvArr * srcarr , CvArr * dstarr , <nl> cvRemap ( src , dst , mapx , mapy , flags , cvScalarAll ( 0 ) ) ; <nl> } <nl> <nl> + void cv : : linearPolar ( InputArray _src , OutputArray _dst , <nl> + Point2f center , double maxRadius , int flags ) <nl> + { <nl> + Mat src = _src . getMat ( ) ; <nl> + _dst . create ( src . size ( ) , src . type ( ) ) ; <nl> + CvMat c_src = src , c_dst = _dst . getMat ( ) ; <nl> + cvLinearPolar ( & c_src , & c_dst , center , maxRadius , flags ) ; <nl> + } <nl> <nl> / * End of file . * / <nl> new file mode 100644 <nl> index 00000000000 . . 66082484d37 <nl> mmm / dev / null <nl> ppp b / samples / python2 / logpolar . py <nl> <nl> + # ! / usr / bin / env python <nl> + import cv2 <nl> + <nl> + if __name__ = = ' __main__ ' : <nl> + import sys <nl> + try : <nl> + fn = sys . argv [ 1 ] <nl> + except : <nl> + fn = ' . . / cpp / fruits . jpg ' <nl> + <nl> + img = cv2 . imread ( fn ) <nl> + if img is None : <nl> + print ' Failed to load image file : ' , fn <nl> + sys . exit ( 1 ) <nl> + <nl> + img2 = cv2 . logPolar ( img , ( img . shape [ 0 ] / 2 , img . shape [ 1 ] / 2 ) , 40 , cv2 . WARP_FILL_OUTLIERS ) <nl> + img3 = cv2 . linearPolar ( img , ( img . shape [ 0 ] / 2 , img . shape [ 1 ] / 2 ) , 40 , cv2 . WARP_FILL_OUTLIERS ) <nl> + <nl> + cv2 . imshow ( ' before ' , img ) <nl> + cv2 . imshow ( ' logpolar ' , img2 ) <nl> + cv2 . imshow ( ' linearpolar ' , img3 ) <nl> + <nl> + cv2 . waitKey ( 0 ) <nl>
Add cv : : logPolar , cv : : linearPolar , and a python example
opencv/opencv
51341738ba7f3f9e9492f73ba927eb3509be6f38
2013-09-30T20:31:19Z
mmm a / src / compiler . cc <nl> ppp b / src / compiler . cc <nl> Handle < SharedFunctionInfo > Compiler : : CompileScript ( <nl> MaybeHandle < SharedFunctionInfo > maybe_result ; <nl> Handle < SharedFunctionInfo > result ; <nl> if ( extension = = NULL ) { <nl> - if ( FLAG_serialize_toplevel & & <nl> + maybe_result = compilation_cache - > LookupScript ( <nl> + source , script_name , line_offset , column_offset , is_shared_cross_origin , <nl> + context ) ; <nl> + if ( maybe_result . is_null ( ) & & FLAG_serialize_toplevel & & <nl> compile_options = = ScriptCompiler : : kConsumeCodeCache & & <nl> ! isolate - > debug ( ) - > is_loaded ( ) ) { <nl> HistogramTimerScope timer ( isolate - > counters ( ) - > compile_deserialize ( ) ) ; <nl> Handle < SharedFunctionInfo > Compiler : : CompileScript ( <nl> return result ; <nl> } <nl> / / Deserializer failed . Fall through to compile . <nl> - } else { <nl> - maybe_result = compilation_cache - > LookupScript ( <nl> - source , script_name , line_offset , column_offset , <nl> - is_shared_cross_origin , context ) ; <nl> } <nl> } <nl> <nl>
Probe same - isolate compilation cache before deserializing .
v8/v8
a699645b71ec442617647cef55ac71f53c6293fa
2015-01-26T10:57:05Z
mmm a / src / profile - generator . cc <nl> ppp b / src / profile - generator . cc <nl> void V8HeapExplorer : : ExtractMapReferences ( int entry , Map * map ) { <nl> SetInternalReference ( map , entry , <nl> " constructor " , map - > constructor ( ) , <nl> Map : : kConstructorOffset ) ; <nl> - if ( ! map - > instance_descriptors ( ) - > IsEmpty ( ) ) { <nl> - TagObject ( map - > instance_descriptors ( ) , " ( map descriptors ) " ) ; <nl> - / / TODO ( verwaest ) : Check what to do here . <nl> + if ( map - > HasTransitionArray ( ) ) { <nl> + TransitionArray * transitions = map - > transitions ( ) ; <nl> + if ( ! transitions - > descriptors ( ) - > IsEmpty ( ) ) { <nl> + DescriptorArray * descriptors = transitions - > descriptors ( ) ; <nl> + TagObject ( descriptors , " ( map descriptors ) " ) ; <nl> + SetInternalReference ( transitions , entry , <nl> + " descriptors " , descriptors , <nl> + TransitionArray : : kDescriptorsOffset ) ; <nl> + IndexedReferencesExtractor refs_extractor ( <nl> + this , transitions , entry ) ; <nl> + transitions - > Iterate ( & refs_extractor ) ; <nl> + } <nl> + TagObject ( transitions , " ( transition array ) " ) ; <nl> SetInternalReference ( map , entry , <nl> - " descriptors " , map - > instance_descriptors ( ) , <nl> + " transitions " , transitions , <nl> Map : : kTransitionsOrBackPointerOffset ) ; <nl> } <nl> SetInternalReference ( map , entry , <nl> mmm a / test / cctest / test - heap - profiler . cc <nl> ppp b / test / cctest / test - heap - profiler . cc <nl> TEST ( NoRefsToNonEssentialEntries ) { <nl> GetProperty ( global_object , v8 : : HeapGraphEdge : : kInternal , " elements " ) ; <nl> CHECK_EQ ( NULL , elements ) ; <nl> } <nl> + <nl> + <nl> + TEST ( MapHasDescriptorsAndTransitions ) { <nl> + v8 : : HandleScope scope ; <nl> + LocalContext env ; <nl> + CompileRun ( " obj = { a : 10 } ; \ n " ) ; <nl> + const v8 : : HeapSnapshot * snapshot = <nl> + v8 : : HeapProfiler : : TakeSnapshot ( v8_str ( " snapshot " ) ) ; <nl> + const v8 : : HeapGraphNode * global = GetGlobalObject ( snapshot ) ; <nl> + const v8 : : HeapGraphNode * global_object = <nl> + GetProperty ( global , v8 : : HeapGraphEdge : : kProperty , " obj " ) ; <nl> + CHECK_NE ( NULL , global_object ) ; <nl> + const v8 : : HeapGraphNode * map = <nl> + GetProperty ( global_object , v8 : : HeapGraphEdge : : kInternal , " map " ) ; <nl> + CHECK_NE ( NULL , map ) ; <nl> + const v8 : : HeapGraphNode * descriptors = <nl> + GetProperty ( map , v8 : : HeapGraphEdge : : kInternal , " descriptors " ) ; <nl> + CHECK_NE ( NULL , descriptors ) ; <nl> + const v8 : : HeapGraphNode * transitions = <nl> + GetProperty ( map , v8 : : HeapGraphEdge : : kInternal , " transitions " ) ; <nl> + CHECK_NE ( NULL , transitions ) ; <nl> + } <nl>
Show map - > transition array - > descriptor array to the heap profiler .
v8/v8
61d11f99c414ce1dd74d93e1def37309f4d20caa
2012-08-16T14:25:55Z
mmm a / src / library . js <nl> ppp b / src / library . js <nl> LibraryManager . library = { <nl> asprintf : function ( s , format , varargs ) { <nl> return _sprintf ( - s , format , varargs ) ; <nl> } , <nl> + dprintf__deps : [ ' _formatString ' , ' write ' ] , <nl> + dprintf : function ( fd , format , varargs ) { <nl> + var result = __formatString ( format , varargs ) ; <nl> + var stack = Runtime . stackSave ( ) ; <nl> + var ret = _write ( fd , allocate ( result , ' i8 ' , ALLOC_STACK ) , result . length ) ; <nl> + Runtime . stackRestore ( stack ) ; <nl> + } , <nl> <nl> # if TARGET_X86 <nl> / / va_arg is just like our varargs <nl> LibraryManager . library = { <nl> vprintf : ' printf ' , <nl> vsprintf : ' sprintf ' , <nl> vasprintf : ' asprintf ' , <nl> + vdprintf : ' dprintf ' , <nl> vscanf : ' scanf ' , <nl> vfscanf : ' fscanf ' , <nl> vsscanf : ' sscanf ' , <nl> LibraryManager . library = { <nl> vasprintf : function ( s , format , va_arg ) { <nl> return _asprintf ( s , format , { { { makeGetValue ( ' va_arg ' , 0 , ' * ' ) } } } ) ; <nl> } , <nl> + vdprintf__deps : [ ' dprintf ' ] , <nl> + vdprintf : function ( fd , format , va_arg ) { <nl> + return _dprintf ( fd , format , { { { makeGetValue ( ' va_arg ' , 0 , ' * ' ) } } } ) ; <nl> + } , <nl> vscanf__deps : [ ' scanf ' ] , <nl> vscanf : function ( format , va_arg ) { <nl> return _scanf ( format , { { { makeGetValue ( ' va_arg ' , 0 , ' * ' ) } } } ) ; <nl>
Merge pull request from ngld / dprintf
emscripten-core/emscripten
161ca12649ab8bfaf3ef16129ac2b29e6b199781
2013-09-24T23:50:02Z
mmm a / jstests / core / views / views_collation . js <nl> ppp b / jstests / core / views / views_collation . js <nl> <nl> viewsDB . runCommand ( <nl> { collMod : " esView " , viewOn : " simpleCollection " , pipeline : [ graphLookupFilView ] } ) , <nl> ErrorCodes . OptionNotSupportedOnView ) ; <nl> + <nl> + / / Views cannot be dropped and recreated with a different collation if other views depend on <nl> + / / that view . <nl> + assert . commandWorked ( <nl> + viewsDB . runCommand ( { create : " filView2 " , viewOn : " filView " , collation : { locale : " fil " } } ) ) ; <nl> + assert . commandWorked ( viewsDB . runCommand ( { drop : " filView " } ) ) ; <nl> + assert . commandFailedWithCode ( <nl> + viewsDB . runCommand ( { create : " filView " , viewOn : " simpleCollection " } ) , <nl> + ErrorCodes . OptionNotSupportedOnView ) ; <nl> + assert . commandFailedWithCode ( <nl> + viewsDB . runCommand ( <nl> + { create : " filView " , viewOn : " simpleCollection " , collation : { locale : " en " } } ) , <nl> + ErrorCodes . OptionNotSupportedOnView ) ; <nl> + assert . commandWorked ( <nl> + viewsDB . createView ( " filView " , " ukCollection " , [ ] , { collation : { locale : " fil " } } ) ) ; <nl> + <nl> + / / Views cannot be dropped and recreated with a different collation if other views depend on <nl> + / / that view via $ lookup or $ graphLookup . <nl> + assert . commandWorked ( viewsDB . runCommand ( <nl> + { collMod : " filView2 " , viewOn : " simpleCollection " , pipeline : [ lookupFilView ] } ) ) ; <nl> + assert . commandWorked ( viewsDB . runCommand ( { drop : " filView " } ) ) ; <nl> + assert . commandFailedWithCode ( <nl> + viewsDB . runCommand ( { create : " filView " , viewOn : " simpleCollection " } ) , <nl> + ErrorCodes . OptionNotSupportedOnView ) ; <nl> + assert . commandFailedWithCode ( <nl> + viewsDB . runCommand ( <nl> + { create : " filView " , viewOn : " simpleCollection " , collation : { locale : " en " } } ) , <nl> + ErrorCodes . OptionNotSupportedOnView ) ; <nl> + assert . commandWorked ( viewsDB . runCommand ( <nl> + { create : " filView " , viewOn : " ukCollection " , pipeline : [ ] , collation : { locale : " fil " } } ) ) ; <nl> + <nl> + assert . commandWorked ( viewsDB . runCommand ( <nl> + { collMod : " filView2 " , viewOn : " simpleCollection " , pipeline : [ graphLookupFilView ] } ) ) ; <nl> + assert . commandWorked ( viewsDB . runCommand ( { drop : " filView " } ) ) ; <nl> + assert . commandFailedWithCode ( <nl> + viewsDB . runCommand ( { create : " filView " , viewOn : " simpleCollection " } ) , <nl> + ErrorCodes . OptionNotSupportedOnView ) ; <nl> + assert . commandFailedWithCode ( <nl> + viewsDB . runCommand ( <nl> + { create : " filView " , viewOn : " simpleCollection " , collation : { locale : " en " } } ) , <nl> + ErrorCodes . OptionNotSupportedOnView ) ; <nl> + <nl> + / / If two views " A " and " C " have different collations and depend on the namespace " B " , then " B " <nl> + / / cannot be created as a view . <nl> + assert . commandWorked ( <nl> + viewsDB . runCommand ( { create : " A " , viewOn : " B " , collation : { locale : " hsb " } } ) ) ; <nl> + assert . commandWorked ( <nl> + viewsDB . runCommand ( { create : " B " , viewOn : " other " , collation : { locale : " hsb " } } ) ) ; <nl> + assert . commandFailedWithCode ( <nl> + viewsDB . runCommand ( { create : " C " , viewOn : " B " , collation : { locale : " wae " } } ) , <nl> + ErrorCodes . OptionNotSupportedOnView ) ; <nl> + assert . commandWorked ( viewsDB . runCommand ( { drop : " B " } ) ) ; <nl> + assert . commandWorked ( <nl> + viewsDB . runCommand ( { create : " C " , viewOn : " B " , collation : { locale : " wae " } } ) ) ; <nl> + assert . commandFailedWithCode ( <nl> + viewsDB . runCommand ( { create : " B " , viewOn : " other " , collation : { locale : " hsb " } } ) , <nl> + ErrorCodes . OptionNotSupportedOnView ) ; <nl> + assert . commandFailedWithCode ( <nl> + viewsDB . runCommand ( { create : " B " , viewOn : " other " , collation : { locale : " wae " } } ) , <nl> + ErrorCodes . OptionNotSupportedOnView ) ; <nl> + assert . commandFailedWithCode ( viewsDB . runCommand ( { create : " B " , viewOn : " other " } ) , <nl> + ErrorCodes . OptionNotSupportedOnView ) ; <nl> } ( ) ) ; <nl> mmm a / src / mongo / db / views / SConscript <nl> ppp b / src / mongo / db / views / SConscript <nl> env . CppUnitTest ( <nl> ' resolved_view_test . cpp ' , <nl> ' view_catalog_test . cpp ' , <nl> ' view_definition_test . cpp ' , <nl> + ' view_graph_test . cpp ' , <nl> ] , <nl> LIBDEPS = [ <nl> ' views ' , <nl> mmm a / src / mongo / db / views / view_catalog . cpp <nl> ppp b / src / mongo / db / views / view_catalog . cpp <nl> Status ViewCatalog : : _upsertIntoGraph ( OperationContext * opCtx , const ViewDefiniti <nl> if ( ! collationStatus . isOK ( ) ) { <nl> return collationStatus ; <nl> } <nl> - return _viewGraph . insertAndValidate ( viewDef . name ( ) , refs , pipelineSize ) ; <nl> + return _viewGraph . insertAndValidate ( viewDef , refs , pipelineSize ) ; <nl> } else { <nl> - _viewGraph . insertWithoutValidating ( viewDef . name ( ) , refs , pipelineSize ) ; <nl> + _viewGraph . insertWithoutValidating ( viewDef , refs , pipelineSize ) ; <nl> return Status : : OK ( ) ; <nl> } <nl> } ; <nl> mmm a / src / mongo / db / views / view_graph . cpp <nl> ppp b / src / mongo / db / views / view_graph . cpp <nl> <nl> <nl> # include " mongo / db / views / view_graph . h " <nl> <nl> + # include " mongo / db / query / collation / collator_interface . h " <nl> # include " mongo / db / views / view . h " <nl> + # include " mongo / util / scopeguard . h " <nl> <nl> namespace mongo { <nl> <nl> void ViewGraph : : clear ( ) { <nl> _namespaceIds . clear ( ) ; <nl> } <nl> <nl> - Status ViewGraph : : insertAndValidate ( const NamespaceString & viewNss , <nl> + size_t ViewGraph : : size ( ) const { <nl> + return _graph . size ( ) ; <nl> + } <nl> + <nl> + Status ViewGraph : : insertAndValidate ( const ViewDefinition & view , <nl> const std : : vector < NamespaceString > & refs , <nl> - const int pipelineSize ) { <nl> - insertWithoutValidating ( viewNss , refs , pipelineSize ) ; <nl> + int pipelineSize ) { <nl> + insertWithoutValidating ( view , refs , pipelineSize ) ; <nl> <nl> / / Perform validation on this newly inserted view . Note , if the graph was put in an invalid <nl> / / state through unvalidated inserts ( e . g . if the user manually edits system . views ) <nl> / / this may not necessarily be detected . We only check for errors introduced by this view . <nl> + const auto & viewNss = view . name ( ) ; <nl> uint64_t nodeId = _getNodeId ( viewNss ) ; <nl> <nl> - auto viewDepthLimitExceeded = [ this , & viewNss ] ( ) - > Status { <nl> - this - > remove ( viewNss ) ; <nl> - return Status ( ErrorCodes : : ViewDepthLimitExceeded , <nl> - str : : stream ( ) < < " View depth limit exceeded ; maximum depth is " <nl> - < < kMaxViewDepth ) ; <nl> - } ; <nl> - <nl> - auto viewPipelineMaxSizeExceeded = [ this , & viewNss ] ( ) - > Status { <nl> - this - > remove ( viewNss ) ; <nl> - return Status ( ErrorCodes : : ViewPipelineMaxSizeExceeded , <nl> - str : : stream ( ) < < " View pipeline exceeds maximum size ; maximum size is " <nl> - < < ViewGraph : : kMaxViewPipelineSizeBytes ) ; <nl> + / / If the graph fails validation for any reason , the insert is automatically rolled back on <nl> + / / exiting this method . <nl> + auto rollBackInsert = [ & ] ( ) - > auto { <nl> + remove ( viewNss ) ; <nl> } ; <nl> + auto guard = MakeGuard ( rollBackInsert ) ; <nl> <nl> / / Check for cycles and get the height of the children . <nl> StatsMap statsMap ; <nl> std : : vector < uint64_t > cycleVertices ; <nl> - ErrorCodes : : Error childRes = <nl> - _getChildrenStatsAndCheckCycle ( nodeId , nodeId , 0 , & statsMap , & cycleVertices ) ; <nl> - if ( childRes = = ErrorCodes : : ViewDepthLimitExceeded ) { <nl> - return viewDepthLimitExceeded ( ) ; <nl> - } else if ( childRes = = ErrorCodes : : ViewPipelineMaxSizeExceeded ) { <nl> - return viewPipelineMaxSizeExceeded ( ) ; <nl> - } else if ( childRes = = ErrorCodes : : GraphContainsCycle ) { <nl> - / / Make the error message with the namespaces of the cycle and remove the node . <nl> - str : : stream ss ; <nl> - ss < < " View cycle detected : " ; <nl> - for ( auto cycleIter = cycleVertices . rbegin ( ) ; cycleIter ! = cycleVertices . rend ( ) ; <nl> - cycleIter + + ) { <nl> - ss < < _graph [ * cycleIter ] . ns < < " = > " ; <nl> - } <nl> - ss < < viewNss . ns ( ) ; <nl> - remove ( viewNss ) ; <nl> - return Status ( ErrorCodes : : GraphContainsCycle , ss ) ; <nl> + cycleVertices . reserve ( kMaxViewDepth ) ; <nl> + auto childRes = _validateChildren ( nodeId , nodeId , 0 , & statsMap , & cycleVertices ) ; <nl> + if ( ! childRes . isOK ( ) ) { <nl> + return childRes ; <nl> } <nl> <nl> / / Subtract one since the child height includes the non - view leaf node ( s ) . <nl> Status ViewGraph : : insertAndValidate ( const NamespaceString & viewNss , <nl> / / Get the height of the parents to obtain the diameter through this node , as well as the size <nl> / / of the pipeline to check if if the combined pipeline exceeds the max size . <nl> statsMap . clear ( ) ; <nl> - ErrorCodes : : Error parentRes = _getParentsStats ( nodeId , 0 , & statsMap ) ; <nl> - if ( parentRes = = ErrorCodes : : ViewDepthLimitExceeded ) { <nl> - return viewDepthLimitExceeded ( ) ; <nl> - } else if ( parentRes = = ErrorCodes : : ViewPipelineMaxSizeExceeded ) { <nl> - return viewPipelineMaxSizeExceeded ( ) ; <nl> + auto parentRes = _validateParents ( nodeId , 0 , & statsMap ) ; <nl> + if ( ! parentRes . isOK ( ) ) { <nl> + return parentRes ; <nl> } <nl> <nl> / / Check the combined heights of the children and parents . <nl> Status ViewGraph : : insertAndValidate ( const NamespaceString & viewNss , <nl> int diameter = parentsHeight + childrenHeight - 1 ; <nl> <nl> if ( diameter > kMaxViewDepth ) { <nl> - return viewDepthLimitExceeded ( ) ; <nl> + return { ErrorCodes : : ViewDepthLimitExceeded , <nl> + str : : stream ( ) < < " View depth limit exceeded ; maximum depth is " < < kMaxViewDepth } ; <nl> } <nl> <nl> / / Check the combined sizes of the children and parents . <nl> Status ViewGraph : : insertAndValidate ( const NamespaceString & viewNss , <nl> int pipelineTotalSize = parentsSize + childrenSize - currentNode . size ; <nl> <nl> if ( pipelineTotalSize > kMaxViewPipelineSizeBytes ) { <nl> - return viewPipelineMaxSizeExceeded ( ) ; <nl> + return { ErrorCodes : : ViewPipelineMaxSizeExceeded , <nl> + str : : stream ( ) < < " Operation would result in a resolved view pipeline that exceeds " <nl> + " the maximum size of " <nl> + < < kMaxViewPipelineSizeBytes <nl> + < < " bytes " } ; <nl> } <nl> <nl> + guard . Dismiss ( ) ; <nl> return Status : : OK ( ) ; <nl> } <nl> <nl> - void ViewGraph : : insertWithoutValidating ( const NamespaceString & viewNss , <nl> + void ViewGraph : : insertWithoutValidating ( const ViewDefinition & view , <nl> const std : : vector < NamespaceString > & refs , <nl> - const int pipelineSize ) { <nl> - uint64_t nodeId = _getNodeId ( viewNss ) ; <nl> + int pipelineSize ) { <nl> + uint64_t nodeId = _getNodeId ( view . name ( ) ) ; <nl> / / Note , the parent pointers of this node are set when the parents are inserted . <nl> / / This sets the children pointers of the node for this view , as well as the parent <nl> / / pointers for its children . <nl> Node * node = & ( _graph [ nodeId ] ) ; <nl> - node - > size = pipelineSize ; <nl> invariant ( node - > children . empty ( ) ) ; <nl> + invariant ( ! static_cast < bool > ( node - > collator ) ) ; <nl> + <nl> + node - > size = pipelineSize ; <nl> + node - > collator = view . defaultCollator ( ) ; <nl> <nl> for ( const NamespaceString & childNss : refs ) { <nl> uint64_t childId = _getNodeId ( childNss ) ; <nl> void ViewGraph : : remove ( const NamespaceString & viewNss ) { <nl> } <nl> } <nl> <nl> - / / Remove all child pointers since this view no longer references anything . <nl> + / / This node no longer represents a view , so its children must be cleared and its collator <nl> + / / unset . <nl> node - > children . clear ( ) ; <nl> + node - > collator = boost : : none ; <nl> <nl> / / Only remove node if there are no remaining references to this node . <nl> if ( node - > parents . size ( ) = = 0 ) { <nl> void ViewGraph : : remove ( const NamespaceString & viewNss ) { <nl> } <nl> } <nl> <nl> - ErrorCodes : : Error ViewGraph : : _getParentsStats ( uint64_t currentId , <nl> - int currentDepth , <nl> - StatsMap * statsMap ) { <nl> + Status ViewGraph : : _validateParents ( uint64_t currentId , int currentDepth , StatsMap * statsMap ) { <nl> const Node & currentNode = _graph [ currentId ] ; <nl> int maxHeightOfParents = 0 ; <nl> int maxSizeOfParents = 0 ; <nl> ErrorCodes : : Error ViewGraph : : _getParentsStats ( uint64_t currentId , <nl> / / Return early if we ' ve already exceeded the maximum depth . This will also be triggered if <nl> / / we ' re traversing a cycle introduced through unvalidated inserts . <nl> if ( currentDepth > kMaxViewDepth ) { <nl> - return ErrorCodes : : ViewDepthLimitExceeded ; <nl> + return { ErrorCodes : : ViewDepthLimitExceeded , <nl> + str : : stream ( ) < < " View depth limit exceeded ; maximum depth is " <nl> + < < ViewGraph : : kMaxViewDepth } ; <nl> } <nl> <nl> for ( uint64_t parentId : currentNode . parents ) { <nl> + const auto & parentNode = _graph [ parentId ] ; <nl> + if ( parentNode . isView ( ) & & <nl> + ! CollatorInterface : : collatorsMatch ( currentNode . collator . get ( ) , <nl> + parentNode . collator . get ( ) ) ) { <nl> + return { ErrorCodes : : OptionNotSupportedOnView , <nl> + str : : stream ( ) < < " View " < < currentNode . ns <nl> + < < " has a collation that does not match the collation of view " <nl> + < < parentNode . ns } ; <nl> + } <nl> + <nl> if ( ! ( * statsMap ) [ parentId ] . checked ) { <nl> - auto res = _getParentsStats ( parentId , currentDepth + 1 , statsMap ) ; <nl> - if ( res ! = ErrorCodes : : OK ) { <nl> + auto res = _validateParents ( parentId , currentDepth + 1 , statsMap ) ; <nl> + if ( ! res . isOK ( ) ) { <nl> return res ; <nl> } <nl> } <nl> ErrorCodes : : Error ViewGraph : : _getParentsStats ( uint64_t currentId , <nl> ( * statsMap ) [ currentId ] . height = maxHeightOfParents + 1 ; <nl> ( * statsMap ) [ currentId ] . cumulativeSize + = maxSizeOfParents + currentNode . size ; <nl> <nl> - if ( ( * statsMap ) [ currentId ] . cumulativeSize > kMaxViewPipelineSizeBytes ) { <nl> - return ErrorCodes : : ViewPipelineMaxSizeExceeded ; <nl> + const auto size = ( * statsMap ) [ currentId ] . cumulativeSize ; <nl> + if ( size > kMaxViewPipelineSizeBytes ) { <nl> + return { ErrorCodes : : ViewPipelineMaxSizeExceeded , <nl> + str : : stream ( ) < < " View pipeline is too large and exceeds the maximum size of " <nl> + < < ViewGraph : : kMaxViewPipelineSizeBytes <nl> + < < " bytes " } ; <nl> } <nl> <nl> - return ErrorCodes : : OK ; <nl> + return Status : : OK ( ) ; <nl> } <nl> <nl> - ErrorCodes : : Error ViewGraph : : _getChildrenStatsAndCheckCycle ( uint64_t startingId , <nl> - uint64_t currentId , <nl> - int currentDepth , <nl> - StatsMap * statsMap , <nl> - std : : vector < uint64_t > * cycleIds ) { <nl> - / / Check children of current node . <nl> + Status ViewGraph : : _validateChildren ( uint64_t startingId , <nl> + uint64_t currentId , <nl> + int currentDepth , <nl> + StatsMap * statsMap , <nl> + std : : vector < uint64_t > * traversalIds ) { <nl> const Node & currentNode = _graph [ currentId ] ; <nl> + traversalIds - > push_back ( currentId ) ; <nl> + <nl> + / / If we ' ve encountered the id of the starting node , we ' ve found a cycle in the graph . <nl> if ( currentDepth > 0 & & currentId = = startingId ) { <nl> - return ErrorCodes : : GraphContainsCycle ; <nl> + auto iterator = traversalIds - > rbegin ( ) ; <nl> + auto errmsg = StringBuilder ( ) ; <nl> + <nl> + errmsg < < " View cycle detected : " ; <nl> + errmsg < < _graph [ * iterator ] . ns ; <nl> + for ( ; iterator ! = traversalIds - > rend ( ) ; + + iterator ) { <nl> + errmsg < < " = > " < < _graph [ * iterator ] . ns ; <nl> + } <nl> + return { ErrorCodes : : GraphContainsCycle , errmsg . str ( ) } ; <nl> } <nl> <nl> / / Return early if we ' ve already exceeded the maximum depth . This will also be triggered if <nl> / / we ' re traversing a cycle introduced through unvalidated inserts . <nl> if ( currentDepth > kMaxViewDepth ) { <nl> - return ErrorCodes : : ViewDepthLimitExceeded ; <nl> + return { ErrorCodes : : ViewDepthLimitExceeded , <nl> + str : : stream ( ) < < " View depth limit exceeded ; maximum depth is " <nl> + < < ViewGraph : : kMaxViewDepth } ; <nl> } <nl> <nl> int maxHeightOfChildren = 0 ; <nl> int maxSizeOfChildren = 0 ; <nl> for ( uint64_t childId : currentNode . children ) { <nl> - if ( ! ( * statsMap ) [ childId ] . checked ) { <nl> - auto res = _getChildrenStatsAndCheckCycle ( <nl> - startingId , childId , currentDepth + 1 , statsMap , cycleIds ) ; <nl> - if ( res = = ErrorCodes : : GraphContainsCycle ) { <nl> - cycleIds - > push_back ( currentId ) ; <nl> - return res ; <nl> - } else if ( res ! = ErrorCodes : : OK ) { <nl> - return res ; <nl> - } <nl> + if ( ( * statsMap ) [ childId ] . checked ) { <nl> + continue ; <nl> } <nl> + <nl> + const auto & childNode = _graph [ childId ] ; <nl> + if ( childNode . isView ( ) & & <nl> + ! CollatorInterface : : collatorsMatch ( currentNode . collator . get ( ) , <nl> + childNode . collator . get ( ) ) ) { <nl> + return { ErrorCodes : : OptionNotSupportedOnView , <nl> + str : : stream ( ) < < " View " < < currentNode . ns <nl> + < < " has a collation that does not match the collation of view " <nl> + < < childNode . ns } ; <nl> + } <nl> + <nl> + auto res = _validateChildren ( startingId , childId , currentDepth + 1 , statsMap , traversalIds ) ; <nl> + if ( ! res . isOK ( ) ) { <nl> + return res ; <nl> + } <nl> + <nl> maxHeightOfChildren = std : : max ( maxHeightOfChildren , ( * statsMap ) [ childId ] . height ) ; <nl> maxSizeOfChildren = std : : max ( maxSizeOfChildren , ( * statsMap ) [ childId ] . cumulativeSize ) ; <nl> } <nl> <nl> + traversalIds - > pop_back ( ) ; <nl> ( * statsMap ) [ currentId ] . checked = true ; <nl> ( * statsMap ) [ currentId ] . height = maxHeightOfChildren + 1 ; <nl> ( * statsMap ) [ currentId ] . cumulativeSize + = maxSizeOfChildren + currentNode . size ; <nl> - return ErrorCodes : : OK ; <nl> + return Status : : OK ( ) ; <nl> } <nl> <nl> uint64_t ViewGraph : : _getNodeId ( const NamespaceString & nss ) { <nl> mmm a / src / mongo / db / views / view_graph . h <nl> ppp b / src / mongo / db / views / view_graph . h <nl> <nl> * / <nl> # pragma once <nl> <nl> + # include < boost / optional . hpp > <nl> # include < vector > <nl> <nl> # include " mongo / base / status . h " <nl> # include " mongo / db / namespace_string . h " <nl> + # include " mongo / db / query / collation / collator_interface . h " <nl> # include " mongo / stdx / unordered_map . h " <nl> # include " mongo / stdx / unordered_set . h " <nl> # include " mongo / util / string_map . h " <nl> namespace mongo { <nl> class ViewDefinition ; <nl> <nl> / * * <nl> - * Validates that the graph of view dependencies is acyclic and within the allowed depth . <nl> - * Each node is represented by an integer id , and stores integer ids for its parents and children <nl> - * in the graph . <nl> + * Represents the dependencies of views on other namespaces and validates that this graph is acyclic <nl> + * and smaller than the maximum diameter . It also checks that the views in each connected component <nl> + * have compatible collations , and that all possible view pipelines stay within the maximum size in <nl> + * bytes . <nl> * <nl> * This is owned and managed by the ViewCatalog . <nl> * / <nl> class ViewGraph { <nl> ViewGraph ( ) = default ; <nl> <nl> / * * <nl> - * Called when a view is added to the catalog . ' refs ' are a list of namespaces that the view <nl> - * represented by ' viewNss ' references in its viewOn or pipeline . Checks if this view introduces <nl> - * a cycle , max diameter , or max pipeline size . If an error is detected , it will not insert . <nl> + * Inserts a new node for ' view ' in the graph , which must not already be present . ' refs ' <nl> + * contains the list of namespaces referred to by the view in its " viewOn " or " pipeline " . <nl> + * ' pipelineSize ' is the size of the view ' s pipeline , in bytes . If inserting the view would <nl> + * violate one of the graph ' s validity properties , the insertion is reverted and a non - OK status <nl> + * is returned . <nl> + * <nl> + * This method is intended for validating a view that is created or modified by a user <nl> + * operation . <nl> * / <nl> - Status insertAndValidate ( const NamespaceString & viewNss , <nl> + Status insertAndValidate ( const ViewDefinition & view , <nl> const std : : vector < NamespaceString > & refs , <nl> - const int pipelineSize ) ; <nl> + int pipelineSize ) ; <nl> <nl> / * * <nl> - * Called when view definitions are being reloaded from the catalog ( e . g . on restart of mongod ) . <nl> - * Does the same as insertAndValidate except does not check for cycles , max diameter , or max <nl> - * pipeline size . <nl> + * Like insertAndValidate ( ) , inserts a new node for ' view ' in the graph , which must not already <nl> + * be present . However , no validation is performed . The insertion is not rolled back even if it <nl> + * puts the graph into an invalid state . <nl> + * <nl> + * This method is intended for quickly repopulating the graph with view definitions that are <nl> + * assumed to be already valid . <nl> * / <nl> - void insertWithoutValidating ( const NamespaceString & viewNss , <nl> + void insertWithoutValidating ( const ViewDefinition & view , <nl> const std : : vector < NamespaceString > & refs , <nl> - const int pipelineSize ) ; <nl> + int pipelineSize ) ; <nl> <nl> / * * <nl> * Called when a view is removed from the catalog . If the view does not exist in the graph it is <nl> class ViewGraph { <nl> * / <nl> void clear ( ) ; <nl> <nl> + / * * <nl> + * Returns the number of namespaces tracked by the view graph . Only exposed for testing . <nl> + * / <nl> + size_t size ( ) const ; <nl> + <nl> private : <nl> - / / A graph node represents a namespace . The parent - child relation is defined as a parent <nl> - / / references the child either through viewOn or in $ lookup / $ graphLookup / $ facet in its pipeline . <nl> - / / E . g . the command { create : " a " , viewOn : " b " , pipeline : [ { $ lookup : { from : " c " } } ] } <nl> - / / means the node for " a " is a parent of nodes for " b " and " c " since it references them . <nl> + / / A graph node represents a namespace . We say that a node A is a parent of B if A is a view and <nl> + / / it references B via its " viewOn " or $ lookup / $ graphLookup / $ facet in its " pipeline " . <nl> + / / <nl> + / / This node represents a view namespace if and only if ' children ' is nonempty and ' collator ' is <nl> + / / set . <nl> struct Node { <nl> - / / Note , a view may refer to the same child more than once , but we only need to know the <nl> - / / set of children and parents , since we do not need to traverse duplicates . <nl> - stdx : : unordered_set < uint64_t > parents ; <nl> - stdx : : unordered_set < uint64_t > children ; <nl> + / * * <nl> + * Returns true if this node represents a view . <nl> + * / <nl> + bool isView ( ) const { <nl> + invariant ( children . empty ( ) = = ! static_cast < bool > ( collator ) ) ; <nl> + return ! children . empty ( ) ; <nl> + } <nl> + <nl> + / / The fully - qualified namespace that this node represents . <nl> std : : string ns ; <nl> + <nl> + / / Represents the namespaces depended on by this view . A view may refer to the same child <nl> + / / more than once , but we store the children as a set because each namespace need not be <nl> + / / traversed more than once . <nl> + stdx : : unordered_set < uint64_t > children ; <nl> + <nl> + / / Represents the views that depend on this namespace . <nl> + stdx : : unordered_set < uint64_t > parents ; <nl> + <nl> + / / When set , this is an unowned pointer to the view ' s collation , or nullptr if the view has <nl> + / / the binary collation . When not set , this namespace is not a view and we don ' t care about <nl> + / / its collator . <nl> + boost : : optional < const CollatorInterface * > collator ; <nl> + <nl> + / / The size of this view ' s " pipeline " , in bytes . <nl> int size = 0 ; <nl> } ; <nl> <nl> class ViewGraph { <nl> using StatsMap = stdx : : unordered_map < uint64_t , NodeStats > ; <nl> <nl> / * * <nl> - * Recursively traverses parents of this node and computes their heights and sizes . Returns an <nl> - * error if the maximum depth is exceeded or the pipeline size exceeds the max . <nl> + * Recursively validates the parents of ' currentId ' , filling out statistics about the node <nl> + * represented by that id in ' statsMap ' . The recursion level is tracked in ' currentDepth ' to <nl> + * limit recursive calls . <nl> + * <nl> + * A non - OK status is returned if ' currentId ' or its parents violate any of the graph ' s <nl> + * validity properties . <nl> * / <nl> - ErrorCodes : : Error _getParentsStats ( uint64_t currentId , int currentDepth , StatsMap * statsMap ) ; <nl> + Status _validateParents ( uint64_t currentId , int currentDepth , StatsMap * statsMap ) ; <nl> <nl> / * * <nl> - * Recursively traverses children of the starting node and computes their heights and sizes . <nl> - * Returns an error if the maximum depth is exceeded , a cycle is detected through the starting <nl> - * node , or the pipeline size exceeds the max . <nl> + * Recursively validates the children of ' currentId ' , filling out statistics about the node <nl> + * represented by that id in ' statsMap ' . The recursion level is tracked in ' currentDepth ' to <nl> + * limit recursive calls . Both ' startingId ' and ' traversalIds ' are used to detect cycles . <nl> + * <nl> + * A non - OK status is returned if ' currentId ' or its children violate any of the graph ' s <nl> + * validity properties . <nl> * / <nl> - ErrorCodes : : Error _getChildrenStatsAndCheckCycle ( uint64_t startingId , <nl> - uint64_t currentId , <nl> - int currentDepth , <nl> - StatsMap * statsMap , <nl> - std : : vector < uint64_t > * cycleIds ) ; <nl> + Status _validateChildren ( uint64_t startingId , <nl> + uint64_t currentId , <nl> + int currentDepth , <nl> + StatsMap * statsMap , <nl> + std : : vector < uint64_t > * traversalIds ) ; <nl> <nl> / * * <nl> * Gets the id for this namespace , and creates an id if it doesn ' t exist . <nl> class ViewGraph { <nl> / / i . e . existing views , collections , and non - existing namespaces . <nl> StringMap < uint64_t > _namespaceIds ; <nl> <nl> - / / Maps node ids to nodes . There is a 1 - 1 correspondance with _namespaceIds , hence the lifetime <nl> + / / Maps node ids to nodes . There is a 1 - 1 correspondence with _namespaceIds , hence the lifetime <nl> / / of a node is the same as the lifetime as its corresponding node id . <nl> stdx : : unordered_map < uint64_t , Node > _graph ; <nl> static uint64_t _idCounter ; <nl> new file mode 100644 <nl> index 000000000000 . . 15638204c5c1 <nl> mmm / dev / null <nl> ppp b / src / mongo / db / views / view_graph_test . cpp <nl> <nl> + / * * <nl> + * Copyright ( C ) 2017 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects <nl> + * for all of the code used other than as permitted herein . If you modify <nl> + * file ( s ) with this exception , you may extend this exception to your <nl> + * version of the file ( s ) , but you are not obligated to do so . If you do not <nl> + * wish to do so , delete this exception statement from your version . If you <nl> + * delete this exception statement from all source files in the program , <nl> + * then also delete it in the license file . <nl> + * / <nl> + <nl> + # include " mongo / platform / basic . h " <nl> + <nl> + # include " mongo / bson / bsonmisc . h " <nl> + # include " mongo / bson / bsonobj . h " <nl> + # include " mongo / bson / bsonobjbuilder . h " <nl> + # include " mongo / db / namespace_string . h " <nl> + # include " mongo / db / operation_context . h " <nl> + # include " mongo / db / query / collation / collator_factory_interface . h " <nl> + # include " mongo / db / query / query_test_service_context . h " <nl> + # include " mongo / db / views / view . h " <nl> + # include " mongo / db / views / view_graph . h " <nl> + # include " mongo / stdx / memory . h " <nl> + # include " mongo / unittest / unittest . h " <nl> + <nl> + namespace mongo { <nl> + namespace { <nl> + constexpr auto kEmptyPipelineSize = 0 ; <nl> + constexpr auto kTestDb = " test " _sd ; <nl> + constexpr auto kFooName = " foo " _sd ; <nl> + constexpr auto kBarName = " bar " _sd ; <nl> + constexpr auto kQuxName = " qux " _sd ; <nl> + const auto kFooNamespace = NamespaceString ( kTestDb , kFooName ) ; <nl> + const auto kBarNamespace = NamespaceString ( kTestDb , kBarName ) ; <nl> + const auto kQuxNamespace = NamespaceString ( kTestDb , kQuxName ) ; <nl> + const auto kEmptyPipeline = BSONArray ( ) ; <nl> + const auto kBinaryCollation = BSONObj ( ) ; <nl> + const auto kFilipinoCollation = BSON ( " locale " <nl> + < < " fil " ) ; <nl> + <nl> + class ViewGraphFixture : public unittest : : Test { <nl> + public : <nl> + ViewGraphFixture ( ) <nl> + : _queryServiceContext ( ) , _opCtx ( _queryServiceContext . makeOperationContext ( ) ) { } <nl> + <nl> + const OperationContext * opCtx ( ) const { <nl> + return _opCtx . get ( ) ; <nl> + } <nl> + <nl> + ViewGraph * viewGraph ( ) { <nl> + return & _viewGraph ; <nl> + } <nl> + <nl> + ViewDefinition makeViewDefinition ( StringData db , <nl> + StringData view , <nl> + StringData viewOn , <nl> + BSONArray pipeline , <nl> + BSONObj collatorSpec ) const { <nl> + auto collator = std : : unique_ptr < CollatorInterface > ( nullptr ) ; <nl> + if ( ! collatorSpec . isEmpty ( ) ) { <nl> + auto factoryCollator = CollatorFactoryInterface : : get ( _opCtx - > getServiceContext ( ) ) <nl> + - > makeFromBSON ( collatorSpec ) ; <nl> + ASSERT_OK ( factoryCollator . getStatus ( ) ) ; <nl> + collator = std : : move ( factoryCollator . getValue ( ) ) ; <nl> + } <nl> + <nl> + return { db , view , viewOn , pipeline , std : : move ( collator ) } ; <nl> + } <nl> + <nl> + private : <nl> + QueryTestServiceContext _queryServiceContext ; <nl> + ServiceContext : : UniqueOperationContext _opCtx ; <nl> + ViewGraph _viewGraph ; <nl> + } ; <nl> + <nl> + TEST_F ( ViewGraphFixture , CanInsertViewsWithMatchingBinaryCollations ) { <nl> + const auto fooView = <nl> + makeViewDefinition ( kTestDb , kFooName , kBarName , kEmptyPipeline , kBinaryCollation ) ; <nl> + ASSERT_OK ( viewGraph ( ) - > insertAndValidate ( fooView , { kBarNamespace } , kEmptyPipelineSize ) ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 2UL ) ; <nl> + <nl> + const auto barView = <nl> + makeViewDefinition ( kTestDb , kBarName , kQuxName , kEmptyPipeline , kBinaryCollation ) ; <nl> + ASSERT_OK ( viewGraph ( ) - > insertAndValidate ( barView , { kQuxNamespace } , kEmptyPipelineSize ) ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 3UL ) ; <nl> + } <nl> + <nl> + TEST_F ( ViewGraphFixture , CanInsertViewsWithMatchingNonTrivialCollations ) { <nl> + const auto fooView = <nl> + makeViewDefinition ( kTestDb , kFooName , kBarName , kEmptyPipeline , kFilipinoCollation ) ; <nl> + ASSERT_OK ( viewGraph ( ) - > insertAndValidate ( fooView , { kBarNamespace } , kEmptyPipelineSize ) ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 2UL ) ; <nl> + <nl> + const auto barView = <nl> + makeViewDefinition ( kTestDb , kBarName , kQuxName , kEmptyPipeline , kFilipinoCollation ) ; <nl> + ASSERT_OK ( viewGraph ( ) - > insertAndValidate ( barView , { kQuxNamespace } , kEmptyPipelineSize ) ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 3UL ) ; <nl> + } <nl> + <nl> + TEST_F ( ViewGraphFixture , CannotInsertViewsWithNonMatchingCollations ) { <nl> + const auto fooView = <nl> + makeViewDefinition ( kTestDb , kFooName , kBarName , kEmptyPipeline , kFilipinoCollation ) ; <nl> + ASSERT_OK ( viewGraph ( ) - > insertAndValidate ( fooView , { kBarNamespace } , kEmptyPipelineSize ) ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 2UL ) ; <nl> + <nl> + const auto barView = <nl> + makeViewDefinition ( kTestDb , kBarName , kQuxName , kEmptyPipeline , kBinaryCollation ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > insertAndValidate ( barView , { kQuxNamespace } , kEmptyPipelineSize ) , <nl> + ErrorCodes : : OptionNotSupportedOnView ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 2UL ) ; <nl> + } <nl> + <nl> + TEST_F ( ViewGraphFixture , CannotRecreateViewWithDifferentCollationIfDependedOnByOtherViews ) { <nl> + const auto fooView = <nl> + makeViewDefinition ( kTestDb , kFooName , kBarName , kEmptyPipeline , kFilipinoCollation ) ; <nl> + ASSERT_OK ( viewGraph ( ) - > insertAndValidate ( fooView , { kBarNamespace } , kEmptyPipelineSize ) ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 2UL ) ; <nl> + <nl> + const auto barView = <nl> + makeViewDefinition ( kTestDb , kBarName , kQuxName , kEmptyPipeline , kFilipinoCollation ) ; <nl> + ASSERT_OK ( viewGraph ( ) - > insertAndValidate ( barView , { kQuxNamespace } , kEmptyPipelineSize ) ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 3UL ) ; <nl> + <nl> + viewGraph ( ) - > remove ( kBarNamespace ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 2UL ) ; <nl> + <nl> + const auto barViewBinaryCollation = <nl> + makeViewDefinition ( kTestDb , kBarName , kQuxName , kEmptyPipeline , kBinaryCollation ) ; <nl> + ASSERT_EQ ( <nl> + viewGraph ( ) - > insertAndValidate ( barViewBinaryCollation , { kQuxNamespace } , kEmptyPipelineSize ) , <nl> + ErrorCodes : : OptionNotSupportedOnView ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 2UL ) ; <nl> + } <nl> + <nl> + / / Tests that an insertion that would create a view cycle is rejected , but will later be accepted if <nl> + / / the cycle is broken by removing another existing view . <nl> + TEST_F ( ViewGraphFixture , CanCreateViewThatReferencesDroppedView ) { <nl> + const auto fooView = <nl> + makeViewDefinition ( kTestDb , kFooName , kBarName , kEmptyPipeline , kBinaryCollation ) ; <nl> + ASSERT_OK ( viewGraph ( ) - > insertAndValidate ( fooView , { kBarNamespace } , kEmptyPipelineSize ) ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 2UL ) ; <nl> + <nl> + const auto barView = <nl> + makeViewDefinition ( kTestDb , kBarName , kQuxName , kEmptyPipeline , kBinaryCollation ) ; <nl> + ASSERT_OK ( viewGraph ( ) - > insertAndValidate ( barView , { kQuxNamespace } , kEmptyPipelineSize ) ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 3UL ) ; <nl> + <nl> + const auto quxView = <nl> + makeViewDefinition ( kTestDb , kQuxName , kBarName , kEmptyPipeline , kBinaryCollation ) ; <nl> + <nl> + / / Inserting qux should fail , as it cycles with bar . <nl> + ASSERT_EQ ( viewGraph ( ) - > insertAndValidate ( quxView , { kBarNamespace } , kEmptyPipelineSize ) , <nl> + ErrorCodes : : GraphContainsCycle ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 3UL ) ; <nl> + <nl> + viewGraph ( ) - > remove ( kBarNamespace ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 2UL ) ; <nl> + <nl> + / / With bar removed , we expect qux to be inserted successfully . <nl> + ASSERT_OK ( viewGraph ( ) - > insertAndValidate ( quxView , { kBarNamespace } , kEmptyPipelineSize ) ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 3UL ) ; <nl> + } <nl> + <nl> + / / Tests that an insertion that would create mismatching collators is rejected , but will later be <nl> + / / accepted if the existing view with the conflicting collator is removed . <nl> + TEST_F ( ViewGraphFixture , CanCreateViewWithDifferentCollationThanDroppedView ) { <nl> + const auto fooView = <nl> + makeViewDefinition ( kTestDb , kFooName , kBarName , kEmptyPipeline , kFilipinoCollation ) ; <nl> + ASSERT_OK ( viewGraph ( ) - > insertAndValidate ( fooView , { kBarNamespace } , kEmptyPipelineSize ) ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 2UL ) ; <nl> + <nl> + const auto barView = <nl> + makeViewDefinition ( kTestDb , kBarName , kQuxName , kEmptyPipeline , kBinaryCollation ) ; <nl> + <nl> + / / Inserting bar should fail , as foo depends on bar and has a different collation . <nl> + ASSERT_EQ ( viewGraph ( ) - > insertAndValidate ( barView , { kQuxNamespace } , kEmptyPipelineSize ) , <nl> + ErrorCodes : : OptionNotSupportedOnView ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 2UL ) ; <nl> + <nl> + viewGraph ( ) - > remove ( kFooNamespace ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 0UL ) ; <nl> + <nl> + / / Now bar should be inserted successfully , as there are no existing views in the graph that <nl> + / / depend on it . <nl> + ASSERT_OK ( viewGraph ( ) - > insertAndValidate ( barView , { kFooNamespace } , kEmptyPipelineSize ) ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 2UL ) ; <nl> + } <nl> + <nl> + / / Tests that a node in the graph is properly converted from a " view " node to a " non - view " node when <nl> + / / a view with that namespace is removed . <nl> + TEST_F ( ViewGraphFixture , DroppingViewPreservesNodeInGraphIfDependedOnByOtherViews ) { <nl> + const auto fooView = <nl> + makeViewDefinition ( kTestDb , kFooName , kBarName , kEmptyPipeline , kBinaryCollation ) ; <nl> + ASSERT_OK ( viewGraph ( ) - > insertAndValidate ( fooView , { kBarNamespace } , kEmptyPipelineSize ) ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 2UL ) ; <nl> + <nl> + const auto barView = <nl> + makeViewDefinition ( kTestDb , kBarName , kQuxName , kEmptyPipeline , kBinaryCollation ) ; <nl> + ASSERT_OK ( viewGraph ( ) - > insertAndValidate ( barView , { kQuxNamespace } , kEmptyPipelineSize ) ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 3UL ) ; <nl> + <nl> + / / Inserts baz into the graph so that qux has another namespace that depends on it . This way , <nl> + / / the node for qux won ' t be destroyed when baz is removed . <nl> + const auto bazView = <nl> + makeViewDefinition ( kTestDb , " baz " _sd , kQuxName , kEmptyPipeline , kBinaryCollation ) ; <nl> + ASSERT_OK ( viewGraph ( ) - > insertAndValidate ( bazView , { kQuxNamespace } , kEmptyPipelineSize ) ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 4UL ) ; <nl> + <nl> + / / Inserting a view that depends on bar but has a different collation should fail . <nl> + const auto viewWithDifferentCollation = makeViewDefinition ( <nl> + kTestDb , " badCollation " _sd , kBarName , kEmptyPipeline , kFilipinoCollation ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > insertAndValidate ( <nl> + viewWithDifferentCollation , { kBarNamespace } , kEmptyPipelineSize ) , <nl> + ErrorCodes : : OptionNotSupportedOnView ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 4UL ) ; <nl> + <nl> + / / Removes bar from the graph . The graph ' s size should remain at 4 , since bar is still depended <nl> + / / on by qux . <nl> + viewGraph ( ) - > remove ( kBarNamespace ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 4UL ) ; <nl> + <nl> + / / Inserting the viewWithDifferentCollation from above should now succeed , since bar is no <nl> + / / longer a view . <nl> + ASSERT_OK ( viewGraph ( ) - > insertAndValidate ( <nl> + viewWithDifferentCollation , { kBarNamespace } , kEmptyPipelineSize ) ) ; <nl> + ASSERT_EQ ( viewGraph ( ) - > size ( ) , 5UL ) ; <nl> + } <nl> + } / / namespace <nl> + } / / namespace mongo <nl>
SERVER - 27761 track collation in ViewGraph
mongodb/mongo
476c7733f5dc01011e1ebd9d7818aad8d63a1781
2017-04-04T17:55:24Z
mmm a / README . android <nl> ppp b / README . android <nl> The following libraries were statically linked . <nl> <nl> * openssl 1 . 0 . 2j <nl> * expat 2 . 2 . 0 <nl> + * zlib 1 . 2 . 8 <nl> * c - ares 1 . 12 . 0 <nl> * libssh2 1 . 8 . 0 <nl> <nl>
android : We build zlib in ourselves
aria2/aria2
834bce71d257649adecd52244f0b9f5dbf02c0c6
2016-12-15T13:33:01Z
mmm a / include / swift / AST / GenericSignatureBuilder . h <nl> ppp b / include / swift / AST / GenericSignatureBuilder . h <nl> class GenericSignatureBuilder { <nl> EquivalenceClass & operator = ( const EquivalenceClass & ) = delete ; <nl> EquivalenceClass & operator = ( EquivalenceClass & & ) = delete ; <nl> <nl> + / / / Record the conformance of this equivalence class to the given <nl> + / / / protocol as found via the given requirement source . <nl> + / / / <nl> + / / / \ returns true if this conformance is new to the equivalence class , <nl> + / / / and false otherwise . <nl> + bool recordConformanceConstraint ( PotentialArchetype * pa , <nl> + ProtocolDecl * proto , <nl> + const RequirementSource * source ) ; <nl> + <nl> / / / Find a source of the same - type constraint that maps a potential <nl> / / / archetype in this equivalence class to a concrete type along with <nl> / / / that concrete type as written . <nl> mmm a / lib / AST / GenericSignatureBuilder . cpp <nl> ppp b / lib / AST / GenericSignatureBuilder . cpp <nl> unsigned GenericSignatureBuilder : : PotentialArchetype : : getNestingDepth ( ) const { <nl> return Depth ; <nl> } <nl> <nl> + bool EquivalenceClass : : recordConformanceConstraint ( <nl> + PotentialArchetype * pa , <nl> + ProtocolDecl * proto , <nl> + const RequirementSource * source ) { <nl> + / / If we haven ' t seen a conformance to this protocol yet , add it . <nl> + bool inserted = false ; <nl> + auto known = conformsTo . find ( proto ) ; <nl> + if ( known = = conformsTo . end ( ) ) { <nl> + known = conformsTo . insert ( { proto , { } } ) . first ; <nl> + inserted = true ; <nl> + modified ( * pa - > getBuilder ( ) ) ; <nl> + + + NumConformances ; <nl> + } <nl> + <nl> + / / Record this conformance source . <nl> + known - > second . push_back ( { pa , proto , source } ) ; <nl> + + + NumConformanceConstraints ; <nl> + <nl> + return inserted ; <nl> + } <nl> + <nl> Optional < ConcreteConstraint > <nl> EquivalenceClass : : findAnyConcreteConstraintAsWritten ( <nl> PotentialArchetype * preferredPA ) const { <nl> GenericSignatureBuilder : : resolveConcreteConformance ( PotentialArchetype * pa , <nl> } <nl> <nl> concreteSource = concreteSource - > viaConcrete ( * this , * conformance ) ; <nl> - paEquivClass - > conformsTo [ proto ] . push_back ( { pa , proto , concreteSource } ) ; <nl> - + + NumConformanceConstraints ; <nl> - <nl> + paEquivClass - > recordConformanceConstraint ( pa , proto , concreteSource ) ; <nl> addConditionalRequirements ( * this , * conformance ) ; <nl> - <nl> return concreteSource ; <nl> } <nl> <nl> const RequirementSource * GenericSignatureBuilder : : resolveSuperConformance ( <nl> <nl> superclassSource = <nl> superclassSource - > viaSuperclass ( * this , * conformance ) ; <nl> - paEquivClass - > conformsTo [ proto ] . push_back ( { pa , proto , superclassSource } ) ; <nl> - + + NumConformanceConstraints ; <nl> - <nl> + paEquivClass - > recordConformanceConstraint ( pa , proto , superclassSource ) ; <nl> addConditionalRequirements ( * this , * conformance ) ; <nl> - <nl> return superclassSource ; <nl> } <nl> <nl> bool PotentialArchetype : : addConformance ( ProtocolDecl * proto , <nl> GenericSignatureBuilder & builder ) { <nl> / / Check whether we already knew about this conformance . <nl> auto equivClass = getOrCreateEquivalenceClass ( ) ; <nl> - auto known = equivClass - > conformsTo . find ( proto ) ; <nl> - if ( known ! = equivClass - > conformsTo . end ( ) ) { <nl> - / / We already knew about this conformance ; record this specific constraint . <nl> - known - > second . push_back ( { this , proto , source } ) ; <nl> - + + NumConformanceConstraints ; <nl> + if ( ! equivClass - > recordConformanceConstraint ( this , proto , source ) ) <nl> return false ; <nl> - } <nl> - <nl> - / / Add the conformance along with this constraint . <nl> - equivClass - > conformsTo [ proto ] . push_back ( { this , proto , source } ) ; <nl> - equivClass - > modified ( builder ) ; <nl> - + + NumConformanceConstraints ; <nl> - + + NumConformances ; <nl> <nl> / / If there is a concrete type that resolves this conformance requirement , <nl> / / record the conformance . <nl> GenericSignatureBuilder : : addSameTypeRequirementBetweenArchetypes ( <nl> T1 - > addConformance ( entry . first , entry . second . front ( ) . source , * this ) ; <nl> <nl> auto & constraints1 = equivClass - > conformsTo [ entry . first ] ; <nl> + / / FIXME : Go through recordConformanceConstraint ( ) ? <nl> constraints1 . insert ( constraints1 . end ( ) , <nl> entry . second . begin ( ) + 1 , <nl> entry . second . end ( ) ) ; <nl> mmm a / lib / AST / ProtocolConformance . cpp <nl> ppp b / lib / AST / ProtocolConformance . cpp <nl> void NormalProtocolConformance : : differenceAndStoreConditionalRequirements ( ) { <nl> / / change . ) <nl> assert ( canTypeSig . getGenericParams ( ) = = canExtensionSig . getGenericParams ( ) ) ; <nl> <nl> - auto mod = DC - > getParentModule ( ) ; <nl> / / Find the requirements in the extension that aren ' t proved by the original <nl> / / type , these are the ones that make the conformance conditional . <nl> SmallVector < Requirement , 4 > reqs ; <nl>
[ GSB ] Factor out the addition of a conformance to an equivalence class .
apple/swift
2adfb5aac6b9a4bc37474f8799980723edd09fbb
2017-10-11T06:19:09Z
mmm a / test / mjsunit / mjsunit . status <nl> ppp b / test / mjsunit / mjsunit . status <nl> <nl> <nl> # Stack overflow on windows . <nl> ' es8 / regress / regress - 624300 ' : [ PASS , [ ' system = = windows ' , SKIP ] ] , <nl> + <nl> + # https : / / bugs . chromium . org / p / v8 / issues / detail ? id = 7102 <nl> + # Flaky due to huge string allocation . <nl> + ' regress / regress - 748069 ' : [ SKIP ] , <nl> } ] , # ' asan = = True ' <nl> <nl> # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> <nl> ' compiler / osr - two ' : [ PASS , SLOW ] , <nl> ' wasm / grow - memory ' : [ PASS , SLOW ] , <nl> <nl> + # https : / / bugs . chromium . org / p / v8 / issues / detail ? id = 7102 <nl> + # Flaky due to huge string allocation . <nl> + ' regress / regress - 748069 ' : [ SKIP ] , <nl> # Slow test . <nl> ' regress / regress - 779407 ' : [ PASS , SLOW ] , <nl> } ] , # ' msan = = True ' <nl>
[ tests ] Skip regress - 748069 for sanitzier builds .
v8/v8
9a9fc07661884da4746816d1d7977b57d7eff909
2017-11-22T14:03:58Z
mmm a / examples / Linalg / Linalg1 / lib / Analysis . cpp <nl> ppp b / examples / Linalg / Linalg1 / lib / Analysis . cpp <nl> ViewOp linalg : : getViewBaseViewOp ( Value * view ) { <nl> view = slice . getParentView ( ) ; <nl> assert ( viewType . isa < ViewType > ( ) & & " expected a ViewType " ) ; <nl> } <nl> - return view - > getDefiningOp ( ) - > cast < ViewOp > ( ) ; <nl> + return cast < ViewOp > ( view - > getDefiningOp ( ) ) ; <nl> } <nl> <nl> Value * linalg : : getViewSupportingMemRef ( Value * view ) { <nl> std : : pair < mlir : : Value * , unsigned > linalg : : getViewRootIndexing ( Value * view , <nl> if ( auto viewOp = dyn_cast < ViewOp > ( view - > getDefiningOp ( ) ) ) <nl> return std : : make_pair ( viewOp . getIndexing ( dim ) , dim ) ; <nl> <nl> - auto sliceOp = view - > getDefiningOp ( ) - > cast < SliceOp > ( ) ; <nl> + auto sliceOp = cast < SliceOp > ( view - > getDefiningOp ( ) ) ; <nl> auto * parentView = sliceOp . getParentView ( ) ; <nl> unsigned sliceDim = sliceOp . getSlicingDim ( ) ; <nl> auto * indexing = sliceOp . getIndexing ( ) ; <nl> if ( indexing - > getDefiningOp ( ) ) { <nl> - if ( auto rangeOp = indexing - > getDefiningOp ( ) - > cast < RangeOp > ( ) ) { <nl> + if ( auto rangeOp = cast < RangeOp > ( indexing - > getDefiningOp ( ) ) ) { <nl> / / If I sliced with a range and I sliced at this dim , then I ' m it . <nl> if ( dim = = sliceDim ) { <nl> return std : : make_pair ( rangeOp . getResult ( ) , dim ) ; <nl> mmm a / examples / Linalg / Linalg1 / lib / Common . cpp <nl> ppp b / examples / Linalg / Linalg1 / lib / Common . cpp <nl> linalg : : common : : LoopNestRangeBuilder : : LoopNestRangeBuilder ( <nl> auto lb = rangeOp . getMin ( ) ; <nl> auto ub = rangeOp . getMax ( ) ; <nl> / / This must be a constexpr index until we relax the affine . for constraint <nl> - auto step = <nl> - rangeOp . getStep ( ) - > getDefiningOp ( ) - > cast < ConstantIndexOp > ( ) . getValue ( ) ; <nl> + auto step = llvm : : cast < ConstantIndexOp > ( rangeOp . getStep ( ) - > getDefiningOp ( ) ) <nl> + . getValue ( ) ; <nl> loops . emplace_back ( ivs [ i ] , ValueHandle ( lb ) , ValueHandle ( ub ) , step ) ; <nl> } <nl> } <nl> mmm a / examples / Linalg / Linalg1 / lib / ConvertToLLVMDialect . cpp <nl> ppp b / examples / Linalg / Linalg1 / lib / ConvertToLLVMDialect . cpp <nl> class RangeOpConversion : public DialectOpConversion { <nl> <nl> SmallVector < Value * , 4 > rewrite ( Operation * op , ArrayRef < Value * > operands , <nl> FuncBuilder & rewriter ) const override { <nl> - auto rangeOp = op - > cast < linalg : : RangeOp > ( ) ; <nl> + auto rangeOp = cast < linalg : : RangeOp > ( op ) ; <nl> auto rangeDescriptorType = <nl> linalg : : convertLinalgType ( rangeOp . getResult ( ) - > getType ( ) ) ; <nl> <nl> class ViewOpConversion : public DialectOpConversion { <nl> <nl> SmallVector < Value * , 4 > rewrite ( Operation * op , ArrayRef < Value * > operands , <nl> FuncBuilder & rewriter ) const override { <nl> - auto viewOp = op - > cast < linalg : : ViewOp > ( ) ; <nl> + auto viewOp = cast < linalg : : ViewOp > ( op ) ; <nl> auto viewDescriptorType = linalg : : convertLinalgType ( viewOp . getViewType ( ) ) ; <nl> auto memrefType = <nl> viewOp . getSupportingMemRef ( ) - > getType ( ) . cast < MemRefType > ( ) ; <nl> class SliceOpConversion : public DialectOpConversion { <nl> <nl> SmallVector < Value * , 4 > rewrite ( Operation * op , ArrayRef < Value * > operands , <nl> FuncBuilder & rewriter ) const override { <nl> - auto sliceOp = op - > cast < linalg : : SliceOp > ( ) ; <nl> + auto sliceOp = cast < linalg : : SliceOp > ( op ) ; <nl> auto newViewDescriptorType = <nl> linalg : : convertLinalgType ( sliceOp . getViewType ( ) ) ; <nl> auto elementType = rewriter . getType < LLVM : : LLVMType > ( <nl> mmm a / examples / Linalg / Linalg1 / lib / Utils . cpp <nl> ppp b / examples / Linalg / Linalg1 / lib / Utils . cpp <nl> unsigned linalg : : getViewRank ( Value * view ) { <nl> assert ( view - > getType ( ) . isa < ViewType > ( ) & & " expected a ViewType " ) ; <nl> if ( auto viewOp = dyn_cast < ViewOp > ( view - > getDefiningOp ( ) ) ) <nl> return viewOp . getRank ( ) ; <nl> - return view - > getDefiningOp ( ) - > cast < SliceOp > ( ) . getRank ( ) ; <nl> + return cast < SliceOp > ( view - > getDefiningOp ( ) ) . getRank ( ) ; <nl> } <nl> <nl> ViewOp linalg : : emitAndReturnViewOpFromMemRef ( Value * memRef ) { <nl> mmm a / examples / Linalg / Linalg2 / lib / Transforms . cpp <nl> ppp b / examples / Linalg / Linalg2 / lib / Transforms . cpp <nl> <nl> # include " mlir / IR / StandardTypes . h " <nl> <nl> using llvm : : ArrayRef ; <nl> + using llvm : : cast ; <nl> using llvm : : SmallVector ; <nl> using mlir : : FuncBuilder ; <nl> using mlir : : MemRefType ; <nl> static SmallVector < Value * , 8 > getViewChain ( mlir : : Value * v ) { <nl> <nl> SmallVector < mlir : : Value * , 8 > tmp ; <nl> do { <nl> - auto sliceOp = v - > getDefiningOp ( ) - > cast < SliceOp > ( ) ; / / must be a slice op <nl> + auto sliceOp = cast < SliceOp > ( v - > getDefiningOp ( ) ) ; / / must be a slice op <nl> tmp . push_back ( v ) ; <nl> v = sliceOp . getParentView ( ) ; <nl> } while ( ! v - > getType ( ) . isa < ViewType > ( ) ) ; <nl> static mlir : : Value * createFullyComposedIndexing ( unsigned dim , <nl> ArrayRef < Value * > chain ) { <nl> using namespace mlir : : edsc : : op ; <nl> assert ( chain . front ( ) - > getType ( ) . isa < ViewType > ( ) & & " must be a ViewType " ) ; <nl> - auto viewOp = chain . front ( ) - > getDefiningOp ( ) - > cast < ViewOp > ( ) ; <nl> + auto viewOp = cast < ViewOp > ( chain . front ( ) - > getDefiningOp ( ) ) ; <nl> auto * indexing = viewOp . getIndexing ( dim ) ; <nl> if ( ! indexing - > getType ( ) . isa < RangeType > ( ) ) <nl> return indexing ; <nl> - auto rangeOp = indexing - > getDefiningOp ( ) - > cast < RangeOp > ( ) ; <nl> + auto rangeOp = cast < RangeOp > ( indexing - > getDefiningOp ( ) ) ; <nl> Value * min = rangeOp . getMin ( ) , * max = rangeOp . getMax ( ) , <nl> * step = rangeOp . getStep ( ) ; <nl> for ( auto * v : chain . drop_front ( 1 ) ) { <nl> - auto slice = v - > getDefiningOp ( ) - > cast < SliceOp > ( ) ; <nl> + auto slice = cast < SliceOp > ( v - > getDefiningOp ( ) ) ; <nl> if ( slice . getRank ( ) ! = slice . getParentRank ( ) ) { <nl> / / Rank - reducing slice . <nl> if ( slice . getSlicingDim ( ) = = dim ) { <nl> static mlir : : Value * createFullyComposedIndexing ( unsigned dim , <nl> dim = ( slice . getSlicingDim ( ) < dim ) ? dim - 1 : dim ; <nl> } else { / / not a rank - reducing slice . <nl> if ( slice . getSlicingDim ( ) = = dim ) { <nl> - auto range = slice . getIndexing ( ) - > getDefiningOp ( ) - > cast < RangeOp > ( ) ; <nl> + auto range = cast < RangeOp > ( slice . getIndexing ( ) - > getDefiningOp ( ) ) ; <nl> auto oldMin = min ; <nl> min = ValueHandle ( min ) + ValueHandle ( range . getMin ( ) ) ; <nl> / / ideally : max = min ( oldMin + ValueHandle ( range . getMax ( ) ) , oldMax ) ; <nl> ViewOp linalg : : emitAndReturnFullyComposedView ( Value * v ) { <nl> for ( unsigned idx = 0 ; idx < rank ; + + idx ) { <nl> ranges . push_back ( createFullyComposedIndexing ( idx , chain ) ) ; <nl> } <nl> - return view ( memRef , ranges ) . getOperation ( ) - > cast < ViewOp > ( ) ; <nl> + return cast < ViewOp > ( view ( memRef , ranges ) . getOperation ( ) ) ; <nl> } <nl> mmm a / examples / Linalg / Linalg3 / include / linalg3 / TensorOps - inl . h <nl> ppp b / examples / Linalg / Linalg3 / include / linalg3 / TensorOps - inl . h <nl> extractRangesFromViewOrSliceOp ( mlir : : Value * view ) { <nl> if ( auto viewOp = llvm : : dyn_cast < linalg : : ViewOp > ( view - > getDefiningOp ( ) ) ) <nl> return viewOp . getRanges ( ) ; <nl> <nl> - auto sliceOp = view - > getDefiningOp ( ) - > cast < linalg : : SliceOp > ( ) ; <nl> + auto sliceOp = llvm : : cast < linalg : : SliceOp > ( view - > getDefiningOp ( ) ) ; <nl> unsigned slicingDim = sliceOp . getSlicingDim ( ) ; <nl> auto * indexing = * ( sliceOp . getIndexings ( ) . begin ( ) ) ; <nl> bool isRankReducing = indexing - > getType ( ) . isa < mlir : : IndexType > ( ) ; <nl> mmm a / examples / Linalg / Linalg3 / lib / ConvertToLLVMDialect . cpp <nl> ppp b / examples / Linalg / Linalg3 / lib / ConvertToLLVMDialect . cpp <nl> class LoadStoreOpConversion : public DialectOpConversion { <nl> / / a getelementptr . <nl> Value * obtainDataPtr ( Operation * op , Value * viewDescriptor , <nl> ArrayRef < Value * > indices , FuncBuilder & rewriter ) const { <nl> - auto loadOp = op - > cast < Op > ( ) ; <nl> + auto loadOp = cast < Op > ( op ) ; <nl> auto elementType = <nl> loadOp . getViewType ( ) . template cast < linalg : : ViewType > ( ) . getElementType ( ) ; <nl> auto * llvmPtrType = linalg : : convertLinalgType ( elementType ) <nl> mmm a / examples / Linalg / Linalg3 / lib / Transforms . cpp <nl> ppp b / examples / Linalg / Linalg3 / lib / Transforms . cpp <nl> extractFromRanges ( ArrayRef < Value * > ranges , <nl> SmallVector < Value * , 4 > res ; <nl> res . reserve ( ranges . size ( ) ) ; <nl> for ( auto * v : ranges ) { <nl> - auto r = v - > getDefiningOp ( ) - > cast < RangeOp > ( ) ; <nl> + auto r = cast < RangeOp > ( v - > getDefiningOp ( ) ) ; <nl> res . push_back ( extract ( r ) ) ; <nl> } <nl> return res ; <nl> linalg : : makeGenericLoopRanges ( AffineMap operandRangesToLoopMaps , <nl> for ( auto z : llvm : : zip ( res . steps , tileSizes ) ) { <nl> auto * step = std : : get < 0 > ( z ) ; <nl> auto tileSize = std : : get < 1 > ( z ) ; <nl> - auto stepValue = step - > getDefiningOp ( ) - > cast < ConstantIndexOp > ( ) . getValue ( ) ; <nl> + auto stepValue = cast < ConstantIndexOp > ( step - > getDefiningOp ( ) ) . getValue ( ) ; <nl> auto tileSizeValue = <nl> - tileSize - > getDefiningOp ( ) - > cast < ConstantIndexOp > ( ) . getValue ( ) ; <nl> + cast < ConstantIndexOp > ( tileSize - > getDefiningOp ( ) ) . getValue ( ) ; <nl> assert ( stepValue > 0 ) ; <nl> tiledSteps . push_back ( constant_index ( stepValue * tileSizeValue ) ) ; <nl> } <nl> emitAndReturnLoadStoreOperands ( LoadOrStoreOp loadOrStoreOp , ViewOp viewOp ) { <nl> operands . push_back ( indexing ) ; <nl> continue ; <nl> } <nl> - RangeOp range = indexing - > getDefiningOp ( ) - > cast < RangeOp > ( ) ; <nl> + RangeOp range = cast < RangeOp > ( indexing - > getDefiningOp ( ) ) ; <nl> ValueHandle min ( range . getMin ( ) ) ; <nl> Value * storeIndex = * ( loadOrStoreOp . getIndices ( ) . begin ( ) + storeDim + + ) ; <nl> using edsc : : op : : operator + ; <nl> template < > <nl> PatternMatchResult <nl> Rewriter < linalg : : LoadOp > : : matchAndRewrite ( Operation * op , <nl> PatternRewriter & rewriter ) const { <nl> - auto load = op - > cast < linalg : : LoadOp > ( ) ; <nl> + auto load = cast < linalg : : LoadOp > ( op ) ; <nl> SliceOp slice = dyn_cast < SliceOp > ( load . getView ( ) - > getDefiningOp ( ) ) ; <nl> ViewOp view = slice ? emitAndReturnFullyComposedView ( slice . getResult ( ) ) <nl> - : load . getView ( ) - > getDefiningOp ( ) - > cast < ViewOp > ( ) ; <nl> + : cast < ViewOp > ( load . getView ( ) - > getDefiningOp ( ) ) ; <nl> ScopedContext scope ( FuncBuilder ( load ) , load . getLoc ( ) ) ; <nl> auto * memRef = view . getSupportingMemRef ( ) ; <nl> auto operands = emitAndReturnLoadStoreOperands ( load , view ) ; <nl> template < > <nl> PatternMatchResult <nl> Rewriter < linalg : : StoreOp > : : matchAndRewrite ( Operation * op , <nl> PatternRewriter & rewriter ) const { <nl> - auto store = op - > cast < linalg : : StoreOp > ( ) ; <nl> + auto store = cast < linalg : : StoreOp > ( op ) ; <nl> SliceOp slice = dyn_cast < SliceOp > ( store . getView ( ) - > getDefiningOp ( ) ) ; <nl> ViewOp view = slice ? emitAndReturnFullyComposedView ( slice . getResult ( ) ) <nl> - : store . getView ( ) - > getDefiningOp ( ) - > cast < ViewOp > ( ) ; <nl> + : cast < ViewOp > ( store . getView ( ) - > getDefiningOp ( ) ) ; <nl> ScopedContext scope ( FuncBuilder ( store ) , store . getLoc ( ) ) ; <nl> auto * valueToStore = store . getValueToStore ( ) ; <nl> auto * memRef = view . getSupportingMemRef ( ) ; <nl> mmm a / examples / toy / Ch4 / mlir / ShapeInferencePass . cpp <nl> ppp b / examples / toy / Ch4 / mlir / ShapeInferencePass . cpp <nl> class ShapeInferencePass : public mlir : : ModulePass < ShapeInferencePass > { <nl> / / Finally , update the return type of the function based on the argument to <nl> / / the return operation . <nl> for ( auto & block : f - > getBlocks ( ) ) { <nl> - auto ret = block . getTerminator ( ) - > cast < ReturnOp > ( ) ; <nl> + auto ret = llvm : : cast < ReturnOp > ( block . getTerminator ( ) ) ; <nl> if ( ! ret ) <nl> continue ; <nl> if ( ret . getNumOperands ( ) & & <nl> mmm a / examples / toy / Ch4 / mlir / ToyCombine . cpp <nl> ppp b / examples / toy / Ch4 / mlir / ToyCombine . cpp <nl> struct SimplifyRedundantTranspose : public mlir : : RewritePattern { <nl> mlir : : PatternRewriter & rewriter ) const override { <nl> / / We can directly cast the current operation as this will only get invoked <nl> / / on TransposeOp . <nl> - TransposeOp transpose = op - > cast < TransposeOp > ( ) ; <nl> + TransposeOp transpose = llvm : : cast < TransposeOp > ( op ) ; <nl> / / Look through the input of the current transpose . <nl> mlir : : Value * transposeInput = transpose . getOperand ( ) ; <nl> TransposeOp transposeInputOp = <nl> struct SimplifyReshapeConstant : public mlir : : RewritePattern { <nl> mlir : : PatternMatchResult <nl> matchAndRewrite ( mlir : : Operation * op , <nl> mlir : : PatternRewriter & rewriter ) const override { <nl> - ReshapeOp reshape = op - > cast < ReshapeOp > ( ) ; <nl> + ReshapeOp reshape = llvm : : cast < ReshapeOp > ( op ) ; <nl> / / Look through the input of the current reshape . <nl> ConstantOp constantOp = llvm : : dyn_cast_or_null < ConstantOp > ( <nl> reshape . getOperand ( ) - > getDefiningOp ( ) ) ; <nl> struct SimplifyReshapeReshape : public mlir : : RewritePattern { <nl> mlir : : PatternMatchResult <nl> matchAndRewrite ( mlir : : Operation * op , <nl> mlir : : PatternRewriter & rewriter ) const override { <nl> - ReshapeOp reshape = op - > cast < ReshapeOp > ( ) ; <nl> + ReshapeOp reshape = llvm : : cast < ReshapeOp > ( op ) ; <nl> / / Look through the input of the current reshape . <nl> mlir : : Value * reshapeInput = reshape . getOperand ( ) ; <nl> / / If the input is defined by another reshape , bingo ! <nl> struct SimplifyNullReshape : public mlir : : RewritePattern { <nl> mlir : : PatternMatchResult <nl> matchAndRewrite ( mlir : : Operation * op , <nl> mlir : : PatternRewriter & rewriter ) const override { <nl> - ReshapeOp reshape = op - > cast < ReshapeOp > ( ) ; <nl> + ReshapeOp reshape = llvm : : cast < ReshapeOp > ( op ) ; <nl> if ( reshape . getOperand ( ) - > getType ( ) ! = reshape . getResult ( ) - > getType ( ) ) <nl> return matchFailure ( ) ; <nl> rewriter . replaceOp ( reshape , { reshape . getOperand ( ) } ) ; <nl> mmm a / examples / toy / Ch5 / mlir / EarlyLowering . cpp <nl> ppp b / examples / toy / Ch5 / mlir / EarlyLowering . cpp <nl> class MulOpConversion : public DialectOpConversion { <nl> using intrinsics : : constant_index ; <nl> using linalg : : intrinsics : : range ; <nl> using linalg : : intrinsics : : view ; <nl> - toy : : MulOp mul = op - > cast < toy : : MulOp > ( ) ; <nl> + toy : : MulOp mul = cast < toy : : MulOp > ( op ) ; <nl> auto loc = mul . getLoc ( ) ; <nl> Value * result = memRefTypeCast ( <nl> rewriter , rewriter . create < toy : : AllocOp > ( loc , mul . getResult ( ) - > getType ( ) ) <nl> mmm a / examples / toy / Ch5 / mlir / LateLowering . cpp <nl> ppp b / examples / toy / Ch5 / mlir / LateLowering . cpp <nl> class AddOpConversion : public DialectOpConversion { <nl> / / / number must match the number of result of ` op ` . <nl> SmallVector < Value * , 4 > rewrite ( Operation * op , ArrayRef < Value * > operands , <nl> FuncBuilder & rewriter ) const override { <nl> - auto add = op - > cast < toy : : AddOp > ( ) ; <nl> + auto add = cast < toy : : AddOp > ( op ) ; <nl> auto loc = add . getLoc ( ) ; <nl> / / Create a ` toy . alloc ` operation to allocate the output buffer for this op . <nl> Value * result = memRefTypeCast ( <nl> class PrintOpConversion : public DialectOpConversion { <nl> / / Get or create the declaration of the printf function in the module . <nl> Function * printfFunc = getPrintf ( * op - > getFunction ( ) - > getModule ( ) ) ; <nl> <nl> - auto print = op - > cast < toy : : PrintOp > ( ) ; <nl> + auto print = cast < toy : : PrintOp > ( op ) ; <nl> auto loc = print . getLoc ( ) ; <nl> / / We will operate on a MemRef abstraction , we use a type . cast to get one <nl> / / if our operand is still a Toy array . <nl> class ConstantOpConversion : public DialectOpConversion { <nl> <nl> SmallVector < Value * , 4 > rewrite ( Operation * op , ArrayRef < Value * > operands , <nl> FuncBuilder & rewriter ) const override { <nl> - toy : : ConstantOp cstOp = op - > cast < toy : : ConstantOp > ( ) ; <nl> + toy : : ConstantOp cstOp = cast < toy : : ConstantOp > ( op ) ; <nl> auto loc = cstOp . getLoc ( ) ; <nl> auto retTy = cstOp . getResult ( ) - > getType ( ) . cast < toy : : ToyArrayType > ( ) ; <nl> auto shape = retTy . getShape ( ) ; <nl> class TransposeOpConversion : public DialectOpConversion { <nl> <nl> SmallVector < Value * , 4 > rewrite ( Operation * op , ArrayRef < Value * > operands , <nl> FuncBuilder & rewriter ) const override { <nl> - auto transpose = op - > cast < toy : : TransposeOp > ( ) ; <nl> + auto transpose = cast < toy : : TransposeOp > ( op ) ; <nl> auto loc = transpose . getLoc ( ) ; <nl> Value * result = memRefTypeCast ( <nl> rewriter , <nl> class ReturnOpConversion : public DialectOpConversion { <nl> <nl> SmallVector < Value * , 4 > rewrite ( Operation * op , ArrayRef < Value * > operands , <nl> FuncBuilder & rewriter ) const override { <nl> - auto retOp = op - > cast < toy : : ReturnOp > ( ) ; <nl> + auto retOp = cast < toy : : ReturnOp > ( op ) ; <nl> using namespace edsc ; <nl> auto loc = retOp . getLoc ( ) ; <nl> / / Argument is optional , handle both cases . <nl> mmm a / examples / toy / Ch5 / mlir / ShapeInferencePass . cpp <nl> ppp b / examples / toy / Ch5 / mlir / ShapeInferencePass . cpp <nl> class ShapeInferencePass : public mlir : : ModulePass < ShapeInferencePass > { <nl> / / Finally , update the return type of the function based on the argument to <nl> / / the return operation . <nl> for ( auto & block : f - > getBlocks ( ) ) { <nl> - auto ret = block . getTerminator ( ) - > cast < ReturnOp > ( ) ; <nl> + auto ret = llvm : : cast < ReturnOp > ( block . getTerminator ( ) ) ; <nl> if ( ! ret ) <nl> continue ; <nl> if ( ret . getNumOperands ( ) & & <nl> mmm a / examples / toy / Ch5 / mlir / ToyCombine . cpp <nl> ppp b / examples / toy / Ch5 / mlir / ToyCombine . cpp <nl> struct SimplifyRedundantTranspose : public mlir : : RewritePattern { <nl> mlir : : PatternRewriter & rewriter ) const override { <nl> / / We can directly cast the current operation as this will only get invoked <nl> / / on TransposeOp . <nl> - TransposeOp transpose = op - > cast < TransposeOp > ( ) ; <nl> + TransposeOp transpose = llvm : : cast < TransposeOp > ( op ) ; <nl> / / look through the input to the current transpose <nl> mlir : : Value * transposeInput = transpose . getOperand ( ) ; <nl> mlir : : Operation * transposeInputInst = transposeInput - > getDefiningOp ( ) ; <nl> struct SimplifyReshapeConstant : public mlir : : RewritePattern { <nl> mlir : : PatternMatchResult <nl> matchAndRewrite ( mlir : : Operation * op , <nl> mlir : : PatternRewriter & rewriter ) const override { <nl> - ReshapeOp reshape = op - > cast < ReshapeOp > ( ) ; <nl> + ReshapeOp reshape = llvm : : cast < ReshapeOp > ( op ) ; <nl> / / look through the input to the current reshape <nl> mlir : : Value * reshapeInput = reshape . getOperand ( ) ; <nl> mlir : : Operation * reshapeInputInst = reshapeInput - > getDefiningOp ( ) ; <nl> struct SimplifyReshapeReshape : public mlir : : RewritePattern { <nl> mlir : : PatternMatchResult <nl> matchAndRewrite ( mlir : : Operation * op , <nl> mlir : : PatternRewriter & rewriter ) const override { <nl> - ReshapeOp reshape = op - > cast < ReshapeOp > ( ) ; <nl> + ReshapeOp reshape = llvm : : cast < ReshapeOp > ( op ) ; <nl> / / look through the input to the current reshape <nl> mlir : : Value * reshapeInput = reshape . getOperand ( ) ; <nl> mlir : : Operation * reshapeInputInst = reshapeInput - > getDefiningOp ( ) ; <nl> struct SimplifyNullReshape : public mlir : : RewritePattern { <nl> mlir : : PatternMatchResult <nl> matchAndRewrite ( mlir : : Operation * op , <nl> mlir : : PatternRewriter & rewriter ) const override { <nl> - ReshapeOp reshape = op - > cast < ReshapeOp > ( ) ; <nl> + ReshapeOp reshape = llvm : : cast < ReshapeOp > ( op ) ; <nl> if ( reshape . getOperand ( ) - > getType ( ) ! = reshape . getResult ( ) - > getType ( ) ) <nl> return matchFailure ( ) ; <nl> rewriter . replaceOp ( reshape , { reshape . getOperand ( ) } ) ; <nl> struct SimplifyIdentityTypeCast : public mlir : : RewritePattern { <nl> mlir : : PatternMatchResult <nl> matchAndRewrite ( mlir : : Operation * op , <nl> mlir : : PatternRewriter & rewriter ) const override { <nl> - TypeCastOp typeCast = op - > cast < TypeCastOp > ( ) ; <nl> + TypeCastOp typeCast = llvm : : cast < TypeCastOp > ( op ) ; <nl> auto resTy = typeCast . getResult ( ) - > getType ( ) ; <nl> auto * candidateOp = op ; <nl> while ( candidateOp & & candidateOp - > isa < TypeCastOp > ( ) ) { <nl> mmm a / include / mlir / IR / OpDefinition . h <nl> ppp b / include / mlir / IR / OpDefinition . h <nl> class FoldingHook { <nl> static LogicalResult constantFoldHook ( Operation * op , <nl> ArrayRef < Attribute > operands , <nl> SmallVectorImpl < Attribute > & results ) { <nl> - return op - > cast < ConcreteType > ( ) . constantFold ( operands , results , <nl> - op - > getContext ( ) ) ; <nl> + return cast < ConcreteType > ( op ) . constantFold ( operands , results , <nl> + op - > getContext ( ) ) ; <nl> } <nl> <nl> / / / Op implementations can implement this hook . It should attempt to constant <nl> class FoldingHook { <nl> / / / This is an implementation detail of the folder hook for AbstractOperation . <nl> static LogicalResult foldHook ( Operation * op , <nl> SmallVectorImpl < Value * > & results ) { <nl> - return op - > cast < ConcreteType > ( ) . fold ( results ) ; <nl> + return cast < ConcreteType > ( op ) . fold ( results ) ; <nl> } <nl> <nl> / / / This hook implements a generalized folder for this operation . Operations <nl> class FoldingHook < ConcreteType , isSingleResult , <nl> ArrayRef < Attribute > operands , <nl> SmallVectorImpl < Attribute > & results ) { <nl> auto result = <nl> - op - > cast < ConcreteType > ( ) . constantFold ( operands , op - > getContext ( ) ) ; <nl> + cast < ConcreteType > ( op ) . constantFold ( operands , op - > getContext ( ) ) ; <nl> if ( ! result ) <nl> return failure ( ) ; <nl> <nl> class FoldingHook < ConcreteType , isSingleResult , <nl> / / / This is an implementation detail of the folder hook for AbstractOperation . <nl> static LogicalResult foldHook ( Operation * op , <nl> SmallVectorImpl < Value * > & results ) { <nl> - auto * result = op - > cast < ConcreteType > ( ) . fold ( ) ; <nl> + auto * result = cast < ConcreteType > ( op ) . fold ( ) ; <nl> if ( ! result ) <nl> return failure ( ) ; <nl> if ( result ! = op - > getResult ( 0 ) ) <nl> class Op : public OpState , <nl> static LogicalResult verifyInvariants ( Operation * op ) { <nl> return failure ( <nl> failed ( BaseVerifier < Traits < ConcreteType > . . . > : : verifyTrait ( op ) ) | | <nl> - failed ( op - > cast < ConcreteType > ( ) . verify ( ) ) ) ; <nl> + failed ( cast < ConcreteType > ( op ) . verify ( ) ) ) ; <nl> } <nl> <nl> / / Returns the properties of an operation by combining the properties of the <nl> mmm a / include / mlir / IR / Operation . h <nl> ppp b / include / mlir / IR / Operation . h <nl> class Operation final <nl> / / Conversions to declared operations like DimOp <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - = = = / / <nl> <nl> - / / / The cast methods perform a cast from an Operation to a typed Op like <nl> - / / / DimOp . This aborts if the parameter to the template isn ' t an instance of <nl> - / / / the template type argument . <nl> - template < typename OpClass > OpClass cast ( ) { <nl> - assert ( isa < OpClass > ( ) & & " cast < Ty > ( ) argument of incompatible type ! " ) ; <nl> - return OpClass ( this ) ; <nl> - } <nl> - <nl> / / / The is methods return true if the operation is a typed op ( like DimOp ) of <nl> / / / of the given class . <nl> template < typename OpClass > bool isa ( ) { return OpClass : : classof ( this ) ; } <nl> mmm a / lib / AffineOps / AffineOps . cpp <nl> ppp b / lib / AffineOps / AffineOps . cpp <nl> struct SimplifyAffineApply : public RewritePattern { <nl> <nl> PatternMatchResult matchAndRewrite ( Operation * op , <nl> PatternRewriter & rewriter ) const override { <nl> - auto apply = op - > cast < AffineApplyOp > ( ) ; <nl> + auto apply = cast < AffineApplyOp > ( op ) ; <nl> auto map = apply . getAffineMap ( ) ; <nl> <nl> AffineMap oldMap = map ; <nl> struct AffineForLoopBoundFolder : public RewritePattern { <nl> <nl> PatternMatchResult matchAndRewrite ( Operation * op , <nl> PatternRewriter & rewriter ) const override { <nl> - auto forOp = op - > cast < AffineForOp > ( ) ; <nl> + auto forOp = cast < AffineForOp > ( op ) ; <nl> auto foldLowerOrUpperBound = [ & forOp ] ( bool lower ) { <nl> / / Check to see if each of the operands is the result of a constant . If <nl> / / so , get the value . If not , ignore it . <nl> mmm a / lib / Analysis / LoopAnalysis . cpp <nl> ppp b / lib / Analysis / LoopAnalysis . cpp <nl> bool mlir : : isAccessInvariant ( Value * iv , Value * index ) { <nl> return false ; <nl> } <nl> <nl> - auto composeOp = affineApplyOps [ 0 ] - > cast < AffineApplyOp > ( ) ; <nl> + auto composeOp = cast < AffineApplyOp > ( affineApplyOps [ 0 ] ) ; <nl> / / We need yet another level of indirection because the ` dim ` index of the <nl> / / access may not correspond to the ` dim ` index of composeOp . <nl> return ! ( AffineValueMap ( composeOp ) . isFunctionOf ( 0 , iv ) ) ; <nl> mmm a / lib / Analysis / Utils . cpp <nl> ppp b / lib / Analysis / Utils . cpp <nl> mlir : : insertBackwardComputationSlice ( Operation * srcOpInst , Operation * dstOpInst , <nl> auto dstAffineForOp = dstLoopIVs [ dstLoopDepth - 1 ] ; <nl> FuncBuilder b ( dstAffineForOp . getBody ( ) , dstAffineForOp . getBody ( ) - > begin ( ) ) ; <nl> auto sliceLoopNest = <nl> - b . clone ( * srcLoopIVs [ 0 ] . getOperation ( ) ) - > cast < AffineForOp > ( ) ; <nl> + cast < AffineForOp > ( b . clone ( * srcLoopIVs [ 0 ] . getOperation ( ) ) ) ; <nl> <nl> Operation * sliceInst = <nl> getInstAtPosition ( positions , / * level = * / 0 , sliceLoopNest . getBody ( ) ) ; <nl> mmm a / lib / Analysis / VectorAnalysis . cpp <nl> ppp b / lib / Analysis / VectorAnalysis . cpp <nl> static AffineMap makePermutationMap ( <nl> for ( auto kvp : enclosingLoopToVectorDim ) { <nl> assert ( kvp . second < perm . size ( ) ) ; <nl> auto invariants = getInvariantAccesses ( <nl> - kvp . first - > cast < AffineForOp > ( ) . getInductionVar ( ) , indices ) ; <nl> + cast < AffineForOp > ( kvp . first ) . getInductionVar ( ) , indices ) ; <nl> unsigned numIndices = indices . size ( ) ; <nl> unsigned countInvariantIndices = 0 ; <nl> for ( unsigned dim = 0 ; dim < numIndices ; + + dim ) { <nl> AffineMap mlir : : makePermutationMap ( <nl> return : : makePermutationMap ( load . getIndices ( ) , enclosingLoopToVectorDim ) ; <nl> } <nl> <nl> - auto store = op - > cast < StoreOp > ( ) ; <nl> + auto store = cast < StoreOp > ( op ) ; <nl> return : : makePermutationMap ( store . getIndices ( ) , enclosingLoopToVectorDim ) ; <nl> } <nl> <nl> mmm a / lib / FxpMathOps / Transforms / LowerUniformRealMath . cpp <nl> ppp b / lib / FxpMathOps / Transforms / LowerUniformRealMath . cpp <nl> struct UniformDequantizePattern : public RewritePattern { <nl> <nl> PatternMatchResult matchAndRewrite ( Operation * op , <nl> PatternRewriter & rewriter ) const { <nl> - auto dcastOp = op - > cast < DequantizeCastOp > ( ) ; <nl> + auto dcastOp = cast < DequantizeCastOp > ( op ) ; <nl> Type inputType = dcastOp . arg ( ) - > getType ( ) ; <nl> Type outputType = dcastOp . getResult ( ) - > getType ( ) ; <nl> <nl> struct UniformRealAddEwPattern : public RewritePattern { <nl> <nl> PatternMatchResult matchAndRewrite ( Operation * op , <nl> PatternRewriter & rewriter ) const { <nl> - auto addOp = op - > cast < RealAddEwOp > ( ) ; <nl> + auto addOp = cast < RealAddEwOp > ( op ) ; <nl> const UniformBinaryOpInfo info ( op , addOp . lhs ( ) , addOp . rhs ( ) , <nl> addOp . clamp_min ( ) , addOp . clamp_max ( ) ) ; <nl> if ( ! info . isValid ( ) ) { <nl> struct UniformRealMulEwPattern : public RewritePattern { <nl> <nl> PatternMatchResult matchAndRewrite ( Operation * op , <nl> PatternRewriter & rewriter ) const { <nl> - auto mulOp = op - > cast < RealMulEwOp > ( ) ; <nl> + auto mulOp = cast < RealMulEwOp > ( op ) ; <nl> const UniformBinaryOpInfo info ( op , mulOp . lhs ( ) , mulOp . rhs ( ) , <nl> mulOp . clamp_min ( ) , mulOp . clamp_max ( ) ) ; <nl> if ( ! info . isValid ( ) ) { <nl> mmm a / lib / LLVMIR / Transforms / ConvertToLLVMDialect . cpp <nl> ppp b / lib / LLVMIR / Transforms / ConvertToLLVMDialect . cpp <nl> struct AllocOpLowering : public LLVMLegalizationPattern < AllocOp > { <nl> PatternMatchResult match ( Operation * op ) const override { <nl> if ( ! LLVMLegalizationPattern < AllocOp > : : match ( op ) ) <nl> return matchFailure ( ) ; <nl> - auto allocOp = op - > cast < AllocOp > ( ) ; <nl> + auto allocOp = cast < AllocOp > ( op ) ; <nl> MemRefType type = allocOp . getType ( ) ; <nl> return isSupportedMemRefType ( type ) ? matchSuccess ( ) : matchFailure ( ) ; <nl> } <nl> <nl> SmallVector < Value * , 4 > rewrite ( Operation * op , ArrayRef < Value * > operands , <nl> FuncBuilder & rewriter ) const override { <nl> - auto allocOp = op - > cast < AllocOp > ( ) ; <nl> + auto allocOp = cast < AllocOp > ( op ) ; <nl> MemRefType type = allocOp . getType ( ) ; <nl> <nl> / / Get actual sizes of the memref as values : static sizes are constant <nl> struct MemRefCastOpLowering : public LLVMLegalizationPattern < MemRefCastOp > { <nl> PatternMatchResult match ( Operation * op ) const override { <nl> if ( ! LLVMLegalizationPattern < MemRefCastOp > : : match ( op ) ) <nl> return matchFailure ( ) ; <nl> - auto memRefCastOp = op - > cast < MemRefCastOp > ( ) ; <nl> + auto memRefCastOp = cast < MemRefCastOp > ( op ) ; <nl> MemRefType sourceType = <nl> memRefCastOp . getOperand ( ) - > getType ( ) . cast < MemRefType > ( ) ; <nl> MemRefType targetType = memRefCastOp . getType ( ) ; <nl> struct MemRefCastOpLowering : public LLVMLegalizationPattern < MemRefCastOp > { <nl> <nl> SmallVector < Value * , 4 > rewrite ( Operation * op , ArrayRef < Value * > operands , <nl> FuncBuilder & rewriter ) const override { <nl> - auto memRefCastOp = op - > cast < MemRefCastOp > ( ) ; <nl> + auto memRefCastOp = cast < MemRefCastOp > ( op ) ; <nl> auto targetType = memRefCastOp . getType ( ) ; <nl> auto sourceType = memRefCastOp . getOperand ( ) - > getType ( ) . cast < MemRefType > ( ) ; <nl> <nl> struct DimOpLowering : public LLVMLegalizationPattern < DimOp > { <nl> PatternMatchResult match ( Operation * op ) const override { <nl> if ( ! LLVMLegalizationPattern < DimOp > : : match ( op ) ) <nl> return this - > matchFailure ( ) ; <nl> - auto dimOp = op - > cast < DimOp > ( ) ; <nl> + auto dimOp = cast < DimOp > ( op ) ; <nl> MemRefType type = dimOp . getOperand ( ) - > getType ( ) . cast < MemRefType > ( ) ; <nl> return isSupportedMemRefType ( type ) ? matchSuccess ( ) : matchFailure ( ) ; <nl> } <nl> struct DimOpLowering : public LLVMLegalizationPattern < DimOp > { <nl> SmallVector < Value * , 4 > rewrite ( Operation * op , ArrayRef < Value * > operands , <nl> FuncBuilder & rewriter ) const override { <nl> assert ( operands . size ( ) = = 1 & & " expected exactly one operand " ) ; <nl> - auto dimOp = op - > cast < DimOp > ( ) ; <nl> + auto dimOp = cast < DimOp > ( op ) ; <nl> MemRefType type = dimOp . getOperand ( ) - > getType ( ) . cast < MemRefType > ( ) ; <nl> <nl> SmallVector < Value * , 4 > results ; <nl> struct LoadStoreOpLowering : public LLVMLegalizationPattern < Derived > { <nl> PatternMatchResult match ( Operation * op ) const override { <nl> if ( ! LLVMLegalizationPattern < Derived > : : match ( op ) ) <nl> return this - > matchFailure ( ) ; <nl> - auto loadOp = op - > cast < Derived > ( ) ; <nl> + auto loadOp = cast < Derived > ( op ) ; <nl> MemRefType type = loadOp . getMemRefType ( ) ; <nl> return isSupportedMemRefType ( type ) ? this - > matchSuccess ( ) <nl> : this - > matchFailure ( ) ; <nl> struct LoadOpLowering : public LoadStoreOpLowering < LoadOp > { <nl> <nl> SmallVector < Value * , 4 > rewrite ( Operation * op , ArrayRef < Value * > operands , <nl> FuncBuilder & rewriter ) const override { <nl> - auto loadOp = op - > cast < LoadOp > ( ) ; <nl> + auto loadOp = cast < LoadOp > ( op ) ; <nl> auto type = loadOp . getMemRefType ( ) ; <nl> <nl> Value * dataPtr = getDataPtr ( op - > getLoc ( ) , type , operands . front ( ) , <nl> struct StoreOpLowering : public LoadStoreOpLowering < StoreOp > { <nl> <nl> SmallVector < Value * , 4 > rewrite ( Operation * op , ArrayRef < Value * > operands , <nl> FuncBuilder & rewriter ) const override { <nl> - auto storeOp = op - > cast < StoreOp > ( ) ; <nl> + auto storeOp = cast < StoreOp > ( op ) ; <nl> auto type = storeOp . getMemRefType ( ) ; <nl> <nl> Value * dataPtr = getDataPtr ( op - > getLoc ( ) , type , operands [ 1 ] , <nl> mmm a / lib / Linalg / IR / LinalgOps . cpp <nl> ppp b / lib / Linalg / IR / LinalgOps . cpp <nl> void mlir : : linalg : : SliceOp : : print ( OpAsmPrinter * p ) { <nl> } <nl> <nl> ViewOp mlir : : linalg : : SliceOp : : getBaseViewOp ( ) { <nl> - return getOperand ( 0 ) - > getDefiningOp ( ) - > cast < ViewOp > ( ) ; <nl> + return cast < ViewOp > ( getOperand ( 0 ) - > getDefiningOp ( ) ) ; <nl> } <nl> <nl> ViewType mlir : : linalg : : SliceOp : : getBaseViewType ( ) { <nl> ParseResult parseBufferSizeOp ( OpAsmParser * parser , OperationState * result ) ; <nl> / / / ` ` ` <nl> void mlir : : linalg : : impl : : printBufferSizeOp ( OpAsmPrinter * p , Operation * op ) { <nl> assert ( op - > getAbstractOperation ( ) & & " unregistered operation " ) ; <nl> - * p < < op - > cast < BufferSizeOp > ( ) . getOperationName ( ) < < " " <nl> - < < * op - > getOperand ( 0 ) ; <nl> + * p < < cast < BufferSizeOp > ( op ) . getOperationName ( ) < < " " < < * op - > getOperand ( 0 ) ; <nl> p - > printOptionalAttrDict ( op - > getAttrs ( ) ) ; <nl> * p < < " : " < < op - > getOperand ( 0 ) - > getType ( ) ; <nl> } <nl> mmm a / lib / Linalg / Transforms / LowerToLLVMDialect . cpp <nl> ppp b / lib / Linalg / Transforms / LowerToLLVMDialect . cpp <nl> class BufferAllocOpConversion : public LLVMOpLowering { <nl> } <nl> <nl> / / Get MLIR types for injecting element pointer . <nl> - auto allocOp = op - > cast < BufferAllocOp > ( ) ; <nl> + auto allocOp = cast < BufferAllocOp > ( op ) ; <nl> auto elementType = allocOp . getElementType ( ) ; <nl> uint64_t elementSize = 0 ; <nl> if ( auto vectorType = elementType . dyn_cast < VectorType > ( ) ) <nl> class BufferDeallocOpConversion : public LLVMOpLowering { <nl> } <nl> <nl> / / Get MLIR types for extracting element pointer . <nl> - auto deallocOp = op - > cast < BufferDeallocOp > ( ) ; <nl> + auto deallocOp = cast < BufferDeallocOp > ( op ) ; <nl> auto elementPtrTy = rewriter . getType < LLVMType > ( getPtrToElementType ( <nl> deallocOp . getOperand ( ) - > getType ( ) . cast < BufferType > ( ) , lowering ) ) ; <nl> <nl> template < typename Op > class LoadStoreOpConversion : public LLVMOpLowering { <nl> / / a getelementptr . This must be called under an edsc : : ScopedContext . <nl> Value * obtainDataPtr ( Operation * op , Value * viewDescriptor , <nl> ArrayRef < Value * > indices , FuncBuilder & rewriter ) const { <nl> - auto loadOp = op - > cast < Op > ( ) ; <nl> + auto loadOp = cast < Op > ( op ) ; <nl> auto elementTy = rewriter . getType < LLVMType > ( <nl> getPtrToElementType ( loadOp . getViewType ( ) , lowering ) ) ; <nl> auto int64Ty = lowering . convertType ( rewriter . getIntegerType ( 64 ) ) ; <nl> class RangeOpConversion : public LLVMOpLowering { <nl> <nl> SmallVector < Value * , 4 > rewrite ( Operation * op , ArrayRef < Value * > operands , <nl> FuncBuilder & rewriter ) const override { <nl> - auto rangeOp = op - > cast < RangeOp > ( ) ; <nl> + auto rangeOp = cast < RangeOp > ( op ) ; <nl> auto rangeDescriptorTy = <nl> convertLinalgType ( rangeOp . getResult ( ) - > getType ( ) , lowering ) ; <nl> <nl> class SliceOpConversion : public LLVMOpLowering { <nl> <nl> SmallVector < Value * , 4 > rewrite ( Operation * op , ArrayRef < Value * > operands , <nl> FuncBuilder & rewriter ) const override { <nl> - auto sliceOp = op - > cast < SliceOp > ( ) ; <nl> + auto sliceOp = cast < SliceOp > ( op ) ; <nl> auto viewDescriptorTy = convertLinalgType ( sliceOp . getViewType ( ) , lowering ) ; <nl> auto viewType = sliceOp . getBaseViewType ( ) ; <nl> auto int64Ty = lowering . convertType ( rewriter . getIntegerType ( 64 ) ) ; <nl> class ViewOpConversion : public LLVMOpLowering { <nl> <nl> SmallVector < Value * , 4 > rewrite ( Operation * op , ArrayRef < Value * > operands , <nl> FuncBuilder & rewriter ) const override { <nl> - auto viewOp = op - > cast < ViewOp > ( ) ; <nl> + auto viewOp = cast < ViewOp > ( op ) ; <nl> auto viewDescriptorTy = convertLinalgType ( viewOp . getViewType ( ) , lowering ) ; <nl> auto elementTy = rewriter . getType < LLVMType > ( <nl> getPtrToElementType ( viewOp . getViewType ( ) , lowering ) ) ; <nl> mmm a / lib / Linalg / Transforms / Tiling . cpp <nl> ppp b / lib / Linalg / Transforms / Tiling . cpp <nl> static SmallVector < Value * , 4 > applyMapToRangePart ( FuncBuilder * b , Location loc , <nl> } <nl> <nl> static bool isZero ( Value * v ) { <nl> - return v - > getDefiningOp ( ) & & v - > getDefiningOp ( ) - > isa < ConstantIndexOp > ( ) & & <nl> - v - > getDefiningOp ( ) - > cast < ConstantIndexOp > ( ) . getValue ( ) = = 0 ; <nl> + return isa_and_nonnull < ConstantIndexOp > ( v - > getDefiningOp ( ) ) & & <nl> + cast < ConstantIndexOp > ( v - > getDefiningOp ( ) ) . getValue ( ) = = 0 ; <nl> } <nl> <nl> / / / Returns a map that can be used to filter the zero values out of tileSizes . <nl> makeTiledLoopRanges ( FuncBuilder * b , Location loc , AffineMap map , <nl> / / Steps must be constant for now to abide by affine . for semantics . <nl> auto * newStep = <nl> state . getOrCreate ( <nl> - step - > getDefiningOp ( ) - > cast < ConstantIndexOp > ( ) . getValue ( ) * <nl> - tileSize - > getDefiningOp ( ) - > cast < ConstantIndexOp > ( ) . getValue ( ) ) ; <nl> + cast < ConstantIndexOp > ( step - > getDefiningOp ( ) ) . getValue ( ) * <nl> + cast < ConstantIndexOp > ( tileSize - > getDefiningOp ( ) ) . getValue ( ) ) ; <nl> res . push_back ( b - > create < RangeOp > ( loc , mins [ idx ] , maxes [ idx ] , newStep ) ) ; <nl> / / clang - format on <nl> } <nl> mmm a / lib / Linalg / Utils / Utils . cpp <nl> ppp b / lib / Linalg / Utils / Utils . cpp <nl> mlir : : edsc : : LoopNestRangeBuilder : : LoopNestRangeBuilder ( <nl> assert ( ranges [ i ] . getType ( ) & & " expected ! linalg . range type " ) ; <nl> assert ( ranges [ i ] . getValue ( ) - > getDefiningOp ( ) & & <nl> " need operations to extract range parts " ) ; <nl> - auto rangeOp = ranges [ i ] . getValue ( ) - > getDefiningOp ( ) - > cast < RangeOp > ( ) ; <nl> + auto rangeOp = cast < RangeOp > ( ranges [ i ] . getValue ( ) - > getDefiningOp ( ) ) ; <nl> auto lb = rangeOp . min ( ) ; <nl> auto ub = rangeOp . max ( ) ; <nl> / / This must be a constexpr index until we relax the affine . for constraint <nl> auto step = <nl> - rangeOp . step ( ) - > getDefiningOp ( ) - > cast < ConstantIndexOp > ( ) . getValue ( ) ; <nl> + cast < ConstantIndexOp > ( rangeOp . step ( ) - > getDefiningOp ( ) ) . getValue ( ) ; <nl> loops . emplace_back ( ivs [ i ] , ValueHandle ( lb ) , ValueHandle ( ub ) , step ) ; <nl> } <nl> assert ( loops . size ( ) = = ivs . size ( ) & & " Mismatch loops vs ivs size " ) ; <nl> Value * mlir : : createOrReturnView ( FuncBuilder * b , Location loc , <nl> return view . getResult ( ) ; <nl> return b - > create < SliceOp > ( loc , view . getResult ( ) , ranges ) ; <nl> } <nl> - auto slice = viewDefiningOp - > cast < SliceOp > ( ) ; <nl> + auto slice = cast < SliceOp > ( viewDefiningOp ) ; <nl> unsigned idxRange = 0 ; <nl> SmallVector < Value * , 4 > newIndexings ; <nl> bool elide = true ; <nl> mmm a / lib / Quantization / IR / QuantOps . cpp <nl> ppp b / lib / Quantization / IR / QuantOps . cpp <nl> class RemoveRedundantStorageCastsRewrite : public RewritePattern { <nl> : RewritePattern ( StorageCastOp : : getOperationName ( ) , 1 , context ) { } <nl> <nl> PatternMatchResult match ( Operation * op ) const override { <nl> - auto scastOp = op - > cast < StorageCastOp > ( ) ; <nl> + auto scastOp = cast < StorageCastOp > ( op ) ; <nl> if ( matchPattern ( scastOp . arg ( ) , m_Op < StorageCastOp > ( ) ) ) { <nl> - auto srcScastOp = scastOp . arg ( ) - > getDefiningOp ( ) - > cast < StorageCastOp > ( ) ; <nl> + auto srcScastOp = cast < StorageCastOp > ( scastOp . arg ( ) - > getDefiningOp ( ) ) ; <nl> if ( srcScastOp . arg ( ) - > getType ( ) = = scastOp . getResult ( ) - > getType ( ) ) { <nl> return matchSuccess ( ) ; <nl> } <nl> class RemoveRedundantStorageCastsRewrite : public RewritePattern { <nl> } <nl> <nl> void rewrite ( Operation * op , PatternRewriter & rewriter ) const override { <nl> - auto scastOp = op - > cast < StorageCastOp > ( ) ; <nl> - auto srcScastOp = scastOp . arg ( ) - > getDefiningOp ( ) - > cast < StorageCastOp > ( ) ; <nl> + auto scastOp = cast < StorageCastOp > ( op ) ; <nl> + auto srcScastOp = cast < StorageCastOp > ( scastOp . arg ( ) - > getDefiningOp ( ) ) ; <nl> rewriter . replaceOp ( op , srcScastOp . arg ( ) ) ; <nl> } <nl> } ; <nl> mmm a / lib / Quantization / Transforms / ConvertConst . cpp <nl> ppp b / lib / Quantization / Transforms / ConvertConst . cpp <nl> PatternMatchResult QuantizedConstRewrite : : match ( Operation * op ) const { <nl> State state ; <nl> <nl> / / Is the operand a constant ? <nl> - auto qbarrier = op - > cast < QuantizeCastOp > ( ) ; <nl> + auto qbarrier = cast < QuantizeCastOp > ( op ) ; <nl> if ( ! matchPattern ( qbarrier . arg ( ) , m_Constant ( & state . value ) ) ) { <nl> return matchFailure ( ) ; <nl> } <nl> mmm a / lib / Quantization / Transforms / ConvertSimQuant . cpp <nl> ppp b / lib / Quantization / Transforms / ConvertSimQuant . cpp <nl> class ConstFakeQuantRewrite : public RewritePattern { <nl> } <nl> <nl> bool failableRewrite ( Operation * op , PatternRewriter & rewriter ) const { <nl> - auto fqOp = op - > cast < ConstFakeQuant > ( ) ; <nl> + auto fqOp = cast < ConstFakeQuant > ( op ) ; <nl> <nl> auto converter = <nl> ExpressedToUniformQuantizedConverter : : forInputType ( fqOp . getType ( ) ) ; <nl> mmm a / lib / StandardOps / Ops . cpp <nl> ppp b / lib / StandardOps / Ops . cpp <nl> struct SimplifyAllocConst : public RewritePattern { <nl> : RewritePattern ( AllocOp : : getOperationName ( ) , 1 , context ) { } <nl> <nl> PatternMatchResult match ( Operation * op ) const override { <nl> - auto alloc = op - > cast < AllocOp > ( ) ; <nl> + auto alloc = cast < AllocOp > ( op ) ; <nl> <nl> / / Check to see if any dimensions operands are constants . If so , we can <nl> / / substitute and drop them . <nl> struct SimplifyAllocConst : public RewritePattern { <nl> } <nl> <nl> void rewrite ( Operation * op , PatternRewriter & rewriter ) const override { <nl> - auto allocOp = op - > cast < AllocOp > ( ) ; <nl> + auto allocOp = cast < AllocOp > ( op ) ; <nl> auto memrefType = allocOp . getType ( ) ; <nl> <nl> / / Ok , we have one or more constant operands . Collect the non - constant ones <nl> struct SimplifyDeadAlloc : public RewritePattern { <nl> PatternMatchResult matchAndRewrite ( Operation * op , <nl> PatternRewriter & rewriter ) const override { <nl> / / Check if the alloc ' ed value has any uses . <nl> - auto alloc = op - > cast < AllocOp > ( ) ; <nl> + auto alloc = cast < AllocOp > ( op ) ; <nl> if ( ! alloc . use_empty ( ) ) <nl> return matchFailure ( ) ; <nl> <nl> struct SimplifyIndirectCallWithKnownCallee : public RewritePattern { <nl> <nl> PatternMatchResult matchAndRewrite ( Operation * op , <nl> PatternRewriter & rewriter ) const override { <nl> - auto indirectCall = op - > cast < CallIndirectOp > ( ) ; <nl> + auto indirectCall = cast < CallIndirectOp > ( op ) ; <nl> <nl> / / Check that the callee is a constant operation . <nl> Attribute callee ; <nl> struct SimplifyConstCondBranchPred : public RewritePattern { <nl> <nl> PatternMatchResult matchAndRewrite ( Operation * op , <nl> PatternRewriter & rewriter ) const override { <nl> - auto condbr = op - > cast < CondBranchOp > ( ) ; <nl> + auto condbr = cast < CondBranchOp > ( op ) ; <nl> <nl> / / Check that the condition is a constant . <nl> if ( ! matchPattern ( condbr . getCondition ( ) , m_Op < ConstantOp > ( ) ) ) <nl> struct SimplifyDeadDealloc : public RewritePattern { <nl> <nl> PatternMatchResult matchAndRewrite ( Operation * op , <nl> PatternRewriter & rewriter ) const override { <nl> - auto dealloc = op - > cast < DeallocOp > ( ) ; <nl> + auto dealloc = cast < DeallocOp > ( op ) ; <nl> <nl> / / Check that the memref operand ' s defining operation is an AllocOp . <nl> Value * memref = dealloc . memref ( ) ; <nl> struct SimplifyXMinusX : public RewritePattern { <nl> <nl> PatternMatchResult matchAndRewrite ( Operation * op , <nl> PatternRewriter & rewriter ) const override { <nl> - auto subi = op - > cast < SubIOp > ( ) ; <nl> + auto subi = cast < SubIOp > ( op ) ; <nl> if ( subi . getOperand ( 0 ) ! = subi . getOperand ( 1 ) ) <nl> return matchFailure ( ) ; <nl> <nl> struct SimplifyXXOrX : public RewritePattern { <nl> <nl> PatternMatchResult matchAndRewrite ( Operation * op , <nl> PatternRewriter & rewriter ) const override { <nl> - auto xorOp = op - > cast < XOrOp > ( ) ; <nl> + auto xorOp = cast < XOrOp > ( op ) ; <nl> if ( xorOp . lhs ( ) ! = xorOp . rhs ( ) ) <nl> return matchFailure ( ) ; <nl> <nl> mmm a / lib / Transforms / LoopFusion . cpp <nl> ppp b / lib / Transforms / LoopFusion . cpp <nl> struct LoopNestStateCollector { <nl> void collect ( Operation * opToWalk ) { <nl> opToWalk - > walk ( [ & ] ( Operation * op ) { <nl> if ( op - > isa < AffineForOp > ( ) ) <nl> - forOps . push_back ( op - > cast < AffineForOp > ( ) ) ; <nl> + forOps . push_back ( cast < AffineForOp > ( op ) ) ; <nl> else if ( op - > getNumRegions ( ) ! = 0 ) <nl> hasNonForRegion = true ; <nl> else if ( op - > isa < LoadOp > ( ) ) <nl> struct MemRefDependenceGraph { <nl> unsigned getLoadOpCount ( Value * memref ) { <nl> unsigned loadOpCount = 0 ; <nl> for ( auto * loadOpInst : loads ) { <nl> - if ( memref = = loadOpInst - > cast < LoadOp > ( ) . getMemRef ( ) ) <nl> + if ( memref = = cast < LoadOp > ( loadOpInst ) . getMemRef ( ) ) <nl> + + loadOpCount ; <nl> } <nl> return loadOpCount ; <nl> struct MemRefDependenceGraph { <nl> unsigned getStoreOpCount ( Value * memref ) { <nl> unsigned storeOpCount = 0 ; <nl> for ( auto * storeOpInst : stores ) { <nl> - if ( memref = = storeOpInst - > cast < StoreOp > ( ) . getMemRef ( ) ) <nl> + if ( memref = = cast < StoreOp > ( storeOpInst ) . getMemRef ( ) ) <nl> + + storeOpCount ; <nl> } <nl> return storeOpCount ; <nl> struct MemRefDependenceGraph { <nl> void getStoreOpsForMemref ( Value * memref , <nl> SmallVectorImpl < Operation * > * storeOps ) { <nl> for ( auto * storeOpInst : stores ) { <nl> - if ( memref = = storeOpInst - > cast < StoreOp > ( ) . getMemRef ( ) ) <nl> + if ( memref = = cast < StoreOp > ( storeOpInst ) . getMemRef ( ) ) <nl> storeOps - > push_back ( storeOpInst ) ; <nl> } <nl> } <nl> struct MemRefDependenceGraph { <nl> void getLoadOpsForMemref ( Value * memref , <nl> SmallVectorImpl < Operation * > * loadOps ) { <nl> for ( auto * loadOpInst : loads ) { <nl> - if ( memref = = loadOpInst - > cast < LoadOp > ( ) . getMemRef ( ) ) <nl> + if ( memref = = cast < LoadOp > ( loadOpInst ) . getMemRef ( ) ) <nl> loadOps - > push_back ( loadOpInst ) ; <nl> } <nl> } <nl> struct MemRefDependenceGraph { <nl> void getLoadAndStoreMemrefSet ( DenseSet < Value * > * loadAndStoreMemrefSet ) { <nl> llvm : : SmallDenseSet < Value * , 2 > loadMemrefs ; <nl> for ( auto * loadOpInst : loads ) { <nl> - loadMemrefs . insert ( loadOpInst - > cast < LoadOp > ( ) . getMemRef ( ) ) ; <nl> + loadMemrefs . insert ( cast < LoadOp > ( loadOpInst ) . getMemRef ( ) ) ; <nl> } <nl> for ( auto * storeOpInst : stores ) { <nl> - auto * memref = storeOpInst - > cast < StoreOp > ( ) . getMemRef ( ) ; <nl> + auto * memref = cast < StoreOp > ( storeOpInst ) . getMemRef ( ) ; <nl> if ( loadMemrefs . count ( memref ) > 0 ) <nl> loadAndStoreMemrefSet - > insert ( memref ) ; <nl> } <nl> struct MemRefDependenceGraph { <nl> bool writesToLiveInOrEscapingMemrefs ( unsigned id ) { <nl> Node * node = getNode ( id ) ; <nl> for ( auto * storeOpInst : node - > stores ) { <nl> - auto * memref = storeOpInst - > cast < StoreOp > ( ) . getMemRef ( ) ; <nl> + auto * memref = cast < StoreOp > ( storeOpInst ) . getMemRef ( ) ; <nl> auto * op = memref - > getDefiningOp ( ) ; <nl> / / Return true if ' memref ' is a block argument . <nl> if ( ! op ) <nl> struct MemRefDependenceGraph { <nl> Node * node = getNode ( id ) ; <nl> for ( auto * storeOpInst : node - > stores ) { <nl> / / Return false if there exist out edges from ' id ' on ' memref ' . <nl> - if ( getOutEdgeCount ( id , storeOpInst - > cast < StoreOp > ( ) . getMemRef ( ) ) > 0 ) <nl> + if ( getOutEdgeCount ( id , cast < StoreOp > ( storeOpInst ) . getMemRef ( ) ) > 0 ) <nl> return false ; <nl> } <nl> return true ; <nl> bool MemRefDependenceGraph : : init ( Function & f ) { <nl> Node node ( nextNodeId + + , & op ) ; <nl> for ( auto * opInst : collector . loadOpInsts ) { <nl> node . loads . push_back ( opInst ) ; <nl> - auto * memref = opInst - > cast < LoadOp > ( ) . getMemRef ( ) ; <nl> + auto * memref = cast < LoadOp > ( opInst ) . getMemRef ( ) ; <nl> memrefAccesses [ memref ] . insert ( node . id ) ; <nl> } <nl> for ( auto * opInst : collector . storeOpInsts ) { <nl> node . stores . push_back ( opInst ) ; <nl> - auto * memref = opInst - > cast < StoreOp > ( ) . getMemRef ( ) ; <nl> + auto * memref = cast < StoreOp > ( opInst ) . getMemRef ( ) ; <nl> memrefAccesses [ memref ] . insert ( node . id ) ; <nl> } <nl> forToNodeMap [ & op ] = node . id ; <nl> bool MemRefDependenceGraph : : init ( Function & f ) { <nl> / / Create graph node for top - level load op . <nl> Node node ( nextNodeId + + , & op ) ; <nl> node . loads . push_back ( & op ) ; <nl> - auto * memref = op . cast < LoadOp > ( ) . getMemRef ( ) ; <nl> + auto * memref = cast < LoadOp > ( op ) . getMemRef ( ) ; <nl> memrefAccesses [ memref ] . insert ( node . id ) ; <nl> nodes . insert ( { node . id , node } ) ; <nl> } else if ( auto storeOp = dyn_cast < StoreOp > ( op ) ) { <nl> / / Create graph node for top - level store op . <nl> Node node ( nextNodeId + + , & op ) ; <nl> node . stores . push_back ( & op ) ; <nl> - auto * memref = op . cast < StoreOp > ( ) . getMemRef ( ) ; <nl> + auto * memref = cast < StoreOp > ( op ) . getMemRef ( ) ; <nl> memrefAccesses [ memref ] . insert ( node . id ) ; <nl> nodes . insert ( { node . id , node } ) ; <nl> } else if ( op . getNumRegions ( ) ! = 0 ) { <nl> static void moveLoadsAccessingMemrefTo ( Value * memref , <nl> dstLoads - > clear ( ) ; <nl> SmallVector < Operation * , 4 > srcLoadsToKeep ; <nl> for ( auto * load : * srcLoads ) { <nl> - if ( load - > cast < LoadOp > ( ) . getMemRef ( ) = = memref ) <nl> + if ( cast < LoadOp > ( load ) . getMemRef ( ) = = memref ) <nl> dstLoads - > push_back ( load ) ; <nl> else <nl> srcLoadsToKeep . push_back ( load ) ; <nl> computeLoopInterchangePermutation ( ArrayRef < AffineForOp > loops , <nl> static void sinkSequentialLoops ( MemRefDependenceGraph : : Node * node ) { <nl> assert ( node - > op - > isa < AffineForOp > ( ) ) ; <nl> SmallVector < AffineForOp , 4 > loops ; <nl> - AffineForOp curr = node - > op - > cast < AffineForOp > ( ) ; <nl> + AffineForOp curr = cast < AffineForOp > ( node - > op ) ; <nl> getPerfectlyNestedLoops ( loops , curr ) ; <nl> if ( loops . size ( ) < 2 ) <nl> return ; <nl> static Value * createPrivateMemRef ( AffineForOp forOp , Operation * srcStoreOpInst , <nl> / / Builder to create constants at the top level . <nl> FuncBuilder top ( forInst - > getFunction ( ) ) ; <nl> / / Create new memref type based on slice bounds . <nl> - auto * oldMemRef = srcStoreOpInst - > cast < StoreOp > ( ) . getMemRef ( ) ; <nl> + auto * oldMemRef = cast < StoreOp > ( srcStoreOpInst ) . getMemRef ( ) ; <nl> auto oldMemRefType = oldMemRef - > getType ( ) . cast < MemRefType > ( ) ; <nl> unsigned rank = oldMemRefType . getRank ( ) ; <nl> <nl> static bool canFuseSrcWhichWritesToLiveOut ( unsigned srcId , unsigned dstId , <nl> / / Gather all memrefs from ' srcNode ' store ops . <nl> DenseSet < Value * > storeMemrefs ; <nl> for ( auto * storeOpInst : srcNode - > stores ) { <nl> - storeMemrefs . insert ( storeOpInst - > cast < StoreOp > ( ) . getMemRef ( ) ) ; <nl> + storeMemrefs . insert ( cast < StoreOp > ( storeOpInst ) . getMemRef ( ) ) ; <nl> } <nl> / / Return false if any of the following are true : <nl> / / * ) ' srcNode ' writes to a live in / out memref other than ' memref ' . <nl> struct GreedyFusion { <nl> DenseSet < Value * > visitedMemrefs ; <nl> while ( ! loads . empty ( ) ) { <nl> / / Get memref of load on top of the stack . <nl> - auto * memref = loads . back ( ) - > cast < LoadOp > ( ) . getMemRef ( ) ; <nl> + auto * memref = cast < LoadOp > ( loads . back ( ) ) . getMemRef ( ) ; <nl> if ( visitedMemrefs . count ( memref ) > 0 ) <nl> continue ; <nl> visitedMemrefs . insert ( memref ) ; <nl> struct GreedyFusion { <nl> / / Gather ' dstNode ' store ops to ' memref ' . <nl> SmallVector < Operation * , 2 > dstStoreOpInsts ; <nl> for ( auto * storeOpInst : dstNode - > stores ) <nl> - if ( storeOpInst - > cast < StoreOp > ( ) . getMemRef ( ) = = memref ) <nl> + if ( cast < StoreOp > ( storeOpInst ) . getMemRef ( ) = = memref ) <nl> dstStoreOpInsts . push_back ( storeOpInst ) ; <nl> <nl> unsigned bestDstLoopDepth ; <nl> struct GreedyFusion { <nl> LLVM_DEBUG ( llvm : : dbgs ( ) < < " \ tslice loop nest : \ n " <nl> < < * sliceLoopNest . getOperation ( ) < < " \ n " ) ; <nl> / / Move ' dstAffineForOp ' before ' insertPointInst ' if needed . <nl> - auto dstAffineForOp = dstNode - > op - > cast < AffineForOp > ( ) ; <nl> + auto dstAffineForOp = cast < AffineForOp > ( dstNode - > op ) ; <nl> if ( insertPointInst ! = dstAffineForOp . getOperation ( ) ) { <nl> dstAffineForOp . getOperation ( ) - > moveBefore ( insertPointInst ) ; <nl> } <nl> struct GreedyFusion { <nl> / / Create private memref for ' memref ' in ' dstAffineForOp ' . <nl> SmallVector < Operation * , 4 > storesForMemref ; <nl> for ( auto * storeOpInst : sliceCollector . storeOpInsts ) { <nl> - if ( storeOpInst - > cast < StoreOp > ( ) . getMemRef ( ) = = memref ) <nl> + if ( cast < StoreOp > ( storeOpInst ) . getMemRef ( ) = = memref ) <nl> storesForMemref . push_back ( storeOpInst ) ; <nl> } <nl> assert ( storesForMemref . size ( ) = = 1 ) ; <nl> struct GreedyFusion { <nl> / / Add new load ops to current Node load op list ' loads ' to <nl> / / continue fusing based on new operands . <nl> for ( auto * loadOpInst : dstLoopCollector . loadOpInsts ) { <nl> - auto * loadMemRef = loadOpInst - > cast < LoadOp > ( ) . getMemRef ( ) ; <nl> + auto * loadMemRef = cast < LoadOp > ( loadOpInst ) . getMemRef ( ) ; <nl> if ( visitedMemrefs . count ( loadMemRef ) = = 0 ) <nl> loads . push_back ( loadOpInst ) ; <nl> } <nl> struct GreedyFusion { <nl> auto sliceLoopNest = mlir : : insertBackwardComputationSlice ( <nl> sibLoadOpInst , dstLoadOpInsts [ 0 ] , bestDstLoopDepth , & sliceState ) ; <nl> if ( sliceLoopNest ! = nullptr ) { <nl> - auto dstForInst = dstNode - > op - > cast < AffineForOp > ( ) ; <nl> + auto dstForInst = cast < AffineForOp > ( dstNode - > op ) ; <nl> / / Update operation position of fused loop nest ( if needed ) . <nl> if ( insertPointInst ! = dstForInst . getOperation ( ) ) { <nl> dstForInst . getOperation ( ) - > moveBefore ( insertPointInst ) ; <nl> struct GreedyFusion { <nl> / / Check that all stores are to the same memref . <nl> DenseSet < Value * > storeMemrefs ; <nl> for ( auto * storeOpInst : sibNode - > stores ) { <nl> - storeMemrefs . insert ( storeOpInst - > cast < StoreOp > ( ) . getMemRef ( ) ) ; <nl> + storeMemrefs . insert ( cast < StoreOp > ( storeOpInst ) . getMemRef ( ) ) ; <nl> } <nl> if ( storeMemrefs . size ( ) ! = 1 ) <nl> return false ; <nl> struct GreedyFusion { <nl> } <nl> <nl> / / Collect dst loop stats after memref privatizaton transformation . <nl> - auto dstForInst = dstNode - > op - > cast < AffineForOp > ( ) ; <nl> + auto dstForInst = cast < AffineForOp > ( dstNode - > op ) ; <nl> LoopNestStateCollector dstLoopCollector ; <nl> dstLoopCollector . collect ( dstForInst . getOperation ( ) ) ; <nl> / / Clear and add back loads and stores <nl> struct GreedyFusion { <nl> / / function . <nl> if ( mdg - > getOutEdgeCount ( sibNode - > id ) = = 0 ) { <nl> mdg - > removeNode ( sibNode - > id ) ; <nl> - sibNode - > op - > cast < AffineForOp > ( ) . erase ( ) ; <nl> + sibNode - > op - > erase ( ) ; <nl> } <nl> } <nl> <nl> mmm a / lib / Transforms / LoopUnroll . cpp <nl> ppp b / lib / Transforms / LoopUnroll . cpp <nl> void LoopUnroll : : runOnFunction ( ) { <nl> hasInnerLoops | = walkPostOrder ( block . begin ( ) , block . end ( ) ) ; <nl> if ( opInst - > isa < AffineForOp > ( ) ) { <nl> if ( ! hasInnerLoops ) <nl> - loops . push_back ( opInst - > cast < AffineForOp > ( ) ) ; <nl> + loops . push_back ( cast < AffineForOp > ( opInst ) ) ; <nl> return true ; <nl> } <nl> return hasInnerLoops ; <nl> mmm a / lib / Transforms / LoopUnrollAndJam . cpp <nl> ppp b / lib / Transforms / LoopUnrollAndJam . cpp <nl> LogicalResult mlir : : loopUnrollJamByFactor ( AffineForOp forOp , <nl> / / Insert the cleanup loop right after ' forOp ' . <nl> FuncBuilder builder ( forInst - > getBlock ( ) , <nl> std : : next ( Block : : iterator ( forInst ) ) ) ; <nl> - auto cleanupAffineForOp = builder . clone ( * forInst ) - > cast < AffineForOp > ( ) ; <nl> + auto cleanupAffineForOp = cast < AffineForOp > ( builder . clone ( * forInst ) ) ; <nl> / / Adjust the lower bound of the cleanup loop ; its upper bound is the same <nl> / / as the original loop ' s upper bound . <nl> AffineMap cleanupMap ; <nl> mmm a / lib / Transforms / LowerAffine . cpp <nl> ppp b / lib / Transforms / LowerAffine . cpp <nl> void LowerAffinePass : : runOnFunction ( ) { <nl> } else if ( auto forOp = dyn_cast < AffineForOp > ( op ) ) { <nl> if ( lowerAffineFor ( forOp ) ) <nl> return signalPassFailure ( ) ; <nl> - } else if ( lowerAffineApply ( op - > cast < AffineApplyOp > ( ) ) ) { <nl> + } else if ( lowerAffineApply ( cast < AffineApplyOp > ( op ) ) ) { <nl> return signalPassFailure ( ) ; <nl> } <nl> } <nl> mmm a / lib / Transforms / LowerVectorTransfers . cpp <nl> ppp b / lib / Transforms / LowerVectorTransfers . cpp <nl> VectorTransferRewriter < VectorTransferReadOp > : : matchAndRewrite ( <nl> using namespace mlir : : edsc : : op ; <nl> using namespace mlir : : edsc : : intrinsics ; <nl> <nl> - VectorTransferReadOp transfer = op - > cast < VectorTransferReadOp > ( ) ; <nl> + VectorTransferReadOp transfer = cast < VectorTransferReadOp > ( op ) ; <nl> <nl> / / 1 . Setup all the captures . <nl> ScopedContext scope ( FuncBuilder ( op ) , transfer . getLoc ( ) ) ; <nl> VectorTransferRewriter < VectorTransferWriteOp > : : matchAndRewrite ( <nl> using namespace mlir : : edsc : : op ; <nl> using namespace mlir : : edsc : : intrinsics ; <nl> <nl> - VectorTransferWriteOp transfer = op - > cast < VectorTransferWriteOp > ( ) ; <nl> + VectorTransferWriteOp transfer = cast < VectorTransferWriteOp > ( op ) ; <nl> <nl> / / 1 . Setup all the captures . <nl> ScopedContext scope ( FuncBuilder ( op ) , transfer . getLoc ( ) ) ; <nl> mmm a / lib / Transforms / MaterializeVectors . cpp <nl> ppp b / lib / Transforms / MaterializeVectors . cpp <nl> static bool materialize ( Function * f , const SetVector < Operation * > & terminators , <nl> continue ; <nl> } <nl> <nl> - auto terminator = term - > cast < VectorTransferWriteOp > ( ) ; <nl> + auto terminator = cast < VectorTransferWriteOp > ( term ) ; <nl> LLVM_DEBUG ( dbgs ( ) < < " \ nFrom terminator : " < < * term ) ; <nl> <nl> / / Get the transitive use - defs starting from terminator , limited to the <nl> mmm a / lib / Transforms / MemRefDataFlowOpt . cpp <nl> ppp b / lib / Transforms / MemRefDataFlowOpt . cpp <nl> void MemRefDataFlowOpt : : forwardStoreToLoad ( LoadOp loadOp ) { <nl> return ; <nl> <nl> / / Perform the actual store to load forwarding . <nl> - Value * storeVal = lastWriteStoreOp - > cast < StoreOp > ( ) . getValueToStore ( ) ; <nl> + Value * storeVal = cast < StoreOp > ( lastWriteStoreOp ) . getValueToStore ( ) ; <nl> loadOp . getResult ( ) - > replaceAllUsesWith ( storeVal ) ; <nl> / / Record the memref for a later sweep to optimize away . <nl> memrefsToErase . insert ( loadOp . getMemRef ( ) ) ; <nl> mmm a / lib / Transforms / PipelineDataTransfer . cpp <nl> ppp b / lib / Transforms / PipelineDataTransfer . cpp <nl> static void findMatchingStartFinishInsts ( <nl> / / For each start operation , we look for a matching finish operation . <nl> for ( auto * dmaStartInst : dmaStartInsts ) { <nl> for ( auto * dmaFinishInst : dmaFinishInsts ) { <nl> - if ( checkTagMatch ( dmaStartInst - > cast < DmaStartOp > ( ) , <nl> - dmaFinishInst - > cast < DmaWaitOp > ( ) ) ) { <nl> + if ( checkTagMatch ( cast < DmaStartOp > ( dmaStartInst ) , <nl> + cast < DmaWaitOp > ( dmaFinishInst ) ) ) { <nl> startWaitPairs . push_back ( { dmaStartInst , dmaFinishInst } ) ; <nl> break ; <nl> } <nl> void PipelineDataTransfer : : runOnAffineForOp ( AffineForOp forOp ) { <nl> for ( auto & pair : startWaitPairs ) { <nl> auto * dmaStartInst = pair . first ; <nl> Value * oldMemRef = dmaStartInst - > getOperand ( <nl> - dmaStartInst - > cast < DmaStartOp > ( ) . getFasterMemPos ( ) ) ; <nl> + cast < DmaStartOp > ( dmaStartInst ) . getFasterMemPos ( ) ) ; <nl> if ( ! doubleBuffer ( oldMemRef , forOp ) ) { <nl> / / Normally , double buffering should not fail because we already checked <nl> / / that there are no uses outside . <nl> mmm a / lib / Transforms / Utils / LoopUtils . cpp <nl> ppp b / lib / Transforms / Utils / LoopUtils . cpp <nl> LogicalResult mlir : : loopUnrollByFactor ( AffineForOp forOp , <nl> Operation * op = forOp . getOperation ( ) ; <nl> if ( getLargestDivisorOfTripCount ( forOp ) % unrollFactor ! = 0 ) { <nl> FuncBuilder builder ( op - > getBlock ( ) , + + Block : : iterator ( op ) ) ; <nl> - auto cleanupForInst = builder . clone ( * op ) - > cast < AffineForOp > ( ) ; <nl> + auto cleanupForInst = cast < AffineForOp > ( builder . clone ( * op ) ) ; <nl> AffineMap cleanupMap ; <nl> SmallVector < Value * , 4 > cleanupOperands ; <nl> getCleanupLoopLowerBound ( forOp , unrollFactor , & cleanupMap , & cleanupOperands , <nl> void mlir : : interchangeLoops ( AffineForOp forOpA , AffineForOp forOpB ) { <nl> void mlir : : sinkLoop ( AffineForOp forOp , unsigned loopDepth ) { <nl> for ( unsigned i = 0 ; i < loopDepth ; + + i ) { <nl> assert ( forOp . getBody ( ) - > front ( ) . isa < AffineForOp > ( ) ) ; <nl> - AffineForOp nextForOp = forOp . getBody ( ) - > front ( ) . cast < AffineForOp > ( ) ; <nl> + AffineForOp nextForOp = cast < AffineForOp > ( forOp . getBody ( ) - > front ( ) ) ; <nl> interchangeLoops ( forOp , nextForOp ) ; <nl> } <nl> } <nl> mmm a / lib / Transforms / Vectorization / VectorizerTestPass . cpp <nl> ppp b / lib / Transforms / Vectorization / VectorizerTestPass . cpp <nl> void VectorizerTestPass : : testNormalizeMaps ( ) { <nl> SmallVector < NestedMatch , 8 > matches ; <nl> pattern . match ( f , & matches ) ; <nl> for ( auto m : matches ) { <nl> - auto app = m . getMatchedOperation ( ) - > cast < AffineApplyOp > ( ) ; <nl> + auto app = cast < AffineApplyOp > ( m . getMatchedOperation ( ) ) ; <nl> FuncBuilder b ( m . getMatchedOperation ( ) ) ; <nl> SmallVector < Value * , 8 > operands ( app . getOperands ( ) ) ; <nl> makeComposedAffineApply ( & b , app . getLoc ( ) , app . getAffineMap ( ) , operands ) ; <nl> mmm a / lib / Transforms / Vectorize . cpp <nl> ppp b / lib / Transforms / Vectorize . cpp <nl> static FilterFunctionType <nl> isVectorizableLoopPtrFactory ( const llvm : : DenseSet < Operation * > & parallelLoops , <nl> int fastestVaryingMemRefDimension ) { <nl> return [ & parallelLoops , fastestVaryingMemRefDimension ] ( Operation & forOp ) { <nl> - auto loop = forOp . cast < AffineForOp > ( ) ; <nl> + auto loop = cast < AffineForOp > ( forOp ) ; <nl> auto parallelIt = parallelLoops . find ( loop ) ; <nl> if ( parallelIt = = parallelLoops . end ( ) ) <nl> return false ; <nl> static LogicalResult <nl> vectorizeLoopsAndLoadsRecursively ( NestedMatch oneMatch , <nl> VectorizationState * state ) { <nl> auto * loopInst = oneMatch . getMatchedOperation ( ) ; <nl> - auto loop = loopInst - > cast < AffineForOp > ( ) ; <nl> + auto loop = cast < AffineForOp > ( loopInst ) ; <nl> auto childrenMatches = oneMatch . getMatchedChildren ( ) ; <nl> <nl> / / 1 . DFS postorder recursion , if any of my children fails , I fail too . <nl> static LogicalResult vectorizeNonTerminals ( VectorizationState * state ) { <nl> / / / anything below it fails . <nl> static LogicalResult vectorizeRootMatch ( NestedMatch m , <nl> VectorizationStrategy * strategy ) { <nl> - auto loop = m . getMatchedOperation ( ) - > cast < AffineForOp > ( ) ; <nl> + auto loop = cast < AffineForOp > ( m . getMatchedOperation ( ) ) ; <nl> VectorizationState state ; <nl> state . strategy = strategy ; <nl> <nl> static LogicalResult vectorizeRootMatch ( NestedMatch m , <nl> / / / RAII . <nl> auto * loopInst = loop . getOperation ( ) ; <nl> FuncBuilder builder ( loopInst ) ; <nl> - auto clonedLoop = builder . clone ( * loopInst ) - > cast < AffineForOp > ( ) ; <nl> + auto clonedLoop = cast < AffineForOp > ( builder . clone ( * loopInst ) ) ; <nl> struct Guard { <nl> LogicalResult failure ( ) { <nl> loop . getInductionVar ( ) - > replaceAllUsesWith ( clonedLoop . getInductionVar ( ) ) ; <nl>
Replace Operation : : cast with llvm : : cast .
tensorflow/tensorflow
e8746e2e17aa94c4391a182369d8a881517be267
2019-05-20T20:37:42Z
mmm a / js / common / bootstrap / js - modules . h <nl> ppp b / js / common / bootstrap / js - modules . h <nl> static string JS_common_bootstrap_modules = <nl> " / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - \ n " <nl> " \ n " <nl> " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl> - " / / / @ page JSModuleFsTOC \ n " <nl> - " / / / \ n " <nl> - " / / / < ol > \ n " <nl> - " / / / < li > @ ref JSModuleFsExists \ " fs . exists \ " < / li > \ n " <nl> - " / / / < / ol > \ n " <nl> - " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl> - " \ n " <nl> - " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl> - " / / / @ page JSModuleFs Module \ " fs \ " \ n " <nl> - " / / / \ n " <nl> - " / / / The implementation follows the CommonJS specification \ n " <nl> - " / / / < a href = \ " http : / / wiki . commonjs . org / wiki / Filesystem / A / 0 \ " > Filesystem / A / 0 < / a > . \ n " <nl> - " / / / \ n " <nl> - " / / / < hr > \ n " <nl> - " / / / @ copydoc JSModuleFsTOC \ n " <nl> - " / / / < hr > \ n " <nl> - " / / / \ n " <nl> - " / / / @ anchor JSModuleFsExists \ n " <nl> - " / / / @ copydetails JS_Exists \ n " <nl> - " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl> - " \ n " <nl> - " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl> " / / / @ addtogroup V8ModuleFS \ n " <nl> " / / / @ { \ n " <nl> " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl> static string JS_common_bootstrap_modules = <nl> " / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - \ n " <nl> " \ n " <nl> " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl> - " / / / @ page JSModuleInternalTOC \ n " <nl> - " / / / \ n " <nl> - " / / / < ol > \ n " <nl> - " / / / < li > @ ref JSModuleInternalExecute \ " internal . execute \ " < / li > \ n " <nl> - " / / / < li > @ ref JSModuleInternalLoad \ " internal . load \ " < / li > \ n " <nl> - " / / / < li > @ ref JSModuleInternalLogLevel \ " internal . log \ " < / li > \ n " <nl> - " / / / < li > @ ref JSModuleInternalLogLevel \ " internal . logLevel \ " < / li > \ n " <nl> - " / / / < li > @ ref JSModuleInternalOutput \ " internal . output \ " < / li > \ n " <nl> - " / / / < li > @ ref JSModuleInternalProcessStat \ " internal . processStat \ " < / li > \ n " <nl> - " / / / < li > @ ref JSModuleInternalRead \ " internal . read \ " < / li > \ n " <nl> - " / / / < li > @ ref JSModuleInternalSPrintF \ " internal . sprintf \ " < / li > \ n " <nl> - " / / / < li > @ ref JSModuleInternalTime \ " internal . time \ " < / li > \ n " <nl> - " / / / < / ol > \ n " <nl> - " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl> - " \ n " <nl> - " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl> - " / / / @ page JSModuleInternal Module \ " internal \ " \ n " <nl> - " / / / \ n " <nl> - " / / / The following functions are used internally . \ n " <nl> - " / / / \ n " <nl> - " / / / < hr > \ n " <nl> - " / / / @ copydoc JSModuleInternalTOC \ n " <nl> - " / / / < hr > \ n " <nl> - " / / / \ n " <nl> - " / / / @ anchor JSModuleInternalExecute \ n " <nl> - " / / / @ copydetails JS_Execute \ n " <nl> - " / / / \ n " <nl> - " / / / @ anchor JSModuleInternalLoad \ n " <nl> - " / / / @ copydetails JS_Load \ n " <nl> - " / / / \ n " <nl> - " / / / @ anchor JSModuleInternalLog \ n " <nl> - " / / / @ copydetails JS_Log \ n " <nl> - " / / / \ n " <nl> - " / / / @ anchor JSModuleInternalLogLevel \ n " <nl> - " / / / @ copydetails JS_LogLevel \ n " <nl> - " / / / \ n " <nl> - " / / / @ anchor JSModuleInternalOutput \ n " <nl> - " / / / @ copydetails JS_Output \ n " <nl> - " / / / \ n " <nl> - " / / / @ anchor JSModuleInternalRead \ n " <nl> - " / / / @ copydetails JS_Read \ n " <nl> - " / / / \ n " <nl> - " / / / @ anchor JSModuleInternalSPrintF \ n " <nl> - " / / / @ copydetails JS_SPrintF \ n " <nl> - " / / / \ n " <nl> - " / / / @ anchor JSModuleInternalTime \ n " <nl> - " / / / @ copydetails JS_Time \ n " <nl> - " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl> - " \ n " <nl> - " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl> " / / / @ addtogroup V8ModuleInternal \ n " <nl> " / / / @ { \ n " <nl> " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl> static string JS_common_bootstrap_modules = <nl> " / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - \ n " <nl> " \ n " <nl> " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl> - " / / / @ page JSModuleConsoleTOC \ n " <nl> - " / / / \ n " <nl> - " / / / < ol > \ n " <nl> - " / / / < li > @ ref JSModuleConsoleDebug \ " console . debug \ " < / li > \ n " <nl> - " / / / < li > @ ref JSModuleConsoleError \ " console . error \ " < / li > \ n " <nl> - " / / / < li > @ ref JSModuleConsoleInfo \ " console . info \ " < / li > \ n " <nl> - " / / / < li > @ ref JSModuleConsoleLog \ " console . log \ " < / li > \ n " <nl> - " / / / < li > @ ref JSModuleConsoleWarn \ " console . warn \ " < / li > \ n " <nl> - " / / / < / ol > \ n " <nl> - " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl> - " \ n " <nl> - " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl> - " / / / @ page JSModuleConsole Module \ " console \ " \ n " <nl> - " / / / \ n " <nl> - " / / / The implementation follows the CommonJS specification \ n " <nl> - " / / / < a href = \ " http : / / wiki . commonjs . org / wiki / Console \ " > Console < / a > . \ n " <nl> - " / / / \ n " <nl> - " / / / < hr > \ n " <nl> - " / / / @ copydoc JSModuleConsoleTOC \ n " <nl> - " / / / < hr > \ n " <nl> - " / / / \ n " <nl> - " / / / @ anchor JSModuleConsoleDebug \ n " <nl> - " / / / @ copydetails JSF_CONSOLE_DEBUG \ n " <nl> - " / / / \ n " <nl> - " / / / @ anchor JSModuleConsoleError \ n " <nl> - " / / / @ copydetails JSF_CONSOLE_ERROR \ n " <nl> - " / / / \ n " <nl> - " / / / @ anchor JSModuleConsoleInfo \ n " <nl> - " / / / @ copydetails JSF_CONSOLE_INFO \ n " <nl> - " / / / \ n " <nl> - " / / / @ anchor JSModuleConsoleLog \ n " <nl> - " / / / @ copydetails JSF_CONSOLE_LOG \ n " <nl> - " / / / \ n " <nl> - " / / / @ anchor JSModuleConsoleWarn \ n " <nl> - " / / / @ copydetails JSF_CONSOLE_WARN \ n " <nl> - " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl> - " \ n " <nl> - " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl> " / / / @ addtogroup V8ModuleConsole \ n " <nl> " / / / @ { \ n " <nl> " / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ n " <nl>
cleanup documentation
arangodb/arangodb
69bfa5757e0f3ac45efe83c91fa12e68402a39bb
2012-03-18T22:54:04Z
mmm a / src / cpp / server / server . cc <nl> ppp b / src / cpp / server / server . cc <nl> bool Server : : Start ( ServerCompletionQueue * * cqs , size_t num_cqs ) { <nl> unknown_method_ . reset ( new RpcServiceMethod ( <nl> " unknown " , RpcMethod : : BIDI_STREAMING , new UnknownMethodHandler ) ) ; <nl> / / Use of emplace_back with just constructor arguments is not accepted <nl> - / / here <nl> - / / by gcc - 4 . 4 because it can ' t match the anonymous nullptr with a proper <nl> - / / constructor implicitly . Construct the object and use push_back . <nl> + / / here by gcc - 4 . 4 because it can ' t match the anonymous nullptr with a <nl> + / / proper constructor implicitly . Construct the object and use push_back . <nl> sync_methods_ - > push_back ( SyncRequest ( unknown_method_ . get ( ) , nullptr ) ) ; <nl> } <nl> for ( size_t i = 0 ; i < num_cqs ; i + + ) { <nl>
prettify comment
grpc/grpc
849c7ca4b2bbda14dd9531ede3aa31cd86aa8d85
2015-08-21T23:06:05Z