diff
stringlengths
41
2.03M
msg
stringlengths
1
1.5k
repo
stringlengths
5
40
sha
stringlengths
40
40
time
stringlengths
20
20
mmm a / tools / test . py <nl> ppp b / tools / test . py <nl> def Run ( self , tasks ) : <nl> # If there ' s an exception we schedule an interruption for any <nl> # remaining threads . <nl> self . terminate = True <nl> - print e <nl> - return False <nl> + # . . . and then reraise the exception to bail out <nl> + raise <nl> self . Done ( ) <nl> return not self . failed <nl> <nl> def RunSingle ( self ) : <nl> self . AboutToRun ( case ) <nl> self . lock . release ( ) <nl> try : <nl> + start = time . time ( ) <nl> output = case . Run ( ) <nl> + case . duration = ( time . time ( ) - start ) <nl> except IOError , e : <nl> assert self . terminate <nl> return <nl> def Done ( self ) : <nl> class VerboseProgressIndicator ( SimpleProgressIndicator ) : <nl> <nl> def AboutToRun ( self , case ) : <nl> - print ' % s : ' % case . GetLabel ( ) , <nl> + print ' Starting % s . . . ' % case . GetLabel ( ) <nl> sys . stdout . flush ( ) <nl> <nl> def HasRun ( self , output ) : <nl> if output . UnexpectedOutput ( ) : <nl> - print " FAIL " <nl> + outcome = ' FAIL ' <nl> else : <nl> - print " pass " <nl> + outcome = ' pass ' <nl> + print ' Done running % s : % s ' % ( output . test . GetLabel ( ) , outcome ) <nl> <nl> <nl> class DotsProgressIndicator ( SimpleProgressIndicator ) : <nl> def __init__ ( self , context , path ) : <nl> self . path = path <nl> self . context = context <nl> self . failed = None <nl> + self . duration = None <nl> <nl> def IsNegative ( self ) : <nl> return False <nl> <nl> + def CompareTime ( self , other ) : <nl> + return cmp ( other . duration , self . duration ) <nl> + <nl> def DidFail ( self , output ) : <nl> if self . failed is None : <nl> self . failed = self . IsFailureOutput ( output ) <nl> def BuildOptions ( ) : <nl> default = False , action = " store_true " ) <nl> result . add_option ( " - j " , help = " The number of parallel tasks to run " , <nl> default = 1 , type = " int " ) <nl> + result . add_option ( " - - time " , help = " Print timing information after running " , <nl> + default = False , action = " store_true " ) <nl> return result <nl> <nl> <nl> def IsSuite ( path ) : <nl> return [ f for f in os . listdir ( test_root ) if IsSuite ( join ( test_root , f ) ) ] <nl> <nl> <nl> + def FormatTime ( d ) : <nl> + millis = round ( d * 1000 ) % 1000 <nl> + return time . strftime ( " % M : % S . " , time . gmtime ( d ) ) + ( " % 03i " % millis ) <nl> + <nl> + <nl> def Main ( ) : <nl> parser = BuildOptions ( ) <nl> ( options , args ) = parser . parse_args ( ) <nl> def Main ( ) : <nl> if options . report : <nl> PrintReport ( all_cases ) <nl> <nl> + result = None <nl> if len ( all_cases ) = = 0 : <nl> print " No tests to run . " <nl> return 0 <nl> else : <nl> try : <nl> + start = time . time ( ) <nl> if RunTestCases ( all_cases , options . progress , options . j ) : <nl> - return 0 <nl> + result = 0 <nl> else : <nl> - return 1 <nl> + result = 1 <nl> + duration = time . time ( ) - start <nl> except KeyboardInterrupt : <nl> print " Interrupted " <nl> return 1 <nl> <nl> + if options . time : <nl> + # Write the times to stderr to make it easy to separate from the <nl> + # test output . <nl> + print <nl> + sys . stderr . write ( " mmm Total time : % s mmm \ n " % FormatTime ( duration ) ) <nl> + timed_tests = [ t . case for t in all_cases if not t . case . duration is None ] <nl> + timed_tests . sort ( lambda a , b : a . CompareTime ( b ) ) <nl> + index = 1 <nl> + for entry in timed_tests [ : 20 ] : <nl> + t = FormatTime ( entry . duration ) <nl> + sys . stderr . write ( " % 4i ( % s ) % s \ n " % ( index , t , entry . GetLabel ( ) ) ) <nl> + index + = 1 <nl> + <nl> + return result <nl> + <nl> <nl> if __name__ = = ' __main__ ' : <nl> sys . exit ( Main ( ) ) <nl>
Added test timing .
v8/v8
22d604e5bfeda63de9e96ab6d8f9d64a811737e2
2008-10-01T09:07:45Z
mmm a / tensorflow / python / compiler / xla / xla . py <nl> ppp b / tensorflow / python / compiler / xla / xla . py <nl> def is_flat ( outputs ) : <nl> 2 ) A single object <nl> 3 ) A list or tuple of Tensors / Operations <nl> <nl> - The only structures that this function understands are sequences and <nl> - dictionaries . E . g . this means that if outputs contains a single <nl> - user - defined Object , it is considered to be flat . Errors are raised later on <nl> - if that Object cannot be converted to a Tensor . <nl> + The only structures that this function understands are sequences , <nl> + dictionaries and types defined using the attrs library . E . g . this means <nl> + that if outputs contains a single user - defined Object , it is considered to <nl> + be flat . Errors are raised later on if that Object cannot be converted to a <nl> + Tensor . <nl> <nl> Args : <nl> outputs : Output from ` computation ` inside ` xla . compile ` . <nl> def is_flat ( outputs ) : <nl> # there is , then outputs is non - flat . <nl> if isinstance ( outputs , collections . Sequence ) : <nl> for o in outputs : <nl> - if isinstance ( o , collections . Sequence ) or isinstance ( <nl> - o , collections . Mapping ) : <nl> + if ( isinstance ( o , collections . Sequence ) or <nl> + isinstance ( o , collections . Mapping ) or <nl> + hasattr ( o . __class__ , ' __attrs_attrs__ ' ) ) : <nl> return False <nl> <nl> # If outputs is a dict , it is non - flat . <nl> if isinstance ( outputs , collections . Mapping ) : <nl> return False <nl> <nl> + # If outputs is from the attrs library , it is non - flat . <nl> + if hasattr ( outputs . __class__ , ' __attrs_attrs__ ' ) : <nl> + return False <nl> + <nl> # Getting here means either outputs itself is a single non - structured value <nl> # or it is a flat list of single non - structured values . <nl> return True <nl>
Allow returning attr types from TPUStrategy . run
tensorflow/tensorflow
9033264944f589f128fe5edccd2406b5f012a126
2020-06-11T17:38:35Z
mmm a / src / yuzu / main . cpp <nl> ppp b / src / yuzu / main . cpp <nl> bool GMainWindow : : LoadROM ( const QString & filename ) { <nl> } <nl> <nl> void GMainWindow : : BootGame ( const QString & filename ) { <nl> - LOG_INFO ( Frontend , " yuzu starting . . . " ) ; <nl> + NGLOG_INFO ( Frontend , " yuzu starting . . . " ) ; <nl> StoreRecentFile ( filename ) ; / / Put the filename on top of the list <nl> <nl> if ( ! LoadROM ( filename ) ) <nl>
Change " yuzu starting . . . " to be logged with the new macro
yuzu-emu/yuzu
47f96fe13ae54d17c83de4e565612279530c957e
2018-03-22T10:26:43Z
mmm a / src / relooper / Relooper . cpp <nl> ppp b / src / relooper / Relooper . cpp <nl> void MultipleShape : : RenderLoopPrefix ( ) { <nl> } <nl> } else { <nl> if ( Labeled ) { <nl> - if ( UseSwitch ) { <nl> - PrintIndented ( " L % d : " , Id ) ; <nl> - } else { <nl> - PrintIndented ( " L % d : do { \ n " , Id ) ; <nl> - } <nl> + PrintIndented ( " L % d : do { \ n " , Id ) ; <nl> } else { <nl> PrintIndented ( " do { \ n " ) ; <nl> } <nl>
remove unneeded code
emscripten-core/emscripten
066eb33d5f169c1d0e8a3eddd41b1f21ceced6c5
2014-04-29T21:07:03Z
mmm a / lib / ClangImporter / ImportDecl . cpp <nl> ppp b / lib / ClangImporter / ImportDecl . cpp <nl> static AccessorDecl * makeEnumRawValueGetter ( ClangImporter : : Implementation & Impl , <nl> / * GenericParams = * / nullptr , params , <nl> TypeLoc : : withoutLoc ( rawTy ) , enumDecl ) ; <nl> getterDecl - > setImplicit ( ) ; <nl> + getterDecl - > setIsObjC ( false ) ; <nl> <nl> auto type = ParameterList : : getFullInterfaceType ( rawTy , params , C ) ; <nl> <nl> static AccessorDecl * makeStructRawValueGetter ( <nl> / * GenericParams = * / nullptr , params , <nl> TypeLoc : : withoutLoc ( computedType ) , structDecl ) ; <nl> getterDecl - > setImplicit ( ) ; <nl> + getterDecl - > setIsObjC ( false ) ; <nl> <nl> auto type = ParameterList : : getFullInterfaceType ( computedType , params , C ) ; <nl> <nl> static AccessorDecl * makeFieldGetterDecl ( ClangImporter : : Implementation & Impl , <nl> / * GenericParams = * / nullptr , params , <nl> TypeLoc : : withoutLoc ( getterType ) , importedDecl , clangNode ) ; <nl> getterDecl - > setAccess ( AccessLevel : : Public ) ; <nl> + getterDecl - > setIsObjC ( false ) ; <nl> <nl> auto type = ParameterList : : getFullInterfaceType ( getterType , params , C ) ; <nl> getterDecl - > setInterfaceType ( type ) ; <nl> static AccessorDecl * makeFieldSetterDecl ( ClangImporter : : Implementation & Impl , <nl> / * ThrowsLoc = * / SourceLoc ( ) , <nl> / * GenericParams = * / nullptr , params , <nl> TypeLoc : : withoutLoc ( voidTy ) , importedDecl , clangNode ) ; <nl> + setterDecl - > setIsObjC ( false ) ; <nl> <nl> auto type = ParameterList : : getFullInterfaceType ( voidTy , params , C ) ; <nl> setterDecl - > setInterfaceType ( type ) ; <nl> static bool addErrorDomain ( NominalTypeDecl * swiftDecl , <nl> TypeLoc : : withoutLoc ( stringTy ) , swiftDecl ) ; <nl> getterDecl - > setInterfaceType ( toStringTy ) ; <nl> getterDecl - > setValidationToChecked ( ) ; <nl> + getterDecl - > setIsObjC ( false ) ; <nl> <nl> swiftDecl - > addMember ( errorDomainPropertyDecl ) ; <nl> swiftDecl - > addMember ( getterDecl ) ; <nl> namespace { <nl> Impl . importSourceLoc ( decl - > getLocStart ( ) ) , <nl> name , dc - > mapTypeIntoContext ( type ) , dc ) ; <nl> result - > setInterfaceType ( type ) ; <nl> + result - > setIsObjC ( false ) ; <nl> Impl . recordImplicitUnwrapForDecl ( result , <nl> importedType . isImplicitlyUnwrapped ( ) ) ; <nl> <nl> namespace { <nl> <nl> result - > setInterfaceType ( type ) ; <nl> result - > setValidationToChecked ( ) ; <nl> + result - > setIsObjC ( false ) ; <nl> Impl . recordImplicitUnwrapForDecl ( result , <nl> importedType . isImplicitlyUnwrapped ( ) ) ; <nl> <nl> namespace { <nl> / * IsCaptureList * / false , <nl> Impl . importSourceLoc ( decl - > getLocation ( ) ) , <nl> name , dc - > mapTypeIntoContext ( type ) , dc ) ; <nl> + result - > setIsObjC ( false ) ; <nl> result - > setInterfaceType ( type ) ; <nl> Impl . recordImplicitUnwrapForDecl ( result , <nl> importedType . isImplicitlyUnwrapped ( ) ) ; <nl> namespace { <nl> / * IsCaptureList * / false , <nl> Impl . importSourceLoc ( decl - > getLocation ( ) ) , <nl> name , dc - > mapTypeIntoContext ( type ) , dc ) ; <nl> + result - > setIsObjC ( false ) ; <nl> result - > setInterfaceType ( type ) ; <nl> Impl . recordImplicitUnwrapForDecl ( result , <nl> importedType . isImplicitlyUnwrapped ( ) ) ; <nl> SwiftDeclConverter : : getImplicitProperty ( ImportedName importedName , <nl> VarDecl : : Specifier : : Var , / * IsCaptureList * / false , SourceLoc ( ) , <nl> propertyName , dc - > mapTypeIntoContext ( swiftPropertyType ) , dc ) ; <nl> property - > setInterfaceType ( swiftPropertyType ) ; <nl> + property - > setIsObjC ( false ) ; <nl> Impl . recordImplicitUnwrapForDecl ( property , <nl> importedType . isImplicitlyUnwrapped ( ) ) ; <nl> <nl> ClangImporter : : Implementation : : createConstant ( Identifier name , DeclContext * dc , <nl> } <nl> <nl> var - > setInterfaceType ( type ) ; <nl> + var - > setIsObjC ( false ) ; <nl> <nl> / / Form the argument patterns . <nl> SmallVector < ParameterList * , 3 > getterArgs ; <nl> ClangImporter : : Implementation : : createConstant ( Identifier name , DeclContext * dc , <nl> func - > setAccess ( getOverridableAccessLevel ( dc ) ) ; <nl> func - > setValidationToChecked ( ) ; <nl> func - > setImplicit ( ) ; <nl> + func - > setIsObjC ( false ) ; <nl> <nl> / / If we ' re not done type checking , build the getter body . <nl> if ( ! hasFinishedTypeChecking ( ) ) { <nl> createUnavailableDecl ( Identifier name , DeclContext * dc , Type type , <nl> VarDecl : : Specifier : : Var , <nl> / * IsCaptureList * / false , <nl> SourceLoc ( ) , name , type , dc ) ; <nl> + var - > setIsObjC ( false ) ; <nl> var - > setInterfaceType ( type ) ; <nl> markUnavailable ( var , UnavailableMessage ) ; <nl> <nl> mmm a / lib / Sema / TypeCheckDecl . cpp <nl> ppp b / lib / Sema / TypeCheckDecl . cpp <nl> static void validateAbstractStorageDecl ( TypeChecker & TC , <nl> / / Add any mandatory accessors now . <nl> maybeAddAccessorsToStorage ( TC , storage ) ; <nl> <nl> - # if false <nl> - / / We can ' t delay validation of getters and setters on @ objc properties , <nl> - / / because if they never get validated at all then conformance checkers <nl> - / / will complain about selector mismatches . <nl> - if ( storage - > isObjC ( ) ) { <nl> - if ( auto * getter = storage - > getGetter ( ) ) <nl> - TC . validateDecl ( getter ) ; <nl> - if ( auto * setter = storage - > getSetter ( ) ) <nl> - TC . validateDecl ( setter ) ; <nl> - } <nl> - # endif <nl> - <nl> / / Everything else about the accessors can wait until finalization . <nl> / / This will validate all the accessors . <nl> TC . DeclsToFinalize . insert ( storage ) ; <nl> void TypeChecker : : requestMemberLayout ( ValueDecl * member ) { <nl> / / Check whether the member is @ objc or dynamic . <nl> ( void ) member - > isObjC ( ) ; <nl> ( void ) member - > isDynamic ( ) ; <nl> + <nl> + / / If this represents ( abstract ) storage , form the appropriate accessors . <nl> + if ( auto storage = dyn_cast < AbstractStorageDecl > ( member ) ) { <nl> + validateAbstractStorageDecl ( * this , storage ) ; <nl> + <nl> + / / Request layout of the accessors for an @ objc declaration . <nl> + / / We can ' t delay validation of getters and setters on @ objc properties , <nl> + / / because if they never get validated at all then conformance checkers <nl> + / / will complain about selector mismatches . <nl> + if ( storage - > isObjC ( ) ) { <nl> + for ( auto accessor : storage - > getAllAccessors ( ) ) { <nl> + requestMemberLayout ( accessor ) ; <nl> + } <nl> + } <nl> + } <nl> } <nl> <nl> void TypeChecker : : requestNominalLayout ( NominalTypeDecl * nominalDecl ) { <nl>
[ Clang importer ] Consistently set “ isObjC ” bit on imported decls .
apple/swift
780f8fea9356b2b6ede7c4bf72796bc7492ed037
2018-07-18T21:52:57Z
new file mode 100644 <nl> index 00000000000 . . bca5f85245e <nl> mmm / dev / null <nl> ppp b / ports / comms / portfile . cmake <nl> <nl> + # header - only library <nl> + <nl> + vcpkg_from_github ( <nl> + OUT_SOURCE_PATH SOURCE_PATH <nl> + REPO mathisloge / comms_champion <nl> + REF v3 . 1 . 1 <nl> + SHA512 167838aec1d42ce60e373aaa1c3b3f0093735e54b80c12229624fa5617b713462609b46585dbe9a1637404e88bd051eda2e619d21bff60056693e79dd9e53878 <nl> + HEAD_REF master <nl> + ) <nl> + <nl> + vcpkg_configure_cmake ( <nl> + SOURCE_PATH $ { SOURCE_PATH } <nl> + PREFER_NINJA <nl> + OPTIONS <nl> + - DCC_COMMS_LIB_ONLY = ON <nl> + - DCC_NO_UNIT_TESTS = ON <nl> + ) <nl> + vcpkg_install_cmake ( ) <nl> + <nl> + file ( REMOVE_RECURSE " $ { CURRENT_PACKAGES_DIR } / debug / include " ) <nl> + file ( REMOVE_RECURSE " $ { CURRENT_PACKAGES_DIR } / debug / share " ) <nl> + <nl> + # Handle copyright <nl> + file ( INSTALL $ { SOURCE_PATH } / LICENSE DESTINATION $ { CURRENT_PACKAGES_DIR } / share / $ { PORT } RENAME copyright ) <nl> \ No newline at end of file <nl> new file mode 100644 <nl> index 00000000000 . . 6c3668de0fd <nl> mmm / dev / null <nl> ppp b / ports / comms / vcpkg . json <nl> <nl> + { <nl> + " name " : " comms " , <nl> + " version - string " : " 3 . 1 . 1 " , <nl> + " description " : " COMMS is the C + + ( 11 ) headers only , platform independent library , which makes the implementation of a communication protocol to be an easy and relatively quick process . " , <nl> + " homepage " : " https : / / commschamp . github . io / " , <nl> + " documentation " : " https : / / github . com / commschamp / comms_champion " <nl> + } <nl> new file mode 100644 <nl> index 00000000000 . . 426f0ac9fa0 <nl> mmm / dev / null <nl> ppp b / ports / commsdsl / fix - libxml2 . patch <nl> <nl> + diff - - git a / lib / src / CMakeLists . txt b / lib / src / CMakeLists . txt <nl> + index 9fb4718 . . fec7712 100644 <nl> + mmm a / lib / src / CMakeLists . txt <nl> ppp + b / lib / src / CMakeLists . txt <nl> + <nl> + set ( INTERNAL_LIBXML_TGT ) <nl> + - while ( TRUE ) <nl> + - if ( UNIX ) <nl> + - # Use libxml2 from system repositories <nl> + - break ( ) <nl> + - endif ( ) <nl> + - <nl> + - if ( ( NOT " $ { LIBXML2_INCLUDE_DIR } " STREQUAL " " ) AND ( NOT " $ { LIBXML2_LIBRARIES } " STREQUAL " " ) ) <nl> + - # External build of libxml2 is provided <nl> + - break ( ) <nl> + - endif ( ) <nl> + - <nl> + - if ( NOT MSVC ) <nl> + - message ( FATAL_ERROR " At this moment only MSVC compiler is supported for windows builds " ) <nl> + - endif ( ) <nl> + - <nl> + - set ( INTERNAL_LIBXML_TGT " libxml2_tgt " ) <nl> + - set ( LIBXML2_DIR " $ { CMAKE_CURRENT_BINARY_DIR } / libxml2 " ) <nl> + - set ( LIBXML2_SRC_DIR " $ { LIBXML2_DIR } / src " ) <nl> + - set ( LIBXML2_BIN_DIR " $ { LIBXML2_SRC_DIR } / win32 " ) <nl> + - <nl> + - set ( LIBXML2_CRUNTIME ) <nl> + - if ( ( " $ { CMAKE_BUILD_TYPE } " STREQUAL " " ) OR ( " $ { CMAKE_BUILD_TYPE } " STREQUAL " None " ) OR ( " $ { CMAKE_BUILD_TYPE } " STREQUAL " Debug " ) ) <nl> + - set ( LIBXML2_CRUNTIME " cruntime = / MDd " ) <nl> + - endif ( ) <nl> + - <nl> + - include ( ExternalProject ) <nl> + - ExternalProject_Add ( <nl> + - $ { INTERNAL_LIBXML_TGT } <nl> + - PREFIX " $ { LIBXML2_DIR } " <nl> + - STAMP_DIR " $ { LIBXML2_DIR } / stamp " <nl> + - GIT_REPOSITORY " https : / / github . com / GNOME / libxml2 . git " <nl> + - GIT_TAG " v2 . 9 . 7 " <nl> + - UPDATE_DISCONNECTED 1 <nl> + - CONFIGURE_COMMAND <nl> + - cscript $ { LIBXML2_BIN_DIR } / configure . js ftp = no html = no iconv = no compiler = msvc static = yes $ { LIBXML2_CRUNTIME } bindir = install \ \ bin incdir = install \ \ include libdir = install \ \ lib sodir = install \ \ bin <nl> + - SOURCE_DIR " $ { LIBXML2_SRC_DIR } " <nl> + - BINARY_DIR " $ { LIBXML2_BIN_DIR } " <nl> + - BUILD_COMMAND <nl> + - nmake / f Makefile . msvc <nl> + - INSTALL_COMMAND <nl> + - nmake / f Makefile . msvc install <nl> + - ) <nl> + - <nl> + - set ( LIBXML2_FOUND TRUE ) <nl> + - set ( LIBXML2_INCLUDE_DIR " $ { LIBXML2_BIN_DIR } / install / include / libxml2 " ) <nl> + - set ( LIBXML2_LIBRARIES " $ { LIBXML2_BIN_DIR } / install / lib / libxml2_a . lib " ) <nl> + - set ( LIBXML2_DEFINITIONS " / DLIBXML_STATIC " ) <nl> + - break ( ) <nl> + - endwhile ( ) <nl> + - <nl> + - if ( NOT LIBXML2_FOUND ) <nl> + - find_package ( LibXml2 REQUIRED ) <nl> + - endif ( ) <nl> + + <nl> + + find_package ( LibXml2 REQUIRED ) <nl> + <nl> + set ( <nl> + src <nl> new file mode 100644 <nl> index 00000000000 . . db5fee1c596 <nl> mmm / dev / null <nl> ppp b / ports / commsdsl / portfile . cmake <nl> <nl> + vcpkg_fail_port_install ( ON_TARGET " uwp " ) <nl> + <nl> + vcpkg_from_github ( <nl> + OUT_SOURCE_PATH SOURCE_PATH <nl> + REPO commschamp / commsdsl <nl> + REF v3 . 5 . 2 <nl> + SHA512 cc763420e84faa7f0c6bf6c7e89e21cbf4e61eeed9916273a5117786a4d54ccc58356904266b6f8e1643fdb7715deabcea868e6a7af574a44ca0363574602aa2 <nl> + HEAD_REF master <nl> + PATCHES <nl> + " use - FindPackage . patch " <nl> + " fix - libxml2 . patch " <nl> + ) <nl> + <nl> + vcpkg_configure_cmake ( <nl> + SOURCE_PATH $ { SOURCE_PATH } <nl> + PREFER_NINJA <nl> + OPTIONS <nl> + - DCOMMSDSL_TEST_BUILD_CC_PLUGIN = OFF <nl> + - DCOMMSDSL_NO_TESTS = ON <nl> + - DBUILD_TESTING = OFF <nl> + - DCOMMSDSL_NO_WARN_AS_ERR = ON # remove on next version or on next version of boost <nl> + ) <nl> + vcpkg_install_cmake ( ) <nl> + <nl> + vcpkg_copy_tools ( <nl> + TOOL_NAMES commsdsl2comms <nl> + SEARCH_DIR $ { CURRENT_PACKAGES_DIR } / bin <nl> + AUTO_CLEAN <nl> + ) <nl> + <nl> + file ( REMOVE_RECURSE " $ { CURRENT_PACKAGES_DIR } / debug / include " ) <nl> + <nl> + if ( VCPKG_LIBRARY_LINKAGE STREQUAL " static " ) <nl> + file ( REMOVE_RECURSE " $ { CURRENT_PACKAGES_DIR } / bin " " $ { CURRENT_PACKAGES_DIR } / debug / bin " ) <nl> + endif ( ) <nl> + # Handle copyright <nl> + file ( INSTALL $ { SOURCE_PATH } / LICENSE . txt DESTINATION $ { CURRENT_PACKAGES_DIR } / share / $ { PORT } RENAME copyright ) <nl> new file mode 100644 <nl> index 00000000000 . . f062bf9563e <nl> mmm / dev / null <nl> ppp b / ports / commsdsl / use - FindPackage . patch <nl> <nl> + diff - - git a / CMakeLists . txt b / CMakeLists . txt <nl> + index d6608b5 . . f545a00 100644 <nl> + mmm a / CMakeLists . txt <nl> ppp + b / CMakeLists . txt <nl> + if ( NOT COMMSDSL_EXTERNALS_DIR ) <nl> + set ( COMMSDSL_EXTERNALS_DIR " $ { PROJECT_SOURCE_DIR } / externals " ) <nl> + endif ( ) <nl> + <nl> + - if ( COMMS_INSTALL_DIR ) <nl> + - set ( CC_CMAKE_DIR $ { COMMS_INSTALL_DIR } / lib / LibComms / cmake ) <nl> + - else ( ) <nl> + - set ( CC_SRC_DIR " $ { COMMSDSL_EXTERNALS_DIR } / comms_champion " ) <nl> + - include ( $ { CMAKE_SCIPTS_DIR } / CC_Prefetch . cmake ) <nl> + - cc_prefetch ( SRC_DIR $ { CC_SRC_DIR } TAG $ { CC_TAG } ) <nl> + - set ( CC_CMAKE_DIR $ { CC_SRC_DIR } / cmake ) <nl> + - endif ( ) <nl> + + find_package ( LibComms CONFIG REQUIRED ) <nl> + + set ( CC_CMAKE_DIR $ { LibComms_DIR } ) <nl> + <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + # Compiler options <nl> new file mode 100644 <nl> index 00000000000 . . a7f2e15feb9 <nl> mmm / dev / null <nl> ppp b / ports / commsdsl / vcpkg . json <nl> <nl> + { <nl> + " name " : " commsdsl " , <nl> + " version - string " : " 3 . 5 . 2 " , <nl> + " description " : " DSL schemas parser and code generator for CommsChampion Ecosystem " , <nl> + " homepage " : " https : / / commschamp . github . io / " , <nl> + " documentation " : " https : / / github . com / commschamp / commsdsl " , <nl> + " supports " : " ! uwp " , <nl> + " dependencies " : [ <nl> + " boost " , <nl> + " comms " , <nl> + " libxml2 " <nl> + ] <nl> + } <nl>
[ comms ] Add new ports ( )
microsoft/vcpkg
2ccfa2d568ddb9c4c0dffb722cfc7b76a0db0932
2020-11-04T04:51:18Z
mmm a / PYTHON - MANIFEST . in <nl> ppp b / PYTHON - MANIFEST . in <nl> graft src / python / grpcio / grpcio . egg - info <nl> graft src / core <nl> graft src / boringssl <nl> graft include / grpc <nl> + graft third_party / address_sorting <nl> graft third_party / boringssl <nl> + graft third_party / cares <nl> graft third_party / nanopb <nl> graft third_party / zlib <nl> - graft third_party / cares <nl> include src / python / grpcio / _spawn_patch . py <nl> include src / python / grpcio / commands . py <nl> include src / python / grpcio / grpc_version . py <nl> mmm a / tools / internal_ci / linux / grpc_build_packages . sh <nl> ppp b / tools / internal_ci / linux / grpc_build_packages . sh <nl> set - ex <nl> # where they can be accessed from within a docker container that builds <nl> # the packages <nl> mv $ { KOKORO_GFILE_DIR } / github / grpc / artifacts input_artifacts | | true <nl> + chmod + x input_artifacts / protoc * / * | | true <nl> ls - R input_artifacts | | true <nl> <nl> tools / run_tests / task_runner . py - f package linux - j 6 <nl> mmm a / tools / run_tests / artifacts / build_package_ruby . sh <nl> ppp b / tools / run_tests / artifacts / build_package_ruby . sh <nl> for arch in { x86 , x64 } ; do <nl> output_dir = " $ base / src / ruby / tools / bin / $ { ruby_arch } - $ { plat } " <nl> mkdir - p " $ output_dir " / google / protobuf <nl> mkdir - p " $ output_dir " / google / protobuf / compiler # needed for plugin . proto <nl> - cp " $ input_dir " / protoc * " $ output_dir " / <nl> - cp " $ input_dir " / grpc_ruby_plugin * " $ output_dir " / <nl> + cp " $ input_dir " / protoc * " $ input_dir " / grpc_ruby_plugin * " $ output_dir / " <nl> + if [ [ " $ plat " ! = " windows " ] ] <nl> + then <nl> + chmod + x " $ output_dir / protoc " " $ output_dir / grpc_ruby_plugin " <nl> + fi <nl> for proto in " $ { well_known_protos [ @ ] } " ; do <nl> cp " $ base / third_party / protobuf / src / google / protobuf / $ proto . proto " " $ output_dir / google / protobuf / $ proto . proto " <nl> done <nl>
Upmerge v1 . 11 . x into master
grpc/grpc
de145e7b40ff5835e0bc69db3be4ab03c1e6543c
2018-04-10T17:49:10Z
mmm a / dbms / src / Interpreters / Join . h <nl> ppp b / dbms / src / Interpreters / Join . h <nl> struct JoinKeyGetterString <nl> <nl> static void onNewKey ( Key & key , Arena & pool ) <nl> { <nl> - key . data = pool . insert ( key . data , key . size ) ; <nl> + if ( key . size ) <nl> + key . data = pool . insert ( key . data , key . size ) ; <nl> } <nl> } ; <nl> <nl>
Fixed UB
ClickHouse/ClickHouse
237a9247cbd81201331f7ee12885150cb0560103
2018-12-27T21:14:32Z
mmm a / include / mlir / IR / op_base . td <nl> ppp b / include / mlir / IR / op_base . td <nl> <nl> / / <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> + / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> + / / Types . <nl> + / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> + <nl> / / Base class for all types . <nl> - class Type { <nl> - string builder = ? ; <nl> - } <nl> + class Type ; <nl> <nl> - / / Scalar types . <nl> - def F32 : Type { <nl> - let builder = " getF32Type ( ) " ; <nl> - } <nl> + / / Integer types . <nl> class I < int width > : Type { <nl> - let builder = " getIntegerType ( " # width # " ) " ; <nl> - int intWidth = width ; <nl> + int bitwidth = width ; <nl> } <nl> + def I1 : I < 1 > ; <nl> + def I32 : I < 32 > ; <nl> + <nl> + / / Floating point types . <nl> + class F < int width > : Type { <nl> + int bitwidth = width ; <nl> + } <nl> + def F32 : F < 32 > ; <nl> <nl> / / Vector types . <nl> class Vector < Type t , list < int > dims > : Type { <nl> class Vector < Type t , list < int > dims > : Type { <nl> / / rank , size . <nl> def Tensor : Type ; <nl> <nl> + / / String type . <nl> def String : Type ; <nl> <nl> - / / The operands of an op . <nl> - class Operands < list < Type > types > { <nl> - list < Type > operandTypes = types ; <nl> - } <nl> + def DerivedAttrBody : Type ; <nl> <nl> - / / The result types of an op . <nl> - class Results < list < Type > types > { <nl> - list < Type > returnTypes = types ; <nl> - } <nl> + / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> + / / Attributes <nl> + / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> - / / Add an attribute to the generated op class . <nl> + / / Base class for all attributes . <nl> class Attr < Type t > { <nl> Type type = t ; <nl> <nl> - / / Define the storage and return type in the subclass . <nl> - code storageType = ? ; <nl> - code returnType = ? ; <nl> + code storageType = ? ; / / The backing mlir : : Attribute type <nl> + code returnType = ? ; / / The underlying C + + value type <nl> <nl> / / Define converter method to convert from the storage type to the return <nl> - / / type . For example , the FloatAttr storage is APFloat , while the returned <nl> - / / primitive type could be float . Similiarly a enum can be stored as a int <nl> - / / but returned as an enum class . <nl> + / / type . For example , an enum can be stored as an int but returned as an <nl> + / / enum class . <nl> / / <nl> / / Format : { 0 } will be expanded to the attribute ' s value . So <nl> - / / ' return { 0 } . convertToFloat ( ) ; ' for ' FloatAttr val ' will expand to <nl> - / / ' return getAttrOfType < FloatAttr > ( " val " ) . getValue ( ) . convertToFloat ( ) ; ' <nl> - code convertFromStorage = " return { 0 } ; " ; <nl> + / / ' { 0 } . convertToFloat ( ) ' for ' FloatAttr val ' will expand to <nl> + / / ' getAttrOfType < FloatAttr > ( " val " ) . getValue ( ) . convertToFloat ( ) ' . <nl> + code convertFromStorage = " { 0 } " ; <nl> } <nl> <nl> - class BoolAttr : Attr < I < 1 > > { <nl> - let storageType = [ { BoolAttr } ] ; <nl> - let returnType = [ { bool } ] ; <nl> + class BoolAttr : Attr < I1 > { <nl> + let storageType = [ { BoolAttr } ] ; <nl> + let returnType = [ { bool } ] ; <nl> } <nl> class F32Attr : Attr < F32 > { <nl> - let storageType = [ { FloatAttr } ] ; <nl> - let returnType = [ { float } ] ; <nl> - let convertFromStorage = [ { return { 0 } . convertToFloat ( ) ; } ] ; <nl> + let storageType = [ { FloatAttr } ] ; <nl> + let returnType = [ { float } ] ; <nl> + let convertFromStorage = [ { { 0 } . convertToFloat ( ) } ] ; <nl> } <nl> - class I32Attr : Attr < I < 32 > > { <nl> - let storageType = [ { IntegerAttr } ] ; <nl> - let returnType = [ { int } ] ; <nl> - let convertFromStorage = [ { return { 0 } . getSExtValue ( ) ; } ] ; <nl> + class I32Attr : Attr < I32 > { <nl> + let storageType = [ { IntegerAttr } ] ; <nl> + let returnType = [ { int } ] ; <nl> + let convertFromStorage = [ { { 0 } . getSExtValue ( ) } ] ; <nl> } <nl> class StrAttr : Attr < String > { <nl> - let storageType = [ { StringAttr } ] ; <nl> - let returnType = [ { StringRef } ] ; <nl> + let storageType = [ { StringAttr } ] ; <nl> + let returnType = [ { StringRef } ] ; <nl> } <nl> <nl> / / DerivedAttr are attributes whose value is computed from properties <nl> / / of the operation . They do not require additional storage and are <nl> / / materialized as needed . <nl> - def DerivedAttrBody : Type ; <nl> class DerivedAttr < code ReturnType , code Body > : Attr < DerivedAttrBody > { <nl> let returnType = ReturnType ; <nl> code body = Body ; <nl> } <nl> <nl> - / / Class representing a Trait ( defined in a C + + file that needs to be included <nl> - / / before the generated op definitions ) . <nl> - class Traits < list < string > Traits > { <nl> - list < string > traits = Traits ; <nl> - } <nl> + / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> + / / Op Properties <nl> + / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> class OpProperty ; <nl> <nl> - / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> - / / Op Properties . <nl> / / <nl> / / Note : These are hard coded into mlir - op - gen . <nl> / / <nl> def Commutative : OpProperty ; / / X op Y = = Y op X <nl> - def NoSideEffect : OpProperty ; / / Sets ' HasNoSideEffects ' . <nl> + def NoSideEffect : OpProperty ; / / op has no side effect <nl> + <nl> + / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> + / / Ops <nl> + / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> - / / Base class for Ops . <nl> + / / Base class for all ops . <nl> class Op < string mnemonic , list < OpProperty > props = [ ] > { <nl> - / / The mnemonic of the Op . <nl> + / / The mnemonic of the op . <nl> string name = mnemonic ; <nl> <nl> - / / One - line human - readable description of what the Op does . <nl> + / / One - line human - readable description of what the op does . <nl> string summary = ? ; <nl> <nl> - / / Additional , longer human - readable description of what the Op does . <nl> + / / Additional , longer human - readable description of what the op does . <nl> string description = ? ; <nl> <nl> - / / The list of operands of the Op . Default 0 operands . <nl> + / / The list of operands of the op . Default 0 operands . <nl> list < Type > operandTypes = [ ] ; <nl> <nl> - / / The list of return types of the Op . Default no return type set . <nl> + / / The list of return types of the op . Default no return type set . <nl> list < Type > returnTypes = [ ] ; <nl> <nl> / / Attribute getters can be added to the op by adding an Attr member <nl> class Op < string mnemonic , list < OpProperty > props = [ ] > { <nl> / / I32Attr value ; <nl> <nl> / / Define the hooks used for building , parsing , printing , verification . <nl> + <nl> / / Custom builder . <nl> code builder = ? ; <nl> <nl> class Op < string mnemonic , list < OpProperty > props = [ ] > { <nl> list < OpProperty > properties = props ; <nl> } <nl> <nl> + / / The operand types of an op . <nl> + class Operands < list < Type > types > { <nl> + list < Type > operandTypes = types ; <nl> + } <nl> + <nl> + / / The result types of an op . <nl> + class Results < list < Type > types > { <nl> + list < Type > returnTypes = types ; <nl> + } <nl> + <nl> + / / The traits of an op . <nl> + / / Traits are defined in C + + and need to be included for the generated <nl> + / / op definitions . <nl> + class Traits < list < string > Traits > { <nl> + list < string > traits = Traits ; <nl> + } <nl> + <nl> class BinaryOp < string mnemonic , list < OpProperty > props > : <nl> Op < mnemonic , props > , Operands < [ Tensor , Tensor ] > , Results < [ Tensor ] > { <nl> <nl> class BinaryOp < string mnemonic , list < OpProperty > props > : <nl> / / type propagation information . <nl> let builder = [ { <nl> static void build ( Builder * builder , OperationState * result , SSAValue * lhs , <nl> - SSAValue * rhs ) { <nl> + SSAValue * rhs ) { <nl> return impl : : buildBinaryOp ( builder , result , lhs , rhs ) ; <nl> } <nl> } ] ; <nl> mmm a / tools / mlir - op - gen / mlir - op - gen . cpp <nl> ppp b / tools / mlir - op - gen / mlir - op - gen . cpp <nl> void OpEmitter : : emitAttrGetters ( ) { <nl> const auto & attrVal = Twine ( " this - > getAttrOfType < " ) + <nl> attr . getValueAsString ( " storageType " ) . trim ( ) + " > ( \ " " + <nl> val . getName ( ) + " \ " ) . getValue ( ) " ; <nl> - os < < formatv ( attr . getValueAsString ( " convertFromStorage " ) , attrVal . str ( ) ) <nl> - < < " \ n } \ n " ; <nl> + os < < " return " <nl> + < < formatv ( attr . getValueAsString ( " convertFromStorage " ) , attrVal . str ( ) ) <nl> + < < " ; \ n } \ n " ; <nl> } <nl> } <nl> <nl> void OpEmitter : : emitVerifier ( ) { <nl> } <nl> <nl> os < < " if ( ! this - > getAttr ( \ " " < < name < < " \ " ) . dyn_cast_or_null < " <nl> - < < attr . second - > getValueAsString ( " storageType " ) . trim ( ) < < " > ( " <nl> - < < " ) ) return emitOpError ( \ " requires " <nl> + < < attr . second - > getValueAsString ( " storageType " ) . trim ( ) <nl> + < < " > ( ) ) return emitOpError ( \ " requires " <nl> < < attr . second - > getValueAsString ( " returnType " ) . trim ( ) < < " attribute ' " <nl> < < name < < " ' \ " ) ; \ n " ; <nl> } <nl>
Clean up base TableGen definitions
tensorflow/tensorflow
93c508f39c06f3d4b52d15c0c811708643063139
2019-03-29T21:18:07Z
mmm a / src / she / display . h <nl> ppp b / src / she / display . h <nl> <nl> <nl> namespace she { <nl> <nl> - class Surface ; <nl> + class EventQueue ; <nl> class NotDisposableSurface ; <nl> + class Surface ; <nl> <nl> / / A display or window to show graphics . <nl> class Display { <nl> namespace she { <nl> virtual void maximize ( ) = 0 ; <nl> virtual bool isMaximized ( ) const = 0 ; <nl> <nl> + virtual EventQueue * getEventQueue ( ) = 0 ; <nl> + <nl> / / Returns the HWND on Windows . <nl> virtual void * nativeHandle ( ) = 0 ; <nl> } ; <nl> new file mode 100644 <nl> index 000000000 . . 4d3d1e5a2 <nl> mmm / dev / null <nl> ppp b / src / she / event . h <nl> <nl> + / / SHE library <nl> + / / Copyright ( C ) 2012 - 2014 David Capello <nl> + / / <nl> + / / This source file is ditributed under a BSD - like license , please <nl> + / / read LICENSE . txt for more information . <nl> + <nl> + # ifndef SHE_EVENT_H_INCLUDED <nl> + # define SHE_EVENT_H_INCLUDED <nl> + <nl> + namespace she { <nl> + <nl> + class Event { <nl> + public : <nl> + enum Type { <nl> + None , <nl> + } ; <nl> + <nl> + Event ( ) : m_type ( None ) { } <nl> + <nl> + int type ( ) const { return m_type ; } <nl> + void setType ( Type type ) { m_type = type ; } <nl> + <nl> + private : <nl> + Type m_type ; <nl> + } ; <nl> + <nl> + } / / namespace she <nl> + <nl> + # endif <nl> similarity index 59 % <nl> rename from src / she / event_loop . h <nl> rename to src / she / event_queue . h <nl> mmm a / src / she / event_loop . h <nl> ppp b / src / she / event_queue . h <nl> <nl> / / This source file is ditributed under a BSD - like license , please <nl> / / read LICENSE . txt for more information . <nl> <nl> - # ifndef SHE_EVENT_LOOP_H_INCLUDED <nl> - # define SHE_EVENT_LOOP_H_INCLUDED <nl> + # ifndef SHE_EVENT_QUEUE_H_INCLUDED <nl> + # define SHE_EVENT_QUEUE_H_INCLUDED <nl> <nl> namespace she { <nl> <nl> - class EventLoop { <nl> + class Event ; <nl> + <nl> + class EventQueue { <nl> public : <nl> - virtual ~ EventLoop ( ) { } <nl> + virtual ~ EventQueue ( ) { } <nl> virtual void dispose ( ) = 0 ; <nl> + virtual void getEvent ( Event & ev ) = 0 ; <nl> } ; <nl> <nl> } / / namespace she <nl> mmm a / src / she / she . h <nl> ppp b / src / she / she . h <nl> <nl> # define SHE_H_INCLUDED <nl> <nl> # include " she / display . h " <nl> - # include " she / event_loop . h " <nl> + # include " she / event . h " <nl> + # include " she / event_queue . h " <nl> # include " she / locked_surface . h " <nl> # include " she / scoped_handle . h " <nl> # include " she / scoped_surface_lock . h " <nl> mmm a / src / she / she_alleg4 . cpp <nl> ppp b / src / she / she_alleg4 . cpp <nl> <nl> <nl> # include < allegro . h > <nl> # include < allegro / internal / aintern . h > <nl> - # ifdef ALLEGRO_WINDOWS <nl> + <nl> + # ifdef WIN32 <nl> # include < winalleg . h > <nl> + <nl> + # if defined STRICT | | defined __GNUC__ <nl> + typedef WNDPROC wndproc_t ; <nl> + # else <nl> + typedef FARPROC wndproc_t ; <nl> + # endif <nl> # endif <nl> + <nl> # include " loadpng . h " <nl> <nl> # include < cassert > <nl> + # include < vector > <nl> <nl> # define DISPLAY_FLAG_FULL_REFRESH 1 <nl> # define DISPLAY_FLAG_WINDOW_RESIZE 2 <nl> class Alleg4Surface : public Surface <nl> DestroyFlag m_destroy ; <nl> } ; <nl> <nl> + class Alleg4EventQueue : public EventQueue { <nl> + public : <nl> + Alleg4EventQueue ( ) { <nl> + } <nl> + <nl> + void dispose ( ) { <nl> + delete this ; <nl> + } <nl> + <nl> + void getEvent ( Event & event ) { <nl> + if ( m_events . size ( ) > 0 ) { <nl> + event = m_events [ 0 ] ; <nl> + m_events . erase ( m_events . begin ( ) ) ; <nl> + } <nl> + else <nl> + event . setType ( Event : : None ) ; <nl> + } <nl> + <nl> + void queueEvent ( const Event & event ) { <nl> + m_events . push_back ( event ) ; <nl> + } <nl> + <nl> + private : <nl> + std : : vector < Event > m_events ; <nl> + } ; <nl> + <nl> + # if WIN32 <nl> + namespace { <nl> + <nl> + Display * g_display = NULL ; <nl> + wndproc_t base_wndproc = NULL ; <nl> + <nl> + static LRESULT CALLBACK wndproc ( HWND hwnd , UINT msg , WPARAM wparam , LPARAM lparam ) <nl> + { <nl> + / / TODO <nl> + / / switch ( msg ) { <nl> + / / } <nl> + return : : CallWindowProc ( base_wndproc , hwnd , msg , wparam , lparam ) ; <nl> + } <nl> + <nl> + void subclass_hwnd ( HWND hwnd ) <nl> + { <nl> + base_wndproc = ( wndproc_t ) SetWindowLongPtr ( hwnd , GWLP_WNDPROC , ( LONG_PTR ) wndproc ) ; <nl> + } <nl> + <nl> + void unsubclass_hwnd ( HWND hwnd ) <nl> + { <nl> + SetWindowLongPtr ( hwnd , GWLP_WNDPROC , ( LONG_PTR ) base_wndproc ) ; <nl> + base_wndproc = NULL ; <nl> + } <nl> + <nl> + } <nl> + # endif <nl> + <nl> class Alleg4Display : public Display { <nl> public : <nl> Alleg4Display ( int width , int height , int scale ) <nl> class Alleg4Display : public Display { <nl> <nl> setScale ( scale ) ; <nl> <nl> + m_queue = new Alleg4EventQueue ( ) ; <nl> + <nl> / / Add a hook to display - switch so when the user returns to the <nl> / / screen it ' s completelly refreshed / redrawn . <nl> LOCK_VARIABLE ( display_flags ) ; <nl> class Alleg4Display : public Display { <nl> / / Setup the handler for window - resize events <nl> set_resize_callback ( resize_callback ) ; <nl> # endif <nl> + <nl> + # if WIN32 <nl> + subclass_hwnd ( ( HWND ) nativeHandle ( ) ) ; <nl> + # endif WIN32 <nl> } <nl> <nl> ~ Alleg4Display ( ) { <nl> + delete m_queue ; <nl> + <nl> + # if WIN32 <nl> + unsubclass_hwnd ( ( HWND ) nativeHandle ( ) ) ; <nl> + # endif WIN32 <nl> + <nl> m_surface - > dispose ( ) ; <nl> set_gfx_mode ( GFX_TEXT , 0 , 0 , 0 , 0 ) ; <nl> } <nl> class Alleg4Display : public Display { <nl> # endif <nl> } <nl> <nl> + EventQueue * getEventQueue ( ) { <nl> + return m_queue ; <nl> + } <nl> + <nl> void * nativeHandle ( ) { <nl> # ifdef WIN32 <nl> return reinterpret_cast < void * > ( win_get_window ( ) ) ; <nl> class Alleg4Display : public Display { <nl> private : <nl> Surface * m_surface ; <nl> int m_scale ; <nl> - } ; <nl> - <nl> - class Alleg4EventLoop : public EventLoop { <nl> - public : <nl> - Alleg4EventLoop ( ) { <nl> - } <nl> - <nl> - void dispose ( ) { <nl> - delete this ; <nl> - } <nl> + Alleg4EventQueue * m_queue ; <nl> } ; <nl> <nl> class Alleg4System : public System { <nl> class Alleg4System : public System { <nl> Alleg4Surface : : AutoDestroy ) ; <nl> } <nl> <nl> - EventLoop * createEventLoop ( ) { <nl> - return new Alleg4EventLoop ( ) ; <nl> - } <nl> - <nl> } ; <nl> <nl> static System * g_instance ; <nl> mmm a / src / she / system . h <nl> ppp b / src / she / system . h <nl> namespace she { <nl> virtual Display * createDisplay ( int width , int height , int scale ) = 0 ; <nl> virtual Surface * createSurface ( int width , int height ) = 0 ; <nl> virtual Surface * createSurfaceFromNativeHandle ( void * nativeHandle ) = 0 ; <nl> - virtual EventLoop * createEventLoop ( ) = 0 ; <nl> } ; <nl> <nl> System * CreateSystem ( ) ; <nl> mmm a / src / ui / manager . cpp <nl> ppp b / src / ui / manager . cpp <nl> <nl> <nl> # include " ui / manager . h " <nl> <nl> + # include " she / display . h " <nl> + # include " she / event . h " <nl> + # include " she / event_queue . h " <nl> # include " ui / intern . h " <nl> # include " ui / ui . h " <nl> <nl> static void allegro_window_close_hook ( ) <nl> <nl> Manager : : Manager ( ) <nl> : Widget ( kManagerWidget ) <nl> + , m_display ( NULL ) <nl> + , m_eventQueue ( NULL ) <nl> { <nl> if ( ! m_defaultManager ) { <nl> / / Hook the window close message <nl> Manager : : ~ Manager ( ) <nl> } <nl> } <nl> <nl> + void Manager : : setDisplay ( she : : Display * display ) <nl> + { <nl> + m_display = display ; <nl> + m_eventQueue = m_display - > getEventQueue ( ) ; <nl> + } <nl> + <nl> void Manager : : run ( ) <nl> { <nl> MessageLoop loop ( this ) ; <nl> bool Manager : : generateMessages ( ) <nl> } <nl> } <nl> <nl> + / / Events from " she " layer . <nl> + she : : Event sheEvent ; <nl> + for ( ; ; ) { <nl> + m_eventQueue - > getEvent ( sheEvent ) ; <nl> + if ( sheEvent . type ( ) = = she : : Event : : None ) <nl> + break ; <nl> + <nl> + / / TODO <nl> + / / switch ( sheEvent . type ( ) ) { <nl> + / / } <nl> + } <nl> + <nl> / / Generate messages for timers <nl> Timer : : pollTimers ( ) ; <nl> <nl> mmm a / src / ui / manager . h <nl> ppp b / src / ui / manager . h <nl> <nl> # include " ui / mouse_buttons . h " <nl> # include " ui / widget . h " <nl> <nl> - namespace she { class Display ; } <nl> + namespace she { <nl> + class Display ; <nl> + class EventQueue ; <nl> + } <nl> <nl> namespace ui { <nl> <nl> namespace ui { <nl> ~ Manager ( ) ; <nl> <nl> she : : Display * getDisplay ( ) { return m_display ; } <nl> - void setDisplay ( she : : Display * display ) { m_display = display ; } <nl> + void setDisplay ( she : : Display * display ) ; <nl> <nl> void run ( ) ; <nl> <nl> namespace ui { <nl> <nl> WidgetsList m_garbage ; <nl> she : : Display * m_display ; <nl> + she : : EventQueue * m_eventQueue ; <nl> } ; <nl> <nl> } / / namespace ui <nl>
Add she : : EventQueue to she : : Display to get events from she library
aseprite/aseprite
be6b98995e31293d2928def8fd13be4168ae2be2
2014-03-20T03:01:00Z
mmm a / doc / classes / ArrayMesh . xml <nl> ppp b / doc / classes / ArrayMesh . xml <nl> <nl> < argument index = " 3 " name = " compress_flags " type = " int " default = " 97792 " > <nl> < / argument > <nl> < description > <nl> - Create a new surface ( [ method get_surface_count ] that will become surf_idx for this . <nl> - Surfaces are created to be rendered using a " primitive " , which may be PRIMITIVE_POINTS , PRIMITIVE_LINES , PRIMITIVE_LINE_STRIP , PRIMITIVE_LINE_LOOP , PRIMITIVE_TRIANGLES , PRIMITIVE_TRIANGLE_STRIP , PRIMITIVE_TRIANGLE_FAN . ( As a note , when using indices , it is recommended to only use just points , lines or triangles ) . <nl> + Creates a new surface . <nl> + Surfaces are created to be rendered using a " primitive " , which may be PRIMITIVE_POINTS , PRIMITIVE_LINES , PRIMITIVE_LINE_STRIP , PRIMITIVE_LINE_LOOP , PRIMITIVE_TRIANGLES , PRIMITIVE_TRIANGLE_STRIP , PRIMITIVE_TRIANGLE_FAN . See [ Mesh ] for details . ( As a note , when using indices , it is recommended to only use points , lines or triangles ) . [ method get_surface_count ] will become the surf_idx for this new surface . <nl> + The [ code ] arrays [ / code ] argument is an array of arrays . See [ enum ArrayType ] for the values used in this array . For example , [ code ] arrays [ 0 ] [ / code ] is the array of vertices . That first vertex sub - array is always required ; the others are optional . Adding an index array puts this function into " index mode " where the vertex and other arrays become the sources of data and the index array defines the vertex order . All sub - arrays must have the same length as the vertex array or be empty , except for [ code ] ARRAY_INDEX [ / code ] if it is used . <nl> + Adding an index array puts this function into " index mode " where the vertex and other arrays become the sources of data , and the index array defines the order of the vertices . <nl> + Godot uses clockwise winding order for front faces of triangle primitive modes . <nl> < / description > <nl> < / method > <nl> < method name = " center_geometry " > <nl> <nl> Array of bone weights , as a float array . Each element in groups of 4 floats . <nl> < / constant > <nl> < constant name = " ARRAY_INDEX " value = " 8 " enum = " ArrayType " > <nl> - Array of integers , used as indices referencing vertices . No index can be beyond the vertex array size . <nl> + [ Array ] of integers used as indices referencing vertices , colors , normals , tangents , and textures . All of those arrays must have the same number of elements as the vertex array . No index can be beyond the vertex array size . When this index array is present , it puts the function into " index mode , " where the index selects the * i * ' th vertex , normal , tangent , color , UV , etc . This means if you want to have different normals or colors along an edge , you have to duplicate the vertices . <nl> + For triangles , the index array is interpreted as triples , referring to the vertices of each triangle . For lines , the index array is in pairs indicating the start and end of each line . <nl> < / constant > <nl> < constant name = " ARRAY_MAX " value = " 9 " enum = " ArrayType " > <nl> < / constant > <nl>
Add detail to doc for add_surface_from_arrays ( )
godotengine/godot
06c5a9ed5f728cff6e6460a67e4b14d3419d41fe
2018-04-22T13:23:33Z
mmm a / tests / sockets / test_sockets_echo_server . c <nl> ppp b / tests / sockets / test_sockets_echo_server . c <nl> int main ( ) { <nl> int res ; <nl> <nl> atexit ( cleanup ) ; <nl> - signal ( SIGTERM , cleanup ) ; <nl> + / / signal ( SIGTERM , cleanup ) ; <nl> <nl> memset ( & server , 0 , sizeof ( server_t ) ) ; <nl> memset ( & client , 0 , sizeof ( client_t ) ) ; <nl>
disable use of SIGTERM in socket server , does not build in all linuxes
emscripten-core/emscripten
c1e32c13f025f04a332eb46b2bd7930bba31933c
2013-08-19T22:27:20Z
mmm a / stdlib / public / core / BridgeObjectiveC . swift <nl> ppp b / stdlib / public / core / BridgeObjectiveC . swift <nl> public func swift_unboxFromSwiftValueWithType < T > ( <nl> / / Internal stdlib SPI <nl> @ _silgen_name ( " swift_swiftValueConformsTo " ) <nl> public func _swiftValueConformsTo < T > ( _ type : T . Type ) - > Bool { <nl> - _assertSwiftValueFlavorIsConsistent ( ) <nl> - if let foundationType = _typeByName ( " Foundation . _SwiftValue " ) { <nl> + if let foundationType = _foundationSwiftValueType { <nl> return foundationType is T . Type <nl> } else { <nl> return _SwiftValue . self is T . Type <nl> extension Optional : _Unwrappable { <nl> } <nl> } <nl> <nl> - / / This is a best - effort tripmine for detecting the situation <nl> - / / ( which should never happen ) of Swift . _SwiftValue and <nl> - / / Foundation . _SwiftValue / Foundation . NSNull being used <nl> - / / in the same process . <nl> - <nl> - @ usableFromInline <nl> - internal enum _SwiftValueFlavor : Equatable { <nl> - case stdlib <nl> - case foundation <nl> - } <nl> - <nl> - @ usableFromInline <nl> - func _currentSwiftValueFlavor ( ) - > _SwiftValueFlavor { <nl> - if _typeByName ( " Foundation . _SwiftValue " ) as ? _NSSwiftValue . Type ! = nil { <nl> - return . foundation <nl> - } else { <nl> - return . stdlib <nl> - } <nl> - } <nl> - <nl> - @ usableFromInline <nl> - internal var _selectedSwiftValueFlavor : _SwiftValueFlavor = _currentSwiftValueFlavor ( ) <nl> - <nl> - @ usableFromInline <nl> - internal func _assertSwiftValueFlavorIsConsistent ( ) { <nl> - assert ( _selectedSwiftValueFlavor = = _currentSwiftValueFlavor ( ) ) <nl> - } <nl> + private let _foundationSwiftValueType = _typeByName ( " Foundation . _SwiftValue " ) as ? _NSSwiftValue . Type <nl> <nl> @ usableFromInline <nl> internal var _nullPlaceholder : AnyObject { <nl> - _assertSwiftValueFlavorIsConsistent ( ) <nl> - if let foundationType = _typeByName ( " Foundation . _SwiftValue " ) as ? _NSSwiftValue . Type { <nl> + if let foundationType = _foundationSwiftValueType { <nl> return foundationType . null <nl> } else { <nl> return _SwiftValue . null <nl> internal var _nullPlaceholder : AnyObject { <nl> <nl> @ usableFromInline <nl> func _makeSwiftValue ( _ value : Any ) - > AnyObject { <nl> - _assertSwiftValueFlavorIsConsistent ( ) <nl> - if let foundationType = _typeByName ( " Foundation . _SwiftValue " ) as ? _NSSwiftValue . Type { <nl> + if let foundationType = _foundationSwiftValueType { <nl> return foundationType . init ( value ) <nl> } else { <nl> return _SwiftValue ( value ) <nl>
Strongly reduce the number of _typeByName ( ) calls — cache the Foundation type , remove assertions .
apple/swift
f7a28a80549e90af311fd9e4833146ce35d8d61b
2018-05-31T00:52:00Z
mmm a / modules / videoio / test / test_ffmpeg . cpp <nl> ppp b / modules / videoio / test / test_ffmpeg . cpp <nl> class CV_FFmpegWriteBigVideoTest : public cvtest : : BaseTest <nl> } <nl> else <nl> { <nl> + printf ( " Case : ' % s ' ( frame size % dx % d fps = % g ) . FileSize = % lld bytes \ n " , <nl> + s . c_str ( ) , frame_s . width , frame_s . height , fps , ( long long int ) sz ) ; <nl> if ( sz < 8192 ) <nl> { <nl> fprintf ( stderr , " ERROR : File name : % s is very small ( data write problems ? ) \ n " , filename . c_str ( ) ) ; <nl>
videoio ( test ) : dump file size information
opencv/opencv
699565828de222b70c27d2ca307fcad73aec7b36
2018-09-18T08:04:51Z
mmm a / src / mongo / db / index_update . cpp <nl> ppp b / src / mongo / db / index_update . cpp <nl> namespace mongo { <nl> bool dupsAllowed = ! idx . unique ( ) ; <nl> Ordering ordering = Ordering : : make ( idx . keyPattern ( ) ) ; <nl> <nl> - verify ( ! recordLoc . isNull ( ) ) ; <nl> - <nl> try { <nl> / / we can ' t do the two step method with multi keys as insertion of one key changes the indexes <nl> / / structure . however we can do the first key of the set so we go ahead and do that FWIW <nl>
remove check for null recordloc - - necessary for prefetch ' s use of index insert phase 1
mongodb/mongo
2fa9ed2b53890824bc99d130593982a585441a00
2012-06-13T21:46:56Z
mmm a / README . md <nl> ppp b / README . md <nl> LeetCode <nl> | 380 | [ Insert Delete GetRandom O ( 1 ) ] ( https : / / leetcode . com / problems / insert - delete - getrandom - o1 / ) | [ C + + ] ( . / algorithms / cpp / insertDeleteGetRandom / InsertDeleteGetrandomO1 . cpp ) | Hard | <nl> | 377 | [ Combination Sum IV ] ( https : / / leetcode . com / problems / combination - sum - iv / ) | [ C + + ] ( . / algorithms / cpp / combinationSumIV / combinationSumIV . cpp ) | Medium | <nl> | 376 | [ Wiggle Subsequence ] ( https : / / leetcode . com / problems / wiggle - subsequence / ) | [ C + + ] ( . / algorithms / cpp / wiggleSubsequence / wiggleSubsequence . cpp ) | Medium | <nl> + | 371 | [ Sum of Two Integers ] ( https : / / leetcode . com / problems / sum - of - two - integers / description / ) | [ C + + ] ( . / algorithms / cpp / sumOfTwoIntegers / SumOfTwoIntegers . cpp ) | Easy | <nl> | 350 | [ Intersection of Two Arrays II ] ( https : / / leetcode . com / problems / intersection - of - two - arrays - ii / ) | [ C + + ] ( . / algorithms / cpp / intersectionOfTwoArrays / intersectionOfTwoArraysII . cpp ) | Easy | <nl> | 349 | [ Intersection of Two Arrays ] ( https : / / leetcode . com / problems / intersection - of - two - arrays / ) | [ C + + ] ( . / algorithms / cpp / intersectionOfTwoArrays / intersectionOfTwoArrays . cpp ) | Easy | <nl> | 347 | [ Top K Frequent Elements ] ( https : / / leetcode . com / problems / top - k - frequent - elements / ) | [ C + + ] ( . / algorithms / cpp / topKFrequentElements / topKFrequentElements . cpp ) | Medium | <nl> new file mode 100644 <nl> index 00000000 . . d636e94c <nl> mmm / dev / null <nl> ppp b / algorithms / cpp / sumOfTwoIntegers / SumOfTwoIntegers . cpp <nl> <nl> + / / Source : https : / / leetcode . com / problems / sum - of - two - integers / description / <nl> + / / Author : Hao Chen <nl> + / / Date : 2018 - 06 - 25 <nl> + <nl> + / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> + * <nl> + * Calculate the sum of two integers a and b , but you are not allowed to use the <nl> + * operator + and - . <nl> + * <nl> + * Example : <nl> + * Given a = 1 and b = 2 , return 3 . <nl> + * <nl> + * <nl> + * Credits : Special thanks to @ fujiaozhu for adding this problem and creating all test <nl> + * cases . <nl> + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> + <nl> + class Solution { <nl> + public : <nl> + int getSum ( int x , int y ) { <nl> + / / Iterate till there is no carry <nl> + while ( y ! = 0 ) { <nl> + / / carry now contains common <nl> + / / set bits of x and y <nl> + int carry = x & y ; <nl> + <nl> + / / Sum of bits of x and y where at <nl> + / / least one of the bits is not set <nl> + x = x ^ y ; <nl> + <nl> + / / Carry is shifted by one so that adding <nl> + / / it to x gives the required sum <nl> + y = carry < < 1 ; <nl> + } <nl> + return x ; <nl> + } <nl> + } ; <nl> + <nl>
New Solution - " Sum of Two Integers "
haoel/leetcode
6daf90dae347b848fa21e3564b0793dd94685266
2018-06-25T16:00:49Z
mmm a / tensorflow / contrib / framework / BUILD <nl> ppp b / tensorflow / contrib / framework / BUILD <nl> py_library ( <nl> " python / framework / __init__ . py " , <nl> " python / framework / tensor_util . py " , <nl> " python / ops / __init__ . py " , <nl> + " python / ops / arg_scope . py " , <nl> " python / ops / embedding_ops . py " , <nl> " python / ops / ops . py " , <nl> " python / ops / variables . py " , <nl> py_library ( <nl> srcs_version = " PY2AND3 " , <nl> ) <nl> <nl> + py_test ( <nl> + name = " arg_scope_test " , <nl> + size = " small " , <nl> + srcs = [ " python / ops / arg_scope_test . py " ] , <nl> + srcs_version = " PY2AND3 " , <nl> + deps = [ <nl> + " : framework_py " , <nl> + " / / tensorflow : tensorflow_py " , <nl> + " / / tensorflow / python : framework_test_lib " , <nl> + " / / tensorflow / python : platform_test " , <nl> + ] , <nl> + ) <nl> + <nl> py_test ( <nl> name = " ops_test " , <nl> + size = " small " , <nl> srcs = glob ( [ " python / ops / ops_test . py " ] ) , <nl> srcs_version = " PY2AND3 " , <nl> deps = [ <nl> py_test ( <nl> <nl> py_test ( <nl> name = " variables_test " , <nl> + size = " small " , <nl> srcs = glob ( [ " python / ops / variables_test . py " ] ) , <nl> srcs_version = " PY2AND3 " , <nl> deps = [ <nl> mmm a / tensorflow / contrib / framework / python / ops / __init__ . py <nl> ppp b / tensorflow / contrib / framework / python / ops / __init__ . py <nl> <nl> <nl> # TODO ( ptucker ) : Add these to tf . contrib . variables ? <nl> # pylint : disable = wildcard - import <nl> + from tensorflow . contrib . framework . python . ops . arg_scope import * <nl> from tensorflow . contrib . framework . python . ops . embedding_ops import * <nl> from tensorflow . contrib . framework . python . ops . ops import * <nl> from tensorflow . contrib . framework . python . ops . variables import * <nl> + # pylint : enable = wildcard - import <nl> new file mode 100644 <nl> index 0000000000000 . . aa6acd735a0bb <nl> mmm / dev / null <nl> ppp b / tensorflow / contrib / framework / python / ops / arg_scope . py <nl> <nl> + # Copyright 2016 Google Inc . 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> + " " " Contains the arg_scope used for scoping layers arguments . <nl> + <nl> + Allows one to define models much more compactly by eliminating boilerplate <nl> + code . This is accomplished through the use of argument scoping ( arg_scope ) . <nl> + <nl> + Example of how to use tf . contrib . arg_scope : <nl> + <nl> + from third_party . tensorflow . contrib . layers . python import layers <nl> + <nl> + with tf . contrib . arg_scope ( [ layers . conv2d ] , padding = ' SAME ' , <nl> + initializer = layers . variance_scaling_initializer ( ) , <nl> + regularizer = layers . l2_regularizer ( 0 . 05 ) ) : <nl> + net = layers . conv2d ( inputs , 64 , [ 11 , 11 ] , 4 , padding = ' VALID ' , scope = ' conv1 ' ) <nl> + net = layers . conv2d ( net , 256 , [ 5 , 5 ] , scope = ' conv2 ' ) <nl> + <nl> + The first call to conv2d will use predefined args : <nl> + layers . conv2d ( inputs , 64 , [ 11 , 11 ] , 4 , padding = ' VALID ' , . . . , scope = ' conv1 ' ) <nl> + <nl> + The second call to Conv will overwrite padding : <nl> + layers . conv2d ( inputs , 256 , [ 5 , 5 ] , padding = ' SAME ' , . . . , scope = ' conv2 ' ) <nl> + <nl> + Example of how to reuse an arg_scope : <nl> + with tf . contrib . arg_scope ( [ layers . conv2d ] , padding = ' SAME ' , <nl> + initializer = layers . variance_scaling_initializer ( ) , <nl> + regularizer = layers . l2_regularizer ( 0 . 05 ) ) as sc : <nl> + net = layers . conv2d ( net , 256 , [ 5 , 5 ] , scope = ' conv1 ' ) <nl> + . . . . <nl> + <nl> + with tf . contrib . arg_scope ( sc ) : <nl> + net = layers . conv2d ( net , 256 , [ 5 , 5 ] , scope = ' conv2 ' ) <nl> + <nl> + Example of how to use tf . contrib . add_arg_scope : <nl> + <nl> + @ tf . contrib . add_arg_scope <nl> + def conv2d ( * args , * * kwargs ) <nl> + <nl> + @ @ arg_scope <nl> + @ @ add_arg_scope <nl> + @ @ has_arg_scope <nl> + @ @ arg_scoped_arguments <nl> + " " " <nl> + from __future__ import absolute_import <nl> + from __future__ import division <nl> + from __future__ import print_function <nl> + import contextlib <nl> + import functools <nl> + <nl> + __all__ = [ ' arg_scope ' , ' add_arg_scope ' , <nl> + ' has_arg_scope ' , ' arg_scoped_arguments ' ] <nl> + <nl> + _ARGSTACK = [ { } ] <nl> + <nl> + _DECORATED_OPS = { } <nl> + <nl> + <nl> + def _get_arg_stack ( ) : <nl> + if _ARGSTACK : <nl> + return _ARGSTACK <nl> + else : <nl> + _ARGSTACK . append ( { } ) <nl> + return _ARGSTACK <nl> + <nl> + <nl> + def _current_arg_scope ( ) : <nl> + stack = _get_arg_stack ( ) <nl> + return stack [ - 1 ] <nl> + <nl> + <nl> + def _key_op ( op ) : <nl> + return getattr ( op , ' _key_op ' , str ( op ) ) <nl> + <nl> + <nl> + def _name_op ( op ) : <nl> + return ( op . __module__ , op . __name__ ) <nl> + <nl> + <nl> + def _kwarg_names ( func ) : <nl> + kwargs_length = len ( func . __defaults__ ) if func . __defaults__ else 0 <nl> + return func . __code__ . co_varnames [ - kwargs_length : func . __code__ . co_argcount ] <nl> + <nl> + <nl> + def _add_op ( op ) : <nl> + key_op = _key_op ( op ) <nl> + if key_op not in _DECORATED_OPS : <nl> + _DECORATED_OPS [ key_op ] = _kwarg_names ( op ) <nl> + <nl> + <nl> + @ contextlib . contextmanager <nl> + def arg_scope ( list_ops_or_scope , * * kwargs ) : <nl> + " " " Stores the default arguments for the given set of list_ops . <nl> + <nl> + For usage , please see examples at top of the file . <nl> + <nl> + Args : <nl> + list_ops_or_scope : List or tuple of operations to set argument scope for or <nl> + a dictionary containg the current scope . When list_ops_or_scope is a dict , <nl> + kwargs must be empty . When list_ops_or_scope is a list or tuple , then <nl> + every op in it need to be decorated with @ add_arg_scope to work . <nl> + * * kwargs : keyword = value that will define the defaults for each op in <nl> + list_ops . All the ops need to accept the given set of arguments . <nl> + <nl> + Yields : <nl> + the current_scope , which is a dictionary of { op : { arg : value } } <nl> + Raises : <nl> + TypeError : if list_ops is not a list or a tuple . <nl> + ValueError : if any op in list_ops has not be decorated with @ add_arg_scope . <nl> + " " " <nl> + if isinstance ( list_ops_or_scope , dict ) : <nl> + # Assumes that list_ops_or_scope is a scope that is being reused . <nl> + if kwargs : <nl> + raise ValueError ( ' When attempting to re - use a scope by suppling a ' <nl> + ' dictionary , kwargs must be empty . ' ) <nl> + current_scope = list_ops_or_scope . copy ( ) <nl> + try : <nl> + _get_arg_stack ( ) . append ( current_scope ) <nl> + yield current_scope <nl> + finally : <nl> + _get_arg_stack ( ) . pop ( ) <nl> + else : <nl> + # Assumes that list_ops_or_scope is a list / tuple of ops with kwargs . <nl> + if not isinstance ( list_ops_or_scope , ( list , tuple ) ) : <nl> + raise TypeError ( ' list_ops_or_scope must either be a list / tuple or reused ' <nl> + ' scope ( i . e . dict ) ' ) <nl> + try : <nl> + current_scope = _current_arg_scope ( ) . copy ( ) <nl> + for op in list_ops_or_scope : <nl> + key_op = _key_op ( op ) <nl> + if not has_arg_scope ( op ) : <nl> + raise ValueError ( ' % s is not decorated with @ add_arg_scope ' , <nl> + _name_op ( op ) ) <nl> + if key_op in current_scope : <nl> + current_kwargs = current_scope [ key_op ] . copy ( ) <nl> + current_kwargs . update ( kwargs ) <nl> + current_scope [ key_op ] = current_kwargs <nl> + else : <nl> + current_scope [ key_op ] = kwargs . copy ( ) <nl> + _get_arg_stack ( ) . append ( current_scope ) <nl> + yield current_scope <nl> + finally : <nl> + _get_arg_stack ( ) . pop ( ) <nl> + <nl> + <nl> + def add_arg_scope ( func ) : <nl> + " " " Decorates a function with args so it can be used within an arg_scope . <nl> + <nl> + Args : <nl> + func : function to decorate . <nl> + <nl> + Returns : <nl> + A tuple with the decorated function func_with_args ( ) . <nl> + " " " <nl> + @ functools . wraps ( func ) <nl> + def func_with_args ( * args , * * kwargs ) : <nl> + current_scope = _current_arg_scope ( ) <nl> + current_args = kwargs <nl> + key_func = _key_op ( func ) <nl> + if key_func in current_scope : <nl> + current_args = current_scope [ key_func ] . copy ( ) <nl> + current_args . update ( kwargs ) <nl> + return func ( * args , * * current_args ) <nl> + _add_op ( func ) <nl> + setattr ( func_with_args , ' _key_op ' , _key_op ( func ) ) <nl> + return func_with_args <nl> + <nl> + <nl> + def has_arg_scope ( func ) : <nl> + " " " Checks whether a func has been decorated with @ add_arg_scope or not . <nl> + <nl> + Args : <nl> + func : function to check . <nl> + <nl> + Returns : <nl> + a boolean . <nl> + " " " <nl> + return _key_op ( func ) in _DECORATED_OPS <nl> + <nl> + <nl> + def arg_scoped_arguments ( func ) : <nl> + " " " Returns the list kwargs that arg_scope can set for a func . <nl> + <nl> + Args : <nl> + func : function which has been decorated with @ add_arg_scope . <nl> + <nl> + Returns : <nl> + a list of kwargs names . <nl> + " " " <nl> + assert has_arg_scope ( func ) <nl> + return _DECORATED_OPS [ _key_op ( func ) ] <nl> new file mode 100644 <nl> index 0000000000000 . . e5468d451c81c <nl> mmm / dev / null <nl> ppp b / tensorflow / contrib / framework / python / ops / arg_scope_test . py <nl> <nl> + # Copyright 2016 Google Inc . 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> + " " " arg_scope tests . " " " <nl> + from __future__ import absolute_import <nl> + from __future__ import division <nl> + from __future__ import print_function <nl> + <nl> + import tensorflow as tf <nl> + <nl> + <nl> + @ tf . contrib . framework . add_arg_scope <nl> + def func1 ( * args , * * kwargs ) : <nl> + return ( args , kwargs ) <nl> + <nl> + <nl> + @ tf . contrib . framework . add_arg_scope <nl> + def func2 ( * args , * * kwargs ) : <nl> + return ( args , kwargs ) <nl> + <nl> + <nl> + @ tf . contrib . framework . add_arg_scope <nl> + def func3 ( args , a = None , b = 1 , c = 2 ) : <nl> + return ( args , a , b , c ) <nl> + <nl> + <nl> + def _key_op ( op ) : <nl> + return getattr ( op , ' _key_op ' , str ( op ) ) <nl> + <nl> + <nl> + class ArgScopeTest ( tf . test . TestCase ) : <nl> + <nl> + def testEmptyArgScope ( self ) : <nl> + with self . test_session ( ) : <nl> + with tf . contrib . framework . arg_scope ( [ ] ) as sc : <nl> + self . assertEqual ( sc , { } ) <nl> + <nl> + def testClearArgScope ( self ) : <nl> + func1_kwargs = { ' a ' : 1 , ' b ' : None , ' c ' : [ 1 ] } <nl> + key_op = _key_op ( func1 ) <nl> + func1_scope = { key_op : func1_kwargs . copy ( ) } <nl> + with self . test_session ( ) : <nl> + with tf . contrib . framework . arg_scope ( [ func1 ] , a = 1 , b = None , c = [ 1 ] ) as sc1 : <nl> + self . assertEqual ( sc1 , func1_scope ) <nl> + with tf . contrib . framework . arg_scope ( { } ) as sc2 : <nl> + self . assertEqual ( sc2 , { } ) <nl> + with tf . contrib . framework . arg_scope ( [ ] ) as current_arg_scope : <nl> + self . assertEqual ( current_arg_scope , func1_scope ) <nl> + <nl> + def testNonDecorated ( self ) : <nl> + def my_func ( t , a = None ) : <nl> + return ( t , a ) <nl> + with self . assertRaises ( ValueError ) : <nl> + with tf . contrib . framework . arg_scope ( [ my_func ] , a = 1 ) : <nl> + pass <nl> + <nl> + def testUnexpectedArg ( self ) : <nl> + with self . assertRaises ( TypeError ) : <nl> + with tf . contrib . framework . arg_scope ( [ func3 ] , d = 1 ) : <nl> + func3 ( 1 ) <nl> + <nl> + def testCurrentArgScope ( self ) : <nl> + func1_kwargs = { ' a ' : 1 , ' b ' : None , ' c ' : [ 1 ] } <nl> + key_op = _key_op ( func1 ) <nl> + current_scope = { key_op : func1_kwargs . copy ( ) } <nl> + with self . test_session ( ) : <nl> + with tf . contrib . framework . arg_scope ( [ func1 ] , a = 1 , b = None , c = [ 1 ] ) as scope : <nl> + self . assertDictEqual ( scope , current_scope ) <nl> + <nl> + def testArgScopedArguments ( self ) : <nl> + func3_kwargs = ( ' a ' , ' b ' , ' c ' ) <nl> + self . assertEquals ( tf . contrib . framework . arg_scoped_arguments ( func3 ) , <nl> + func3_kwargs ) <nl> + <nl> + def testCurrentArgScopeNested ( self ) : <nl> + func1_kwargs = { ' a ' : 1 , ' b ' : None , ' c ' : [ 1 ] } <nl> + func2_kwargs = { ' b ' : 2 , ' d ' : [ 2 ] } <nl> + key = _key_op <nl> + current_scope = { key ( func1 ) : func1_kwargs . copy ( ) , <nl> + key ( func2 ) : func2_kwargs . copy ( ) } <nl> + with self . test_session ( ) : <nl> + with tf . contrib . framework . arg_scope ( [ func1 ] , a = 1 , b = None , c = [ 1 ] ) : <nl> + with tf . contrib . framework . arg_scope ( [ func2 ] , b = 2 , d = [ 2 ] ) as scope : <nl> + self . assertDictEqual ( scope , current_scope ) <nl> + <nl> + def testReuseArgScope ( self ) : <nl> + func1_kwargs = { ' a ' : 1 , ' b ' : None , ' c ' : [ 1 ] } <nl> + key_op = _key_op ( func1 ) <nl> + current_scope = { key_op : func1_kwargs . copy ( ) } <nl> + with self . test_session ( ) : <nl> + with tf . contrib . framework . arg_scope ( [ func1 ] , <nl> + a = 1 , b = None , c = [ 1 ] ) as scope1 : <nl> + pass <nl> + with tf . contrib . framework . arg_scope ( scope1 ) as scope : <nl> + self . assertDictEqual ( scope , current_scope ) <nl> + <nl> + def testReuseArgScopeNested ( self ) : <nl> + func1_kwargs = { ' a ' : 1 , ' b ' : None , ' c ' : [ 1 ] } <nl> + func2_kwargs = { ' b ' : 2 , ' d ' : [ 2 ] } <nl> + key = _key_op <nl> + current_scope1 = { key ( func1 ) : func1_kwargs . copy ( ) } <nl> + current_scope2 = { key ( func1 ) : func1_kwargs . copy ( ) , <nl> + key ( func2 ) : func2_kwargs . copy ( ) } <nl> + with self . test_session ( ) : <nl> + with tf . contrib . framework . arg_scope ( [ func1 ] , <nl> + a = 1 , b = None , c = [ 1 ] ) as scope1 : <nl> + with tf . contrib . framework . arg_scope ( [ func2 ] , b = 2 , d = [ 2 ] ) as scope2 : <nl> + pass <nl> + with tf . contrib . framework . arg_scope ( scope1 ) : <nl> + with tf . contrib . framework . arg_scope ( [ ] ) as current_arg_scope : <nl> + self . assertDictEqual ( current_arg_scope , current_scope1 ) <nl> + with tf . contrib . framework . arg_scope ( scope2 ) : <nl> + with tf . contrib . framework . arg_scope ( [ ] ) as current_arg_scope : <nl> + self . assertDictEqual ( current_arg_scope , current_scope2 ) <nl> + <nl> + def testSimpleArgScope ( self ) : <nl> + func1_args = ( 0 , ) <nl> + func1_kwargs = { ' a ' : 1 , ' b ' : None , ' c ' : [ 1 ] } <nl> + with self . test_session ( ) : <nl> + with tf . contrib . framework . arg_scope ( [ func1 ] , a = 1 , b = None , c = [ 1 ] ) : <nl> + args , kwargs = func1 ( 0 ) <nl> + self . assertTupleEqual ( args , func1_args ) <nl> + self . assertDictEqual ( kwargs , func1_kwargs ) <nl> + <nl> + def testSimpleArgScopeWithTuple ( self ) : <nl> + func1_args = ( 0 , ) <nl> + func1_kwargs = { ' a ' : 1 , ' b ' : None , ' c ' : [ 1 ] } <nl> + with self . test_session ( ) : <nl> + with tf . contrib . framework . arg_scope ( ( func1 , ) , a = 1 , b = None , c = [ 1 ] ) : <nl> + args , kwargs = func1 ( 0 ) <nl> + self . assertTupleEqual ( args , func1_args ) <nl> + self . assertDictEqual ( kwargs , func1_kwargs ) <nl> + <nl> + def testOverwriteArgScope ( self ) : <nl> + func1_args = ( 0 , ) <nl> + func1_kwargs = { ' a ' : 1 , ' b ' : 2 , ' c ' : [ 1 ] } <nl> + with tf . contrib . framework . arg_scope ( [ func1 ] , a = 1 , b = None , c = [ 1 ] ) : <nl> + args , kwargs = func1 ( 0 , b = 2 ) <nl> + self . assertTupleEqual ( args , func1_args ) <nl> + self . assertDictEqual ( kwargs , func1_kwargs ) <nl> + <nl> + def testNestedArgScope ( self ) : <nl> + func1_args = ( 0 , ) <nl> + func1_kwargs = { ' a ' : 1 , ' b ' : None , ' c ' : [ 1 ] } <nl> + with tf . contrib . framework . arg_scope ( [ func1 ] , a = 1 , b = None , c = [ 1 ] ) : <nl> + args , kwargs = func1 ( 0 ) <nl> + self . assertTupleEqual ( args , func1_args ) <nl> + self . assertDictEqual ( kwargs , func1_kwargs ) <nl> + func1_kwargs [ ' b ' ] = 2 <nl> + with tf . contrib . framework . arg_scope ( [ func1 ] , b = 2 ) : <nl> + args , kwargs = func1 ( 0 ) <nl> + self . assertTupleEqual ( args , func1_args ) <nl> + self . assertDictEqual ( kwargs , func1_kwargs ) <nl> + <nl> + def testSharedArgScope ( self ) : <nl> + func1_args = ( 0 , ) <nl> + func1_kwargs = { ' a ' : 1 , ' b ' : None , ' c ' : [ 1 ] } <nl> + with tf . contrib . framework . arg_scope ( [ func1 , func2 ] , a = 1 , b = None , c = [ 1 ] ) : <nl> + args , kwargs = func1 ( 0 ) <nl> + self . assertTupleEqual ( args , func1_args ) <nl> + self . assertDictEqual ( kwargs , func1_kwargs ) <nl> + args , kwargs = func2 ( 0 ) <nl> + self . assertTupleEqual ( args , func1_args ) <nl> + self . assertDictEqual ( kwargs , func1_kwargs ) <nl> + <nl> + def testSharedArgScopeTuple ( self ) : <nl> + func1_args = ( 0 , ) <nl> + func1_kwargs = { ' a ' : 1 , ' b ' : None , ' c ' : [ 1 ] } <nl> + with tf . contrib . framework . arg_scope ( ( func1 , func2 ) , a = 1 , b = None , c = [ 1 ] ) : <nl> + args , kwargs = func1 ( 0 ) <nl> + self . assertTupleEqual ( args , func1_args ) <nl> + self . assertDictEqual ( kwargs , func1_kwargs ) <nl> + args , kwargs = func2 ( 0 ) <nl> + self . assertTupleEqual ( args , func1_args ) <nl> + self . assertDictEqual ( kwargs , func1_kwargs ) <nl> + <nl> + def testPartiallySharedArgScope ( self ) : <nl> + func1_args = ( 0 , ) <nl> + func1_kwargs = { ' a ' : 1 , ' b ' : None , ' c ' : [ 1 ] } <nl> + func2_args = ( 1 , ) <nl> + func2_kwargs = { ' a ' : 1 , ' b ' : None , ' d ' : [ 2 ] } <nl> + with tf . contrib . framework . arg_scope ( [ func1 , func2 ] , a = 1 , b = None ) : <nl> + with tf . contrib . framework . arg_scope ( [ func1 ] , c = [ 1 ] ) : <nl> + with tf . contrib . framework . arg_scope ( [ func2 ] , d = [ 2 ] ) : <nl> + args , kwargs = func1 ( 0 ) <nl> + self . assertTupleEqual ( args , func1_args ) <nl> + self . assertDictEqual ( kwargs , func1_kwargs ) <nl> + args , kwargs = func2 ( 1 ) <nl> + self . assertTupleEqual ( args , func2_args ) <nl> + self . assertDictEqual ( kwargs , func2_kwargs ) <nl> + <nl> + if __name__ = = ' __main__ ' : <nl> + tf . test . main ( ) <nl>
Added a new scope : arg_scope , which allows to define default arguments for layers .
tensorflow/tensorflow
b498a05fd048ecbae2a5bc1efe4712b201e4e917
2016-05-14T00:03:25Z
mmm a / src / IO / readFloatText . h <nl> ppp b / src / IO / readFloatText . h <nl> template < typename T > bool tryReadFloatTextWithFastFloat ( T & x , ReadBuffer & in ) <nl> # endif <nl> <nl> # ifdef USE_FAST_FLOAT <nl> - template < typename T > void readFloatTextPrecise ( T & x , ReadBuffer & in ) { readFloatTextWithFastFloat < T , void > ( x , in ) ; } <nl> - template < typename T > bool tryReadFloatTextPrecise ( T & x , ReadBuffer & in ) { return tryReadFloatTextWithFastFloat < T , bool > ( x , in ) ; } <nl> + template < typename T > void readFloatTextPrecise ( T & x , ReadBuffer & in ) { readFloatTextWithFastFloat ( x , in ) ; } <nl> + template < typename T > bool tryReadFloatTextPrecise ( T & x , ReadBuffer & in ) { return tryReadFloatTextWithFastFloat ( x , in ) ; } <nl> # else <nl> template < typename T > void readFloatTextPrecise ( T & x , ReadBuffer & in ) { readFloatTextPreciseImpl < T , void > ( x , in ) ; } <nl> template < typename T > bool tryReadFloatTextPrecise ( T & x , ReadBuffer & in ) { return readFloatTextPreciseImpl < T , bool > ( x , in ) ; } <nl>
Fixed compile issues
ClickHouse/ClickHouse
ccbfd52315d4a827b2f6db0842b10c68f1567480
2020-12-06T20:37:35Z
mmm a / include / swift / AST / DiagnosticEngine . h <nl> ppp b / include / swift / AST / DiagnosticEngine . h <nl> namespace swift { <nl> bool showDiagnosticsAfterFatalError = false ; <nl> <nl> / / / \ brief Don ' t emit any warnings <nl> - bool ignoreAllWarnings = false ; <nl> + bool suppressWarnings = false ; <nl> + <nl> + / / / \ brief Emit all warnings as errors <nl> + bool warningsAsErrors = false ; <nl> <nl> / / / \ brief Whether a fatal error has occurred <nl> bool fatalErrorOccurred = false ; <nl> namespace swift { <nl> Behavior previousBehavior = Behavior : : Unspecified ; <nl> <nl> / / / \ brief Track settable , per - diagnostic state that we store <nl> - std : : vector < Behavior > perDiagnosticState ; <nl> + std : : vector < Behavior > perDiagnosticBehavior ; <nl> <nl> public : <nl> DiagnosticState ( ) ; <nl> namespace swift { <nl> } <nl> <nl> / / / \ brief Whether to skip emitting warnings <nl> - void setIgnoreAllWarnings ( bool val ) { ignoreAllWarnings = val ; } <nl> - bool getIgnoreAllWarnings ( ) const { return ignoreAllWarnings ; } <nl> + void setSuppressWarnings ( bool val ) { suppressWarnings = val ; } <nl> + bool getSuppressWarnings ( ) const { return suppressWarnings ; } <nl> + <nl> + / / / \ brief Whether to treat warnings as errors <nl> + void setWarningsAsErrors ( bool val ) { warningsAsErrors = val ; } <nl> + bool getWarningsAsErrors ( ) const { return warningsAsErrors ; } <nl> <nl> void resetHadAnyError ( ) { <nl> anyErrorOccurred = false ; <nl> namespace swift { <nl> <nl> / / / Set per - diagnostic behavior <nl> void setDiagnosticBehavior ( DiagID id , Behavior behavior ) { <nl> - perDiagnosticState [ ( unsigned ) id ] = behavior ; <nl> + perDiagnosticBehavior [ ( unsigned ) id ] = behavior ; <nl> } <nl> <nl> private : <nl> namespace swift { <nl> / / / emitting diagnostics . <nl> SmallVector < DiagnosticConsumer * , 2 > Consumers ; <nl> <nl> + / / / \ brief Tracks diagnostic behaviors and state <nl> DiagnosticState state ; <nl> <nl> / / / \ brief The currently active diagnostic , if there is one . <nl> namespace swift { <nl> } <nl> <nl> / / / \ brief Whether to skip emitting warnings <nl> - void setIgnoreAllWarnings ( bool val ) { state . setIgnoreAllWarnings ( val ) ; } <nl> - bool getIgnoreAllWarnings ( ) const { <nl> - return state . getIgnoreAllWarnings ( ) ; <nl> + void setSuppressWarnings ( bool val ) { state . setSuppressWarnings ( val ) ; } <nl> + bool getSuppressWarnings ( ) const { <nl> + return state . getSuppressWarnings ( ) ; <nl> + } <nl> + <nl> + / / / \ brief Whether to treat warnings as errors <nl> + void setWarningsAsErrors ( bool val ) { state . setWarningsAsErrors ( val ) ; } <nl> + bool getWarningsAsErrors ( ) const { <nl> + return state . getWarningsAsErrors ( ) ; <nl> } <nl> <nl> void ignoreDiagnostic ( DiagID id ) { <nl> mmm a / include / swift / AST / DiagnosticsAll . def <nl> ppp b / include / swift / AST / DiagnosticsAll . def <nl> <nl> # endif <nl> <nl> # ifndef ERROR <nl> - # define ERROR ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( ERROR , ID , Category , Options , Text , Signature ) <nl> + # define ERROR ( ID , Options , Text , Signature ) \ <nl> + DIAG ( ERROR , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef WARNING <nl> - # define WARNING ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( WARNING , ID , Category , Options , Text , Signature ) <nl> + # define WARNING ( ID , Options , Text , Signature ) \ <nl> + DIAG ( WARNING , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef NOTE <nl> - # define NOTE ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( NOTE , ID , Category , Options , Text , Signature ) <nl> + # define NOTE ( ID , Options , Text , Signature ) \ <nl> + DIAG ( NOTE , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # define DIAG_NO_UNDEF <nl> mmm a / include / swift / AST / DiagnosticsClangImporter . def <nl> ppp b / include / swift / AST / DiagnosticsClangImporter . def <nl> <nl> # endif <nl> <nl> # ifndef ERROR <nl> - # define ERROR ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( ERROR , ID , Category , Options , Text , Signature ) <nl> + # define ERROR ( ID , Options , Text , Signature ) \ <nl> + DIAG ( ERROR , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef WARNING <nl> - # define WARNING ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( WARNING , ID , Category , Options , Text , Signature ) <nl> + # define WARNING ( ID , Options , Text , Signature ) \ <nl> + DIAG ( WARNING , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef NOTE <nl> - # define NOTE ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( NOTE , ID , Category , Options , Text , Signature ) <nl> + # define NOTE ( ID , Options , Text , Signature ) \ <nl> + DIAG ( NOTE , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> - WARNING ( warning_from_clang , none , none , <nl> + WARNING ( warning_from_clang , none , <nl> " % 0 " , ( StringRef ) ) <nl> - ERROR ( error_from_clang , none , none , <nl> + ERROR ( error_from_clang , none , <nl> " % 0 " , ( StringRef ) ) <nl> - NOTE ( note_from_clang , none , none , <nl> + NOTE ( note_from_clang , none , <nl> " % 0 " , ( StringRef ) ) <nl> <nl> - ERROR ( clang_cannot_build_module , none , Fatal , <nl> + ERROR ( clang_cannot_build_module , Fatal , <nl> " could not build Objective - C module ' % 0 ' " , ( StringRef ) ) <nl> <nl> - ERROR ( bridging_header_missing , none , Fatal , <nl> + ERROR ( bridging_header_missing , Fatal , <nl> " bridging header ' % 0 ' does not exist " , ( StringRef ) ) <nl> - ERROR ( bridging_header_error , none , Fatal , <nl> + ERROR ( bridging_header_error , Fatal , <nl> " failed to import bridging header ' % 0 ' " , ( StringRef ) ) <nl> - WARNING ( could_not_rewrite_bridging_header , none , none , <nl> + WARNING ( could_not_rewrite_bridging_header , none , <nl> " failed to serialize bridging header ; " <nl> " target may not be debuggable outside of its original project " , ( ) ) <nl> <nl> - WARNING ( invalid_swift_name_method , none , none , <nl> + WARNING ( invalid_swift_name_method , none , <nl> " too % select { few | many } 0 parameters in swift_name attribute ( expected % 1 ; " <nl> " got % 2 ) " , ( bool , unsigned , unsigned ) ) <nl> <nl> mmm a / include / swift / AST / DiagnosticsClangImporter . h <nl> ppp b / include / swift / AST / DiagnosticsClangImporter . h <nl> <nl> namespace swift { <nl> namespace diag { <nl> / / Declare common diagnostics objects with their appropriate types . <nl> - # define DIAG ( KIND , ID , Category , Options , Text , Signature ) \ <nl> + # define DIAG ( KIND , ID , Options , Text , Signature ) \ <nl> extern detail : : DiagWithArguments < void Signature > : : type ID ; <nl> # include " DiagnosticsClangImporter . def " <nl> } <nl> mmm a / include / swift / AST / DiagnosticsCommon . def <nl> ppp b / include / swift / AST / DiagnosticsCommon . def <nl> <nl> # endif <nl> <nl> # ifndef ERROR <nl> - # define ERROR ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( ERROR , ID , Category , Options , Text , Signature ) <nl> + # define ERROR ( ID , Options , Text , Signature ) \ <nl> + DIAG ( ERROR , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef WARNING <nl> - # define WARNING ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( WARNING , ID , Category , Options , Text , Signature ) <nl> + # define WARNING ( ID , Options , Text , Signature ) \ <nl> + DIAG ( WARNING , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef NOTE <nl> - # define NOTE ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( NOTE , ID , Category , Options , Text , Signature ) <nl> + # define NOTE ( ID , Options , Text , Signature ) \ <nl> + DIAG ( NOTE , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> - ERROR ( invalid_diagnostic , common , none , <nl> + ERROR ( invalid_diagnostic , none , <nl> " INTERNAL ERROR : this diagnostic should not be produced " , ( ) ) <nl> <nl> - ERROR ( not_implemented , TODO , none , <nl> + ERROR ( not_implemented , none , <nl> " INTERNAL ERROR : feature not implemented : % 0 " , ( StringRef ) ) <nl> <nl> - ERROR ( error_opening_output , common , none , <nl> + ERROR ( error_opening_output , none , <nl> " error opening ' % 0 ' for output : % 1 " , ( StringRef , StringRef ) ) <nl> <nl> <nl> - NOTE ( previous_decldef , common , none , <nl> + NOTE ( previous_decldef , none , <nl> " previous % select { declaration | definition } 0 of % 1 is here " , <nl> ( bool , Identifier ) ) <nl> <nl> <nl> / / Generic disambiguation <nl> - NOTE ( while_parsing_as_left_angle_bracket , common , none , <nl> + NOTE ( while_parsing_as_left_angle_bracket , none , <nl> " while parsing this ' < ' as a type parameter bracket " , ( ) ) <nl> - NOTE ( while_parsing_as_less_operator , common , none , <nl> + NOTE ( while_parsing_as_less_operator , none , <nl> " while parsing this ' < ' as an operator " , ( ) ) <nl> <nl> <nl> / / FIXME : This is used both as a parse error ( a literal " super " outside a <nl> / / method ) and a type - checker error ( " super " in a method of a non - class type ) . <nl> - ERROR ( super_not_in_class_method , common , none , <nl> + ERROR ( super_not_in_class_method , none , <nl> " ' super ' cannot be used outside of class members " , ( ) ) <nl> <nl> - ERROR ( class_func_not_in_class , common , none , <nl> + ERROR ( class_func_not_in_class , none , <nl> " class methods are only allowed within classes ; " <nl> " use ' static ' to declare a static method " , ( ) ) <nl> - ERROR ( class_var_not_in_class , common , none , <nl> + ERROR ( class_var_not_in_class , none , <nl> " class properties are only allowed within classes ; " <nl> " use ' static ' to declare a static property " , ( ) ) <nl> <nl> / / FIXME : Used by both the parser and the type - checker . <nl> - ERROR ( func_decl_without_brace , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( func_decl_without_brace , PointsToFirstBadToken , <nl> " expected ' { ' in body of function declaration " , ( ) ) <nl> <nl> - NOTE ( convert_let_to_var , sema , none , <nl> + NOTE ( convert_let_to_var , none , <nl> " change ' let ' to ' var ' to make it mutable " , ( ) ) <nl> - NOTE ( change_let_to_var_param , sema , none , <nl> + NOTE ( change_let_to_var_param , none , <nl> " change ' let ' parameter to ' var ' to make it mutable " , ( ) ) <nl> - NOTE ( mark_param_var , sema , none , <nl> + NOTE ( mark_param_var , none , <nl> " mark parameter with ' var ' to make it mutable " , ( ) ) <nl> <nl> <nl> mmm a / include / swift / AST / DiagnosticsCommon . h <nl> ppp b / include / swift / AST / DiagnosticsCommon . h <nl> namespace swift { <nl> using DeclAttribute = const DeclAttribute * ; <nl> <nl> / / Declare common diagnostics objects with their appropriate types . <nl> - # define DIAG ( KIND , ID , Category , Options , Text , Signature ) \ <nl> + # define DIAG ( KIND , ID , Options , Text , Signature ) \ <nl> extern detail : : DiagWithArguments < void Signature > : : type ID ; <nl> # include " DiagnosticsCommon . def " <nl> } <nl> mmm a / include / swift / AST / DiagnosticsDriver . def <nl> ppp b / include / swift / AST / DiagnosticsDriver . def <nl> <nl> # endif <nl> <nl> # ifndef ERROR <nl> - # define ERROR ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( ERROR , ID , Category , Options , Text , Signature ) <nl> + # define ERROR ( ID , Options , Text , Signature ) \ <nl> + DIAG ( ERROR , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef WARNING <nl> - # define WARNING ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( WARNING , ID , Category , Options , Text , Signature ) <nl> + # define WARNING ( ID , Options , Text , Signature ) \ <nl> + DIAG ( WARNING , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef NOTE <nl> - # define NOTE ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( NOTE , ID , Category , Options , Text , Signature ) <nl> + # define NOTE ( ID , Options , Text , Signature ) \ <nl> + DIAG ( NOTE , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> <nl> - WARNING ( warning_parallel_execution_not_supported , driver , none , <nl> + WARNING ( warning_parallel_execution_not_supported , none , <nl> " parallel execution not supported ; falling back to serial execution " , <nl> ( ) ) <nl> <nl> - ERROR ( error_unable_to_execute_command , driver , none , <nl> + ERROR ( error_unable_to_execute_command , none , <nl> " unable to execute command : % 0 " , ( StringRef ) ) <nl> - ERROR ( error_command_signalled , driver , none , <nl> + ERROR ( error_command_signalled , none , <nl> " % 0 command failed due to signal ( use - v to see invocation ) " , ( StringRef ) ) <nl> - ERROR ( error_command_failed , driver , none , <nl> + ERROR ( error_command_failed , none , <nl> " % 0 command failed with exit code % 1 ( use - v to see invocation ) " , <nl> ( StringRef , int ) ) <nl> <nl> - ERROR ( error_expected_one_frontend_job , driver , none , <nl> + ERROR ( error_expected_one_frontend_job , none , <nl> " unable to handle compilation , expected exactly one frontend job " , ( ) ) <nl> - ERROR ( error_expected_frontend_command , driver , none , <nl> + ERROR ( error_expected_frontend_command , none , <nl> " expected a swift frontend command " , ( ) ) <nl> <nl> - ERROR ( error_cannot_specify__o_for_multiple_outputs , driver , none , <nl> + ERROR ( error_cannot_specify__o_for_multiple_outputs , none , <nl> " cannot specify - o when generating multiple output files " , ( ) ) <nl> <nl> - ERROR ( error_unable_to_load_output_file_map , driver , none , <nl> + ERROR ( error_unable_to_load_output_file_map , none , <nl> " unable to load output file map " , ( ) ) <nl> <nl> - ERROR ( error_no_output_file_map_specified , driver , none , <nl> + ERROR ( error_no_output_file_map_specified , none , <nl> " no output file map specified " , ( ) ) <nl> <nl> - ERROR ( error_unable_to_make_temporary_file , driver , none , <nl> + ERROR ( error_unable_to_make_temporary_file , none , <nl> " unable to make temporary file : % 0 " , ( StringRef ) ) <nl> <nl> - ERROR ( error_no_input_files , driver , none , <nl> + ERROR ( error_no_input_files , none , <nl> " no input files " , ( ) ) <nl> <nl> - ERROR ( error_unexpected_input_file , driver , none , <nl> + ERROR ( error_unexpected_input_file , none , <nl> " unexpected input file : % 0 " , ( StringRef ) ) <nl> <nl> - ERROR ( error_unknown_target , driver , none , <nl> + ERROR ( error_unknown_target , none , <nl> " unknown target ' % 0 ' " , ( StringRef ) ) <nl> <nl> - ERROR ( error_framework_bridging_header , driver , none , <nl> + ERROR ( error_framework_bridging_header , none , <nl> " using bridging headers with framework targets is unsupported " , ( ) ) <nl> <nl> - ERROR ( error_i_mode , driver , none , <nl> + ERROR ( error_i_mode , none , <nl> " the flag ' - i ' is no longer required and has been removed ; " <nl> " use ' % 0 input - filename ' " , ( StringRef ) ) <nl> - WARNING ( warning_unnecessary_repl_mode , driver , none , <nl> + WARNING ( warning_unnecessary_repl_mode , none , <nl> " unnecessary option ' % 0 ' ; this is the default for ' % 1 ' " <nl> " with no input files " , ( StringRef , StringRef ) ) <nl> - ERROR ( error_unsupported_option , driver , none , <nl> + ERROR ( error_unsupported_option , none , <nl> " unsupported option ' % 0 ' for ' % 1 ' ; did you mean ' % 2 % 0 ' ? " , <nl> ( StringRef , StringRef , StringRef ) ) <nl> <nl> - WARNING ( incremental_requires_output_file_map , driver , none , <nl> + WARNING ( incremental_requires_output_file_map , none , <nl> " ignoring - incremental ( currently requires an output file map ) " , ( ) ) <nl> - WARNING ( incremental_requires_build_record_entry , driver , none , <nl> + WARNING ( incremental_requires_build_record_entry , none , <nl> " ignoring - incremental ; output file map has no master dependencies " <nl> " entry ( \ " % 0 \ " under \ " \ " ) " , ( StringRef ) ) <nl> <nl> - ERROR ( error_os_minimum_deployment , driver , none , <nl> + ERROR ( error_os_minimum_deployment , none , <nl> " Swift requires a minimum deployment target of % 0 " , ( StringRef ) ) <nl> - ERROR ( error_sdk_too_old , driver , none , <nl> + ERROR ( error_sdk_too_old , none , <nl> " Swift does not support the SDK ' % 0 ' " , ( StringRef ) ) <nl> <nl> - ERROR ( error_two_files_same_name , driver , none , <nl> + ERROR ( error_two_files_same_name , none , <nl> " filename \ " % 0 \ " used twice : ' % 1 ' and ' % 2 ' " , <nl> ( StringRef , StringRef , StringRef ) ) <nl> - NOTE ( note_explain_two_files_same_name , driver , none , <nl> + NOTE ( note_explain_two_files_same_name , none , <nl> " filenames are used to distinguish private declarations with the same " <nl> " name " , ( ) ) <nl> <nl> - WARNING ( warn_cannot_stat_input , driver , none , <nl> + WARNING ( warn_cannot_stat_input , none , <nl> " unable to determine when ' % 0 ' was last modified : % 1 " , <nl> ( StringRef , StringRef ) ) <nl> <nl> - ERROR ( error_input_changed_during_build , driver , none , <nl> + ERROR ( error_input_changed_during_build , none , <nl> " input file ' % 0 ' was modified during the build " , <nl> ( StringRef ) ) <nl> <nl> + ERROR ( error_conflicting_options , none , <nl> + " conflicting options ' % 0 ' and ' % 1 ' " , <nl> + ( StringRef , StringRef ) ) <nl> + <nl> # ifndef DIAG_NO_UNDEF <nl> # if defined ( DIAG ) <nl> # undef DIAG <nl> mmm a / include / swift / AST / DiagnosticsDriver . h <nl> ppp b / include / swift / AST / DiagnosticsDriver . h <nl> <nl> namespace swift { <nl> namespace diag { <nl> / / Declare common diagnostics objects with their appropriate types . <nl> - # define DIAG ( KIND , ID , Category , Options , Text , Signature ) \ <nl> + # define DIAG ( KIND , ID , Options , Text , Signature ) \ <nl> extern detail : : DiagWithArguments < void Signature > : : type ID ; <nl> # include " DiagnosticsDriver . def " <nl> } <nl> mmm a / include / swift / AST / DiagnosticsFrontend . def <nl> ppp b / include / swift / AST / DiagnosticsFrontend . def <nl> <nl> # endif <nl> <nl> # ifndef ERROR <nl> - # define ERROR ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( ERROR , ID , Category , Options , Text , Signature ) <nl> + # define ERROR ( ID , Options , Text , Signature ) \ <nl> + DIAG ( ERROR , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef WARNING <nl> - # define WARNING ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( WARNING , ID , Category , Options , Text , Signature ) <nl> + # define WARNING ( ID , Options , Text , Signature ) \ <nl> + DIAG ( WARNING , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef NOTE <nl> - # define NOTE ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( NOTE , ID , Category , Options , Text , Signature ) <nl> + # define NOTE ( ID , Options , Text , Signature ) \ <nl> + DIAG ( NOTE , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> - WARNING ( warning_no_such_sdk , frontend , none , <nl> + WARNING ( warning_no_such_sdk , none , <nl> " no such SDK : ' % 0 ' " , ( StringRef ) ) <nl> <nl> - ERROR ( error_no_frontend_args , frontend , none , <nl> + ERROR ( error_no_frontend_args , none , <nl> " no arguments provided to ' - frontend ' " , ( ) ) <nl> <nl> - ERROR ( error_no_such_file_or_directory , frontend , none , <nl> + ERROR ( error_no_such_file_or_directory , none , <nl> " no such file or directory : ' % 0 ' " , ( StringRef ) ) <nl> <nl> - ERROR ( error_unsupported_target_os , frontend , none , <nl> + ERROR ( error_unsupported_target_os , none , <nl> " unsupported target OS : ' % 0 ' " , ( StringRef ) ) <nl> <nl> - ERROR ( error_unsupported_target_arch , frontend , none , <nl> + ERROR ( error_unsupported_target_arch , none , <nl> " unsupported target architecture : ' % 0 ' " , ( StringRef ) ) <nl> <nl> - ERROR ( cannot_open_file , frontend , none , <nl> + ERROR ( cannot_open_file , none , <nl> " cannot open file ' % 0 ' ( % 1 ) " , ( StringRef , StringRef ) ) <nl> - ERROR ( cannot_open_serialized_file , frontend , none , <nl> + ERROR ( cannot_open_serialized_file , none , <nl> " cannot open file ' % 0 ' for diagnostics emission ( % 1 ) " , ( StringRef , StringRef ) ) <nl> - ERROR ( error_open_input_file , frontend , none , <nl> + ERROR ( error_open_input_file , none , <nl> " error opening input file ' % 0 ' ( % 1 ) " , ( StringRef , StringRef ) ) <nl> - ERROR ( error_clang_importer_create_fail , frontend , none , <nl> + ERROR ( error_clang_importer_create_fail , none , <nl> " clang importer creation failed " , ( ) ) <nl> - ERROR ( error_missing_arg_value , frontend , none , <nl> + ERROR ( error_missing_arg_value , none , <nl> " missing argument value for ' % 0 ' , expected % 1 argument ( s ) " , <nl> ( StringRef , unsigned ) ) <nl> - ERROR ( error_unknown_arg , frontend , none , <nl> + ERROR ( error_unknown_arg , none , <nl> " unknown argument : ' % 0 ' " , ( StringRef ) ) <nl> - ERROR ( error_invalid_arg_value , frontend , none , <nl> + ERROR ( error_invalid_arg_value , none , <nl> " invalid value ' % 1 ' in ' % 0 ' " , ( StringRef , StringRef ) ) <nl> - ERROR ( error_immediate_mode_missing_stdlib , frontend , none , <nl> + ERROR ( error_immediate_mode_missing_stdlib , none , <nl> " could not load the swift standard library " , ( ) ) <nl> - ERROR ( error_immediate_mode_missing_library , frontend , none , <nl> + ERROR ( error_immediate_mode_missing_library , none , <nl> " could not load % select { shared library | framework } 0 ' % 1 ' " , <nl> ( unsigned , StringRef ) ) <nl> - ERROR ( error_immediate_mode_primary_file , frontend , none , <nl> + ERROR ( error_immediate_mode_primary_file , none , <nl> " immediate mode is incompatible with - primary - file " , ( ) ) <nl> - ERROR ( error_missing_frontend_action , frontend , none , <nl> + ERROR ( error_missing_frontend_action , none , <nl> " no frontend action was selected " , ( ) ) <nl> <nl> - ERROR ( error_mode_cannot_emit_dependencies , frontend , none , <nl> + ERROR ( error_mode_cannot_emit_dependencies , none , <nl> " this mode does not support emitting dependency files " , ( ) ) <nl> - ERROR ( error_mode_cannot_emit_header , frontend , none , <nl> + ERROR ( error_mode_cannot_emit_header , none , <nl> " this mode does not support emitting Objective - C headers " , ( ) ) <nl> - ERROR ( error_mode_cannot_emit_module , frontend , none , <nl> + ERROR ( error_mode_cannot_emit_module , none , <nl> " this mode does not support emitting modules " , ( ) ) <nl> - ERROR ( error_mode_cannot_emit_module_doc , frontend , none , <nl> + ERROR ( error_mode_cannot_emit_module_doc , none , <nl> " this mode does not support emitting module documentation files " , ( ) ) <nl> <nl> - WARNING ( emit_reference_dependencies_without_primary_file , frontend , none , <nl> + WARNING ( emit_reference_dependencies_without_primary_file , none , <nl> " ignoring - emit - reference - dependencies ( requires - primary - file ) " , ( ) ) <nl> <nl> - ERROR ( error_bad_module_name , frontend , none , <nl> + ERROR ( error_bad_module_name , none , <nl> " module name \ " % 0 \ " is not a valid identifier " <nl> " % select { | ; use - module - name flag to specify an alternate name } 1 " , <nl> ( StringRef , bool ) ) <nl> - ERROR ( error_stdlib_module_name , frontend , none , <nl> + ERROR ( error_stdlib_module_name , none , <nl> " module name \ " % 0 \ " is reserved for the standard library " <nl> " % select { | ; use - module - name flag to specify an alternate name } 1 " , <nl> ( StringRef , bool ) ) <nl> <nl> - ERROR ( error_stdlib_not_found , frontend , Fatal , <nl> + ERROR ( error_stdlib_not_found , Fatal , <nl> " unable to load standard library for target ' % 0 ' " , ( StringRef ) ) <nl> - ERROR ( error_underlying_module_not_found , frontend , none , <nl> + ERROR ( error_underlying_module_not_found , none , <nl> " underlying Objective - C module % 0 not found " , ( Identifier ) ) <nl> <nl> - ERROR ( error_repl_requires_no_input_files , frontend , none , <nl> + ERROR ( error_repl_requires_no_input_files , none , <nl> " REPL mode requires no input files " , ( ) ) <nl> - ERROR ( error_mode_requires_one_input_file , frontend , none , <nl> + ERROR ( error_mode_requires_one_input_file , none , <nl> " this mode requires a single input file " , ( ) ) <nl> - ERROR ( error_mode_requires_an_input_file , frontend , none , <nl> + ERROR ( error_mode_requires_an_input_file , none , <nl> " this mode requires at least one input file " , ( ) ) <nl> - ERROR ( error_mode_requires_one_sil_multi_sib , frontend , none , <nl> + ERROR ( error_mode_requires_one_sil_multi_sib , none , <nl> " this mode requires . sil for primary - file and only . sib for other inputs " , ( ) ) <nl> <nl> - ERROR ( error_no_output_filename_specified , frontend , none , <nl> + ERROR ( error_no_output_filename_specified , none , <nl> " an output filename was not specified for a mode which requires an output " <nl> " filename " , ( ) ) <nl> <nl> - ERROR ( error_implicit_output_file_is_directory , frontend , none , <nl> + ERROR ( error_implicit_output_file_is_directory , none , <nl> " the implicit output file ' % 0 ' is a directory ; explicitly specify a filename " <nl> " using - o " , ( StringRef ) ) <nl> <nl> - ERROR ( repl_must_be_initialized , sema , none , <nl> + ERROR ( repl_must_be_initialized , none , <nl> " variables currently must have an initial value when entered at the " <nl> " top level of the REPL " , ( ) ) <nl> <nl> - ERROR ( error_doing_code_completion , frontend , none , <nl> + ERROR ( error_doing_code_completion , none , <nl> " compiler is in code completion mode ( benign diagnostic ) " , ( ) ) <nl> <nl> - ERROR ( verify_encountered_fatal , frontend , none , <nl> + ERROR ( verify_encountered_fatal , none , <nl> " fatal error encountered while in - verify mode " , ( ) ) <nl> <nl> - ERROR ( error_parse_input_file , frontend , none , <nl> + ERROR ( error_parse_input_file , none , <nl> " error parsing input file ' % 0 ' ( % 1 ) " , ( StringRef , StringRef ) ) <nl> <nl> # ifndef DIAG_NO_UNDEF <nl> mmm a / include / swift / AST / DiagnosticsFrontend . h <nl> ppp b / include / swift / AST / DiagnosticsFrontend . h <nl> <nl> namespace swift { <nl> namespace diag { <nl> / / Declare common diagnostics objects with their appropriate types . <nl> - # define DIAG ( KIND , ID , Category , Options , Text , Signature ) \ <nl> + # define DIAG ( KIND , ID , Options , Text , Signature ) \ <nl> extern detail : : DiagWithArguments < void Signature > : : type ID ; <nl> # include " DiagnosticsFrontend . def " <nl> } <nl> mmm a / include / swift / AST / DiagnosticsIRGen . def <nl> ppp b / include / swift / AST / DiagnosticsIRGen . def <nl> <nl> # endif <nl> <nl> # ifndef ERROR <nl> - # define ERROR ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( ERROR , ID , Category , Options , Text , Signature ) <nl> + # define ERROR ( ID , Options , Text , Signature ) \ <nl> + DIAG ( ERROR , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef WARNING <nl> - # define WARNING ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( WARNING , ID , Category , Options , Text , Signature ) <nl> + # define WARNING ( ID , Options , Text , Signature ) \ <nl> + DIAG ( WARNING , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef NOTE <nl> - # define NOTE ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( NOTE , ID , Category , Options , Text , Signature ) <nl> + # define NOTE ( ID , Options , Text , Signature ) \ <nl> + DIAG ( NOTE , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> <nl> - ERROR ( no_llvm_target , irgen , none , <nl> + ERROR ( no_llvm_target , none , <nl> " error loading LLVM target for triple ' % 0 ' : % 1 " , ( StringRef , StringRef ) ) <nl> - ERROR ( error_codegen_init_fail , irgen , none , <nl> + ERROR ( error_codegen_init_fail , none , <nl> " cannot initialize code generation passes for target " , ( ) ) <nl> <nl> - ERROR ( irgen_unimplemented , irgen , none , <nl> + ERROR ( irgen_unimplemented , none , <nl> " unimplemented IR generation feature % 0 " , ( StringRef ) ) <nl> - ERROR ( irgen_failure , irgen , none , " IR generation failure : % 0 " , ( StringRef ) ) <nl> + ERROR ( irgen_failure , none , " IR generation failure : % 0 " , ( StringRef ) ) <nl> <nl> - ERROR ( type_to_verify_not_found , irgen , none , " unable to find type ' % 0 ' to verify " , <nl> + ERROR ( type_to_verify_not_found , none , " unable to find type ' % 0 ' to verify " , <nl> ( StringRef ) ) <nl> - ERROR ( type_to_verify_ambiguous , irgen , none , " type to verify ' % 0 ' is ambiguous " , <nl> + ERROR ( type_to_verify_ambiguous , none , " type to verify ' % 0 ' is ambiguous " , <nl> ( StringRef ) ) <nl> - ERROR ( type_to_verify_dependent , irgen , none , <nl> + ERROR ( type_to_verify_dependent , none , <nl> " type to verify ' % 0 ' has unbound generic parameters " , <nl> ( StringRef ) ) <nl> - ERROR ( too_few_output_filenames , irgen , none , <nl> + ERROR ( too_few_output_filenames , none , <nl> " too few output file names specified " , ( ) ) <nl> - ERROR ( no_input_files_for_mt , irgen , none , <nl> + ERROR ( no_input_files_for_mt , none , <nl> " no swift input files for multi - threaded compilation " , ( ) ) <nl> <nl> - ERROR ( alignment_dynamic_type_layout_unsupported , irgen , none , <nl> + ERROR ( alignment_dynamic_type_layout_unsupported , none , <nl> " @ _alignment is not supported on types with dynamic layout " , ( ) ) <nl> - ERROR ( alignment_less_than_natural , irgen , none , <nl> + ERROR ( alignment_less_than_natural , none , <nl> " @ _alignment cannot decrease alignment below natural alignment of % 0 " , <nl> ( unsigned ) ) <nl> <nl> mmm a / include / swift / AST / DiagnosticsIRGen . h <nl> ppp b / include / swift / AST / DiagnosticsIRGen . h <nl> <nl> namespace swift { <nl> namespace diag { <nl> / / Declare common diagnostics objects with their appropriate types . <nl> - # define DIAG ( KIND , ID , Category , Options , Text , Signature ) \ <nl> + # define DIAG ( KIND , ID , Options , Text , Signature ) \ <nl> extern detail : : DiagWithArguments < void Signature > : : type ID ; <nl> # include " DiagnosticsIRGen . def " <nl> } <nl> mmm a / include / swift / AST / DiagnosticsParse . def <nl> ppp b / include / swift / AST / DiagnosticsParse . def <nl> <nl> # endif <nl> <nl> # ifndef ERROR <nl> - # define ERROR ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( ERROR , ID , Category , Options , Text , Signature ) <nl> + # define ERROR ( ID , Options , Text , Signature ) \ <nl> + DIAG ( ERROR , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef WARNING <nl> - # define WARNING ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( WARNING , ID , Category , Options , Text , Signature ) <nl> + # define WARNING ( ID , Options , Text , Signature ) \ <nl> + DIAG ( WARNING , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef NOTE <nl> - # define NOTE ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( NOTE , ID , Category , Options , Text , Signature ) <nl> + # define NOTE ( ID , Options , Text , Signature ) \ <nl> + DIAG ( NOTE , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / Lexing and Parsing diagnostics <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> <nl> - NOTE ( opening_brace , parsing , none , <nl> + NOTE ( opening_brace , none , <nl> " to match this opening ' { ' " , ( ) ) <nl> - NOTE ( opening_bracket , parsing , none , <nl> + NOTE ( opening_bracket , none , <nl> " to match this opening ' [ ' " , ( ) ) <nl> - NOTE ( opening_paren , parsing , none , <nl> + NOTE ( opening_paren , none , <nl> " to match this opening ' ( ' " , ( ) ) <nl> - NOTE ( opening_angle , parsing , none , <nl> + NOTE ( opening_angle , none , <nl> " to match this opening ' < ' " , ( ) ) <nl> <nl> - ERROR ( extra_rbrace , parsing , none , <nl> + ERROR ( extra_rbrace , none , <nl> " extraneous ' } ' at top level " , ( ) ) <nl> <nl> - ERROR ( unexpected_config_block_terminator , parsing , none , <nl> + ERROR ( unexpected_config_block_terminator , none , <nl> " unexpected configuration block terminator " , ( ) ) <nl> - ERROR ( expected_build_configuration_expression , parsing , none , <nl> + ERROR ( expected_build_configuration_expression , none , <nl> " expected a build configuration expression to follow the # if clause " , ( ) ) <nl> - ERROR ( extra_tokens_config_directive , parsing , none , <nl> + ERROR ( extra_tokens_config_directive , none , <nl> " extra tokens at the end of the build configuration directive " , ( ) ) <nl> <nl> - ERROR ( unexpected_line_directive , parsing , none , <nl> + ERROR ( unexpected_line_directive , none , <nl> " parameterless closing # line directive " <nl> " without prior opening # line directive " , ( ) ) <nl> - ERROR ( expected_line_directive_number , parsing , none , <nl> + ERROR ( expected_line_directive_number , none , <nl> " expected starting line number for # line directive " , ( ) ) <nl> - ERROR ( expected_line_directive_name , parsing , none , <nl> + ERROR ( expected_line_directive_name , none , <nl> " expected filename string literal for # line directive " , ( ) ) <nl> - ERROR ( extra_tokens_line_directive , parsing , none , <nl> + ERROR ( extra_tokens_line_directive , none , <nl> " extra tokens at the end of # line directive " , ( ) ) <nl> - ERROR ( line_directive_line_zero , parsing , none , <nl> + ERROR ( line_directive_line_zero , none , <nl> " the line number needs to be greater than zero " , ( ) ) <nl> <nl> - WARNING ( escaped_parameter_name , parsing , none , <nl> + WARNING ( escaped_parameter_name , none , <nl> " keyword ' % 0 ' does not need to be escaped in argument list " , <nl> ( StringRef ) ) <nl> <nl> WARNING ( escaped_parameter_name , parsing , none , <nl> / / Lexer diagnostics <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - WARNING ( lex_nul_character , lexing , none , <nl> + WARNING ( lex_nul_character , none , <nl> " nul character embedded in middle of file " , ( ) ) <nl> - ERROR ( lex_utf16_bom_marker , lexing , none , <nl> + ERROR ( lex_utf16_bom_marker , none , <nl> " input files must be encoded as UTF - 8 instead of UTF - 16 " , ( ) ) <nl> <nl> - ERROR ( lex_hashbang_not_allowed , lexing , none , <nl> + ERROR ( lex_hashbang_not_allowed , none , <nl> " hashbang line is allowed only in the main file " , ( ) ) <nl> <nl> - ERROR ( lex_unprintable_ascii_character , lexing , none , <nl> + ERROR ( lex_unprintable_ascii_character , none , <nl> " unprintable ASCII character found in source file " , ( ) ) <nl> - ERROR ( lex_invalid_utf8 , lexing , none , <nl> + ERROR ( lex_invalid_utf8 , none , <nl> " invalid UTF - 8 found in source file " , ( ) ) <nl> - ERROR ( lex_single_quote_string , lexing , none , <nl> + ERROR ( lex_single_quote_string , none , <nl> " single - quoted string literal found , use ' \ " ' " , ( ) ) <nl> - ERROR ( lex_invalid_curly_quote , lexing , none , <nl> + ERROR ( lex_invalid_curly_quote , none , <nl> " unicode curly quote found , replace with ' \ " ' " , ( ) ) <nl> <nl> <nl> - ERROR ( lex_unterminated_block_comment , lexing , none , <nl> + ERROR ( lex_unterminated_block_comment , none , <nl> " unterminated ' / * ' comment " , ( ) ) <nl> - NOTE ( lex_comment_start , lexing , none , <nl> + NOTE ( lex_comment_start , none , <nl> " comment started here " , ( ) ) <nl> <nl> <nl> - ERROR ( lex_unterminated_string , lexing , none , <nl> + ERROR ( lex_unterminated_string , none , <nl> " unterminated string literal " , ( ) ) <nl> - ERROR ( lex_invalid_escape , lexing , none , <nl> + ERROR ( lex_invalid_escape , none , <nl> " invalid escape sequence in literal " , ( ) ) <nl> - ERROR ( lex_invalid_u_escape , lexing , none , <nl> + ERROR ( lex_invalid_u_escape , none , <nl> " \ \ u { . . . } escape sequence expects between 1 and 8 hex digits " , ( ) ) <nl> - ERROR ( lex_invalid_u_escape_rbrace , lexing , none , <nl> + ERROR ( lex_invalid_u_escape_rbrace , none , <nl> " expected ' } ' in \ \ u { . . . } escape sequence " , ( ) ) <nl> <nl> - ERROR ( lex_invalid_unicode_scalar , lexing , none , <nl> + ERROR ( lex_invalid_unicode_scalar , none , <nl> " invalid unicode scalar " , ( ) ) <nl> - ERROR ( lex_unicode_escape_braces , lexing , none , <nl> + ERROR ( lex_unicode_escape_braces , none , <nl> " expected hexadecimal code in braces after unicode escape " , ( ) ) <nl> <nl> <nl> - ERROR ( lex_invalid_character , lexing , none , <nl> + ERROR ( lex_invalid_character , none , <nl> " invalid character in source file " , ( ) ) <nl> - ERROR ( lex_invalid_identifier_start_character , lexing , none , <nl> + ERROR ( lex_invalid_identifier_start_character , none , <nl> " an identifier cannot begin with this character " , ( ) ) <nl> - ERROR ( lex_expected_digit_in_fp_exponent , lexing , none , <nl> + ERROR ( lex_expected_digit_in_fp_exponent , none , <nl> " expected a digit in floating point exponent " , ( ) ) <nl> - ERROR ( lex_expected_digit_in_int_literal , lexing , none , <nl> + ERROR ( lex_expected_digit_in_int_literal , none , <nl> " expected a digit after integer literal prefix " , ( ) ) <nl> - ERROR ( lex_expected_binary_exponent_in_hex_float_literal , lexing , none , <nl> + ERROR ( lex_expected_binary_exponent_in_hex_float_literal , none , <nl> " hexadecimal floating point literal must end with an exponent " , ( ) ) <nl> - ERROR ( lex_unexpected_block_comment_end , lexing , none , <nl> + ERROR ( lex_unexpected_block_comment_end , none , <nl> " unexpected end of block comment " , ( ) ) <nl> - ERROR ( lex_unary_equal , lexing , none , <nl> + ERROR ( lex_unary_equal , none , <nl> " ' = ' must have consistent whitespace on both sides " , ( ) ) <nl> - ERROR ( extra_whitespace_period , lexing , none , <nl> + ERROR ( extra_whitespace_period , none , <nl> " extraneous whitespace after ' . ' is not permitted " , ( ) ) <nl> - ERROR ( lex_editor_placeholder , lexing , none , <nl> + ERROR ( lex_editor_placeholder , none , <nl> " editor placeholder in source file " , ( ) ) <nl> - WARNING ( lex_editor_placeholder_in_playground , lexing , none , <nl> + WARNING ( lex_editor_placeholder_in_playground , none , <nl> " editor placeholder in source file " , ( ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Declaration parsing diagnostics <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - ERROR ( declaration_same_line_without_semi , decl_parsing , none , <nl> + ERROR ( declaration_same_line_without_semi , none , <nl> " consecutive declarations on a line must be separated by ' ; ' " , ( ) ) <nl> <nl> - ERROR ( expected_decl , decl_parsing , none , <nl> + ERROR ( expected_decl , none , <nl> " expected declaration " , ( ) ) <nl> - ERROR ( expected_identifier_in_decl , decl_parsing , none , <nl> + ERROR ( expected_identifier_in_decl , none , <nl> " expected identifier in % 0 declaration " , ( StringRef ) ) <nl> - ERROR ( expected_identifier_after_case_comma , decl_parsing , none , <nl> + ERROR ( expected_identifier_after_case_comma , none , <nl> " expected identifier after comma in enum ' case ' declaration " , ( ) ) <nl> - ERROR ( decl_redefinition , decl_parsing , none , <nl> + ERROR ( decl_redefinition , none , <nl> " % select { declaration | definition } 0 conflicts with previous value " , <nl> ( bool ) ) <nl> - ERROR ( let_cannot_be_computed_property , decl_parsing , none , <nl> + ERROR ( let_cannot_be_computed_property , none , <nl> " ' let ' declarations cannot be computed properties " , ( ) ) <nl> - ERROR ( let_cannot_be_observing_property , decl_parsing , none , <nl> + ERROR ( let_cannot_be_observing_property , none , <nl> " ' let ' declarations cannot be observing properties " , ( ) ) <nl> - ERROR ( let_cannot_be_addressed_property , decl_parsing , none , <nl> + ERROR ( let_cannot_be_addressed_property , none , <nl> " ' let ' declarations cannot have addressors " , ( ) ) <nl> - ERROR ( disallowed_var_multiple_getset , decl_parsing , none , <nl> + ERROR ( disallowed_var_multiple_getset , none , <nl> " ' var ' declarations with multiple variables cannot have explicit " <nl> " getters / setters " , ( ) ) <nl> <nl> - ERROR ( disallowed_type , decl_parsing , none , <nl> + ERROR ( disallowed_type , none , <nl> " type not allowed here " , ( ) ) <nl> - ERROR ( disallowed_init , decl_parsing , none , <nl> + ERROR ( disallowed_init , none , <nl> " initial value is not allowed here " , ( ) ) <nl> - ERROR ( var_init_self_referential , expr_parsing , none , <nl> + ERROR ( var_init_self_referential , none , <nl> " variable used within its own initial value " , ( ) ) <nl> - ERROR ( disallowed_enum_element , decl_parsing , none , <nl> + ERROR ( disallowed_enum_element , none , <nl> " enum ' case ' is not allowed outside of an enum " , ( ) ) <nl> - ERROR ( decl_inner_scope , decl_parsing , none , <nl> + ERROR ( decl_inner_scope , none , <nl> " declaration is only valid at file scope " , ( ) ) <nl> <nl> - ERROR ( decl_not_static , decl_parsing , none , <nl> + ERROR ( decl_not_static , none , <nl> " declaration cannot be marked % 0 " , ( StaticSpellingKind ) ) <nl> <nl> - ERROR ( cskeyword_not_attribute , decl_parsing , none , <nl> + ERROR ( cskeyword_not_attribute , none , <nl> " ' % 0 ' is a declaration modifier , not an attribute " , ( StringRef ) ) <nl> <nl> - ERROR ( decl_already_static , decl_parsing , none , <nl> + ERROR ( decl_already_static , none , <nl> " % 0 specified twice " , ( StaticSpellingKind ) ) <nl> <nl> - ERROR ( enum_case_dot_prefix , decl_parsing , none , <nl> + ERROR ( enum_case_dot_prefix , none , <nl> " extraneous ' . ' in enum ' case ' declaration " , ( ) ) <nl> <nl> <nl> / / Variable getters / setters <nl> - ERROR ( static_var_decl_global_scope , decl_parsing , none , <nl> + ERROR ( static_var_decl_global_scope , none , <nl> " % select { ERROR | static properties | class properties } 0 may only be declared on a type " , <nl> ( StaticSpellingKind ) ) <nl> - ERROR ( computed_property_no_accessors , decl_parsing , none , <nl> + ERROR ( computed_property_no_accessors , none , <nl> " computed property must have accessors specified " , ( ) ) <nl> - ERROR ( expected_getset_in_protocol , decl_parsing , none , <nl> + ERROR ( expected_getset_in_protocol , none , <nl> " expected get or set in a protocol property " , ( ) ) <nl> - ERROR ( computed_property_missing_type , decl_parsing , none , <nl> + ERROR ( computed_property_missing_type , none , <nl> " computed property must have an explicit type " , ( ) ) <nl> - ERROR ( getset_nontrivial_pattern , decl_parsing , none , <nl> + ERROR ( getset_nontrivial_pattern , none , <nl> " getter / setter can only be defined for a single variable " , ( ) ) <nl> - ERROR ( expected_rbrace_in_getset , decl_parsing , none , <nl> + ERROR ( expected_rbrace_in_getset , none , <nl> " expected ' } ' at end of variable get / set clause " , ( ) ) <nl> - ERROR ( duplicate_property_accessor , decl_parsing , none , <nl> + ERROR ( duplicate_property_accessor , none , <nl> " duplicate definition of % 0 " , ( StringRef ) ) <nl> - NOTE ( previous_accessor , decl_parsing , none , <nl> + NOTE ( previous_accessor , none , <nl> " previous definition of % 0 is here " , ( StringRef ) ) <nl> - ERROR ( conflicting_property_addressor , decl_parsing , none , <nl> + ERROR ( conflicting_property_addressor , none , <nl> " % select { variable | subscript } 0 already has a " <nl> " % select { addressor | mutable addressor } 1 " , ( unsigned , unsigned ) ) <nl> - ERROR ( expected_accessor_name , decl_parsing , none , <nl> + ERROR ( expected_accessor_name , none , <nl> " expected % select { GETTER | setter | willSet | didSet } 0 parameter name " , <nl> ( unsigned ) ) <nl> - ERROR ( expected_rparen_set_name , decl_parsing , none , <nl> + ERROR ( expected_rparen_set_name , none , <nl> " expected ' ) ' after setter parameter name " , ( ) ) <nl> - ERROR ( expected_rparen_willSet_name , decl_parsing , none , <nl> + ERROR ( expected_rparen_willSet_name , none , <nl> " expected ' ) ' after willSet parameter name " , ( ) ) <nl> - ERROR ( expected_rparen_didSet_name , decl_parsing , none , <nl> + ERROR ( expected_rparen_didSet_name , none , <nl> " expected ' ) ' after didSet parameter name " , ( ) ) <nl> - ERROR ( expected_lbrace_accessor , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_accessor , PointsToFirstBadToken , <nl> " expected ' { ' to start % 0 definition " , ( StringRef ) ) <nl> - ERROR ( expected_accessor_kw , decl_parsing , none , <nl> + ERROR ( expected_accessor_kw , none , <nl> " expected ' get ' , ' set ' , ' willSet ' , or ' didSet ' keyword to " <nl> " start an accessor definition " , ( ) ) <nl> - ERROR ( var_set_without_get , decl_parsing , none , <nl> + ERROR ( var_set_without_get , none , <nl> " variable with a setter must also have a getter " , ( ) ) <nl> - ERROR ( observingproperty_with_getset , decl_parsing , none , <nl> + ERROR ( observingproperty_with_getset , none , <nl> " % select { willSet | didSet } 0 variable may not also have a " <nl> " % select { get | set } 1 specifier " , ( unsigned , unsigned ) ) <nl> - ERROR ( observingproperty_without_mutableaddress , decl_parsing , none , <nl> + ERROR ( observingproperty_without_mutableaddress , none , <nl> " % select { willSet | didSet } 0 variable with addressor must provide a " <nl> " ' mutableAddress ' accessor " , ( unsigned ) ) <nl> - ERROR ( observingproperty_in_subscript , decl_parsing , none , <nl> + ERROR ( observingproperty_in_subscript , none , <nl> " % select { willSet | didSet } 0 is not allowed in subscripts " , ( unsigned ) ) <nl> - ERROR ( getset_init , decl_parsing , none , <nl> + ERROR ( getset_init , none , <nl> " variable with getter / setter cannot have an initial value " , ( ) ) <nl> - ERROR ( getset_cannot_be_implied , decl_parsing , none , <nl> + ERROR ( getset_cannot_be_implied , none , <nl> " variable with implied type cannot have implied getter / setter " , ( ) ) <nl> - ERROR ( mutableaddressor_without_address , decl_parsing , none , <nl> + ERROR ( mutableaddressor_without_address , none , <nl> " % select { variable | subscript } 0 must provide either a getter or " <nl> " ' address ' if it provides ' mutableAddress ' " , ( unsigned ) ) <nl> - ERROR ( mutableaddressor_with_setter , decl_parsing , none , <nl> + ERROR ( mutableaddressor_with_setter , none , <nl> " % select { variable | subscript } 0 cannot provide both ' mutableAddress ' " <nl> " and a setter " , ( unsigned ) ) <nl> - ERROR ( addressor_with_getter , decl_parsing , none , <nl> + ERROR ( addressor_with_getter , none , <nl> " % select { variable | subscript } 0 cannot provide both ' address ' and " <nl> " a getter " , ( unsigned ) ) <nl> - ERROR ( addressor_with_setter , decl_parsing , none , <nl> + ERROR ( addressor_with_setter , none , <nl> " % select { variable | subscript } 0 cannot provide both ' address ' and " <nl> " a setter ; use an ordinary getter instead " , ( unsigned ) ) <nl> <nl> / / Import <nl> - ERROR ( decl_expected_module_name , decl_parsing , none , <nl> + ERROR ( decl_expected_module_name , none , <nl> " expected module name in import declaration " , ( ) ) <nl> <nl> / / Extension <nl> - ERROR ( expected_lbrace_extension , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_extension , PointsToFirstBadToken , <nl> " expected ' { ' in extension " , ( ) ) <nl> - ERROR ( expected_rbrace_extension , decl_parsing , none , <nl> + ERROR ( expected_rbrace_extension , none , <nl> " expected ' } ' at end of extension " , ( ) ) <nl> - ERROR ( extension_type_expected , decl_parse , none , <nl> + ERROR ( extension_type_expected , none , <nl> " expected type name in extension declaration " , ( ) ) <nl> <nl> / / TypeAlias <nl> - ERROR ( expected_equal_in_typealias , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_equal_in_typealias , PointsToFirstBadToken , <nl> " expected ' = ' in typealias declaration " , ( ) ) <nl> - ERROR ( expected_type_in_typealias , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_type_in_typealias , PointsToFirstBadToken , <nl> " expected type in typealias declaration " , ( ) ) <nl> <nl> / / Func <nl> - ERROR ( func_decl_nonglobal_operator , decl_parsing , none , <nl> + ERROR ( func_decl_nonglobal_operator , none , <nl> " operators are only allowed at global scope " , ( ) ) <nl> - ERROR ( func_decl_without_paren , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( func_decl_without_paren , PointsToFirstBadToken , <nl> " expected ' ( ' in argument list of function declaration " , ( ) ) <nl> - ERROR ( static_func_decl_global_scope , decl_parsing , none , <nl> + ERROR ( static_func_decl_global_scope , none , <nl> " % select { ERROR | static methods | class methods } 0 may only be declared on a type " , <nl> ( StaticSpellingKind ) ) <nl> - ERROR ( func_decl_expected_arrow , decl_parsing , none , <nl> + ERROR ( func_decl_expected_arrow , none , <nl> " expected ' - > ' after function parameter tuple " , ( ) ) <nl> <nl> / / Enum <nl> - ERROR ( expected_lbrace_enum , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_enum , PointsToFirstBadToken , <nl> " expected ' { ' in enum " , ( ) ) <nl> - ERROR ( expected_rbrace_enum , decl_parsing , none , <nl> + ERROR ( expected_rbrace_enum , none , <nl> " expected ' } ' at end of enum " , ( ) ) <nl> <nl> / / Struct <nl> - ERROR ( expected_lbrace_struct , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_struct , PointsToFirstBadToken , <nl> " expected ' { ' in struct " , ( ) ) <nl> - ERROR ( expected_rbrace_struct , decl_parsing , none , <nl> + ERROR ( expected_rbrace_struct , none , <nl> " expected ' } ' in struct " , ( ) ) <nl> <nl> / / Class <nl> - ERROR ( expected_lbrace_class , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_class , PointsToFirstBadToken , <nl> " expected ' { ' in class " , ( ) ) <nl> - ERROR ( expected_rbrace_class , decl_parsing , none , <nl> + ERROR ( expected_rbrace_class , none , <nl> " expected ' } ' in class " , ( ) ) <nl> <nl> / / Protocol <nl> - ERROR ( generic_arguments_protocol , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( generic_arguments_protocol , PointsToFirstBadToken , <nl> " protocols do not allow generic parameters ; use associated types instead " , <nl> ( ) ) <nl> - ERROR ( expected_lbrace_protocol , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_protocol , PointsToFirstBadToken , <nl> " expected ' { ' in protocol type " , ( ) ) <nl> - ERROR ( expected_rbrace_protocol , decl_parsing , none , <nl> + ERROR ( expected_rbrace_protocol , none , <nl> " expected ' } ' in protocol " , ( ) ) <nl> - ERROR ( protocol_setter_name , decl_parsing , none , <nl> + ERROR ( protocol_setter_name , none , <nl> " setter in a protocol cannot have a name " , ( ) ) <nl> - ERROR ( protocol_method_with_body , decl_parsing , none , <nl> + ERROR ( protocol_method_with_body , none , <nl> " protocol methods may not have bodies " , ( ) ) <nl> - ERROR ( protocol_init_with_body , decl_parsing , none , <nl> + ERROR ( protocol_init_with_body , none , <nl> " protocol initializers may not have bodies " , ( ) ) <nl> <nl> / / Subscripting <nl> - ERROR ( subscript_decl_wrong_scope , decl_parsing , none , <nl> + ERROR ( subscript_decl_wrong_scope , none , <nl> " ' subscript ' functions may only be declared within a type " , ( ) ) <nl> - ERROR ( expected_lparen_subscript , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lparen_subscript , PointsToFirstBadToken , <nl> " expected ' ( ' for subscript parameters " , ( ) ) <nl> - ERROR ( expected_arrow_subscript , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_arrow_subscript , PointsToFirstBadToken , <nl> " expected ' - > ' for subscript element type " , ( ) ) <nl> - ERROR ( expected_type_subscript , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_type_subscript , PointsToFirstBadToken , <nl> " expected subscripting element type " , ( ) ) <nl> - ERROR ( expected_lbrace_subscript , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_subscript , PointsToFirstBadToken , <nl> " expected ' { ' in subscript to specify getter and setter implementation " , <nl> ( ) ) <nl> - ERROR ( expected_lbrace_subscript_protocol , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_subscript_protocol , PointsToFirstBadToken , <nl> " subscript in protocol must have explicit { get } or " <nl> " { get set } specifier " , ( ) ) <nl> - ERROR ( subscript_without_get , decl_parsing , none , <nl> + ERROR ( subscript_without_get , none , <nl> " subscript declarations must have a getter " , ( ) ) <nl> - ERROR ( subscript_static , decl_parsing , none , <nl> + ERROR ( subscript_static , none , <nl> " subscript cannot be marked % 0 " , ( StaticSpellingKind ) ) <nl> <nl> / / initializer <nl> - ERROR ( initializer_decl_wrong_scope , decl_parsing , none , <nl> + ERROR ( initializer_decl_wrong_scope , none , <nl> " initializers may only be declared within a type " , ( ) ) <nl> - ERROR ( expected_lparen_initializer , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lparen_initializer , PointsToFirstBadToken , <nl> " expected ' ( ' for initializer parameters " , ( ) ) <nl> <nl> / / Destructor <nl> - ERROR ( destructor_decl_outside_class , decl_parsing , none , <nl> + ERROR ( destructor_decl_outside_class , none , <nl> " deinitializers may only be declared within a class " , ( ) ) <nl> - ERROR ( expected_lbrace_destructor , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_destructor , PointsToFirstBadToken , <nl> " expected ' { ' for deinitializer " , ( ) ) <nl> - ERROR ( opened_destructor_expected_rparen , attribute_parsing , none , <nl> + ERROR ( opened_destructor_expected_rparen , none , <nl> " expected ' ) ' to close parameter list " , ( ) ) <nl> - ERROR ( destructor_params , decl_parsing , none , <nl> + ERROR ( destructor_params , none , <nl> " no parameter clause allowed on deinitializer " , ( ) ) <nl> <nl> / / Operator <nl> - ERROR ( operator_decl_inner_scope , decl_parsing , none , <nl> + ERROR ( operator_decl_inner_scope , none , <nl> " ' operator ' may only be declared at file scope " , ( ) ) <nl> - ERROR ( expected_operator_name_after_operator , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_operator_name_after_operator , PointsToFirstBadToken , <nl> " expected operator name in operator declaration " , ( ) ) <nl> - ERROR ( identifier_when_expecting_operator , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( identifier_when_expecting_operator , PointsToFirstBadToken , <nl> " % 0 is considered to be an identifier , not an operator " , ( Identifier ) ) <nl> <nl> - ERROR ( operator_decl_no_fixity , decl_parsing , none , <nl> + ERROR ( operator_decl_no_fixity , none , <nl> " operator must be declared as ' prefix ' , ' postfix ' , or ' infix ' " , ( ) ) <nl> - ERROR ( expected_lbrace_after_operator , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_after_operator , PointsToFirstBadToken , <nl> " expected ' { ' after operator name in ' operator ' declaration " , ( ) ) <nl> - ERROR ( expected_operator_attribute , decl_parsing , none , <nl> + ERROR ( expected_operator_attribute , none , <nl> " expected operator attribute identifier in ' operator ' declaration body " , ( ) ) <nl> - ERROR ( unknown_prefix_operator_attribute , decl_parsing , none , <nl> + ERROR ( unknown_prefix_operator_attribute , none , <nl> " ' % 0 ' is not a valid prefix operator attribute " , ( StringRef ) ) <nl> - ERROR ( unknown_postfix_operator_attribute , decl_parsing , none , <nl> + ERROR ( unknown_postfix_operator_attribute , none , <nl> " ' % 0 ' is not a valid postfix operator attribute " , ( StringRef ) ) <nl> - ERROR ( unknown_infix_operator_attribute , decl_parsing , none , <nl> + ERROR ( unknown_infix_operator_attribute , none , <nl> " ' % 0 ' is not a valid infix operator attribute " , ( StringRef ) ) <nl> - ERROR ( operator_associativity_redeclared , decl_parsing , none , <nl> + ERROR ( operator_associativity_redeclared , none , <nl> " ' associativity ' for infix operator declared multiple times " , ( ) ) <nl> - ERROR ( expected_infix_operator_associativity , decl_parsing , none , <nl> + ERROR ( expected_infix_operator_associativity , none , <nl> " expected identifier after ' associativity ' in ' operator ' declaration body " , ( ) ) <nl> - ERROR ( unknown_infix_operator_associativity , decl_parsing , none , <nl> + ERROR ( unknown_infix_operator_associativity , none , <nl> " ' % 0 ' is not a valid infix operator associativity ; must be ' none ' , ' left ' , or ' right ' " , ( StringRef ) ) <nl> - ERROR ( operator_precedence_redeclared , decl_parsing , none , <nl> + ERROR ( operator_precedence_redeclared , none , <nl> " ' precedence ' for infix operator declared multiple times " , ( ) ) <nl> - ERROR ( operator_assignment_redeclared , decl_parsing , none , <nl> + ERROR ( operator_assignment_redeclared , none , <nl> " ' assignment ' for infix operator declared multiple times " , ( ) ) <nl> - ERROR ( expected_infix_operator_precedence , decl_parsing , none , <nl> + ERROR ( expected_infix_operator_precedence , none , <nl> " expected integer literal after ' precedence ' in ' operator ' declaration body " , ( ) ) <nl> - ERROR ( invalid_infix_operator_precedence , decl_parsing , none , <nl> + ERROR ( invalid_infix_operator_precedence , none , <nl> " ' precedence ' must be in the range of 0 to 255 " , ( ) ) <nl> <nl> / / SIL <nl> - ERROR ( inout_not_attribute , decl_parsing , none , <nl> + ERROR ( inout_not_attribute , none , <nl> " @ inout is no longer an attribute " , ( ) ) <nl> - ERROR ( only_allowed_in_sil , decl_parsing , none , <nl> + ERROR ( only_allowed_in_sil , none , <nl> " ' % 0 ' only allowed in SIL modules " , ( StringRef ) ) <nl> - ERROR ( expected_sil_type , decl_parsing , none , <nl> + ERROR ( expected_sil_type , none , <nl> " expected type in SIL code " , ( ) ) <nl> - ERROR ( expected_sil_colon_value_ref , decl_parsing , none , <nl> + ERROR ( expected_sil_colon_value_ref , none , <nl> " expected ' : ' before type in SIL value reference " , ( ) ) <nl> - ERROR ( expected_sil_value_name , decl_parsing , none , <nl> + ERROR ( expected_sil_value_name , none , <nl> " expected SIL value name " , ( ) ) <nl> - ERROR ( expected_sil_value_name_result_number , decl_parsing , none , <nl> + ERROR ( expected_sil_value_name_result_number , none , <nl> " expected result number in SIL value name " , ( ) ) <nl> - ERROR ( invalid_sil_value_name_result_number , decl_parsing , none , <nl> + ERROR ( invalid_sil_value_name_result_number , none , <nl> " invalid result number in SIL value " , ( ) ) <nl> - ERROR ( expected_sil_type_kind , decl_parsing , none , <nl> + ERROR ( expected_sil_type_kind , none , <nl> " expected SIL type to % 0 " , ( StringRef ) ) <nl> - ERROR ( expected_sil_constant , decl_parsing , none , <nl> + ERROR ( expected_sil_constant , none , <nl> " expected constant in SIL code " , ( ) ) <nl> - ERROR ( referenced_value_no_accessor , decl_parsing , none , <nl> + ERROR ( referenced_value_no_accessor , none , <nl> " referenced declaration has no % select { getter | setter } 0 " , ( unsigned ) ) <nl> <nl> / / SIL Values <nl> - ERROR ( sil_value_redefinition , decl_parsing , none , <nl> + ERROR ( sil_value_redefinition , none , <nl> " redefinition of value ' % 0 ' " , ( StringRef ) ) <nl> - ERROR ( sil_value_use_type_mismatch , decl_parsing , none , <nl> + ERROR ( sil_value_use_type_mismatch , none , <nl> " value ' % 0 ' defined with mismatching type % 1 ( expected % 2 ) " , ( StringRef , Type , Type ) ) <nl> - ERROR ( sil_value_def_type_mismatch , decl_parsing , none , <nl> + ERROR ( sil_value_def_type_mismatch , none , <nl> " value ' % 0 ' used with mismatching type % 1 ( expected % 2 ) " , ( StringRef , Type , Type ) ) <nl> - ERROR ( sil_use_of_undefined_value , decl_parsing , none , <nl> + ERROR ( sil_use_of_undefined_value , none , <nl> " use of undefined value ' % 0 ' " , ( StringRef ) ) <nl> - NOTE ( sil_prior_reference , parsing , none , <nl> + NOTE ( sil_prior_reference , none , <nl> " prior reference was here " , ( ) ) <nl> <nl> <nl> / / SIL Instructions <nl> - ERROR ( expected_sil_instr_start_of_line , decl_parsing , none , <nl> + ERROR ( expected_sil_instr_start_of_line , none , <nl> " SIL instructions must be at the start of a line " , ( ) ) <nl> - ERROR ( expected_equal_in_sil_instr , decl_parsing , none , <nl> + ERROR ( expected_equal_in_sil_instr , none , <nl> " expected ' = ' in SIL instruction " , ( ) ) <nl> - ERROR ( expected_sil_instr_opcode , decl_parsing , none , <nl> + ERROR ( expected_sil_instr_opcode , none , <nl> " expected SIL instruction opcode " , ( ) ) <nl> - ERROR ( expected_tok_in_sil_instr , decl_parsing , none , <nl> + ERROR ( expected_tok_in_sil_instr , none , <nl> " expected ' % 0 ' in SIL instruction " , ( StringRef ) ) <nl> - ERROR ( sil_string_no_encoding , decl_parsing , none , <nl> + ERROR ( sil_string_no_encoding , none , <nl> " string_literal instruction requires an encoding " , ( ) ) <nl> - ERROR ( sil_string_invalid_encoding , decl_parsing , none , <nl> + ERROR ( sil_string_invalid_encoding , none , <nl> " unknown string literal encoding ' % 0 ' " , ( StringRef ) ) <nl> - ERROR ( expected_tuple_type_in_tuple , decl_parsing , none , <nl> + ERROR ( expected_tuple_type_in_tuple , none , <nl> " tuple instruction requires a tuple type " , ( ) ) <nl> - ERROR ( sil_tuple_inst_wrong_value_count , decl_parsing , none , <nl> + ERROR ( sil_tuple_inst_wrong_value_count , none , <nl> " tuple instruction requires % 0 values " , ( unsigned ) ) <nl> - ERROR ( sil_tuple_inst_wrong_field , decl_parsing , none , <nl> + ERROR ( sil_tuple_inst_wrong_field , none , <nl> " tuple instruction requires a field number " , ( ) ) <nl> - ERROR ( sil_struct_inst_wrong_field , decl_parsing , none , <nl> + ERROR ( sil_struct_inst_wrong_field , none , <nl> " struct instruction requires a field name " , ( ) ) <nl> - ERROR ( sil_ref_inst_wrong_field , decl_parsing , none , <nl> + ERROR ( sil_ref_inst_wrong_field , none , <nl> " ref_element_addr instruction requires a field name " , ( ) ) <nl> - ERROR ( sil_invalid_instr_operands , decl_parsing , none , <nl> + ERROR ( sil_invalid_instr_operands , none , <nl> " invalid instruction operands " , ( ) ) <nl> - ERROR ( sil_operand_not_address , decl_parsing , none , <nl> + ERROR ( sil_operand_not_address , none , <nl> " % 0 operand of ' % 1 ' must have address type " , ( StringRef , StringRef ) ) <nl> - ERROR ( sil_operand_not_unowned_address , decl_parsing , none , <nl> + ERROR ( sil_operand_not_unowned_address , none , <nl> " % 0 operand of ' % 1 ' must have address of [ unowned ] type " , <nl> ( StringRef , StringRef ) ) <nl> - ERROR ( sil_operand_not_weak_address , decl_parsing , none , <nl> + ERROR ( sil_operand_not_weak_address , none , <nl> " % 0 operand of ' % 1 ' must have address of [ weak ] type " , <nl> ( StringRef , StringRef ) ) <nl> - ERROR ( sil_integer_literal_not_integer_type , decl_parsing , none , <nl> + ERROR ( sil_integer_literal_not_integer_type , none , <nl> " integer_literal instruction requires a ' Builtin . Int < n > ' type " , ( ) ) <nl> - ERROR ( sil_float_literal_not_float_type , decl_parsing , none , <nl> + ERROR ( sil_float_literal_not_float_type , none , <nl> " float_literal instruction requires a ' Builtin . FP < n > ' type " , ( ) ) <nl> - ERROR ( sil_substitutions_on_non_polymorphic_type , decl_parsing , none , <nl> + ERROR ( sil_substitutions_on_non_polymorphic_type , none , <nl> " apply of non - polymorphic function cannot have substitutions " , ( ) ) <nl> - ERROR ( sil_witness_method_not_protocol , decl_parsing , none , <nl> + ERROR ( sil_witness_method_not_protocol , none , <nl> " witness_method is not a protocol method " , ( ) ) <nl> - ERROR ( sil_witness_method_type_does_not_conform , decl_parsing , none , <nl> + ERROR ( sil_witness_method_type_does_not_conform , none , <nl> " witness_method type does not conform to protocol " , ( ) ) <nl> - ERROR ( sil_member_decl_not_found , decl_parsing , none , <nl> + ERROR ( sil_member_decl_not_found , none , <nl> " member not found in method instructions " , ( ) ) <nl> - ERROR ( sil_member_decl_type_mismatch , decl_parsing , none , <nl> + ERROR ( sil_member_decl_type_mismatch , none , <nl> " member defined with mismatching type % 0 ( expected % 1 ) " , ( Type , Type ) ) <nl> - ERROR ( sil_substitution_mismatch , decl_parsing , none , <nl> + ERROR ( sil_substitution_mismatch , none , <nl> " substitution conformances dont match archetype " , ( ) ) <nl> - ERROR ( sil_missing_substitutions , decl_parsing , none , <nl> + ERROR ( sil_missing_substitutions , none , <nl> " missing substitutions " , ( ) ) <nl> - ERROR ( sil_too_many_substitutions , decl_parsing , none , <nl> + ERROR ( sil_too_many_substitutions , none , <nl> " too many substitutions " , ( ) ) <nl> - ERROR ( sil_dbg_unknown_key , decl_parsing , none , <nl> + ERROR ( sil_dbg_unknown_key , none , <nl> " unknown key ' % 0 ' in debug variable declaration " , ( StringRef ) ) <nl> <nl> / / SIL Basic Blocks <nl> - ERROR ( expected_sil_block_name , decl_parsing , none , <nl> + ERROR ( expected_sil_block_name , none , <nl> " expected basic block name or ' } ' " , ( ) ) <nl> - ERROR ( expected_sil_block_colon , decl_parsing , none , <nl> + ERROR ( expected_sil_block_colon , none , <nl> " expected ' : ' after basic block name " , ( ) ) <nl> - ERROR ( sil_undefined_basicblock_use , decl_parsing , none , <nl> + ERROR ( sil_undefined_basicblock_use , none , <nl> " use of undefined basic block % 0 " , ( Identifier ) ) <nl> - ERROR ( sil_basicblock_redefinition , decl_parsing , none , <nl> + ERROR ( sil_basicblock_redefinition , none , <nl> " redefinition of basic block % 0 " , ( Identifier ) ) <nl> - ERROR ( sil_basicblock_arg_rparen , decl_parsing , none , <nl> + ERROR ( sil_basicblock_arg_rparen , none , <nl> " expected ' ) ' in basic block argument list " , ( ) ) <nl> <nl> / / SIL Functions <nl> - ERROR ( expected_sil_function_name , decl_parsing , none , <nl> + ERROR ( expected_sil_function_name , none , <nl> " expected SIL function name " , ( ) ) <nl> - ERROR ( expected_sil_rbrace , decl_parsing , none , <nl> + ERROR ( expected_sil_rbrace , none , <nl> " expected ' } ' at the end of a sil body " , ( ) ) <nl> - ERROR ( expected_sil_function_type , decl_parsing , none , <nl> + ERROR ( expected_sil_function_type , none , <nl> " sil function expected to have SIL function type " , ( ) ) <nl> <nl> / / SIL Stage <nl> - ERROR ( expected_sil_stage_name , decl_parsing , none , <nl> + ERROR ( expected_sil_stage_name , none , <nl> " expected ' raw ' or ' canonical ' after ' sil_stage ' " , ( ) ) <nl> - ERROR ( multiple_sil_stage_decls , decl_parsing , none , <nl> + ERROR ( multiple_sil_stage_decls , none , <nl> " sil_stage declared multiple times " , ( ) ) <nl> <nl> / / SIL VTable <nl> - ERROR ( expected_sil_vtable_colon , decl_parsing , none , <nl> + ERROR ( expected_sil_vtable_colon , none , <nl> " expected ' : ' in a vtable entry " , ( ) ) <nl> - ERROR ( sil_vtable_func_not_found , decl_parsing , none , <nl> + ERROR ( sil_vtable_func_not_found , none , <nl> " sil function not found % 0 " , ( Identifier ) ) <nl> - ERROR ( sil_vtable_class_not_found , decl_parsing , none , <nl> + ERROR ( sil_vtable_class_not_found , none , <nl> " sil class not found % 0 " , ( Identifier ) ) <nl> <nl> / / SIL Global <nl> - ERROR ( sil_global_variable_not_found , decl_parsing , none , <nl> + ERROR ( sil_global_variable_not_found , none , <nl> " sil global not found % 0 " , ( Identifier ) ) <nl> <nl> / / SIL Witness Table <nl> - ERROR ( expected_sil_witness_colon , decl_parsing , none , <nl> + ERROR ( expected_sil_witness_colon , none , <nl> " expected ' : ' in a witness table " , ( ) ) <nl> - ERROR ( expected_sil_witness_lparen , decl_parsing , none , <nl> + ERROR ( expected_sil_witness_lparen , none , <nl> " expected ' ( ' in a witness table " , ( ) ) <nl> - ERROR ( expected_sil_witness_rparen , decl_parsing , none , <nl> + ERROR ( expected_sil_witness_rparen , none , <nl> " expected ' ) ' in a witness table " , ( ) ) <nl> - ERROR ( sil_witness_func_not_found , decl_parsing , none , <nl> + ERROR ( sil_witness_func_not_found , none , <nl> " sil function not found % 0 " , ( Identifier ) ) <nl> - ERROR ( sil_witness_protocol_not_found , decl_parsing , none , <nl> + ERROR ( sil_witness_protocol_not_found , none , <nl> " sil protocol not found % 0 " , ( Identifier ) ) <nl> - ERROR ( sil_witness_assoc_not_found , decl_parsing , none , <nl> + ERROR ( sil_witness_assoc_not_found , none , <nl> " sil associated type decl not found % 0 " , ( Identifier ) ) <nl> - ERROR ( sil_witness_protocol_conformance_not_found , decl_parsing , none , <nl> + ERROR ( sil_witness_protocol_conformance_not_found , none , <nl> " sil protocol conformance not found " , ( ) ) <nl> <nl> / / SIL Coverage Map <nl> - ERROR ( sil_coverage_func_not_found , decl_parsing , none , <nl> + ERROR ( sil_coverage_func_not_found , none , <nl> " sil function not found % 0 " , ( Identifier ) ) <nl> - ERROR ( sil_coverage_invalid_hash , decl_parsing , none , <nl> + ERROR ( sil_coverage_invalid_hash , none , <nl> " expected coverage hash " , ( ) ) <nl> - ERROR ( sil_coverage_expected_lbrace , decl_parsing , none , <nl> + ERROR ( sil_coverage_expected_lbrace , none , <nl> " expected ' { ' in coverage map " , ( ) ) <nl> - ERROR ( sil_coverage_expected_loc , decl_parsing , none , <nl> + ERROR ( sil_coverage_expected_loc , none , <nl> " expected line : column pair " , ( ) ) <nl> - ERROR ( sil_coverage_expected_arrow , decl_parsing , none , <nl> + ERROR ( sil_coverage_expected_arrow , none , <nl> " expected ' - > ' after start location " , ( ) ) <nl> - ERROR ( sil_coverage_expected_colon , decl_parsing , none , <nl> + ERROR ( sil_coverage_expected_colon , none , <nl> " expected ' : ' after source range " , ( ) ) <nl> - ERROR ( sil_coverage_invalid_counter , decl_parsing , none , <nl> + ERROR ( sil_coverage_invalid_counter , none , <nl> " expected counter expression , id , or ' zero ' " , ( ) ) <nl> - ERROR ( sil_coverage_expected_rparen , decl_parsing , none , <nl> + ERROR ( sil_coverage_expected_rparen , none , <nl> " expected ' ) ' to end counter expression " , ( ) ) <nl> - ERROR ( sil_coverage_invalid_operator , decl_parsing , none , <nl> + ERROR ( sil_coverage_invalid_operator , none , <nl> " expected ' + ' or ' - ' " , ( ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Type parsing diagnostics <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - ERROR ( expected_type , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_type , PointsToFirstBadToken , <nl> " expected type " , ( ) ) <nl> - ERROR ( expected_init_value , expr_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_init_value , PointsToFirstBadToken , <nl> " expected initial value after ' = ' " , ( ) ) <nl> <nl> / / Named types <nl> - ERROR ( expected_identifier_in_dotted_type , expr_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_identifier_in_dotted_type , PointsToFirstBadToken , <nl> " expected identifier in dotted type " , ( ) ) <nl> - ERROR ( expected_identifier_for_type , expr_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_identifier_for_type , PointsToFirstBadToken , <nl> " expected identifier for type name " , ( ) ) <nl> - ERROR ( expected_rangle_generic_arg_list , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_rangle_generic_arg_list , PointsToFirstBadToken , <nl> " expected ' > ' to complete generic argument list " , ( ) ) <nl> <nl> <nl> / / Function types <nl> - ERROR ( expected_type_function_result , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_type_function_result , PointsToFirstBadToken , <nl> " expected type for function result " , ( ) ) <nl> - ERROR ( generic_non_function , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( generic_non_function , PointsToFirstBadToken , <nl> " only syntactic function types can be generic " , ( ) ) <nl> - ERROR ( rethrowing_function_type , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( rethrowing_function_type , PointsToFirstBadToken , <nl> " only function declarations may be marked ' rethrows ' " , ( ) ) <nl> - ERROR ( throws_after_function_result , type_parsing , none , <nl> + ERROR ( throws_after_function_result , none , <nl> " ' throws ' may only occur before ' - > ' " , ( ) ) <nl> - ERROR ( rethrows_after_function_result , type_parsing , none , <nl> + ERROR ( rethrows_after_function_result , none , <nl> " ' rethrows ' may only occur before ' - > ' " , ( ) ) <nl> - ERROR ( throw_in_function_type , type_parsing , none , <nl> + ERROR ( throw_in_function_type , none , <nl> " expected throwing specifier ; did you mean ' throws ' ? " , ( ) ) <nl> <nl> / / Enum Types <nl> - ERROR ( expected_expr_enum_case_raw_value , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_expr_enum_case_raw_value , PointsToFirstBadToken , <nl> " expected expression after ' = ' in ' case ' " , ( ) ) <nl> - ERROR ( nonliteral_enum_case_raw_value , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( nonliteral_enum_case_raw_value , PointsToFirstBadToken , <nl> " raw value for enum case must be a literal " , ( ) ) <nl> <nl> / / Collection Types <nl> - ERROR ( new_array_syntax , type_parsing , none , <nl> + ERROR ( new_array_syntax , none , <nl> " array types are now written with the brackets around the element type " , <nl> ( ) ) <nl> - ERROR ( expected_rbracket_array_type , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_rbracket_array_type , PointsToFirstBadToken , <nl> " expected ' ] ' in array type " , ( ) ) <nl> - ERROR ( expected_element_type , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_element_type , PointsToFirstBadToken , <nl> " expected element type " , ( ) ) <nl> - ERROR ( expected_dictionary_value_type , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_dictionary_value_type , PointsToFirstBadToken , <nl> " expected dictionary value type " , ( ) ) <nl> - ERROR ( expected_rbracket_dictionary_type , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_rbracket_dictionary_type , PointsToFirstBadToken , <nl> " expected ' ] ' in dictionary type " , ( ) ) <nl> <nl> / / Tuple Types <nl> - ERROR ( expected_rparen_tuple_type_list , type_parsing , none , <nl> + ERROR ( expected_rparen_tuple_type_list , none , <nl> " expected ' ) ' at end of tuple list " , ( ) ) <nl> - ERROR ( multiple_ellipsis_in_tuple , type_parsing , none , <nl> + ERROR ( multiple_ellipsis_in_tuple , none , <nl> " only a single element can be variadic " , ( ) ) <nl> - ERROR ( tuple_type_init , pattern_parsing , none , <nl> + ERROR ( tuple_type_init , none , <nl> " default argument not permitted in a tuple type " , ( ) ) <nl> - ERROR ( protocol_method_argument_init , type_parsing , none , <nl> + ERROR ( protocol_method_argument_init , none , <nl> " default argument not permitted in a protocol method " , ( ) ) <nl> - ERROR ( protocol_init_argument_init , type_parsing , none , <nl> + ERROR ( protocol_init_argument_init , none , <nl> " default argument not permitted in a protocol initializer " , ( ) ) <nl> <nl> / / Protocol Types <nl> - ERROR ( expected_langle_protocol , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_langle_protocol , PointsToFirstBadToken , <nl> " expected ' < ' in protocol composition type " , ( ) ) <nl> - ERROR ( expected_rangle_protocol , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_rangle_protocol , PointsToFirstBadToken , <nl> " expected ' > ' to complete protocol composition type " , ( ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Pattern parsing diagnostics <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - ERROR ( expected_pattern , pattern_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_pattern , PointsToFirstBadToken , <nl> " expected pattern " , ( ) ) <nl> - ERROR ( expected_pattern_is_keyword , pattern_parsing , none , <nl> + ERROR ( expected_pattern_is_keyword , none , <nl> " keyword ' % 0 ' cannot be used as an identifier " , ( StringRef ) ) <nl> - ERROR ( expected_rparen_tuple_pattern_list , pattern_parsing , none , <nl> + ERROR ( expected_rparen_tuple_pattern_list , none , <nl> " expected ' ) ' at end of tuple pattern " , ( ) ) <nl> - ERROR ( untyped_pattern_ellipsis , pattern_parsing , none , <nl> + ERROR ( untyped_pattern_ellipsis , none , <nl> " ' . . . ' cannot be applied to a subpattern which is not explicitly typed " , ( ) ) <nl> - ERROR ( non_func_decl_pattern_init , pattern_parsing , none , <nl> + ERROR ( non_func_decl_pattern_init , none , <nl> " default argument is only permitted for a non - curried function parameter " , ( ) ) <nl> - ERROR ( var_not_allowed_in_pattern , pattern_parsing , none , <nl> + ERROR ( var_not_allowed_in_pattern , none , <nl> " Use of ' var ' binding here is not allowed " , ( ) ) <nl> - WARNING ( let_on_param_is_redundant , pattern_parsing , none , <nl> + WARNING ( let_on_param_is_redundant , none , <nl> " ' let ' keyword is unnecessary ; function parameters are immutable by default " , ( unsigned ) ) <nl> - ERROR ( var_pattern_in_var , pattern_parsing , none , <nl> + ERROR ( var_pattern_in_var , none , <nl> " ' % select { var | let } 0 ' cannot appear nested inside another ' var ' or " <nl> " ' let ' pattern " , ( unsigned ) ) <nl> - ERROR ( let_pattern_in_immutable_context , pattern_parsing , none , <nl> + ERROR ( let_pattern_in_immutable_context , none , <nl> " ' let ' pattern is already in an immutable context " , ( ) ) <nl> - ERROR ( inout_must_have_type , pattern_parsing , none , <nl> + ERROR ( inout_must_have_type , none , <nl> " ' inout ' arguments must have a type specified " , ( ) ) <nl> - ERROR ( inout_must_appear_before_param , pattern_parsing , none , <nl> + ERROR ( inout_must_appear_before_param , none , <nl> " ' inout ' must appear before the parameter name " , ( ) ) <nl> - ERROR ( expected_rparen_parameter , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_rparen_parameter , PointsToFirstBadToken , <nl> " expected ' ) ' in parameter " , ( ) ) <nl> - ERROR ( expected_parameter_type , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_parameter_type , PointsToFirstBadToken , <nl> " expected parameter type following ' : ' " , ( ) ) <nl> - ERROR ( multiple_parameter_ellipsis , decl_parsing , none , <nl> + ERROR ( multiple_parameter_ellipsis , none , <nl> " only a single variadic parameter ' . . . ' is permitted " , ( ) ) <nl> - ERROR ( parameter_vararg_default , decl_parsing , none , <nl> + ERROR ( parameter_vararg_default , none , <nl> " variadic parameter cannot have a default value " , ( ) ) <nl> - ERROR ( parameter_inout_var_let , decl_parsing , none , <nl> + ERROR ( parameter_inout_var_let , none , <nl> " parameter may not have multiple ' inout ' , ' var ' , or ' let ' specifiers " , <nl> ( ) ) <nl> <nl> - WARNING ( parameter_extraneous_double_up , decl_parsing , none , <nl> + WARNING ( parameter_extraneous_double_up , none , <nl> " extraneous duplicate parameter name ; % 0 already has an argument " <nl> " label " , ( Identifier ) ) <nl> - WARNING ( parameter_extraneous_empty_name , decl_parsing , none , <nl> + WARNING ( parameter_extraneous_empty_name , none , <nl> " extraneous ' _ ' in parameter : % 0 has no keyword argument name " , <nl> ( Identifier ) ) <nl> - ERROR ( parameter_operator_keyword_argument , decl_parsing , none , <nl> + ERROR ( parameter_operator_keyword_argument , none , <nl> " % select { operator | closure } 0 cannot have keyword arguments " , ( bool ) ) <nl> <nl> - ERROR ( parameter_unnamed , decl_parsing , none , <nl> + ERROR ( parameter_unnamed , none , <nl> " unnamed parameters must be written with the empty name ' _ ' " , ( ) ) <nl> <nl> - WARNING ( parameter_curry_syntax_removed , decl_parsing , none , <nl> + WARNING ( parameter_curry_syntax_removed , none , <nl> " curried function declaration syntax will be removed in a future version of Swift ; use a single parameter list " , ( ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Statement parsing diagnostics <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> - ERROR ( expected_stmt , stmt_parsing , none , <nl> + ERROR ( expected_stmt , none , <nl> " expected statement " , ( ) ) <nl> - ERROR ( illegal_top_level_stmt , stmt_parsing , none , <nl> + ERROR ( illegal_top_level_stmt , none , <nl> " statements are not allowed at the top level " , ( ) ) <nl> - ERROR ( illegal_top_level_expr , stmt_parsing , none , <nl> + ERROR ( illegal_top_level_expr , none , <nl> " expressions are not allowed at the top level " , ( ) ) <nl> - ERROR ( illegal_semi_stmt , stmt_parsing , none , <nl> + ERROR ( illegal_semi_stmt , none , <nl> " ' ; ' statements are not allowed " , ( ) ) <nl> - ERROR ( statement_begins_with_closure , stmt_parsing , none , <nl> + ERROR ( statement_begins_with_closure , none , <nl> " statement cannot begin with a closure expression " , ( ) ) <nl> - ERROR ( statement_same_line_without_semi , stmt_parsing , none , <nl> + ERROR ( statement_same_line_without_semi , none , <nl> " consecutive statements on a line must be separated by ' ; ' " , ( ) ) <nl> - ERROR ( brace_stmt_invalid , stmt_parsing , none , <nl> + ERROR ( brace_stmt_invalid , none , <nl> " braced block of statements is an unused closure " , ( ) ) <nl> - ERROR ( invalid_label_on_stmt , stmt_parsing , none , <nl> + ERROR ( invalid_label_on_stmt , none , <nl> " labels are only valid on loops , if , and switch statements " , ( ) ) <nl> <nl> - NOTE ( discard_result_of_closure , stmt_parsing , none , <nl> + NOTE ( discard_result_of_closure , none , <nl> " explicitly discard the result of the closure by assigning to ' _ ' " , ( ) ) <nl> <nl> / / Assignment statement <nl> - ERROR ( expected_expr_assignment , stmt_parsing , none , <nl> + ERROR ( expected_expr_assignment , none , <nl> " expected expression in assignment " , ( ) ) <nl> <nl> / / Brace Statement <nl> - ERROR ( expected_rbrace_in_brace_stmt , stmt_parsing , none , <nl> + ERROR ( expected_rbrace_in_brace_stmt , none , <nl> " expected ' } ' at end of brace statement " , ( ) ) <nl> <nl> / / / # if Statement <nl> - ERROR ( expected_close_to_config_stmt , stmt_parsing , none , <nl> + ERROR ( expected_close_to_config_stmt , none , <nl> " expected # else or # endif at end of configuration block " , ( ) ) <nl> - ERROR ( expected_close_after_else , stmt_parsing , none , <nl> + ERROR ( expected_close_after_else , none , <nl> " further conditions after # else are unreachable " , ( ) ) <nl> <nl> / / / Associatedtype Statement <nl> - WARNING ( typealias_inside_protocol , stmt_parsing , none , <nl> + WARNING ( typealias_inside_protocol , none , <nl> " use of ' typealias ' to declare associated types is deprecated ; use ' associatedtype ' instead " , ( ) ) <nl> - ERROR ( associatedtype_outside_protocol , stmt_parsing , none , <nl> + ERROR ( associatedtype_outside_protocol , none , <nl> " associated types can only be defined in a protocol ; define a type or introduce a ' typealias ' to satisfy an associated type requirement " , ( ) ) <nl> <nl> / / Return Statement <nl> - ERROR ( expected_expr_return , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_expr_return , PointsToFirstBadToken , <nl> " expected expression in ' return ' statement " , ( ) ) <nl> - WARNING ( unindented_code_after_return , stmt_parsing , none , <nl> + WARNING ( unindented_code_after_return , none , <nl> " expression following ' return ' is treated as an argument of " <nl> " the ' return ' " , ( ) ) <nl> - NOTE ( indent_expression_to_silence , stmt_parsing , none , <nl> + NOTE ( indent_expression_to_silence , none , <nl> " indent the expression to silence this warning " , ( ) ) <nl> <nl> / / Throw Statement <nl> - ERROR ( expected_expr_throw , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_expr_throw , PointsToFirstBadToken , <nl> " expected expression in ' throw ' statement " , ( ) ) <nl> <nl> / / Defer Statement <nl> - ERROR ( expected_lbrace_after_defer , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_after_defer , PointsToFirstBadToken , <nl> " expected ' { ' after ' defer ' " , ( ) ) <nl> <nl> / / If / While / Guard Conditions <nl> - ERROR ( expected_expr_conditional_letbinding , stmt_parsing , none , <nl> + ERROR ( expected_expr_conditional_letbinding , none , <nl> " expected ' let ' or ' var ' in conditional " , ( ) ) <nl> - ERROR ( expected_expr_conditional_letbinding_bool_conditions , stmt_parsing , none , <nl> + ERROR ( expected_expr_conditional_letbinding_bool_conditions , none , <nl> " expected ' let ' or ' var ' in conditional ; " <nl> " use ' & & ' to join boolean conditions " , ( ) ) <nl> - ERROR ( expected_expr_conditional_var , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_expr_conditional_var , PointsToFirstBadToken , <nl> " expected expression after ' = ' in conditional binding " , ( ) ) <nl> - ERROR ( expected_expr_conditional_where , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_expr_conditional_where , PointsToFirstBadToken , <nl> " expected expression in conditional binding ' where ' clause " , ( ) ) <nl> - ERROR ( conditional_var_initializer_required , stmt_parsing , none , <nl> + ERROR ( conditional_var_initializer_required , none , <nl> " variable binding in a condition requires an initializer " , ( ) ) <nl> - ERROR ( wrong_condition_case_location , stmt_parsing , none , <nl> + ERROR ( wrong_condition_case_location , none , <nl> " pattern matching binding is spelled with ' case % 0 ' , not ' % 0 case ' " , <nl> ( StringRef ) ) <nl> - ERROR ( where_end_of_binding_use_letvar , stmt_parsing , none , <nl> + ERROR ( where_end_of_binding_use_letvar , none , <nl> " binding ended by previous ' where ' clause ; " <nl> " use ' % 0 ' to introduce a new one " , ( StringRef ) ) <nl> - ERROR ( comma_should_be_where , stmt_parsing , none , <nl> + ERROR ( comma_should_be_where , none , <nl> " boolean condition requires ' where ' to separate it from variable binding " , <nl> ( ) ) <nl> <nl> / / If Statement <nl> - ERROR ( expected_condition_if , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_condition_if , PointsToFirstBadToken , <nl> " expected expression , var , or let in ' if ' condition " , ( ) ) <nl> - ERROR ( missing_condition_after_if , stmt_parsing , none , <nl> + ERROR ( missing_condition_after_if , none , <nl> " missing condition in an ' if ' statement " , ( ) ) <nl> - ERROR ( expected_lbrace_after_if , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_after_if , PointsToFirstBadToken , <nl> " expected ' { ' after ' if ' condition " , ( ) ) <nl> - ERROR ( expected_lbrace_after_else , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_after_else , PointsToFirstBadToken , <nl> " expected ' { ' after ' else ' " , ( ) ) <nl> <nl> / / Guard Statement <nl> - ERROR ( expected_condition_guard , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_condition_guard , PointsToFirstBadToken , <nl> " expected expression , var , let or case in ' guard ' condition " , ( ) ) <nl> - ERROR ( missing_condition_after_guard , stmt_parsing , none , <nl> + ERROR ( missing_condition_after_guard , none , <nl> " missing condition in an ' guard ' statement " , ( ) ) <nl> - ERROR ( expected_else_after_guard , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_else_after_guard , PointsToFirstBadToken , <nl> " expected ' else ' after ' guard ' condition " , ( ) ) <nl> - ERROR ( expected_lbrace_after_guard , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_after_guard , PointsToFirstBadToken , <nl> " expected ' { ' after ' guard ' else " , ( ) ) <nl> - ERROR ( bound_var_guard_body , expr_parsing , none , <nl> + ERROR ( bound_var_guard_body , none , <nl> " variable declared in ' guard ' condition is not usable in its body " , ( ) ) <nl> <nl> / / While Statement <nl> - ERROR ( expected_condition_while , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_condition_while , PointsToFirstBadToken , <nl> " expected expression , var , or let in ' while ' condition " , ( ) ) <nl> - ERROR ( missing_condition_after_while , stmt_parsing , none , <nl> + ERROR ( missing_condition_after_while , none , <nl> " missing condition in a ' while ' statement " , ( ) ) <nl> - ERROR ( expected_lbrace_after_while , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_after_while , PointsToFirstBadToken , <nl> " expected ' { ' after ' while ' condition " , ( ) ) <nl> <nl> / / Repeat / While Statement <nl> - ERROR ( expected_lbrace_after_repeat , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_after_repeat , PointsToFirstBadToken , <nl> " expected ' { ' after ' repeat ' " , ( ) ) <nl> - ERROR ( expected_while_after_repeat_body , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_while_after_repeat_body , PointsToFirstBadToken , <nl> " expected ' while ' after body of ' repeat ' statement " , ( ) ) <nl> - ERROR ( expected_expr_repeat_while , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_expr_repeat_while , PointsToFirstBadToken , <nl> " expected expression in ' repeat - while ' condition " , ( ) ) <nl> <nl> - ERROR ( do_while_now_repeat_while , stmt_parsing , none , <nl> + ERROR ( do_while_now_repeat_while , none , <nl> " ' do - while ' statement is not allowed ; use ' repeat - while ' instead " , ( ) ) <nl> <nl> / / Do / Catch Statement <nl> - ERROR ( expected_lbrace_after_do , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_after_do , PointsToFirstBadToken , <nl> " expected ' { ' after ' do ' " , ( ) ) <nl> - ERROR ( expected_lbrace_after_catch , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_after_catch , PointsToFirstBadToken , <nl> " expected ' { ' after ' catch ' pattern " , ( ) ) <nl> - ERROR ( expected_catch_where_expr , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_catch_where_expr , PointsToFirstBadToken , <nl> " expected expression for ' where ' guard of ' catch ' " , ( ) ) <nl> <nl> / / C - Style For Stmt <nl> - ERROR ( expected_init_for_stmt , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_init_for_stmt , PointsToFirstBadToken , <nl> " expected initialization in a ' for ' statement " , ( ) ) <nl> - ERROR ( missing_init_for_stmt , stmt_parsing , none , <nl> + ERROR ( missing_init_for_stmt , none , <nl> " missing initialization in a ' for ' statement " , ( ) ) <nl> - ERROR ( expected_semi_for_stmt , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_semi_for_stmt , PointsToFirstBadToken , <nl> " expected ' ; ' in ' for ' statement " , ( ) ) <nl> - ERROR ( expected_cond_for_stmt , stmt_parsing , none , <nl> + ERROR ( expected_cond_for_stmt , none , <nl> " expected condition in ' for ' statement " , ( ) ) <nl> - ERROR ( expected_rparen_for_stmt , stmt_parsing , none , <nl> + ERROR ( expected_rparen_for_stmt , none , <nl> " expected ' ) ' in ' for ' statement " , ( ) ) <nl> - ERROR ( expected_lbrace_after_for , stmt_parsing , none , <nl> + ERROR ( expected_lbrace_after_for , none , <nl> " expected ' { ' in ' for ' statement " , ( ) ) <nl> - ERROR ( expected_var_decl_for_stmt , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_var_decl_for_stmt , PointsToFirstBadToken , <nl> " expected var declaration in a ' for ' statement " , ( ) ) <nl> <nl> / / For - each Stmt <nl> - ERROR ( expected_foreach_in , stmt_parsing , none , <nl> + ERROR ( expected_foreach_in , none , <nl> " expected ' in ' after for - each pattern " , ( ) ) <nl> - ERROR ( expected_foreach_container , stmt_parsing , none , <nl> + ERROR ( expected_foreach_container , none , <nl> " expected SequenceType expression for for - each loop " , ( ) ) <nl> - ERROR ( expected_foreach_lbrace , stmt_parsing , none , <nl> + ERROR ( expected_foreach_lbrace , none , <nl> " expected ' { ' to start the body of for - each loop " , ( ) ) <nl> - ERROR ( expected_foreach_where_expr , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_foreach_where_expr , PointsToFirstBadToken , <nl> " expected expression in ' where ' guard of ' for / in ' " , ( ) ) <nl> <nl> / / Switch Stmt <nl> - ERROR ( expected_switch_expr , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_switch_expr , PointsToFirstBadToken , <nl> " expected expression in ' switch ' statement " , ( ) ) <nl> - ERROR ( expected_lbrace_after_switch , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_lbrace_after_switch , PointsToFirstBadToken , <nl> " expected ' { ' after ' switch ' subject expression " , ( ) ) <nl> - ERROR ( expected_rbrace_switch , stmt_parsing , none , <nl> + ERROR ( expected_rbrace_switch , none , <nl> " expected ' } ' at end of ' switch ' statement " , ( ) ) <nl> - ERROR ( case_outside_of_switch , stmt_parsing , none , <nl> + ERROR ( case_outside_of_switch , none , <nl> " ' % 0 ' label can only appear inside a ' switch ' statement " , ( StringRef ) ) <nl> - ERROR ( stmt_in_switch_not_covered_by_case , stmt_parsing , none , <nl> + ERROR ( stmt_in_switch_not_covered_by_case , none , <nl> " all statements inside a switch must be covered by a ' case ' or ' default ' " , <nl> ( ) ) <nl> - ERROR ( case_after_default , stmt_parsing , none , <nl> + ERROR ( case_after_default , none , <nl> " additional ' case ' blocks cannot appear after the ' default ' block of a ' switch ' " , <nl> ( ) ) <nl> <nl> - ERROR ( empty_switch_stmt , stmt_parsing , none , <nl> + ERROR ( empty_switch_stmt , none , <nl> " ' switch ' statement body must have at least one ' case ' or ' default ' block " , <nl> ( ) ) <nl> <nl> / / Case Stmt <nl> - ERROR ( expected_case_where_expr , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_case_where_expr , PointsToFirstBadToken , <nl> " expected expression for ' where ' guard of ' case ' " , ( ) ) <nl> - ERROR ( expected_case_colon , stmt_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_case_colon , PointsToFirstBadToken , <nl> " expected ' : ' after ' % 0 ' " , ( StringRef ) ) <nl> - ERROR ( default_with_where , stmt_parsing , none , <nl> + ERROR ( default_with_where , none , <nl> " ' default ' cannot be used with a ' where ' guard expression " , <nl> ( ) ) <nl> - ERROR ( var_binding_with_multiple_case_patterns , stmt_parsing , none , <nl> + ERROR ( var_binding_with_multiple_case_patterns , none , <nl> " ' case ' labels with multiple patterns cannot declare variables " , <nl> ( ) ) <nl> - ERROR ( case_stmt_without_body , stmt_parsing , none , <nl> + ERROR ( case_stmt_without_body , none , <nl> " % select { ' case ' | ' default ' } 0 label in a ' switch ' should have at least one " <nl> " executable statement " , ( bool ) ) <nl> <nl> / / ' try ' on statements <nl> - ERROR ( try_on_stmt , stmt_parsing , none , <nl> + ERROR ( try_on_stmt , none , <nl> " ' try ' cannot be used with ' % 0 ' " , ( StringRef ) ) <nl> - ERROR ( try_on_return_throw , stmt_parsing , none , <nl> + ERROR ( try_on_return_throw , none , <nl> " ' try ' must be placed on the % select { returned | thrown } 0 expression " , <nl> ( bool ) ) <nl> - ERROR ( try_on_var_let , stmt_parsing , none , <nl> + ERROR ( try_on_var_let , none , <nl> " ' try ' must be placed on the initial value expression " , ( ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Expression parsing diagnostics <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - ERROR ( expected_expr , expr_parsing , none , <nl> + ERROR ( expected_expr , none , <nl> " expected expression " , ( ) ) <nl> - ERROR ( expected_separator , expr_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_separator , PointsToFirstBadToken , <nl> " expected ' % 0 ' separator " , ( StringRef ) ) <nl> - ERROR ( unexpected_separator , expr_parsing , none , <nl> + ERROR ( unexpected_separator , none , <nl> " unexpected ' % 0 ' separator " , ( StringRef ) ) <nl> <nl> - ERROR ( expected_expr_after_operator , expr_parsing , none , <nl> + ERROR ( expected_expr_after_operator , none , <nl> " expected expression after operator " , ( ) ) <nl> - ERROR ( expected_expr_after_unary_operator , expr_parsing , none , <nl> + ERROR ( expected_expr_after_unary_operator , none , <nl> " expected expression after unary operator " , ( ) ) <nl> - ERROR ( expected_prefix_operator , expr_parsing , none , <nl> + ERROR ( expected_prefix_operator , none , <nl> " unary operator cannot be separated from its operand " , ( ) ) <nl> - ERROR ( expected_operator_ref , expr_parsing , none , <nl> + ERROR ( expected_operator_ref , none , <nl> " expected operator name in operator reference " , ( ) ) <nl> - ERROR ( invalid_postfix_operator , expr_parsing , none , <nl> + ERROR ( invalid_postfix_operator , none , <nl> " operator with postfix spacing cannot start a subexpression " , ( ) ) <nl> <nl> - ERROR ( expected_member_name , expr_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_member_name , PointsToFirstBadToken , <nl> " expected member name following ' . ' " , ( ) ) <nl> - ERROR ( expected_dollar_numeric , expr_parsing , none , <nl> + ERROR ( expected_dollar_numeric , none , <nl> " expected numeric value following ' $ ' " , ( ) ) <nl> - ERROR ( dollar_numeric_too_large , expr_parsing , none , <nl> + ERROR ( dollar_numeric_too_large , none , <nl> " numeric value following ' $ ' is too large " , ( ) ) <nl> - ERROR ( numeric_literal_numeric_member , expr_parsing , none , <nl> + ERROR ( numeric_literal_numeric_member , none , <nl> " expected named member of numeric literal " , ( ) ) <nl> <nl> - ERROR ( anon_closure_arg_not_in_closure , expr_parsing , none , <nl> + ERROR ( anon_closure_arg_not_in_closure , none , <nl> " anonymous closure argument not contained in a closure " , ( ) ) <nl> - ERROR ( anon_closure_arg_in_closure_with_args , expr_parsing , none , <nl> + ERROR ( anon_closure_arg_in_closure_with_args , none , <nl> " anonymous closure arguments cannot be used inside a closure that has " <nl> " explicit arguments " , ( ) ) <nl> - ERROR ( expected_closure_parameter_name , expr_parsing , none , <nl> + ERROR ( expected_closure_parameter_name , none , <nl> " expected the name of a closure parameter " , ( ) ) <nl> - ERROR ( expected_capture_specifier , expr_parsing , none , <nl> + ERROR ( expected_capture_specifier , none , <nl> " expected ' weak ' , ' unowned ' , or no specifier in capture list " , ( ) ) <nl> - ERROR ( expected_capture_specifier_name , attribute_parsing , none , <nl> + ERROR ( expected_capture_specifier_name , none , <nl> " expected name of in closure capture list " , ( ) ) <nl> - ERROR ( expected_init_capture_specifier , attribute_parsing , none , <nl> + ERROR ( expected_init_capture_specifier , none , <nl> " expected initializer for closure capture specifier " , ( ) ) <nl> - ERROR ( expected_capture_list_end_rsquare , attribute_parsing , none , <nl> + ERROR ( expected_capture_list_end_rsquare , none , <nl> " expected ' ] ' at end of capture list " , ( ) ) <nl> - ERROR ( cannot_capture_fields , attribute_parsing , none , <nl> + ERROR ( cannot_capture_fields , none , <nl> " fields may only be captured by assigning to a specific name " , ( ) ) <nl> <nl> - ERROR ( expected_closure_result_type , expr_parsing , none , <nl> + ERROR ( expected_closure_result_type , none , <nl> " expected closure result type after ' - > ' " , ( ) ) <nl> - ERROR ( expected_closure_in , expr_parsing , none , <nl> + ERROR ( expected_closure_in , none , <nl> " expected ' in ' after the closure signature " , ( ) ) <nl> - ERROR ( unexpected_tokens_before_closure_in , expr_parsing , none , <nl> + ERROR ( unexpected_tokens_before_closure_in , none , <nl> " unexpected tokens prior to ' in ' " , ( ) ) <nl> - ERROR ( expected_closure_rbrace , expr_parsing , none , <nl> + ERROR ( expected_closure_rbrace , none , <nl> " expected ' } ' at end of closure " , ( ) ) <nl> <nl> - WARNING ( trailing_closure_excess_newlines , expr_parsing , none , <nl> + WARNING ( trailing_closure_excess_newlines , none , <nl> " trailing closure is separated from call site by multiple newlines " , ( ) ) <nl> - NOTE ( trailing_closure_call_here , expr_parsing , none , <nl> + NOTE ( trailing_closure_call_here , none , <nl> " parsing trailing closure for this call " , ( ) ) <nl> <nl> - ERROR ( string_literal_no_atsign , expr_parsing , none , <nl> + ERROR ( string_literal_no_atsign , none , <nl> " string literals in Swift are not preceded by an ' @ ' sign " , ( ) ) <nl> <nl> - ERROR ( invalid_float_literal_missing_leading_zero , expr_parsing , none , <nl> + ERROR ( invalid_float_literal_missing_leading_zero , none , <nl> " ' . % 0 ' is not a valid floating point literal ; it must be written ' 0 . % 0 ' " , <nl> ( StringRef ) ) <nl> - ERROR ( availability_query_outside_if_stmt_guard , expr_parsing , none , <nl> + ERROR ( availability_query_outside_if_stmt_guard , none , <nl> " # available may only be used as condition of an ' if ' , ' guard ' " <nl> " or ' while ' statement " , ( ) ) <nl> <nl> - ERROR ( expected_identifier_after_dot_expr , expr_parsing , none , <nl> + ERROR ( expected_identifier_after_dot_expr , none , <nl> " expected identifier after ' . ' expression " , ( ) ) <nl> <nl> - ERROR ( expected_identifier_after_super_dot_expr , expr_parsing , <nl> + ERROR ( expected_identifier_after_super_dot_expr , <nl> PointsToFirstBadToken , <nl> " expected identifier or ' init ' after super ' . ' expression " , ( ) ) <nl> - ERROR ( expected_dot_or_subscript_after_super , expr_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_dot_or_subscript_after_super , PointsToFirstBadToken , <nl> " expected ' . ' or ' [ ' after ' super ' " , ( ) ) <nl> - ERROR ( super_in_closure_with_capture , expr_parsing , none , <nl> + ERROR ( super_in_closure_with_capture , none , <nl> " using ' super ' in a closure where ' self ' is explicitly captured is " <nl> " not yet supported " , ( ) ) <nl> - NOTE ( super_in_closure_with_capture_here , expr_parsing , none , <nl> + NOTE ( super_in_closure_with_capture_here , none , <nl> " ' self ' explicitly captured here " , ( ) ) <nl> <nl> / / Tuples and parenthesized expressions <nl> - ERROR ( expected_expr_in_expr_list , expr_parsing , none , <nl> + ERROR ( expected_expr_in_expr_list , none , <nl> " expected expression in list of expressions " , ( ) ) <nl> - ERROR ( expected_expr_in_collection_literal , expr_parsing , none , <nl> + ERROR ( expected_expr_in_collection_literal , none , <nl> " expected expression in container literal " , ( ) ) <nl> - ERROR ( expected_key_in_dictionary_literal , expr_parsing , none , <nl> + ERROR ( expected_key_in_dictionary_literal , none , <nl> " expected key expression in dictionary literal " , ( ) ) <nl> - ERROR ( expected_value_in_dictionary_literal , expr_parsing , none , <nl> + ERROR ( expected_value_in_dictionary_literal , none , <nl> " expected value in dictionary literal " , ( ) ) <nl> - ERROR ( expected_colon_in_dictionary_literal , expr_parsing , none , <nl> + ERROR ( expected_colon_in_dictionary_literal , none , <nl> " expected ' : ' in dictionary literal " , ( ) ) <nl> - ERROR ( expected_rparen_expr_list , expr_parsing , none , <nl> + ERROR ( expected_rparen_expr_list , none , <nl> " expected ' ) ' in expression list " , ( ) ) <nl> - ERROR ( expected_rsquare_expr_list , expr_parsing , none , <nl> + ERROR ( expected_rsquare_expr_list , none , <nl> " expected ' ] ' in expression list " , ( ) ) <nl> <nl> / / Array literal expressions <nl> - ERROR ( expected_rsquare_array_expr , expr_parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_rsquare_array_expr , PointsToFirstBadToken , <nl> " expected ' ] ' in container literal expression " , ( ) ) <nl> <nl> / / Object literal expressions <nl> - ERROR ( expected_identifier_after_l_square_lit , expr_parsing , none , <nl> + ERROR ( expected_identifier_after_l_square_lit , none , <nl> " expected identifier after ' [ # ' in object literal expression " , ( ) ) <nl> - ERROR ( expected_arg_list_in_object_literal , expr_parsing , none , <nl> + ERROR ( expected_arg_list_in_object_literal , none , <nl> " expected argument list in object literal " , ( ) ) <nl> - ERROR ( expected_r_square_lit_after_object_literal , expr_parsing , none , <nl> + ERROR ( expected_r_square_lit_after_object_literal , none , <nl> " expected ' # ] ' at end of object literal expression " , ( ) ) <nl> <nl> / / If expressions <nl> - ERROR ( expected_expr_after_if_question , expr_parsing , none , <nl> + ERROR ( expected_expr_after_if_question , none , <nl> " expected expression after ' ? ' in ternary expression " , ( ) ) <nl> - ERROR ( expected_colon_after_if_question , expr_parsing , none , <nl> + ERROR ( expected_colon_after_if_question , none , <nl> " expected ' : ' after ' ? . . . ' in ternary expression " , ( ) ) <nl> - ERROR ( expected_expr_after_if_colon , expr_parsing , none , <nl> + ERROR ( expected_expr_after_if_colon , none , <nl> " expected expression after ' ? . . . : ' in ternary expression " , ( ) ) <nl> <nl> / / Cast expressions <nl> - ERROR ( expected_type_after_is , expr_parsing , none , <nl> + ERROR ( expected_type_after_is , none , <nl> " expected type after ' is ' " , ( ) ) <nl> - ERROR ( expected_type_after_as , expr_parsing , none , <nl> + ERROR ( expected_type_after_as , none , <nl> " expected type after ' as ' " , ( ) ) <nl> <nl> / / Extra tokens in string interpolation like in " > > \ ( $ 0 } ) < < " <nl> - ERROR ( string_interpolation_extra , expr_parsing , none , <nl> + ERROR ( string_interpolation_extra , none , <nl> " extra tokens after interpolated string expression " , ( ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Attribute - parsing diagnostics <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> - ERROR ( expected_attribute_name , attribute_parsing , none , <nl> + ERROR ( expected_attribute_name , none , <nl> " expected an attribute name " , ( ) ) <nl> - ERROR ( unknown_attribute , attribute_parsing , none , <nl> + ERROR ( unknown_attribute , none , <nl> " unknown attribute ' % 0 ' " , ( StringRef ) ) <nl> - ERROR ( duplicate_attribute , attribute_parsing , none , <nl> + ERROR ( duplicate_attribute , none , <nl> " duplicate % select { attribute | modifier } 0 " , ( bool ) ) <nl> - NOTE ( previous_attribute , parsing , none , <nl> + NOTE ( previous_attribute , none , <nl> " % select { attribute | modifier } 0 already specified here " , ( bool ) ) <nl> <nl> - ERROR ( cannot_combine_attribute , attribute_parsing , none , <nl> + ERROR ( cannot_combine_attribute , none , <nl> " attribute ' % 0 ' cannot be combined with this attribute " , ( StringRef ) ) <nl> - ERROR ( expected_in_attribute_list , attribute_parsing , none , <nl> + ERROR ( expected_in_attribute_list , none , <nl> " expected ' ] ' or ' , ' in attribute list " , ( ) ) <nl> <nl> - ERROR ( type_attribute_applied_to_decl , attribute_parsing , none , <nl> + ERROR ( type_attribute_applied_to_decl , none , <nl> " attribute can only be applied to types , not declarations " , ( ) ) <nl> - ERROR ( decl_attribute_applied_to_type , attribute_parsing , none , <nl> + ERROR ( decl_attribute_applied_to_type , none , <nl> " attribute can only be applied to declarations , not types " , ( ) ) <nl> <nl> - ERROR ( attr_expected_lparen , attribute_parsing , none , <nl> + ERROR ( attr_expected_lparen , none , <nl> " expected ' ( ' in ' % 0 ' % select { attribute | modifier } 1 " , ( StringRef , bool ) ) <nl> <nl> - ERROR ( attr_expected_rparen , attribute_parsing , none , <nl> + ERROR ( attr_expected_rparen , none , <nl> " expected ' ) ' in ' % 0 ' % select { attribute | modifier } 1 " , ( StringRef , bool ) ) <nl> <nl> - ERROR ( attr_expected_comma , attribute_parsing , none , <nl> + ERROR ( attr_expected_comma , none , <nl> " expected ' , ' in ' % 0 ' % select { attribute | modifier } 1 " , ( StringRef , bool ) ) <nl> <nl> - ERROR ( attr_expected_string_literal , attribute_parsing , none , <nl> + ERROR ( attr_expected_string_literal , none , <nl> " expected string literal in ' % 0 ' attribute " , ( StringRef ) ) <nl> <nl> - ERROR ( alignment_must_be_positive_integer , attribute_parsing , none , <nl> + ERROR ( alignment_must_be_positive_integer , none , <nl> " alignment value must be a positive integer literal " , ( ) ) <nl> <nl> - ERROR ( swift_native_objc_runtime_base_must_be_identifier , attribute_parsing , none , <nl> + ERROR ( swift_native_objc_runtime_base_must_be_identifier , none , <nl> " @ _swift_native_objc_runtime_base class name must be an identifier " , ( ) ) <nl> <nl> - ERROR ( attr_interpolated_string , attribute_parsing , none , <nl> + ERROR ( attr_interpolated_string , none , <nl> " % 0 cannot be an interpolated string literal " , ( StringRef ) ) <nl> <nl> - ERROR ( attr_only_at_non_local_scope , attribute_parsing , none , <nl> + ERROR ( attr_only_at_non_local_scope , none , <nl> " attribute ' % 0 ' can only be used in a non - local scope " , ( StringRef ) ) <nl> <nl> - ERROR ( attr_expected_equal_separator , attribute_parsing , none , <nl> + ERROR ( attr_expected_equal_separator , none , <nl> " expected ' = ' following ' % 0 ' argument of ' % 1 ' " , <nl> ( StringRef , StringRef ) ) <nl> <nl> - ERROR ( attr_expected_string_literal_arg , attribute_parsing , none , <nl> + ERROR ( attr_expected_string_literal_arg , none , <nl> " expected string literal for ' % 0 ' argument of ' % 1 ' " , <nl> ( StringRef , StringRef ) ) <nl> <nl> - ERROR ( attr_duplicate_argument , attribute_parsing , none , <nl> + ERROR ( attr_duplicate_argument , none , <nl> " duplicate ' % 0 ' argument " , ( StringRef ) ) <nl> <nl> / / accessibility <nl> - ERROR ( attr_accessibility_expected_set , attribute_parsing , none , <nl> + ERROR ( attr_accessibility_expected_set , none , <nl> " expected ' set ' as subject of ' % 0 ' modifier " , ( StringRef ) ) <nl> <nl> / / availability <nl> - ERROR ( attr_availability_platform , attribute_parsing , none , <nl> + ERROR ( attr_availability_platform , none , <nl> " expected platform name or ' * ' for ' % 0 ' attribute " , ( StringRef ) ) <nl> - ERROR ( attr_availability_unavailable_deprecated , attribute_parsing , none , <nl> + ERROR ( attr_availability_unavailable_deprecated , none , <nl> " ' % 0 ' attribute cannot be both unconditionally ' unavailable ' and " <nl> " ' deprecated ' " , ( StringRef ) ) <nl> <nl> - WARNING ( attr_availability_unknown_platform , attribute_parsing , none , <nl> + WARNING ( attr_availability_unknown_platform , none , <nl> " unknown platform ' % 0 ' for attribute ' % 1 ' " , ( StringRef , StringRef ) ) <nl> <nl> - ERROR ( attr_availability_expected_option , attribute_parsing , none , <nl> + ERROR ( attr_availability_expected_option , none , <nl> " expected ' % 0 ' option such as ' unavailable ' , ' introduced ' , ' deprecated ' , " <nl> " ' obsoleted ' , ' message ' , or ' renamed ' " , ( StringRef ) ) <nl> <nl> - ERROR ( attr_availability_expected_equal , attribute_parsing , none , <nl> + ERROR ( attr_availability_expected_equal , none , <nl> " expected ' = ' after ' % 1 ' in ' % 0 ' attribute " , ( StringRef , StringRef ) ) <nl> <nl> - ERROR ( attr_availability_expected_version , attribute_parsing , none , <nl> + ERROR ( attr_availability_expected_version , none , <nl> " expected version number in ' % 0 ' attribute " , ( StringRef ) ) <nl> <nl> - ERROR ( attr_availability_renamed , attribute_parsing , none , <nl> + ERROR ( attr_availability_renamed , none , <nl> " @ availability has been renamed to @ available " , ( ) ) <nl> <nl> / / autoclosure <nl> - ERROR ( attr_autoclosure_expected_r_paren , attribute_parsing , PointsToFirstBadToken , <nl> + ERROR ( attr_autoclosure_expected_r_paren , PointsToFirstBadToken , <nl> " expected ' ) ' in @ autoclosure " , ( ) ) <nl> <nl> / / convention <nl> - ERROR ( convention_attribute_expected_lparen , attribute_parsing , none , <nl> + ERROR ( convention_attribute_expected_lparen , none , <nl> " expected ' ( ' after ' convention ' attribute " , ( ) ) <nl> - ERROR ( convention_attribute_expected_name , attribute_parsing , none , <nl> + ERROR ( convention_attribute_expected_name , none , <nl> " expected convention name identifier in ' convention ' attribute " , ( ) ) <nl> - ERROR ( convention_attribute_expected_rparen , attribute_parsing , none , <nl> + ERROR ( convention_attribute_expected_rparen , none , <nl> " expected ' ) ' after convention name for ' convention ' attribute " , ( ) ) <nl> <nl> / / objc <nl> - ERROR ( attr_objc_missing_colon , attribute_parsing , none , <nl> + ERROR ( attr_objc_missing_colon , none , <nl> " missing ' : ' after selector piece in @ objc attribute " , ( ) ) <nl> - ERROR ( attr_objc_expected_rparen , attribute_parsing , none , <nl> + ERROR ( attr_objc_expected_rparen , none , <nl> " expected ' ) ' after name for @ objc " , ( ) ) <nl> - ERROR ( attr_objc_empty_name , attribute_parsing , none , <nl> + ERROR ( attr_objc_empty_name , none , <nl> " expected name within parentheses of @ objc attribute " , ( ) ) <nl> <nl> / / opened <nl> - ERROR ( opened_attribute_expected_lparen , attribute_parsing , none , <nl> + ERROR ( opened_attribute_expected_lparen , none , <nl> " expected ' ( ' after ' opened ' attribute " , ( ) ) <nl> - ERROR ( opened_attribute_id_value , attribute_parsing , none , <nl> + ERROR ( opened_attribute_id_value , none , <nl> " known id for ' opened ' attribute must be a UUID string " , ( ) ) <nl> - ERROR ( opened_attribute_expected_rparen , attribute_parsing , none , <nl> + ERROR ( opened_attribute_expected_rparen , none , <nl> " expected ' ) ' after id value for ' opened ' attribute " , ( ) ) <nl> <nl> / / inline <nl> - ERROR ( inline_attribute_expect_option , attribute_parsing , none , <nl> + ERROR ( inline_attribute_expect_option , none , <nl> " expected ' % 0 ' option such as ' never ' " , ( StringRef ) ) <nl> - ERROR ( inline_attribute_unknown_option , attribute_parsing , none , <nl> + ERROR ( inline_attribute_unknown_option , none , <nl> " unknown option ' % 0 ' for attribute ' % 1 ' " , ( StringRef , StringRef ) ) <nl> <nl> / / effects <nl> - ERROR ( effects_attribute_expect_option , attribute_parsing , none , <nl> + ERROR ( effects_attribute_expect_option , none , <nl> " expected ' % 0 ' option ( readnone , readonly , readwrite ) " , ( StringRef ) ) <nl> - ERROR ( effects_attribute_unknown_option , attribute_parsing , none , <nl> + ERROR ( effects_attribute_unknown_option , none , <nl> " unknown option ' % 0 ' for attribute ' % 1 ' " , ( StringRef , StringRef ) ) <nl> <nl> / / swift3_migration <nl> - ERROR ( attr_swift3_migration_label , attribute_parsing , none , <nl> + ERROR ( attr_swift3_migration_label , none , <nl> " expected ' renamed ' or ' message ' in ' swift3_migration ' attribute " , ( ) ) <nl> - WARNING ( warn_attr_swift3_migration_unknown_label , attribute_parsing , none , <nl> + WARNING ( warn_attr_swift3_migration_unknown_label , none , <nl> " expected ' renamed ' or ' message ' in ' swift3_migration ' attribute " , ( ) ) <nl> - ERROR ( attr_swift3_migration_expected_rparen , attribute_parsing , none , <nl> + ERROR ( attr_swift3_migration_expected_rparen , none , <nl> " expected ' ) ' after name for ' swift3_migration ' attribute " , ( ) ) <nl> - ERROR ( attr_bad_swift_name , attribute_parsing , none , <nl> + ERROR ( attr_bad_swift_name , none , <nl> " ill - formed Swift name ' % 0 ' " , ( StringRef ) ) <nl> <nl> <nl> / / unowned <nl> - ERROR ( attr_unowned_invalid_specifier , attribute_parsing , none , <nl> + ERROR ( attr_unowned_invalid_specifier , none , <nl> " expected ' safe ' or ' unsafe ' " , ( ) ) <nl> - ERROR ( attr_unowned_expected_rparen , attribute_parsing , none , <nl> + ERROR ( attr_unowned_expected_rparen , none , <nl> " expected ' ) ' after specifier for ' unowned ' " , ( ) ) <nl> <nl> / / warn_unused_result <nl> - WARNING ( attr_warn_unused_result_expected_name , attribute_parsing , none , <nl> + WARNING ( attr_warn_unused_result_expected_name , none , <nl> " expected parameter ' message ' or ' mutable_variant ' " , ( ) ) <nl> - WARNING ( attr_warn_unused_result_duplicate_parameter , attribute_parsing , none , <nl> + WARNING ( attr_warn_unused_result_duplicate_parameter , none , <nl> " duplicate ' % 0 ' parameter ; previous value will be ignored " , ( StringRef ) ) <nl> - ERROR ( attr_warn_unused_result_expected_eq , attribute_parsing , none , <nl> + ERROR ( attr_warn_unused_result_expected_eq , none , <nl> " expected ' = ' following ' % 0 ' parameter " , ( StringRef ) ) <nl> - ERROR ( attr_warn_unused_result_expected_string , attribute_parsing , none , <nl> + ERROR ( attr_warn_unused_result_expected_string , none , <nl> " expected a string following ' = ' for ' % 0 ' parameter " , ( StringRef ) ) <nl> - WARNING ( attr_warn_unused_result_unknown_parameter , attribute_parsing , none , <nl> + WARNING ( attr_warn_unused_result_unknown_parameter , none , <nl> " unknown parameter ' % 0 ' in ' warn_unused_result ' attribute " , ( StringRef ) ) <nl> - ERROR ( attr_warn_unused_result_expected_rparen , attribute_parsing , none , <nl> + ERROR ( attr_warn_unused_result_expected_rparen , none , <nl> " expected ' ) ' after ' warn_unused_result ' attribute " , ( ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Generics parsing diagnostics <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> - ERROR ( expected_rangle_generics_param , parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_rangle_generics_param , PointsToFirstBadToken , <nl> " expected ' > ' to complete generic parameter list " , ( ) ) <nl> - ERROR ( expected_generics_parameter_name , parsing , PointsToFirstBadToken , <nl> + ERROR ( expected_generics_parameter_name , PointsToFirstBadToken , <nl> " expected an identifier to name generic parameter " , ( ) ) <nl> - ERROR ( expected_generics_type_restriction , parsing , none , <nl> + ERROR ( expected_generics_type_restriction , none , <nl> " expected a type name or protocol composition restricting % 0 " , <nl> ( Identifier ) ) <nl> - ERROR ( requires_single_equal , parsing , none , <nl> + ERROR ( requires_single_equal , none , <nl> " use ' = = ' for same - type requirements rather than ' = ' " , ( ) ) <nl> - ERROR ( expected_requirement_delim , parsing , none , <nl> + ERROR ( expected_requirement_delim , none , <nl> " expected ' : ' or ' = = ' to indicate a conformance or same - type requirement " , <nl> ( ) ) <nl> - ERROR ( invalid_class_requirement , decl_parsing , none , <nl> + ERROR ( invalid_class_requirement , none , <nl> " ' class ' requirement only applies to protocols " , ( ) ) <nl> - ERROR ( redundant_class_requirement , decl_parsing , none , <nl> + ERROR ( redundant_class_requirement , none , <nl> " redundant ' class ' requirement " , ( ) ) <nl> - ERROR ( late_class_requirement , decl_parsing , none , <nl> + ERROR ( late_class_requirement , none , <nl> " ' class ' must come first in the requirement list " , ( ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Build configuration parsing diagnostics <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> - ERROR ( unsupported_build_config_binary_expression , parsing , none , <nl> + ERROR ( unsupported_build_config_binary_expression , none , <nl> " expected ' & & ' or ' | | ' expression " , ( ) ) <nl> - ERROR ( unsupported_build_config_unary_expression , parsing , none , <nl> + ERROR ( unsupported_build_config_unary_expression , none , <nl> " expected unary ' ! ' expression " , ( ) ) <nl> - ERROR ( unsupported_target_config_expression , parsing , none , <nl> + ERROR ( unsupported_target_config_expression , none , <nl> " unexpected target configuration expression ( expected ' os ' or ' arch ' ) " , ( ) ) <nl> - ERROR ( unsupported_target_config_runtime_argument , parsing , none , <nl> + ERROR ( unsupported_target_config_runtime_argument , none , <nl> " unexpected argument for the ' _runtime ' target configuration , " <nl> " expected ' _Native ' or ' _ObjC ' " , ( ) ) <nl> - ERROR ( unsupported_target_config_argument , parsing , none , <nl> + ERROR ( unsupported_target_config_argument , none , <nl> " unexpected target configuration expression argument : expected % 0 " , <nl> ( StringRef ) ) <nl> - ERROR ( unsupported_config_conditional_expression_type , parsing , none , <nl> + ERROR ( unsupported_config_conditional_expression_type , none , <nl> " unexpected configuration expression type " , ( ) ) <nl> - ERROR ( unsupported_config_integer , parsing , none , <nl> + ERROR ( unsupported_config_integer , none , <nl> " ' % 0 ' is not a valid configuration option , use ' % 1 ' " , <nl> ( StringRef , StringRef ) ) <nl> - ERROR ( compiler_version_component_not_number , parsing , none , <nl> + ERROR ( compiler_version_component_not_number , none , <nl> " compiler version component is not a number " , ( ) ) <nl> - ERROR ( compiler_version_too_many_components , parsing , none , <nl> + ERROR ( compiler_version_too_many_components , none , <nl> " compiler version must not have more than five components " , ( ) ) <nl> - WARNING ( unused_compiler_version_component , parsing , none , <nl> + WARNING ( unused_compiler_version_component , none , <nl> " the second version component is not used for comparison " , ( ) ) <nl> - ERROR ( empty_compiler_version_component , parsing , none , <nl> + ERROR ( empty_compiler_version_component , none , <nl> " found empty compiler version component " , ( ) ) <nl> - ERROR ( compiler_version_component_out_of_range , parsing , none , <nl> + ERROR ( compiler_version_component_out_of_range , none , <nl> " compiler version component out of range : must be in [ 0 , % 0 ] " , <nl> ( unsigned ) ) <nl> - ERROR ( empty_compiler_version_string , parsing , none , <nl> + ERROR ( empty_compiler_version_string , none , <nl> " compiler version requirement is empty " , ( ) ) <nl> - ERROR ( cannot_combine_compiler_version , parsing , none , <nl> + ERROR ( cannot_combine_compiler_version , none , <nl> " cannot combine _compiler_version with binary operators " , ( ) ) <nl> - WARNING ( unknown_build_config , parsing , none , <nl> + WARNING ( unknown_build_config , none , <nl> " unknown % 0 for build configuration ' % 1 ' " , <nl> ( StringRef , StringRef ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Availability query parsing diagnostics <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> - ERROR ( avail_query_expected_condition , parsing , PointsToFirstBadToken , <nl> + ERROR ( avail_query_expected_condition , PointsToFirstBadToken , <nl> " expected availability condition " , ( ) ) <nl> - ERROR ( avail_query_expected_platform_name , parsing , PointsToFirstBadToken , <nl> + ERROR ( avail_query_expected_platform_name , PointsToFirstBadToken , <nl> " expected platform name " , ( ) ) <nl> <nl> - ERROR ( avail_query_expected_version_number , parsing , PointsToFirstBadToken , <nl> + ERROR ( avail_query_expected_version_number , PointsToFirstBadToken , <nl> " expected version number " , ( ) ) <nl> - ERROR ( avail_query_expected_rparen , parsing , PointsToFirstBadToken , <nl> + ERROR ( avail_query_expected_rparen , PointsToFirstBadToken , <nl> " expected ' ) ' in availability query " , ( ) ) <nl> <nl> - ERROR ( avail_query_unrecognized_platform_name , parsing , <nl> + ERROR ( avail_query_unrecognized_platform_name , <nl> PointsToFirstBadToken , " unrecognized platform name % 0 " , ( Identifier ) ) <nl> <nl> - ERROR ( avail_query_disallowed_operator , parsing , PointsToFirstBadToken , <nl> + ERROR ( avail_query_disallowed_operator , PointsToFirstBadToken , <nl> " ' % 0 ' cannot be used in an availability condition " , ( StringRef ) ) <nl> <nl> - ERROR ( avail_query_version_comparison_not_needed , parsing , <nl> + ERROR ( avail_query_version_comparison_not_needed , <nl> none , " version comparison not needed " , ( ) ) <nl> <nl> - ERROR ( availability_query_wildcard_required , parsing , none , <nl> + ERROR ( availability_query_wildcard_required , none , <nl> " must handle potential future platforms with ' * ' " , ( ) ) <nl> <nl> - ERROR ( availability_query_repeated_platform , parsing , none , <nl> + ERROR ( availability_query_repeated_platform , none , <nl> " version for ' % 0 ' already specified " , ( StringRef ) ) <nl> <nl> # ifndef DIAG_NO_UNDEF <nl> mmm a / include / swift / AST / DiagnosticsParse . h <nl> ppp b / include / swift / AST / DiagnosticsParse . h <nl> <nl> namespace swift { <nl> namespace diag { <nl> / / Declare common diagnostics objects with their appropriate types . <nl> - # define DIAG ( KIND , ID , Category , Options , Text , Signature ) \ <nl> + # define DIAG ( KIND , ID , Options , Text , Signature ) \ <nl> extern detail : : DiagWithArguments < void Signature > : : type ID ; <nl> # include " DiagnosticsParse . def " <nl> } <nl> mmm a / include / swift / AST / DiagnosticsSIL . def <nl> ppp b / include / swift / AST / DiagnosticsSIL . def <nl> <nl> # endif <nl> <nl> # ifndef ERROR <nl> - # define ERROR ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( ERROR , ID , Category , Options , Text , Signature ) <nl> + # define ERROR ( ID , Options , Text , Signature ) \ <nl> + DIAG ( ERROR , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef WARNING <nl> - # define WARNING ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( WARNING , ID , Category , Options , Text , Signature ) <nl> + # define WARNING ( ID , Options , Text , Signature ) \ <nl> + DIAG ( WARNING , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef NOTE <nl> - # define NOTE ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( NOTE , ID , Category , Options , Text , Signature ) <nl> + # define NOTE ( ID , Options , Text , Signature ) \ <nl> + DIAG ( NOTE , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> <nl> / / SILGen issues . <nl> - ERROR ( bridging_module_missing , sil_gen , none , <nl> + ERROR ( bridging_module_missing , none , <nl> " unable to find module ' % 0 ' for implicit conversion function ' % 0 . % 1 ' " , <nl> ( StringRef , StringRef ) ) <nl> - ERROR ( bridging_function_missing , sil_gen , none , <nl> + ERROR ( bridging_function_missing , none , <nl> " unable to find implicit conversion function ' % 0 . % 1 ' " , <nl> ( StringRef , StringRef ) ) <nl> - ERROR ( bridging_function_overloaded , sil_gen , none , <nl> + ERROR ( bridging_function_overloaded , none , <nl> " multiple definitions of implicit conversion function ' % 0 . % 1 ' " , <nl> ( StringRef , StringRef ) ) <nl> - ERROR ( bridging_function_not_function , sil_gen , none , <nl> + ERROR ( bridging_function_not_function , none , <nl> " definition of implicit conversion function ' % 0 . % 1 ' is not a function " , <nl> ( StringRef , StringRef ) ) <nl> - ERROR ( bridging_function_not_correct_type , sil_gen , none , <nl> + ERROR ( bridging_function_not_correct_type , none , <nl> " definition of implicit conversion function ' % 0 . % 1 ' is not of the correct " <nl> " type " , <nl> ( StringRef , StringRef ) ) <nl> - ERROR ( invalid_sil_builtin , sil_gen , none , <nl> + ERROR ( invalid_sil_builtin , none , <nl> " INTERNAL ERROR : invalid use of builtin : % 0 " , <nl> ( StringRef ) ) <nl> - ERROR ( could_not_find_bridge_type , sil_gen , none , <nl> + ERROR ( could_not_find_bridge_type , none , <nl> " could not find Objective - C bridge type for type % 0 ; " <nl> " did you forget to import Foundation ? " , ( Type ) ) <nl> - ERROR ( could_not_find_pointer_memory_property , sil_gen , none , <nl> + ERROR ( could_not_find_pointer_memory_property , none , <nl> " could not find ' memory ' property of pointer type % 0 " , ( Type ) ) <nl> <nl> - ERROR ( writeback_overlap_property , sil_gen , none , <nl> + ERROR ( writeback_overlap_property , none , <nl> " inout writeback to computed property % 0 occurs in multiple arguments to " <nl> " call , introducing invalid aliasing " , ( Identifier ) ) <nl> - ERROR ( writeback_overlap_subscript , sil_gen , none , <nl> + ERROR ( writeback_overlap_subscript , none , <nl> " inout writeback through subscript occurs in multiple arguments to call , " <nl> " introducing invalid aliasing " , <nl> ( ) ) <nl> - NOTE ( writebackoverlap_note , sil_gen , none , <nl> + NOTE ( writebackoverlap_note , none , <nl> " concurrent writeback occurred here " , ( ) ) <nl> <nl> - ERROR ( inout_argument_alias , sil_gen , none , <nl> + ERROR ( inout_argument_alias , none , <nl> " inout arguments are not allowed to alias each other " , ( ) ) <nl> - NOTE ( previous_inout_alias , sil_gen , none , <nl> + NOTE ( previous_inout_alias , none , <nl> " previous aliasing argument " , ( ) ) <nl> <nl> - ERROR ( unsupported_recursive_type , sil_gen , none , <nl> + ERROR ( unsupported_recursive_type , none , <nl> " recursive value type % 0 is not allowed " , ( Type ) ) <nl> <nl> - ERROR ( recursive_enum_not_indirect , sil_gen , none , <nl> + ERROR ( recursive_enum_not_indirect , none , <nl> " recursive enum % 0 is not marked ' indirect ' " , ( Type ) ) <nl> <nl> - ERROR ( unsupported_c_function_pointer_conversion , sil_gen , none , <nl> + ERROR ( unsupported_c_function_pointer_conversion , none , <nl> " C function pointer signature % 0 is not compatible with expected type % 1 " , <nl> ( Type , Type ) ) <nl> <nl> / / Definite initialization diagnostics . <nl> - NOTE ( variable_defined_here , sil_analysis , none , <nl> + NOTE ( variable_defined_here , none , <nl> " % select { variable | constant } 0 defined here " , ( bool ) ) <nl> - ERROR ( variable_used_before_initialized , sil_analysis , none , <nl> + ERROR ( variable_used_before_initialized , none , <nl> " % select { variable | constant } 1 ' % 0 ' used before being initialized " , <nl> ( StringRef , bool ) ) <nl> - ERROR ( variable_inout_before_initialized , sil_analysis , none , <nl> + ERROR ( variable_inout_before_initialized , none , <nl> " % select { variable | constant } 1 ' % 0 ' passed by reference before being " <nl> " initialized " , ( StringRef , bool ) ) <nl> - ERROR ( variable_closure_use_uninit , sil_analysis , none , <nl> + ERROR ( variable_closure_use_uninit , none , <nl> " % select { variable | constant } 1 ' % 0 ' captured by a closure before being " <nl> " initialized " , ( StringRef , bool ) ) <nl> <nl> - ERROR ( variable_addrtaken_before_initialized , sil_analysis , none , <nl> + ERROR ( variable_addrtaken_before_initialized , none , <nl> " address of % select { variable | constant } 1 ' % 0 ' taken before it is " <nl> " initialized " , ( StringRef , bool ) ) <nl> - ERROR ( ivar_not_initialized_at_superinit , sil_analysis , none , <nl> + ERROR ( ivar_not_initialized_at_superinit , none , <nl> " property ' % 0 ' not initialized at super . init call " , ( StringRef , bool ) ) <nl> - ERROR ( ivar_not_initialized_at_implicit_superinit , sil_analysis , none , <nl> + ERROR ( ivar_not_initialized_at_implicit_superinit , none , <nl> " property ' % 0 ' not initialized at implicitly generated super . init call " , <nl> ( StringRef , bool ) ) <nl> <nl> - ERROR ( self_use_before_fully_init , sil_analysis , none , <nl> + ERROR ( self_use_before_fully_init , none , <nl> " use of ' self ' in % select { method call | property access } 1 % 0 before " <nl> " % select { all stored properties are initialized | " <nl> " super . init initializes self | " <nl> " self . init initializes self } 2 " , ( Identifier , bool , unsigned ) ) <nl> - ERROR ( use_of_self_before_fully_init , sil_analysis , none , <nl> + ERROR ( use_of_self_before_fully_init , none , <nl> " ' self ' used before all stored properties are initialized " , ( ) ) <nl> - ERROR ( use_of_self_before_fully_init_protocol , sil_analysis , none , <nl> + ERROR ( use_of_self_before_fully_init_protocol , none , <nl> " ' self ' used before chaining to another self . init requirement " , ( ) ) <nl> <nl> <nl> - NOTE ( stored_property_not_initialized , sil_analysis , none , <nl> + NOTE ( stored_property_not_initialized , none , <nl> " ' % 0 ' not initialized " , ( StringRef ) ) <nl> <nl> - ERROR ( selfinit_multiple_times , sil_analysis , none , <nl> + ERROR ( selfinit_multiple_times , none , <nl> " % select { super | self } 0 . init called multiple times in initializer " , <nl> ( unsigned ) ) <nl> - ERROR ( superselfinit_not_called_before_return , sil_analysis , none , <nl> + ERROR ( superselfinit_not_called_before_return , none , <nl> " % select { super | self } 0 . init isn ' t called on all paths before returning " <nl> " from initializer " , ( unsigned ) ) <nl> - ERROR ( self_before_superselfinit , sil_analysis , none , <nl> + ERROR ( self_before_superselfinit , none , <nl> " ' self ' used before % select { super | self } 0 . init call " , <nl> ( unsigned ) ) <nl> - ERROR ( self_inside_catch_superselfinit , sil_analysis , none , <nl> + ERROR ( self_inside_catch_superselfinit , none , <nl> " ' self ' used inside ' catch ' block reachable from " <nl> " % select { super | self } 0 . init call " , <nl> ( unsigned ) ) <nl> - ERROR ( return_from_init_without_initing_self , sil_analysis , none , <nl> + ERROR ( return_from_init_without_initing_self , none , <nl> " return from enum initializer method without storing to ' self ' " , ( ) ) <nl> - ERROR ( return_from_protocol_init_without_initing_self , sil_analysis , none , <nl> + ERROR ( return_from_protocol_init_without_initing_self , none , <nl> " protocol extension initializer never chained to ' self . init ' " , ( ) ) <nl> - ERROR ( return_from_init_without_initing_stored_properties , sil_analysis , none , <nl> + ERROR ( return_from_init_without_initing_stored_properties , none , <nl> " return from initializer without initializing all " <nl> " stored properties " , ( ) ) <nl> <nl> - ERROR ( variable_function_use_uninit , sil_analysis , none , <nl> + ERROR ( variable_function_use_uninit , none , <nl> " % select { variable | constant } 1 ' % 0 ' used by function definition before " <nl> " being initialized " , <nl> ( StringRef , bool ) ) <nl> - ERROR ( struct_not_fully_initialized , sil_analysis , none , <nl> + ERROR ( struct_not_fully_initialized , none , <nl> " struct ' % 0 ' must be completely initialized before a member is stored to " , <nl> ( StringRef , bool ) ) <nl> - ERROR ( immutable_property_already_initialized , sil_analysis , none , <nl> + ERROR ( immutable_property_already_initialized , none , <nl> " immutable value ' % 0 ' may only be initialized once " , <nl> ( StringRef ) ) <nl> - NOTE ( initial_value_provided_in_let_decl , sil_analysis , none , <nl> + NOTE ( initial_value_provided_in_let_decl , none , <nl> " initial value already provided in ' let ' declaration " , ( ) ) <nl> - ERROR ( mutating_method_called_on_immutable_value , sil_analysis , none , <nl> + ERROR ( mutating_method_called_on_immutable_value , none , <nl> " mutating % select { method | property access | subscript | operator } 1 % 0 may not " <nl> " be used on immutable value ' % 2 ' " , <nl> ( Identifier , unsigned , StringRef ) ) <nl> - ERROR ( immutable_value_passed_inout , sil_analysis , none , <nl> + ERROR ( immutable_value_passed_inout , none , <nl> " immutable value ' % 0 ' may not be passed inout " , <nl> ( StringRef ) ) <nl> - ERROR ( assignment_to_immutable_value , sil_analysis , none , <nl> + ERROR ( assignment_to_immutable_value , none , <nl> " immutable value ' % 0 ' may not be assigned to " , <nl> ( StringRef ) ) <nl> <nl> <nl> / / Control flow diagnostics . <nl> - ERROR ( missing_return , sil_analysis , none , <nl> + ERROR ( missing_return , none , <nl> " missing return in a % select { function | closure } 1 expected to return % 0 " , <nl> ( Type , unsigned ) ) <nl> - ERROR ( return_from_noreturn , sil_analysis , none , <nl> + ERROR ( return_from_noreturn , none , <nl> " return from a ' noreturn ' function " , ( ) ) <nl> - ERROR ( non_exhaustive_switch , sil_analysis , none , <nl> + ERROR ( non_exhaustive_switch , none , <nl> " switch must be exhaustive , consider adding a default clause " , ( ) ) <nl> - ERROR ( guard_body_must_not_fallthrough , sil_analysis , none , <nl> + ERROR ( guard_body_must_not_fallthrough , none , <nl> " ' guard ' body may not fall through , consider using ' return ' or ' break ' " <nl> " to exit the scope " , ( ) ) <nl> - WARNING ( unreachable_code , sil_analysis , none , " will never be executed " , ( ) ) <nl> - NOTE ( unreachable_code_branch , sil_analysis , none , <nl> + WARNING ( unreachable_code , none , " will never be executed " , ( ) ) <nl> + NOTE ( unreachable_code_branch , none , <nl> " condition always evaluates to % select { false | true } 0 " , ( bool ) ) <nl> - NOTE ( call_to_noreturn_note , sil_analysis , none , <nl> + NOTE ( call_to_noreturn_note , none , <nl> " a call to a noreturn function " , ( ) ) <nl> - WARNING ( unreachable_code_after_stmt , sil_analysis , none , <nl> + WARNING ( unreachable_code_after_stmt , none , <nl> " code after ' % select { return | break | continue | throw } 0 ' will never " <nl> " be executed " , ( unsigned ) ) <nl> - WARNING ( unreachable_case , sil_analysis , none , <nl> + WARNING ( unreachable_case , none , <nl> " % select { case | default } 0 will never be executed " , ( bool ) ) <nl> - WARNING ( switch_on_a_constant , sil_analysis , none , <nl> + WARNING ( switch_on_a_constant , none , <nl> " switch condition evaluates to a constant " , ( ) ) <nl> - NOTE ( unreachable_code_note , sil_analysis , none , " will never be executed " , ( ) ) <nl> + NOTE ( unreachable_code_note , none , " will never be executed " , ( ) ) <nl> <nl> / / ' transparent ' diagnostics <nl> - ERROR ( circular_transparent , sil_analysis , none , <nl> + ERROR ( circular_transparent , none , <nl> " inlining ' transparent ' functions forms circular loop " , ( ) ) <nl> - NOTE ( note_while_inlining , sil_analysis , none , <nl> + NOTE ( note_while_inlining , none , <nl> " while inlining here " , ( ) ) <nl> <nl> / / Arithmetic diagnostics . <nl> - ERROR ( integer_conversion_overflow , sil_analysis , none , <nl> + ERROR ( integer_conversion_overflow , none , <nl> " integer overflows when converted from % 0 to % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( integer_conversion_overflow_builtin_types , sil_analysis , none , <nl> + ERROR ( integer_conversion_overflow_builtin_types , none , <nl> " integer overflows when converted from % select { unsigned | signed } 0 " <nl> " % 1 to % select { unsigned | signed } 2 % 3 " , <nl> ( bool , Type , bool , Type ) ) <nl> - WARNING ( integer_conversion_overflow_warn , sil_analysis , none , <nl> + WARNING ( integer_conversion_overflow_warn , none , <nl> " integer overflows when converted from % 0 to % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( integer_conversion_sign_error , sil_analysis , none , <nl> + ERROR ( integer_conversion_sign_error , none , <nl> " negative integer cannot be converted to unsigned type % 0 " , <nl> ( Type ) ) <nl> - ERROR ( negative_integer_literal_overflow_unsigned , sil_analysis , none , <nl> + ERROR ( negative_integer_literal_overflow_unsigned , none , <nl> " negative integer ' % 1 ' overflows when stored into unsigned type % 0 " , <nl> ( Type , StringRef ) ) <nl> <nl> - ERROR ( integer_literal_overflow , sil_analysis , none , <nl> + ERROR ( integer_literal_overflow , none , <nl> " integer literal ' % 1 ' overflows when stored into % 0 " , <nl> ( Type , StringRef ) ) <nl> - ERROR ( integer_literal_overflow_builtin_types , sil_analysis , none , <nl> + ERROR ( integer_literal_overflow_builtin_types , none , <nl> " integer literal ' % 2 ' overflows when stored into " <nl> " % select { unsigned | signed } 0 % 1 " , ( bool , Type , StringRef ) ) <nl> - WARNING ( integer_literal_overflow_warn , sil_analysis , none , <nl> + WARNING ( integer_literal_overflow_warn , none , <nl> " integer literal overflows when stored into % 0 " , <nl> ( Type ) ) <nl> - ERROR ( arithmetic_operation_overflow , sil_analysis , none , <nl> + ERROR ( arithmetic_operation_overflow , none , <nl> " arithmetic operation ' % 0 % 1 % 2 ' ( on type % 3 ) results in an overflow " , <nl> ( StringRef , StringRef , StringRef , Type ) ) <nl> - ERROR ( arithmetic_operation_overflow_generic_type , sil_analysis , none , <nl> + ERROR ( arithmetic_operation_overflow_generic_type , none , <nl> " arithmetic operation ' % 0 % 1 % 2 ' ( on % select { unsigned | signed } 3 " <nl> " % 4 - bit integer type ) results in an overflow " , <nl> ( StringRef , StringRef , StringRef , bool , unsigned ) ) <nl> - ERROR ( division_overflow , sil_analysis , none , <nl> + ERROR ( division_overflow , none , <nl> " division ' % 0 % 1 % 2 ' results in an overflow " , <nl> ( StringRef , StringRef , StringRef ) ) <nl> - ERROR ( division_by_zero , sil_analysis , none , " division by zero " , ( ) ) <nl> - ERROR ( wrong_non_negative_assumption , sil_analysis , none , <nl> + ERROR ( division_by_zero , none , " division by zero " , ( ) ) <nl> + ERROR ( wrong_non_negative_assumption , none , <nl> " assumed non - negative value ' % 0 ' is negative " , ( StringRef ) ) <nl> - ERROR ( shifting_all_significant_bits , sil_analysis , none , <nl> + ERROR ( shifting_all_significant_bits , none , <nl> " shift amount is greater than or equal to type size in bits " , ( ) ) <nl> <nl> / / FIXME : We won ' t need this as it will be replaced with user - generated strings . <nl> / / staticReport diagnostics . <nl> - ERROR ( static_report_error , sil_analysis , none , <nl> + ERROR ( static_report_error , none , <nl> " static report error " , ( ) ) <nl> <nl> <nl> mmm a / include / swift / AST / DiagnosticsSIL . h <nl> ppp b / include / swift / AST / DiagnosticsSIL . h <nl> <nl> namespace swift { <nl> namespace diag { <nl> / / Declare common diagnostics objects with their appropriate types . <nl> - # define DIAG ( KIND , ID , Category , Options , Text , Signature ) \ <nl> + # define DIAG ( KIND , ID , Options , Text , Signature ) \ <nl> extern detail : : DiagWithArguments < void Signature > : : type ID ; <nl> # include " DiagnosticsSIL . def " <nl> } <nl> mmm a / include / swift / AST / DiagnosticsSema . def <nl> ppp b / include / swift / AST / DiagnosticsSema . def <nl> <nl> # endif <nl> <nl> # ifndef ERROR <nl> - # define ERROR ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( ERROR , ID , Category , Options , Text , Signature ) <nl> + # define ERROR ( ID , Options , Text , Signature ) \ <nl> + DIAG ( ERROR , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef WARNING <nl> - # define WARNING ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( WARNING , ID , Category , Options , Text , Signature ) <nl> + # define WARNING ( ID , Options , Text , Signature ) \ <nl> + DIAG ( WARNING , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> # ifndef NOTE <nl> - # define NOTE ( ID , Category , Options , Text , Signature ) \ <nl> - DIAG ( NOTE , ID , Category , Options , Text , Signature ) <nl> + # define NOTE ( ID , Options , Text , Signature ) \ <nl> + DIAG ( NOTE , ID , Options , Text , Signature ) <nl> # endif <nl> <nl> <nl> - NOTE ( type_declared_here , sema , none , <nl> + NOTE ( type_declared_here , none , <nl> " type declared here " , ( ) ) <nl> - NOTE ( decl_declared_here , sema , none , <nl> + NOTE ( decl_declared_here , none , <nl> " % 0 declared here " , ( Identifier ) ) <nl> - NOTE ( extended_type_declared_here , sema , none , <nl> + NOTE ( extended_type_declared_here , none , <nl> " extended type declared here " , ( ) ) <nl> <nl> - NOTE ( while_converting_default_tuple_value , sema , none , <nl> + NOTE ( while_converting_default_tuple_value , none , <nl> " while converting default tuple value to element type % 0 " , ( Type ) ) <nl> - NOTE ( while_converting_subscript_index , sema , none , <nl> + NOTE ( while_converting_subscript_index , none , <nl> " while converting subscript index to expected type % 0 " , ( Type ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Constraint solver diagnostics <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - ERROR ( ambiguous_member_overload_set , sema , none , <nl> + ERROR ( ambiguous_member_overload_set , none , <nl> " ambiguous reference to member ' % 0 ' " , ( StringRef ) ) <nl> <nl> - ERROR ( ambiguous_subscript , sema , none , <nl> + ERROR ( ambiguous_subscript , none , <nl> " ambiguous subscript with base type % 0 and index type % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( type_not_subscriptable , sema , none , <nl> + ERROR ( type_not_subscriptable , none , <nl> " type % 0 has no subscript members " , <nl> ( Type ) ) <nl> <nl> - ERROR ( could_not_find_tuple_member , sema , none , <nl> + ERROR ( could_not_find_tuple_member , none , <nl> " value of tuple type % 0 has no member % 1 " , ( Type , DeclName ) ) <nl> <nl> - ERROR ( could_not_find_value_member , sema , none , <nl> + ERROR ( could_not_find_value_member , none , <nl> " value of type % 0 has no member % 1 " , ( Type , DeclName ) ) <nl> - ERROR ( could_not_find_type_member , sema , none , <nl> + ERROR ( could_not_find_type_member , none , <nl> " type % 0 has no member % 1 " , ( Type , DeclName ) ) <nl> <nl> - ERROR ( expected_argument_in_contextual_member , sema , none , <nl> + ERROR ( expected_argument_in_contextual_member , none , <nl> " contextual member % 0 expects argument of type % 1 " , ( Identifier , Type ) ) <nl> - ERROR ( unexpected_argument_in_contextual_member , sema , none , <nl> + ERROR ( unexpected_argument_in_contextual_member , none , <nl> " contextual member % 0 has no associated value " , ( Identifier ) ) <nl> <nl> - ERROR ( could_not_use_value_member , sema , none , <nl> + ERROR ( could_not_use_value_member , none , <nl> " member % 1 cannot be used on value of type % 0 " , ( Type , DeclName ) ) <nl> - ERROR ( could_not_use_type_member , sema , none , <nl> + ERROR ( could_not_use_type_member , none , <nl> " member % 1 cannot be used on type % 0 " , ( Type , DeclName ) ) <nl> <nl> - ERROR ( could_not_use_type_member_on_instance , sema , none , <nl> + ERROR ( could_not_use_type_member_on_instance , none , <nl> " static member % 1 cannot be used on instance of type % 0 " , <nl> ( Type , DeclName ) ) <nl> - ERROR ( could_not_use_instance_member_on_type , sema , none , <nl> + ERROR ( could_not_use_instance_member_on_type , none , <nl> " instance member % 1 cannot be used on type % 0 " , <nl> ( Type , DeclName ) ) <nl> - ERROR ( could_not_use_member_on_existential , sema , none , <nl> + ERROR ( could_not_use_member_on_existential , none , <nl> " member % 1 cannot be used on value of protocol type % 0 ; use a generic " <nl> " constraint instead " , <nl> ( Type , DeclName ) ) <nl> <nl> <nl> - ERROR ( cannot_pass_rvalue_mutating_subelement , sema_tcs , none , <nl> + ERROR ( cannot_pass_rvalue_mutating_subelement , none , <nl> " cannot use mutating member on immutable value : % 0 " , <nl> ( StringRef ) ) <nl> - ERROR ( cannot_pass_rvalue_mutating , sema_tcs , none , <nl> + ERROR ( cannot_pass_rvalue_mutating , none , <nl> " cannot use mutating member on immutable value of type % 0 " , <nl> ( Type ) ) <nl> - ERROR ( cannot_pass_rvalue_mutating_getter_subelement , sema_tcs , none , <nl> + ERROR ( cannot_pass_rvalue_mutating_getter_subelement , none , <nl> " cannot use mutating getter on immutable value : % 0 " , <nl> ( StringRef ) ) <nl> - ERROR ( cannot_pass_rvalue_mutating_getter , sema_tcs , none , <nl> + ERROR ( cannot_pass_rvalue_mutating_getter , none , <nl> " cannot use mutating getter on immutable value of type % 0 " , <nl> ( Type ) ) <nl> <nl> - ERROR ( expression_too_complex , sema , none , <nl> + ERROR ( expression_too_complex , none , <nl> " expression was too complex to be solved in reasonable time ; " <nl> " consider breaking up the expression into distinct sub - expressions " , ( ) ) <nl> <nl> - ERROR ( comparison_with_nil_illegal , sema , none , <nl> + ERROR ( comparison_with_nil_illegal , none , <nl> " value of type % 0 can never be nil , comparison isn ' t allowed " , <nl> ( Type ) ) <nl> <nl> - ERROR ( cannot_match_expr_pattern_with_value , sema , none , <nl> + ERROR ( cannot_match_expr_pattern_with_value , none , <nl> " expression pattern of type % 0 cannot match values of type % 1 " , <nl> ( Type , Type ) ) <nl> <nl> - ERROR ( cannot_apply_binop_to_args , sema , none , <nl> + ERROR ( cannot_apply_binop_to_args , none , <nl> " binary operator ' % 0 ' cannot be applied to operands of type " <nl> " % 1 and % 2 " , <nl> ( StringRef , Type , Type ) ) <nl> <nl> - ERROR ( cannot_apply_binop_to_same_args , sema , none , <nl> + ERROR ( cannot_apply_binop_to_same_args , none , <nl> " binary operator ' % 0 ' cannot be applied to two % 1 operands " , <nl> ( StringRef , Type ) ) <nl> <nl> - ERROR ( cannot_apply_unop_to_arg , sema , none , <nl> + ERROR ( cannot_apply_unop_to_arg , none , <nl> " unary operator ' % 0 ' cannot be applied to an operand of type % 1 " , <nl> ( StringRef , Type ) ) <nl> <nl> - ERROR ( cannot_apply_lvalue_unop_to_subelement , sema_tcs , none , <nl> + ERROR ( cannot_apply_lvalue_unop_to_subelement , none , <nl> " cannot pass immutable value to mutating operator : % 0 " , <nl> ( StringRef ) ) <nl> - ERROR ( cannot_apply_lvalue_unop_to_rvalue , sema , none , <nl> + ERROR ( cannot_apply_lvalue_unop_to_rvalue , none , <nl> " cannot pass immutable value of type % 0 to mutating operator " , <nl> ( Type ) ) <nl> <nl> <nl> - ERROR ( cannot_apply_lvalue_binop_to_subelement , sema_tcs , none , <nl> + ERROR ( cannot_apply_lvalue_binop_to_subelement , none , <nl> " left side of mutating operator isn ' t mutable : % 0 " , ( StringRef ) ) <nl> - ERROR ( cannot_apply_lvalue_binop_to_rvalue , sema , none , <nl> + ERROR ( cannot_apply_lvalue_binop_to_rvalue , none , <nl> " left side of mutating operator has immutable type % 0 " , ( Type ) ) <nl> <nl> - ERROR ( cannot_subscript_with_index , sema , none , <nl> + ERROR ( cannot_subscript_with_index , none , <nl> " cannot subscript a value of type % 0 with an index of type % 1 " , <nl> ( Type , Type ) ) <nl> <nl> - ERROR ( cannot_subscript_base , sema , none , <nl> + ERROR ( cannot_subscript_base , none , <nl> " cannot subscript a value of type % 0 " , <nl> ( Type ) ) <nl> <nl> - ERROR ( cannot_pass_rvalue_inout_subelement , sema_tcs , none , <nl> + ERROR ( cannot_pass_rvalue_inout_subelement , none , <nl> " cannot pass immutable value as inout argument : % 0 " , <nl> ( StringRef ) ) <nl> - ERROR ( cannot_pass_rvalue_inout , sema_tcs , none , <nl> + ERROR ( cannot_pass_rvalue_inout , none , <nl> " cannot pass immutable value of type % 0 as inout argument " , <nl> ( Type ) ) <nl> <nl> - ERROR ( cannot_assign_to_literal , sema , none , <nl> + ERROR ( cannot_assign_to_literal , none , <nl> " cannot assign to a literal value " , ( ) ) <nl> <nl> - ERROR ( cannot_call_with_no_params , sema , none , <nl> + ERROR ( cannot_call_with_no_params , none , <nl> " cannot invoke % select { | initializer for type } 1 ' % 0 ' with no arguments " , <nl> ( StringRef , bool ) ) <nl> <nl> - ERROR ( cannot_call_with_params , sema , none , <nl> + ERROR ( cannot_call_with_params , none , <nl> " cannot invoke % select { | initializer for type } 2 ' % 0 ' with an argument list " <nl> " of type ' % 1 ' " , ( StringRef , StringRef , bool ) ) <nl> <nl> - ERROR ( expected_do_in_statement , sema , none , <nl> + ERROR ( expected_do_in_statement , none , <nl> " expected ' do ' keyword to designate a block of statements " , ( ) ) <nl> <nl> - ERROR ( cannot_call_non_function_value , sema , none , <nl> + ERROR ( cannot_call_non_function_value , none , <nl> " cannot call value of non - function type % 0 " , ( Type ) ) <nl> <nl> - ERROR ( wrong_argument_labels_overload , sema , none , <nl> + ERROR ( wrong_argument_labels_overload , none , <nl> " argument labels ' % 0 ' do not match any available overloads " , ( StringRef ) ) <nl> <nl> - ERROR ( no_candidates_match_result_type , sema , none , <nl> + ERROR ( no_candidates_match_result_type , none , <nl> " no ' % 0 ' candidates produce the expected contextual result type % 1 " , <nl> ( StringRef , Type ) ) <nl> <nl> - ERROR ( candidates_no_match_result_type , sema , none , <nl> + ERROR ( candidates_no_match_result_type , none , <nl> " ' % 0 ' produces % 1 , not the expected contextual result type % 2 " , <nl> ( StringRef , Type , Type ) ) <nl> <nl> <nl> <nl> - ERROR ( invalid_callee_result_type , sema , none , <nl> + ERROR ( invalid_callee_result_type , none , <nl> " cannot convert call result type % 0 to expected type % 1 " , <nl> ( Type , Type ) ) <nl> <nl> <nl> - ERROR ( cannot_invoke_closure , sema , none , <nl> + ERROR ( cannot_invoke_closure , none , <nl> " cannot invoke closure expression with an argument list of type ' % 0 ' " , <nl> ( StringRef ) ) <nl> - ERROR ( cannot_invoke_closure_type , sema , none , <nl> + ERROR ( cannot_invoke_closure_type , none , <nl> " cannot invoke closure of type % 0 with an argument list of type ' % 1 ' " , <nl> ( Type , StringRef ) ) <nl> <nl> - ERROR ( cannot_infer_closure_type , sema , none , <nl> + ERROR ( cannot_infer_closure_type , none , <nl> " unable to infer closure type in the current context " , ( ) ) <nl> - ERROR ( cannot_infer_closure_result_type , sema , none , <nl> + ERROR ( cannot_infer_closure_result_type , none , <nl> " unable to infer closure return type in current context " , ( ) ) <nl> <nl> - ERROR ( incorrect_explicit_closure_result , sema , none , <nl> + ERROR ( incorrect_explicit_closure_result , none , <nl> " declared closure result % 0 is incompatible with contextual type % 1 " , <nl> ( Type , Type ) ) <nl> <nl> - ERROR ( cannot_call_function_value , sema , none , <nl> + ERROR ( cannot_call_function_value , none , <nl> " cannot invoke value of function type with argument list ' % 0 ' " , <nl> ( StringRef ) ) <nl> - ERROR ( cannot_call_value_of_function_type , sema , none , <nl> + ERROR ( cannot_call_value_of_function_type , none , <nl> " cannot invoke value of type % 0 with argument list ' % 1 ' " , <nl> ( Type , StringRef ) ) <nl> <nl> - NOTE ( suggest_expected_match , sema , none , <nl> + NOTE ( suggest_expected_match , none , <nl> " % select { expected an argument list | produces result } 0 of type ' % 1 ' " , <nl> ( bool , StringRef ) ) <nl> <nl> - NOTE ( suggest_partial_overloads , sema , none , <nl> + NOTE ( suggest_partial_overloads , none , <nl> " overloads for ' % 1 ' exist with these % select { " <nl> " partially matching parameter lists | result types } 0 : % 2 " , <nl> ( bool , StringRef , StringRef ) ) <nl> <nl> - ERROR ( cannot_convert_initializer_value , sema , none , <nl> + ERROR ( cannot_convert_initializer_value , none , <nl> " cannot convert value of type % 0 to specified type % 1 " , ( Type , Type ) ) <nl> - ERROR ( cannot_convert_initializer_value_protocol , sema , none , <nl> + ERROR ( cannot_convert_initializer_value_protocol , none , <nl> " value of type % 0 does not conform to specified type % 1 " , ( Type , Type ) ) <nl> - ERROR ( cannot_convert_initializer_value_nil , sema_tcd , none , <nl> + ERROR ( cannot_convert_initializer_value_nil , none , <nl> " nil cannot initialize specified type % 0 " , ( Type ) ) <nl> <nl> - ERROR ( cannot_convert_to_return_type , sema , none , <nl> + ERROR ( cannot_convert_to_return_type , none , <nl> " cannot convert return expression of type % 0 to return type % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( cannot_convert_to_return_type_protocol , sema , none , <nl> + ERROR ( cannot_convert_to_return_type_protocol , none , <nl> " return expression of type % 0 does not conform to % 1 " , ( Type , Type ) ) <nl> - ERROR ( cannot_convert_to_return_type_nil , sema , none , <nl> + ERROR ( cannot_convert_to_return_type_nil , none , <nl> " nil is incompatible with return type % 0 " , ( Type ) ) <nl> <nl> - ERROR ( cannot_convert_thrown_type , sema , none , <nl> + ERROR ( cannot_convert_thrown_type , none , <nl> " thrown expression type % 0 does not conform to ' ErrorType ' " , ( Type ) ) <nl> - ERROR ( cannot_throw_nil , sema , none , <nl> + ERROR ( cannot_throw_nil , none , <nl> " cannot infer concrete ErrorType for thrown ' nil ' value " , ( ) ) <nl> <nl> <nl> - ERROR ( cannot_convert_raw_initializer_value , sema , none , <nl> + ERROR ( cannot_convert_raw_initializer_value , none , <nl> " cannot convert value of type % 0 to raw type % 1 " , ( Type , Type ) ) <nl> - ERROR ( cannot_convert_raw_initializer_value_nil , sema , none , <nl> + ERROR ( cannot_convert_raw_initializer_value_nil , none , <nl> " cannot convert nil to raw type % 1 " , ( Type ) ) <nl> <nl> - ERROR ( cannot_convert_default_arg_value , sema , none , <nl> + ERROR ( cannot_convert_default_arg_value , none , <nl> " default argument value of type % 0 cannot be converted to type % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( cannot_convert_default_arg_value_protocol , sema , none , <nl> + ERROR ( cannot_convert_default_arg_value_protocol , none , <nl> " default argument value of type % 0 does not conform to % 1 " , ( Type , Type ) ) <nl> - ERROR ( cannot_convert_default_arg_value_nil , sema , none , <nl> + ERROR ( cannot_convert_default_arg_value_nil , none , <nl> " nil default argument value of cannot be converted to type % 0 " , ( Type ) ) <nl> <nl> - ERROR ( cannot_convert_argument_value , sema , none , <nl> + ERROR ( cannot_convert_argument_value , none , <nl> " cannot convert value of type % 0 to expected argument type % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( cannot_convert_argument_value_protocol , sema_tcd , none , <nl> + ERROR ( cannot_convert_argument_value_protocol , none , <nl> " argument type % 0 does not conform to expected type % 1 " , ( Type , Type ) ) <nl> - ERROR ( cannot_convert_argument_value_nil , sema , none , <nl> + ERROR ( cannot_convert_argument_value_nil , none , <nl> " nil is not compatible with expected argument type % 0 " , ( Type ) ) <nl> <nl> - ERROR ( cannot_convert_closure_result , sema , none , <nl> + ERROR ( cannot_convert_closure_result , none , <nl> " cannot convert value of type % 0 to closure result type % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( cannot_convert_closure_result_protocol , sema_tcd , none , <nl> + ERROR ( cannot_convert_closure_result_protocol , none , <nl> " result value of type % 0 does not conform to closure result type % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( cannot_convert_closure_result_nil , sema , none , <nl> + ERROR ( cannot_convert_closure_result_nil , none , <nl> " nil is not compatible with closure result type % 0 " , ( Type ) ) <nl> <nl> / / Array Element <nl> - ERROR ( cannot_convert_array_element , sema , none , <nl> + ERROR ( cannot_convert_array_element , none , <nl> " cannot convert value of type % 0 to expected element type % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( cannot_convert_array_element_protocol , sema_tcd , none , <nl> + ERROR ( cannot_convert_array_element_protocol , none , <nl> " value of type % 0 does not conform to expected element type % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( cannot_convert_array_element_nil , sema , none , <nl> + ERROR ( cannot_convert_array_element_nil , none , <nl> " nil is not compatible with expected element type % 0 " , ( Type ) ) <nl> <nl> / / Dictionary Key <nl> - ERROR ( cannot_convert_dict_key , sema , none , <nl> + ERROR ( cannot_convert_dict_key , none , <nl> " cannot convert value of type % 0 to expected dictionary key type % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( cannot_convert_dict_key_protocol , sema_tcd , none , <nl> + ERROR ( cannot_convert_dict_key_protocol , none , <nl> " value of type % 0 does not conform to expected dictionary key type % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( cannot_convert_dict_key_nil , sema , none , <nl> + ERROR ( cannot_convert_dict_key_nil , none , <nl> " nil is not compatible with expected dictionary key type % 0 " , ( Type ) ) <nl> <nl> / / Dictionary Value <nl> - ERROR ( cannot_convert_dict_value , sema , none , <nl> + ERROR ( cannot_convert_dict_value , none , <nl> " cannot convert value of type % 0 to expected dictionary value type % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( cannot_convert_dict_value_protocol , sema_tcd , none , <nl> + ERROR ( cannot_convert_dict_value_protocol , none , <nl> " value of type % 0 does not conform to expected dictionary value type % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( cannot_convert_dict_value_nil , sema , none , <nl> + ERROR ( cannot_convert_dict_value_nil , none , <nl> " nil is not compatible with expected dictionary value type % 0 " , ( Type ) ) <nl> <nl> / / Coerce Expr <nl> - ERROR ( cannot_convert_coerce , sema , none , <nl> + ERROR ( cannot_convert_coerce , none , <nl> " cannot convert value of type % 0 to type % 1 in coercion " , <nl> ( Type , Type ) ) <nl> - ERROR ( cannot_convert_coerce_protocol , sema_tcd , none , <nl> + ERROR ( cannot_convert_coerce_protocol , none , <nl> " value of type % 0 does not conform to % 1 in coercion " , <nl> ( Type , Type ) ) <nl> - ERROR ( cannot_convert_coerce_nil , sema , none , <nl> + ERROR ( cannot_convert_coerce_nil , none , <nl> " nil is not compatible with type % 0 in coercion " , ( Type ) ) <nl> <nl> / / Assign Expr <nl> - ERROR ( cannot_convert_assign , sema , none , <nl> + ERROR ( cannot_convert_assign , none , <nl> " cannot assign value of type % 0 to type % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( cannot_convert_assign_protocol , sema_tcd , none , <nl> + ERROR ( cannot_convert_assign_protocol , none , <nl> " value of type % 0 does not conform to % 1 in assignment " , <nl> ( Type , Type ) ) <nl> - ERROR ( cannot_convert_assign_nil , sema , none , <nl> + ERROR ( cannot_convert_assign_nil , none , <nl> " nil cannot be assigned to type % 0 " , ( Type ) ) <nl> <nl> <nl> - ERROR ( throws_functiontype_mismatch , sema_tcc , none , <nl> + ERROR ( throws_functiontype_mismatch , none , <nl> " invalid conversion from throwing function of type % 0 to " <nl> " non - throwing function type % 1 " , ( Type , Type ) ) <nl> - ERROR ( noescape_functiontype_mismatch , sema_tcc , none , <nl> + ERROR ( noescape_functiontype_mismatch , none , <nl> " invalid conversion from non - escaping function of type % 0 to " <nl> " potentially escaping function type % 1 " , ( Type , Type ) ) <nl> <nl> <nl> <nl> <nl> - ERROR ( cannot_return_value_from_void_func , sema , none , <nl> + ERROR ( cannot_return_value_from_void_func , none , <nl> " unexpected non - void return value in void function " , ( ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Name Binding <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - ERROR ( sema_no_import , sema_nb , Fatal , <nl> + ERROR ( sema_no_import , Fatal , <nl> " no such module ' % 0 ' " , ( StringRef ) ) <nl> - ERROR ( sema_no_import_repl , sema_nb , none , <nl> + ERROR ( sema_no_import_repl , none , <nl> " no such module ' % 0 ' " , ( StringRef ) ) <nl> - NOTE ( sema_no_import_no_sdk , sema_nb , none , <nl> + NOTE ( sema_no_import_no_sdk , none , <nl> " did you forget to set an SDK using - sdk or SDKROOT ? " , ( ) ) <nl> - NOTE ( sema_no_import_no_sdk_xcrun , sema_nb , none , <nl> + NOTE ( sema_no_import_no_sdk_xcrun , none , <nl> " use \ " xcrun - sdk macosx swiftc \ " to select the default OS X SDK " <nl> " installed with Xcode " , ( ) ) <nl> - WARNING ( sema_import_current_module , sema_nb , none , <nl> + WARNING ( sema_import_current_module , none , <nl> " this file is part of module % 0 ; ignoring import " , ( Identifier ) ) <nl> - WARNING ( sema_import_current_module_with_file , sema_nb , none , <nl> + WARNING ( sema_import_current_module_with_file , none , <nl> " file ' % 0 ' is part of module % 1 ; ignoring import " , <nl> ( StringRef , Identifier ) ) <nl> - ERROR ( sema_opening_import , sema_nb , Fatal , <nl> + ERROR ( sema_opening_import , Fatal , <nl> " opening import file for module % 0 : % 1 " , ( Identifier , StringRef ) ) <nl> <nl> - ERROR ( serialization_load_failed , sema , Fatal , <nl> + ERROR ( serialization_load_failed , Fatal , <nl> " failed to load module % 0 " , ( Identifier ) ) <nl> - ERROR ( serialization_malformed_module , sema , Fatal , <nl> + ERROR ( serialization_malformed_module , Fatal , <nl> " malformed module file : % 0 " , ( StringRef ) ) <nl> - ERROR ( serialization_module_too_new , sema , Fatal , <nl> + ERROR ( serialization_module_too_new , Fatal , <nl> " module file was created by a newer version of the compiler : % 0 " , <nl> ( StringRef ) ) <nl> - ERROR ( serialization_module_too_old , sema , Fatal , <nl> + ERROR ( serialization_module_too_old , Fatal , <nl> " module file was created by an older version of the compiler ; " <nl> " rebuild % 0 and try again : % 1 " , <nl> ( Identifier , StringRef ) ) <nl> - ERROR ( serialization_missing_single_dependency , sema , Fatal , <nl> + ERROR ( serialization_missing_single_dependency , Fatal , <nl> " missing required module ' % 0 ' " , ( StringRef ) ) <nl> - ERROR ( serialization_missing_dependencies , sema , Fatal , <nl> + ERROR ( serialization_missing_dependencies , Fatal , <nl> " missing required modules : % 0 " , ( StringRef ) ) <nl> - ERROR ( serialization_missing_shadowed_module , sema , Fatal , <nl> + ERROR ( serialization_missing_shadowed_module , Fatal , <nl> " cannot load underlying module for % 0 " , ( Identifier ) ) <nl> - ERROR ( serialization_name_mismatch , sema , Fatal , <nl> + ERROR ( serialization_name_mismatch , Fatal , <nl> " cannot load module ' % 0 ' as % 1 " , ( StringRef , Identifier ) ) <nl> - ERROR ( serialization_name_mismatch_repl , sema , none , <nl> + ERROR ( serialization_name_mismatch_repl , none , <nl> " cannot load module ' % 0 ' as % 1 " , ( StringRef , Identifier ) ) <nl> - ERROR ( serialization_target_incompatible , sema , Fatal , <nl> + ERROR ( serialization_target_incompatible , Fatal , <nl> " module file was created for incompatible target % 0 : % 1 " , <nl> ( StringRef , StringRef ) ) <nl> - ERROR ( serialization_target_incompatible_repl , sema , none , <nl> + ERROR ( serialization_target_incompatible_repl , none , <nl> " module file was created for incompatible target % 0 : % 1 " , <nl> ( StringRef , StringRef ) ) <nl> - ERROR ( serialization_target_too_new , sema , Fatal , <nl> + ERROR ( serialization_target_too_new , Fatal , <nl> " module file ' s minimum deployment target is % 0 v % 1 . % 2 % select { | . % 3 } 3 : % 4 " , <nl> ( StringRef , unsigned , unsigned , unsigned , StringRef ) ) <nl> - ERROR ( serialization_target_too_new_repl , sema , none , <nl> + ERROR ( serialization_target_too_new_repl , none , <nl> " module file ' s minimum deployment target is % 0 v % 1 . % 2 % select { | . % 3 } 3 : % 4 " , <nl> ( StringRef , unsigned , unsigned , unsigned , StringRef ) ) <nl> <nl> - ERROR ( invalid_redecl , sema_nb , none , " invalid redeclaration of % 0 " , ( DeclName ) ) <nl> - NOTE ( invalid_redecl_prev , sema_nb , none , <nl> + ERROR ( invalid_redecl , none , " invalid redeclaration of % 0 " , ( DeclName ) ) <nl> + NOTE ( invalid_redecl_prev , none , <nl> " % 0 previously declared here " , ( DeclName ) ) <nl> <nl> - ERROR ( ambiguous_type_base , sema_nb , none , <nl> + ERROR ( ambiguous_type_base , none , <nl> " % 0 is ambiguous for type lookup in this context " , ( Identifier ) ) <nl> - ERROR ( invalid_member_type , sema_nb , none , <nl> + ERROR ( invalid_member_type , none , <nl> " % 0 is not a member type of % 1 " , ( Identifier , Type ) ) <nl> - ERROR ( invalid_member_type_suggest , sema_nb , none , <nl> + ERROR ( invalid_member_type_suggest , none , <nl> " % 0 does not have a member type named % 1 ; did you mean % 2 ? " , <nl> ( Type , Identifier , Identifier ) ) <nl> - ERROR ( ambiguous_member_type , sema_nb , none , <nl> + ERROR ( ambiguous_member_type , none , <nl> " ambiguous type name % 0 in % 1 " , ( Identifier , Type ) ) <nl> - ERROR ( no_module_type , sema_nb , none , <nl> + ERROR ( no_module_type , none , <nl> " no type named % 0 in module % 1 " , ( Identifier , Identifier ) ) <nl> - ERROR ( ambiguous_module_type , sema_nb , none , <nl> + ERROR ( ambiguous_module_type , none , <nl> " ambiguous type name % 0 in module % 1 " , ( Identifier , Identifier ) ) <nl> - ERROR ( use_nonmatching_operator , sema_nb , none , <nl> + ERROR ( use_nonmatching_operator , none , <nl> " % 0 is not a % select { binary | prefix unary | postfix unary } 1 operator " , <nl> ( Identifier , unsigned ) ) <nl> <nl> - ERROR ( unspaced_binary_operator_fixit , sema_nb , none , <nl> + ERROR ( unspaced_binary_operator_fixit , none , <nl> " missing whitespace between % 0 and % 1 operators " , <nl> ( Identifier , Identifier , bool ) ) <nl> - ERROR ( unspaced_binary_operator , sema_nb , none , <nl> + ERROR ( unspaced_binary_operator , none , <nl> " ambiguous missing whitespace between unary and binary operators " , ( ) ) <nl> - NOTE ( unspaced_binary_operators_candidate , sema_nb , none , <nl> + NOTE ( unspaced_binary_operators_candidate , none , <nl> " could be % select { binary | postfix } 2 % 0 and % select { prefix | binary } 2 % 1 " , <nl> ( Identifier , Identifier , bool ) ) <nl> - ERROR ( unspaced_unary_operator , sema_nb , none , <nl> + ERROR ( unspaced_unary_operator , none , <nl> " unary operators may not be juxtaposed ; parenthesize inner expression " , <nl> ( ) ) <nl> <nl> <nl> - ERROR ( use_unresolved_identifier , sema_nb , none , <nl> + ERROR ( use_unresolved_identifier , none , <nl> " use of unresolved % select { identifier | operator } 1 % 0 " , ( Identifier , bool ) ) <nl> - ERROR ( use_undeclared_type , sema_nb , none , <nl> + ERROR ( use_undeclared_type , none , <nl> " use of undeclared type % 0 " , ( Identifier ) ) <nl> - ERROR ( use_undeclared_type_did_you_mean , sema_nb , none , <nl> + ERROR ( use_undeclared_type_did_you_mean , none , <nl> " use of undeclared type % 0 ; did you mean to use ' % 1 ' ? " , ( Identifier , StringRef ) ) <nl> - NOTE ( note_remapped_type , sema_nb , none , <nl> + NOTE ( note_remapped_type , none , <nl> " did you mean to use ' % 0 ' ? " , ( StringRef ) ) <nl> - ERROR ( identifier_init_failure , sema_nb , none , <nl> + ERROR ( identifier_init_failure , none , <nl> " could not infer type for % 0 " , ( Identifier ) ) <nl> - ERROR ( pattern_used_in_type , sema_nb , none , <nl> + ERROR ( pattern_used_in_type , none , <nl> " % 0 used within its own type " , ( Identifier ) ) <nl> - NOTE ( note_module_as_type , sema_nb , none , <nl> + NOTE ( note_module_as_type , none , <nl> " cannot use module % 0 as a type " , ( Identifier ) ) <nl> <nl> - ERROR ( use_unknown_object_literal , sema_nb , none , <nl> + ERROR ( use_unknown_object_literal , none , <nl> " use of unknown object literal name % 0 " , ( Identifier ) ) <nl> - ERROR ( object_literal_default_type_missing , sema_nb , none , <nl> + ERROR ( object_literal_default_type_missing , none , <nl> " could not infer type of % 0 literal " , ( StringRef ) ) <nl> - NOTE ( object_literal_resolve_import , sema_nb , none , <nl> + NOTE ( object_literal_resolve_import , none , <nl> " import % 0 to use ' % 1 ' as the default % 2 literal type " , <nl> ( StringRef , StringRef , StringRef ) ) <nl> <nl> - ERROR ( use_non_type_value , sema_nb , none , <nl> + ERROR ( use_non_type_value , none , <nl> " % 0 is not a type " , ( Identifier ) ) <nl> - NOTE ( use_non_type_value_prev , sema_nb , none , <nl> + NOTE ( use_non_type_value_prev , none , <nl> " % 0 declared here " , ( Identifier ) ) <nl> - ERROR ( use_local_before_declaration , sema_nb , none , <nl> + ERROR ( use_local_before_declaration , none , <nl> " use of local variable % 0 before its declaration " , ( Identifier ) ) <nl> - ERROR ( unsupported_existential_type , sema_nb , none , <nl> + ERROR ( unsupported_existential_type , none , <nl> " protocol % 0 can only be used as a generic constraint because it has " <nl> " Self or associated type requirements " , ( Identifier ) ) <nl> <nl> - ERROR ( no_decl_in_module , sema_nb , none , <nl> + ERROR ( no_decl_in_module , none , <nl> " no such decl in module " , ( ) ) <nl> - ERROR ( imported_decl_is_wrong_kind , sema_nb , none , <nl> + ERROR ( imported_decl_is_wrong_kind , none , <nl> " % 0 was imported as ' % 1 ' , but is a " <nl> " % select { * * MODULE * * | type | struct | class | enum | protocol | variable | function } 2 " , <nl> ( Identifier , StringRef , / * ImportKind * / unsigned ) ) <nl> - ERROR ( ambiguous_decl_in_module , sema_nb , none , <nl> + ERROR ( ambiguous_decl_in_module , none , <nl> " ambiguous name % 0 in module % 1 " , ( Identifier , Identifier ) ) <nl> <nl> - ERROR ( module_not_testable , sema_nb , none , <nl> + ERROR ( module_not_testable , none , <nl> " module % 0 was not compiled for testing " , ( Identifier ) ) <nl> <nl> / / Operator decls <nl> - ERROR ( ambiguous_operator_decls , sema_nb , none , <nl> + ERROR ( ambiguous_operator_decls , none , <nl> " ambiguous operator declarations found for operator " , ( ) ) <nl> - NOTE ( found_this_operator_decl , sema_nb , none , <nl> + NOTE ( found_this_operator_decl , none , <nl> " found this matching operator declaration " , ( ) ) <nl> - ERROR ( operator_redeclared , sema_nb , none , <nl> + ERROR ( operator_redeclared , none , <nl> " operator redeclared " , ( ) ) <nl> - NOTE ( previous_operator_decl , sema_nb , none , <nl> + NOTE ( previous_operator_decl , none , <nl> " previous operator declaration here " , ( ) ) <nl> - ERROR ( declared_operator_without_operator_decl , sema_nb , none , <nl> + ERROR ( declared_operator_without_operator_decl , none , <nl> " operator implementation without matching operator declaration " , ( ) ) <nl> - ERROR ( declared_unary_op_without_attribute , sema_nb , none , <nl> + ERROR ( declared_unary_op_without_attribute , none , <nl> " unary operator implementation must have a ' prefix ' or ' postfix ' modifier " , ( ) ) <nl> - ERROR ( unary_op_missing_prepos_attribute , sema_nb , none , <nl> + ERROR ( unary_op_missing_prepos_attribute , none , <nl> " % select { prefix | postfix } 0 unary operator missing " <nl> " ' % select { prefix | postfix } 0 ' modifier " , ( bool ) ) <nl> - NOTE ( unary_operator_declaration_here , sema_nb , none , <nl> + NOTE ( unary_operator_declaration_here , none , <nl> " % select { prefix | postfix } 0 operator found here " , ( bool ) ) <nl> - ERROR ( invalid_arg_count_for_operator , sema_nb , none , <nl> + ERROR ( invalid_arg_count_for_operator , none , <nl> " operators must have one or two arguments " , ( ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Type Check Coercions <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - ERROR ( tuple_conversion_not_expressible , sema_tcc , none , <nl> + ERROR ( tuple_conversion_not_expressible , none , <nl> " cannot express tuple conversion % 0 to % 1 " , ( Type , Type ) ) <nl> - ERROR ( load_of_explicit_lvalue , sema_tcc , none , <nl> + ERROR ( load_of_explicit_lvalue , none , <nl> " % 0 variable is not being passed by reference " , ( Type ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Expression Type Checking Errors <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> - ERROR ( types_not_convertible , sema_tcc , none , <nl> + ERROR ( types_not_convertible , none , <nl> " % 1 is not % select { convertible to | a subtype of } 0 % 2 " , <nl> ( bool , Type , Type ) ) <nl> - NOTE ( in_cast_expr_types , sema_tcc , none , <nl> + NOTE ( in_cast_expr_types , none , <nl> " in cast from type % 0 to % 1 " , <nl> ( Type , Type ) ) <nl> <nl> - ERROR ( tuple_types_not_convertible_nelts , sema_tcc , none , <nl> + ERROR ( tuple_types_not_convertible_nelts , none , <nl> " % 0 is not convertible to % 1 , " <nl> " tuples have a different number of elements " , ( Type , Type ) ) <nl> <nl> - ERROR ( tuple_types_not_convertible , sema_tcc , none , <nl> + ERROR ( tuple_types_not_convertible , none , <nl> " tuple type % 0 is not convertible to tuple % 1 " , ( Type , Type ) ) <nl> <nl> - ERROR ( invalid_force_unwrap , sema_tcc , none , <nl> + ERROR ( invalid_force_unwrap , none , <nl> " cannot force unwrap value of non - optional type % 0 " , ( Type ) ) <nl> - ERROR ( invalid_optional_chain , sema_tcc , none , <nl> + ERROR ( invalid_optional_chain , none , <nl> " cannot use optional chaining on non - optional value of type % 0 " , <nl> ( Type ) ) <nl> - ERROR ( if_expr_cases_mismatch , sema_tcc , none , <nl> + ERROR ( if_expr_cases_mismatch , none , <nl> " result values in ' ? : ' expression have mismatching types % 0 and % 1 " , <nl> ( Type , Type ) ) <nl> <nl> - ERROR ( did_not_call_function_value , sema_tcc , none , <nl> + ERROR ( did_not_call_function_value , none , <nl> " function value was used as a property ; add ( ) to call it " , <nl> ( ) ) <nl> - ERROR ( did_not_call_function , sema_tcc , none , <nl> + ERROR ( did_not_call_function , none , <nl> " function % 0 was used as a property ; add ( ) to call it " , <nl> ( Identifier ) ) <nl> - ERROR ( did_not_call_method , sema_tcc , none , <nl> + ERROR ( did_not_call_method , none , <nl> " method % 0 was used as a property ; add ( ) to call it " , <nl> ( Identifier ) ) <nl> <nl> - ERROR ( init_not_instance_member , sema_tcc , none , <nl> + ERROR ( init_not_instance_member , none , <nl> " ' init ' is a member of the type ; insert ' . dynamicType ' to initialize " <nl> " a new object of the same dynamic type " , ( ) ) <nl> - ERROR ( super_initializer_not_in_initializer , sema_tcc , none , <nl> + ERROR ( super_initializer_not_in_initializer , none , <nl> " ' super . init ' cannot be called outside of an initializer " , ( ) ) <nl> - WARNING ( isa_is_always_true , sema_tcc , none , " ' % 0 ' test is always true " , <nl> + WARNING ( isa_is_always_true , none , " ' % 0 ' test is always true " , <nl> ( StringRef ) ) <nl> - WARNING ( conditional_downcast_coercion , sema_tcc , none , <nl> + WARNING ( conditional_downcast_coercion , none , <nl> " conditional cast from % 0 to % 1 always succeeds " , <nl> ( Type , Type ) ) <nl> - WARNING ( forced_downcast_noop , sema_tcc , none , <nl> + WARNING ( forced_downcast_noop , none , <nl> " forced cast of % 0 to same type has no effect " , ( Type ) ) <nl> <nl> - WARNING ( forced_downcast_coercion , sema_tcc , none , <nl> + WARNING ( forced_downcast_coercion , none , <nl> " forced cast from % 0 to % 1 always succeeds ; did you mean to use ' as ' ? " , <nl> ( Type , Type ) ) <nl> - ERROR ( downcast_same_type , sema_tcc , none , <nl> + ERROR ( downcast_same_type , none , <nl> " downcast from % 0 to % 1 only unwraps optionals ; did you mean to use " <nl> " ' % 2 ' ? " , <nl> ( Type , Type , StringRef ) ) <nl> - WARNING ( downcast_to_unrelated , sema_tcc , none , <nl> + WARNING ( downcast_to_unrelated , none , <nl> " cast from % 0 to unrelated type % 1 always fails " , ( Type , Type ) ) <nl> - ERROR ( downcast_to_more_optional , sema_tcc , none , <nl> + ERROR ( downcast_to_more_optional , none , <nl> " cannot downcast from % 0 to a more optional type % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( optional_chain_noop , sema_tcc , none , <nl> + ERROR ( optional_chain_noop , none , <nl> " optional chain has no effect , expression already produces % 0 " , <nl> ( Type ) ) <nl> - ERROR ( optional_chain_isnt_chaining , sema_tcc , none , <nl> + ERROR ( optional_chain_isnt_chaining , none , <nl> " ' ? ' must be followed by a call , member lookup , or subscript " , <nl> ( ) ) <nl> - ERROR ( pattern_in_expr , sema_tcc , none , <nl> + ERROR ( pattern_in_expr , none , <nl> " % 0 cannot appear in an expression " , ( PatternKind ) ) <nl> - NOTE ( note_call_to_operator , sema_tcc , none , <nl> + NOTE ( note_call_to_operator , none , <nl> " in call to operator % 0 " , ( Identifier ) ) <nl> - NOTE ( note_call_to_func , sema_tcc , none , <nl> + NOTE ( note_call_to_func , none , <nl> " in call to function % 0 " , ( Identifier ) ) <nl> - NOTE ( note_call_to_initializer , sema_tcc , none , <nl> + NOTE ( note_call_to_initializer , none , <nl> " in call to initializer " , ( ) ) <nl> - NOTE ( note_init_parameter , sema_tcc , none , <nl> + NOTE ( note_init_parameter , none , <nl> " in initialization of parameter % 0 " , ( Identifier ) ) <nl> - ERROR ( missing_nullary_call , sema_tcc , none , <nl> + ERROR ( missing_nullary_call , none , <nl> " function produces expected type % 0 ; did you mean to call it with ' ( ) ' ? " , <nl> ( Type ) ) <nl> - ERROR ( missing_unwrap_optional , sema_tcc , none , <nl> + ERROR ( missing_unwrap_optional , none , <nl> " value of optional type % 0 not unwrapped ; did you mean to use ' ! ' " <nl> " or ' ? ' ? " , <nl> ( Type ) ) <nl> - ERROR ( missing_unwrap_optional_try , sema_tcc , none , <nl> + ERROR ( missing_unwrap_optional_try , none , <nl> " value of optional type % 0 not unwrapped ; did you mean to use ' try ! ' " <nl> " or chain with ' ? ' ? " , <nl> ( Type ) ) <nl> - ERROR ( missing_forced_downcast , sema_tcc , none , <nl> + ERROR ( missing_forced_downcast , none , <nl> " % 0 is not convertible to % 1 ; " <nl> " did you mean to use ' as ! ' to force downcast ? " , ( Type , Type ) ) <nl> - ERROR ( missing_explicit_conversion , sema_tcc , none , <nl> + ERROR ( missing_explicit_conversion , none , <nl> " % 0 is not implicitly convertible to % 1 ; " <nl> " did you mean to use ' as ' to explicitly convert ? " , ( Type , Type ) ) <nl> - ERROR ( missing_address_of , sema_tcc , none , <nl> + ERROR ( missing_address_of , none , <nl> " passing value of type % 0 to an inout parameter requires explicit ' & ' " , <nl> ( Type ) ) <nl> - ERROR ( extra_address_of , sema_tcc , none , <nl> + ERROR ( extra_address_of , none , <nl> " ' & ' used with non - inout argument of type % 0 " , <nl> ( Type ) ) <nl> - ERROR ( extra_address_of_unsafepointer , sema_tcc , none , <nl> + ERROR ( extra_address_of_unsafepointer , none , <nl> " ' & ' is not allowed passing array value as % 0 argument " , <nl> ( Type ) ) <nl> <nl> - ERROR ( missing_init_on_metatype_initialization , sema_tcc , none , <nl> + ERROR ( missing_init_on_metatype_initialization , none , <nl> " initializing from a metatype value must reference ' init ' explicitly " , <nl> ( ) ) <nl> - ERROR ( extra_call_nonfunction , sema_tcc , none , <nl> + ERROR ( extra_call_nonfunction , none , <nl> " invalid use of ' ( ) ' to call a value of non - function type % 0 " , <nl> ( Type ) ) <nl> - ERROR ( extra_argument_labels , sema_tcc , none , <nl> + ERROR ( extra_argument_labels , none , <nl> " extraneous argument label % select { | s } 0 ' % 1 ' in % select { call | subscript } 2 " , <nl> ( bool , StringRef , bool ) ) <nl> - ERROR ( missing_argument_labels , sema_tcc , none , <nl> + ERROR ( missing_argument_labels , none , <nl> " missing argument label % select { | s } 0 ' % 1 ' in % select { call | subscript } 2 " , <nl> ( bool , StringRef , bool ) ) <nl> - ERROR ( wrong_argument_labels , sema_tcc , none , <nl> + ERROR ( wrong_argument_labels , none , <nl> " incorrect argument label % select { | s } 0 in % select { call | subscript } 3 " <nl> " ( have ' % 1 ' , expected ' % 2 ' ) " , <nl> ( bool , StringRef , StringRef , bool ) ) <nl> - ERROR ( extra_named_single_element_tuple , sema_tcc , none , <nl> + ERROR ( extra_named_single_element_tuple , none , <nl> " cannot treat single - element named tuple as a scalar ; use ' . % 0 ' to " <nl> " access its element " , ( StringRef ) ) <nl> - ERROR ( argument_out_of_order , sema_tcc , none , <nl> + ERROR ( argument_out_of_order , none , <nl> " argument % 0 must precede argument % 1 " , ( Identifier , Identifier ) ) <nl> - ERROR ( argument_out_of_order_named_unnamed , sema_tcc , none , <nl> + ERROR ( argument_out_of_order_named_unnamed , none , <nl> " argument % 0 must precede unnamed parameter # % 1 " , ( Identifier , unsigned ) ) <nl> <nl> - ERROR ( instance_member_use_on_type , sema_tcc , none , <nl> + ERROR ( instance_member_use_on_type , none , <nl> " use of instance member % 1 on type % 0 ; " <nl> " did you mean to use a value of type % 0 instead ? " , ( Type , Identifier ) ) <nl> <nl> - ERROR ( missing_argument_named , sema_tcc , none , <nl> + ERROR ( missing_argument_named , none , <nl> " missing argument for parameter % 0 in call " , ( Identifier ) ) <nl> - ERROR ( missing_argument_positional , sema_tcc , none , <nl> + ERROR ( missing_argument_positional , none , <nl> " missing argument for parameter # % 0 in call " , ( unsigned ) ) <nl> - ERROR ( extra_argument_named , sema_tcc , none , <nl> + ERROR ( extra_argument_named , none , <nl> " extra argument % 0 in call " , ( Identifier ) ) <nl> - ERROR ( extra_argument_positional , sema_tcc , none , <nl> + ERROR ( extra_argument_positional , none , <nl> " extra argument in call " , ( ) ) <nl> - ERROR ( extra_argument_to_nullary_call , sema_tcc , none , <nl> + ERROR ( extra_argument_to_nullary_call , none , <nl> " argument passed to call that takes no arguments " , ( ) ) <nl> - ERROR ( extra_trailing_closure_in_call , sema_tcc , none , <nl> + ERROR ( extra_trailing_closure_in_call , none , <nl> " extra trailing closure passed in call " , ( ) ) <nl> - ERROR ( no_accessible_initializers , sema_tcc , none , <nl> + ERROR ( no_accessible_initializers , none , <nl> " % 0 cannot be constructed because it has no accessible initializers " , <nl> ( Type ) ) <nl> - ERROR ( unbound_generic_parameter , sema_tcc , none , <nl> + ERROR ( unbound_generic_parameter , none , <nl> " generic parameter % 0 could not be inferred " , ( Type ) ) <nl> - ERROR ( cannot_bind_generic_parameter_to_type , sema_tcc , none , <nl> + ERROR ( cannot_bind_generic_parameter_to_type , none , <nl> " cannot bind generic parameter to type % 0 " , <nl> ( Type ) ) <nl> - ERROR ( string_index_not_integer , sema_tcc , none , <nl> + ERROR ( string_index_not_integer , none , <nl> " String may not be indexed with % 0 , it has variable size elements " , <nl> ( Type ) ) <nl> - NOTE ( string_index_not_integer_note , sema_tcc , none , <nl> + NOTE ( string_index_not_integer_note , none , <nl> " consider using an existing high level algorithm , " <nl> " str . startIndex . advancedBy ( n ) , or a projection like str . utf8 " , ( ) ) <nl> <nl> - ERROR ( invalid_c_function_pointer_conversion_expr , sema_tcc , none , <nl> + ERROR ( invalid_c_function_pointer_conversion_expr , none , <nl> " a C function pointer can only be formed from a reference to a ' func ' or " <nl> " a literal closure " , ( ) ) <nl> - ERROR ( c_function_pointer_from_method , sema_tcc , none , <nl> + ERROR ( c_function_pointer_from_method , none , <nl> " a C function pointer cannot be formed from a method " , ( ) ) <nl> - ERROR ( c_function_pointer_from_generic_function , sema_tcc , none , <nl> + ERROR ( c_function_pointer_from_generic_function , none , <nl> " a C function pointer cannot be formed from a reference to a generic " <nl> " function " , ( ) ) <nl> - ERROR ( c_function_pointer_from_function_with_context , sema_tcc , none , <nl> + ERROR ( c_function_pointer_from_function_with_context , none , <nl> " a C function pointer cannot be formed from a " <nl> " % select { local function | closure } 0 that captures " <nl> " % select { context | generic parameters } 1 " , ( bool , bool ) ) <nl> - NOTE ( c_function_pointer_captures_here , sema_tcc , none , <nl> + NOTE ( c_function_pointer_captures_here , none , <nl> " % 0 captured here " , ( Identifier ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Type Check Declarations <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - ERROR ( var_type_not_materializable , sema_tcd , none , <nl> + ERROR ( var_type_not_materializable , none , <nl> " type % 0 of variable is not materializable " , ( Type ) ) <nl> - ERROR ( enum_element_not_materializable , sema_tcd , none , <nl> + ERROR ( enum_element_not_materializable , none , <nl> " type of enum case is not materializable " , ( ) ) <nl> <nl> - ERROR ( missing_initializer_def , decl_parsing , PointsToFirstBadToken , <nl> + ERROR ( missing_initializer_def , PointsToFirstBadToken , <nl> " initializer requires a body " , ( ) ) <nl> <nl> / / Attributes <nl> - ERROR ( operator_not_func , sema_tcd , none , <nl> + ERROR ( operator_not_func , none , <nl> " operators must be declared with ' func ' " , ( ) ) <nl> - ERROR ( redefining_builtin_operator , sema_tcd , none , <nl> + ERROR ( redefining_builtin_operator , none , <nl> " cannot declare a custom % 0 ' % 1 ' operator " , ( StringRef , StringRef ) ) <nl> - ERROR ( invalid_infix_on_func , sema_tcd , none , <nl> + ERROR ( invalid_infix_on_func , none , <nl> " ' infix ' modifier is not required or allowed on func declarations " , ( ) ) <nl> - ERROR ( attribute_requires_operator_identifier , sema_tcd , none , <nl> + ERROR ( attribute_requires_operator_identifier , none , <nl> " ' % 0 ' requires a function with an operator identifier " , ( StringRef ) ) <nl> - ERROR ( attribute_requires_single_argument , sema_tcd , none , <nl> + ERROR ( attribute_requires_single_argument , none , <nl> " ' % 0 ' requires a function with one argument " , ( StringRef ) ) <nl> <nl> - ERROR ( inout_cant_be_variadic , sema_tce , none , <nl> + ERROR ( inout_cant_be_variadic , none , <nl> " inout arguments cannot be variadic " , ( ) ) <nl> - ERROR ( inout_only_parameter , sema_tce , none , <nl> + ERROR ( inout_only_parameter , none , <nl> " ' inout ' is only valid in parameter lists " , ( ) ) <nl> <nl> - ERROR ( mutating_invalid_global_scope , sema_tcd , none , <nl> + ERROR ( mutating_invalid_global_scope , none , <nl> " ' mutating ' is only valid on methods " , ( ) ) <nl> - ERROR ( mutating_invalid_classes , sema_tcd , none , <nl> + ERROR ( mutating_invalid_classes , none , <nl> " ' mutating ' isn ' t valid on methods in classes or class - bound protocols " , <nl> ( ) ) <nl> - ERROR ( functions_mutating_and_not , sema_tcd , none , <nl> + ERROR ( functions_mutating_and_not , none , <nl> " method may not be declared both mutating and nonmutating " , ( ) ) <nl> - ERROR ( static_functions_not_mutating , sema_tcd , none , <nl> + ERROR ( static_functions_not_mutating , none , <nl> " static functions may not be declared mutating " , ( ) ) <nl> <nl> - ERROR ( transparent_stored_property , sema_tcd , none , <nl> + ERROR ( transparent_stored_property , none , <nl> " @ _transparent cannot be applied to stored properties " , ( ) ) <nl> - ERROR ( transparent_on_invalid_extension , sema_tcd , none , <nl> + ERROR ( transparent_on_invalid_extension , none , <nl> " @ _transparent is only supported on struct and enum extensions " , ( ) ) <nl> - ERROR ( transparent_in_protocols_not_supported , sema_tcd , none , <nl> + ERROR ( transparent_in_protocols_not_supported , none , <nl> " @ _transparent is not supported on declarations within protocols " , ( ) ) <nl> - ERROR ( transparent_in_classes_not_supported , sema_tcd , none , <nl> + ERROR ( transparent_in_classes_not_supported , none , <nl> " @ _transparent is not supported on declarations within classes " , ( ) ) <nl> <nl> - ERROR ( invalid_iboutlet , sema_tcd , none , <nl> + ERROR ( invalid_iboutlet , none , <nl> " only instance properties can be declared @ IBOutlet " , ( ) ) <nl> - ERROR ( iboutlet_nonobjc_class , sema_tcd , none , <nl> + ERROR ( iboutlet_nonobjc_class , none , <nl> " @ IBOutlet property cannot % select { have | be an array of } 0 " <nl> " non - ' @ objc ' class type % 1 " , ( bool , Type ) ) <nl> - ERROR ( iboutlet_nonobjc_protocol , sema_tcd , none , <nl> + ERROR ( iboutlet_nonobjc_protocol , none , <nl> " @ IBOutlet property cannot % select { have | be an array of } 0 " <nl> " non - ' @ objc ' protocol type % 1 " , ( bool , Type ) ) <nl> - ERROR ( iboutlet_nonobject_type , sema_tcd , none , <nl> + ERROR ( iboutlet_nonobject_type , none , <nl> " @ IBOutlet property cannot % select { have | be an array of } 0 " <nl> " non - object type % 1 " , ( bool , Type ) ) <nl> - ERROR ( iboutlet_only_mutable , sema_tcd , none , <nl> + ERROR ( iboutlet_only_mutable , none , <nl> " @ IBOutlet attribute requires property to be mutable " , ( ) ) <nl> - ERROR ( iboutlet_non_optional , sema_tcd , none , <nl> + ERROR ( iboutlet_non_optional , none , <nl> " @ IBOutlet property has non - optional type % 0 " , ( Type ) ) <nl> - NOTE ( note_make_optional , sema_tcd , none , <nl> + NOTE ( note_make_optional , none , <nl> " add ' ? ' to form the optional type % 0 " , ( Type ) ) <nl> - NOTE ( note_make_implicitly_unwrapped_optional , sema_tcd , none , <nl> + NOTE ( note_make_implicitly_unwrapped_optional , none , <nl> " add ' ! ' to form the implicitly unwrapped optional type % 0 " , ( Type ) ) <nl> <nl> - ERROR ( invalid_ibdesignable_extension , sema_tcd , none , <nl> + ERROR ( invalid_ibdesignable_extension , none , <nl> " @ IBDesignable can only be applied to classes and extensions " <nl> " of classes " , ( ) ) <nl> - ERROR ( invalid_ibinspectable , sema_tcd , none , <nl> + ERROR ( invalid_ibinspectable , none , <nl> " only instance properties can be declared @ IBInspectable " , ( ) ) <nl> - ERROR ( invalid_ibaction_decl , sema_tcd , none , <nl> + ERROR ( invalid_ibaction_decl , none , <nl> " only instance methods can be declared @ IBAction " , ( ) ) <nl> - ERROR ( invalid_ibaction_result , sema_tcd , none , <nl> + ERROR ( invalid_ibaction_result , none , <nl> " methods declared @ IBAction must return ' Void ' ( not % 0 ) " , ( Type ) ) <nl> - ERROR ( invalid_ibaction_argument_count , sema_tcd , none , <nl> + ERROR ( invalid_ibaction_argument_count , none , <nl> " @ IBAction methods % select { must have a single argument " <nl> " | can only have up to 2 arguments } 0 " , ( bool ) ) <nl> - ERROR ( ibaction_nonobjc_class_argument , sema_tcd , none , <nl> + ERROR ( ibaction_nonobjc_class_argument , none , <nl> " argument to @ IBAction method cannot have non - ' @ objc ' class type % 0 " , <nl> ( Type ) ) <nl> - ERROR ( ibaction_nonobject_argument , sema_tcd , none , <nl> + ERROR ( ibaction_nonobject_argument , none , <nl> " argument to @ IBAction method cannot have non - object type % 0 " , ( Type ) ) <nl> - ERROR ( no_objc_tagged_pointer_not_class_protocol , sema_tcd , none , <nl> + ERROR ( no_objc_tagged_pointer_not_class_protocol , none , <nl> " @ unsafe_no_objc_tagged_pointer can only be applied to class protocols " , <nl> ( ) ) <nl> - ERROR ( swift_native_objc_runtime_base_not_on_root_class , sema_tcd , none , <nl> + ERROR ( swift_native_objc_runtime_base_not_on_root_class , none , <nl> " @ _swift_native_objc_runtime_base_not_on_root_class can only be applied " <nl> " to root classes " , ( ) ) <nl> - ERROR ( attr_methods_only , sema_tcd , none , <nl> + ERROR ( attr_methods_only , none , <nl> " only methods can be declared % 0 " , ( DeclAttribute ) ) <nl> - ERROR ( access_control_in_protocol , sema_tcd , none , <nl> + ERROR ( access_control_in_protocol , none , <nl> " % 0 modifier cannot be used in protocols " , ( DeclAttribute ) ) <nl> - ERROR ( access_control_setter , sema_tcd , none , <nl> + ERROR ( access_control_setter , none , <nl> " ' % select { private | internal | public } 0 ( set ) ' modifier can only be applied " <nl> " to variables and subscripts " , <nl> ( Accessibility ) ) <nl> - ERROR ( access_control_setter_read_only , sema_tcd , none , <nl> + ERROR ( access_control_setter_read_only , none , <nl> " ' % select { private | internal | public } 0 ( set ) ' modifier cannot be applied to " <nl> " % select { constants | read - only variables | read - only properties " <nl> " | read - only subscripts } 1 " , <nl> ( Accessibility , unsigned ) ) <nl> - ERROR ( access_control_setter_more , sema_tcd , none , <nl> + ERROR ( access_control_setter_more , none , <nl> " % select { private | internal | PUBLIC } 0 " <nl> " % select { variable | property | subscript } 1 cannot have " <nl> " % select { PRIVATE | an internal | a public } 2 setter " , <nl> ( Accessibility , unsigned , Accessibility ) ) <nl> - WARNING ( access_control_member_more , sema_tcd , none , <nl> + WARNING ( access_control_member_more , none , <nl> " declaring % select { PRIVATE | an internal | a public } 0 % 1 for " <nl> " % select { a private | an internal | PUBLIC } 2 % 3 " , <nl> ( Accessibility , DescriptiveDeclKind , Accessibility , DescriptiveDeclKind ) ) <nl> - WARNING ( access_control_ext_member_more , sema_tcd , none , <nl> + WARNING ( access_control_ext_member_more , none , <nl> " declaring % select { PRIVATE | an internal | a public } 0 % 1 in " <nl> " % select { a private | an internal | PUBLIC } 2 extension " , <nl> ( Accessibility , DescriptiveDeclKind , Accessibility ) ) <nl> - ERROR ( access_control_ext_requirement_member_more , sema_tcd , none , <nl> + ERROR ( access_control_ext_requirement_member_more , none , <nl> " cannot declare % select { PRIVATE | an internal | a public } 0 % 1 in " <nl> " an extension with % select { private | internal | PUBLIC } 2 requirements " , <nl> ( Accessibility , DescriptiveDeclKind , Accessibility ) ) <nl> - ERROR ( access_control_extension_more , sema_tcd , none , <nl> + ERROR ( access_control_extension_more , none , <nl> " extension of % select { private | internal | PUBLIC } 0 % 1 cannot be " <nl> " declared % select { PRIVATE | internal | public } 2 " , <nl> ( Accessibility , DescriptiveDeclKind , Accessibility ) ) <nl> <nl> - ERROR ( invalid_decl_attribute_simple , sema_tcd , none , <nl> + ERROR ( invalid_decl_attribute_simple , none , <nl> " attribute cannot be applied to declaration " , ( ) ) <nl> - ERROR ( invalid_decl_attribute , sema_tcd , none , <nl> + ERROR ( invalid_decl_attribute , none , <nl> " % 0 cannot be applied to this declaration " , ( DeclAttribute ) ) <nl> - ERROR ( invalid_decl_modifier , sema_tcd , none , <nl> + ERROR ( invalid_decl_modifier , none , <nl> " % 0 modifier cannot be applied to this declaration " , ( DeclAttribute ) ) <nl> - ERROR ( attribute_does_not_apply_to_type , type_parsing , none , <nl> + ERROR ( attribute_does_not_apply_to_type , none , <nl> " attribute does not apply to type " , ( ) ) <nl> - ERROR ( optional_attribute_non_protocol , sema_tcd , none , <nl> + ERROR ( optional_attribute_non_protocol , none , <nl> " ' optional ' can only be applied to protocol members " , ( ) ) <nl> - ERROR ( optional_attribute_non_objc_protocol , sema_tcd , none , <nl> + ERROR ( optional_attribute_non_objc_protocol , none , <nl> " ' optional ' can only be applied to members of an @ objc protocol " , <nl> ( ) ) <nl> - ERROR ( optional_attribute_initializer , sema_tcd , none , <nl> + ERROR ( optional_attribute_initializer , none , <nl> " ' optional ' cannot be applied to an initializer " , ( ) ) <nl> - ERROR ( unavailable_method_non_objc_protocol , sema_tcd , none , <nl> + ERROR ( unavailable_method_non_objc_protocol , none , <nl> " protocol members can only be marked unavailable in an @ objc protocol " , <nl> ( ) ) <nl> - ERROR ( missing_in_class_init_1 , sema_tcd , none , <nl> + ERROR ( missing_in_class_init_1 , none , <nl> " stored property % 0 requires an initial value % select { | or should be " <nl> " @ NSManaged } 1 " , ( Identifier , bool ) ) <nl> - ERROR ( missing_in_class_init_2 , sema_tcd , none , <nl> + ERROR ( missing_in_class_init_2 , none , <nl> " stored properties % 0 and % 1 require initial values % select { | or should " <nl> " be @ NSManaged } 2 " , <nl> ( Identifier , Identifier , bool ) ) <nl> - ERROR ( missing_in_class_init_3plus , sema_tcd , none , <nl> + ERROR ( missing_in_class_init_3plus , none , <nl> " stored properties % 0 , % 1 , % select { and % 2 | % 2 , and others } 3 " <nl> " require initial values % select { | or should be @ NSManaged } 4 " , <nl> ( Identifier , Identifier , Identifier , bool , bool ) ) <nl> - NOTE ( requires_stored_property_inits_here , sema_tcd , none , <nl> + NOTE ( requires_stored_property_inits_here , none , <nl> " % select { superclass | class } 1 % 0 requires all stored properties to have " <nl> " initial values % select { | or use @ NSManaged } 2 " , ( Type , bool , bool ) ) <nl> - ERROR ( class_without_init , sema_tcd , none , <nl> + ERROR ( class_without_init , none , <nl> " class % 0 has no initializers " , ( Type ) ) <nl> - NOTE ( note_no_in_class_init_1 , sema_tcd , none , <nl> + NOTE ( note_no_in_class_init_1 , none , <nl> " stored property % 0 without initial value prevents synthesized " <nl> " initializers " , <nl> ( Identifier ) ) <nl> - NOTE ( note_no_in_class_init_2 , sema_tcd , none , <nl> + NOTE ( note_no_in_class_init_2 , none , <nl> " stored properties % 0 and % 1 without initial values prevent synthesized " <nl> " initializers " , <nl> ( Identifier , Identifier ) ) <nl> - NOTE ( note_no_in_class_init_3plus , sema_tcd , none , <nl> + NOTE ( note_no_in_class_init_3plus , none , <nl> " stored properties % 0 , % 1 , % select { and % 2 | % 2 , and others } 3 " <nl> " without initial values prevent synthesized initializers " , <nl> ( Identifier , Identifier , Identifier , bool ) ) <nl> - ERROR ( missing_unimplemented_init_runtime , sema_tcd , none , <nl> + ERROR ( missing_unimplemented_init_runtime , none , <nl> " standard library error : missing _unimplemented_initializer " , ( ) ) <nl> - ERROR ( missing_undefined_runtime , sema_tcd , none , <nl> + ERROR ( missing_undefined_runtime , none , <nl> " standard library error : missing _undefined " , ( ) ) <nl> - WARNING ( unsupported_synthesize_init_variadic , sema_tcd , none , <nl> + WARNING ( unsupported_synthesize_init_variadic , none , <nl> " synthesizing a variadic inherited initializer for subclass % 0 is " <nl> " unsupported " , <nl> ( Type ) ) <nl> - NOTE ( variadic_superclass_init_here , sema_tcd , none , <nl> + NOTE ( variadic_superclass_init_here , none , <nl> " variadic superclass initializer defined here " , ( ) ) <nl> <nl> / / Alignment attribute <nl> - ERROR ( alignment_not_power_of_two , sema_tcd , none , <nl> + ERROR ( alignment_not_power_of_two , none , <nl> " alignment value must be a power of two " , ( ) ) <nl> <nl> / / Indirect enums <nl> - ERROR ( indirect_case_without_payload , sema_tcd , none , <nl> + ERROR ( indirect_case_without_payload , none , <nl> " enum case % 0 without associated value cannot be ' indirect ' " , ( Identifier ) ) <nl> - ERROR ( indirect_case_in_indirect_enum , sema_tcd , none , <nl> + ERROR ( indirect_case_in_indirect_enum , none , <nl> " enum case in ' indirect ' enum cannot also be ' indirect ' " , ( ) ) <nl> <nl> / / Variables ( var and let ) . <nl> - ERROR ( unimplemented_type_var , decl_parsing , none , <nl> + ERROR ( unimplemented_type_var , none , <nl> " % select { ERROR | static | class } 1 stored properties not yet supported " <nl> " % select { in this context | in generic types | in classes } 0 " <nl> " % select { | ; did you mean ' static ' ? } 2 " , <nl> ( unsigned , StaticSpellingKind , unsigned ) ) <nl> - ERROR ( observingprop_requires_initializer , decl_parsing , none , <nl> + ERROR ( observingprop_requires_initializer , none , <nl> " non - member observing properties require an initializer " , ( ) ) <nl> - ERROR ( global_requires_initializer , decl_parsing , none , <nl> + ERROR ( global_requires_initializer , none , <nl> " global ' % select { var | let } 0 ' declaration requires an initializer expression " <nl> " % select { or getter / setter specifier } 0 " , ( bool ) ) <nl> - ERROR ( static_requires_initializer , decl_parsing , none , <nl> + ERROR ( static_requires_initializer , none , <nl> " % select { ERROR | ' static var ' | ' class var ' | } 0 declaration requires an initializer " <nl> " expression or getter / setter specifier " , ( StaticSpellingKind ) ) <nl> - ERROR ( pattern_type_access , sema_tcd , none , <nl> + ERROR ( pattern_type_access , none , <nl> " % select { % select { variable | constant } 0 | property } 1 " <nl> " % select { must be declared % select { private | internal | PUBLIC } 4 " <nl> " | cannot be declared % select { PRIVATE | internal | public } 3 } 2 because its " <nl> " type uses % select { a private | an internal | PUBLIC } 4 type " , <nl> ( bool , bool , bool , Accessibility , Accessibility ) ) <nl> - ERROR ( pattern_type_access_inferred , sema_tcd , none , <nl> + ERROR ( pattern_type_access_inferred , none , <nl> " % select { % select { variable | constant } 0 | property } 1 " <nl> " % select { must be declared % select { private | internal | PUBLIC } 4 " <nl> " | cannot be declared % select { PRIVATE | internal | public } 3 } 2 because its " <nl> " type % 5 uses % select { a private | an internal | PUBLIC } 4 type " , <nl> ( bool , bool , bool , Accessibility , Accessibility , Type ) ) <nl> - ERROR ( pattern_binds_no_variables , sema_tcd , none , <nl> + ERROR ( pattern_binds_no_variables , none , <nl> " % select { property | global variable } 0 declaration does not bind any " <nl> " variables " , <nl> ( unsigned ) ) <nl> <nl> <nl> / / Generic types <nl> - ERROR ( unsupported_generic_nested_in_type , sema_tcd , none , <nl> + ERROR ( unsupported_generic_nested_in_type , none , <nl> " generic type % 0 nested in type % 1 is not allowed " , <nl> ( Identifier , Type ) ) <nl> - ERROR ( unsupported_type_nested_in_generic_type , sema_tcd , none , <nl> + ERROR ( unsupported_type_nested_in_generic_type , none , <nl> " type % 0 nested in generic type % 1 is not allowed " , <nl> ( Identifier , Type ) ) <nl> - ERROR ( unsupported_type_nested_in_generic_function , sema_tcd , none , <nl> + ERROR ( unsupported_type_nested_in_generic_function , none , <nl> " type % 0 nested in generic function % 1 is not allowed " , <nl> ( Identifier , Identifier ) ) <nl> <nl> / / Type aliases <nl> - ERROR ( circular_type_alias , sema_tct , none , <nl> + ERROR ( circular_type_alias , none , <nl> " type alias % 0 circularly references itself " , ( Identifier ) ) <nl> - ERROR ( type_alias_underlying_type_access , sema_tcd , none , <nl> + ERROR ( type_alias_underlying_type_access , none , <nl> " type alias % select { must be declared % select { private | internal | PUBLIC } 2 " <nl> " | cannot be declared % select { PRIVATE | internal | public } 1 } 0 because its " <nl> " underlying type uses % select { a private | an internal | PUBLIC } 2 type " , <nl> ( bool , Accessibility , Accessibility ) ) <nl> <nl> / / Subscripts <nl> - ERROR ( subscript_type_access , sema_tcd , none , <nl> + ERROR ( subscript_type_access , none , <nl> " subscript % select { must be declared % select { private | internal | PUBLIC } 2 " <nl> " | cannot be declared % select { PRIVATE | internal | public } 1 } 0 because its " <nl> " % select { index | element type } 3 uses " <nl> ERROR ( subscript_type_access , sema_tcd , none , <nl> ( bool , Accessibility , Accessibility , bool ) ) <nl> <nl> / / Functions <nl> - ERROR ( function_type_access , sema_tcd , none , <nl> + ERROR ( function_type_access , none , <nl> " % select { function | method | initializer } 3 " <nl> " % select { must be declared % select { private | internal | PUBLIC } 2 " <nl> " | cannot be declared % select { PRIVATE | internal | public } 1 } 0 because its " <nl> " % select { parameter | result } 4 uses " <nl> " % select { a private | an internal | PUBLIC } 2 type " , <nl> ( bool , Accessibility , Accessibility , unsigned , bool ) ) <nl> - WARNING ( non_trailing_closure_before_default_args , sema_tcd , none , <nl> + WARNING ( non_trailing_closure_before_default_args , none , <nl> " closure parameter prior to parameters with default arguments will " <nl> " not be treated as a trailing closure " , ( ) ) <nl> <nl> / / Extensions <nl> - ERROR ( non_nominal_extension , sema_tcd , none , <nl> + ERROR ( non_nominal_extension , none , <nl> " non - nominal type % 0 cannot be extended " , ( Type ) ) <nl> - ERROR ( extension_access_with_conformances , sema_tcd , none , <nl> + ERROR ( extension_access_with_conformances , none , <nl> " % 0 modifier cannot be used with extensions that declare " <nl> " protocol conformances " , ( DeclAttribute ) ) <nl> - ERROR ( extension_metatype , sema_tcd , none , <nl> + ERROR ( extension_metatype , none , <nl> " cannot extend a metatype % 0 " , ( Type ) ) <nl> - ERROR ( extension_specialization , decl_parsing , none , <nl> + ERROR ( extension_specialization , none , <nl> " constrained extension must be declared on the unspecialized generic " <nl> " type % 0 with constraints specified by a ' where ' clause " , ( Identifier ) ) <nl> - ERROR ( extension_stored_property , sema_tcd , none , <nl> + ERROR ( extension_stored_property , none , <nl> " extensions may not contain stored properties " , ( ) ) <nl> - ERROR ( extension_nongeneric_trailing_where , sema_tcd , none , <nl> + ERROR ( extension_nongeneric_trailing_where , none , <nl> " trailing ' where ' clause for extension of non - generic type % 0 " , ( Type ) ) <nl> - ERROR ( extension_constrained_inheritance , sema_tcd , none , <nl> + ERROR ( extension_constrained_inheritance , none , <nl> " extension of type % 0 with constraints cannot have an " <nl> " inheritance clause " , ( Type ) ) <nl> - ERROR ( extension_protocol_inheritance , sema_tcd , none , <nl> + ERROR ( extension_protocol_inheritance , none , <nl> " extension of protocol % 0 cannot have an inheritance clause " , ( Type ) ) <nl> - ERROR ( extension_protocol_type_definition , sema_tcd , none , <nl> + ERROR ( extension_protocol_type_definition , none , <nl> " type % 0 cannot be defined within a protocol extension " , ( DeclName ) ) <nl> - ERROR ( extension_protocol_via_typealias , sema_tcd , none , <nl> + ERROR ( extension_protocol_via_typealias , none , <nl> " protocol % 0 in the module being compiled cannot be extended via a " <nl> " typealias " , ( Type ) ) <nl> - ERROR ( extension_anyobject , sema_tcd , none , <nl> + ERROR ( extension_anyobject , none , <nl> " ' AnyObject ' protocol cannot be extended " , ( ) ) <nl> <nl> / / Protocols <nl> - ERROR ( type_does_not_conform , sema_tcd , none , <nl> + ERROR ( type_does_not_conform , none , <nl> " type % 0 does not conform to protocol % 1 " , ( Type , Type ) ) <nl> - ERROR ( cannot_use_nil_with_this_type , sema_tcd , none , <nl> + ERROR ( cannot_use_nil_with_this_type , none , <nl> " nil cannot be used in context expecting type % 0 " , ( Type ) ) <nl> <nl> - ERROR ( use_of_equal_instead_of_equality , sema_tcd , none , <nl> + ERROR ( use_of_equal_instead_of_equality , none , <nl> " use of ' = ' in a boolean context , did you mean ' = = ' ? " , ( ) ) <nl> <nl> <nl> - ERROR ( protocol_does_not_conform_objc , sema_tcc , none , <nl> + ERROR ( protocol_does_not_conform_objc , none , <nl> " using % 0 as a concrete type conforming to protocol % 1 is not supported " , <nl> ( Type , Type ) ) <nl> - ERROR ( protocol_does_not_conform_static , sema_tcc , none , <nl> + ERROR ( protocol_does_not_conform_static , none , <nl> " % 0 cannot be used as a type conforming to protocol % 1 because % 1 " <nl> " has static requirements " , <nl> ( Type , Type ) ) <nl> - ERROR ( protocol_derivation_is_broken , sema_tcd , none , <nl> + ERROR ( protocol_derivation_is_broken , none , <nl> " protocol % 0 is broken ; cannot derive conformance for type % 1 " , ( Type , Type ) ) <nl> - ERROR ( type_does_not_inherit , sema_tcd , none , <nl> + ERROR ( type_does_not_inherit , none , <nl> " % 0 requires that % 1 inherit from % 2 " , ( Type , Type , Type ) ) <nl> - NOTE ( type_does_not_inherit_requirement , sema_tcd , none , <nl> + NOTE ( type_does_not_inherit_requirement , none , <nl> " requirement specified as % 0 : % 1 % 2 " , ( Type , Type , StringRef ) ) <nl> - ERROR ( types_not_equal , sema_tcd , none , <nl> + ERROR ( types_not_equal , none , <nl> " % 0 requires the types % 1 and % 2 be equivalent " , <nl> ( Type , Type , Type ) ) <nl> - NOTE ( types_not_equal_requirement , sema_tcd , none , <nl> + NOTE ( types_not_equal_requirement , none , <nl> " requirement specified as % 0 = = % 1 % 2 " , ( Type , Type , StringRef ) ) <nl> - ERROR ( non_class_cannot_conform_to_class_protocol , sema_tcd , none , <nl> + ERROR ( non_class_cannot_conform_to_class_protocol , none , <nl> " non - class type % 0 cannot conform to class protocol % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( foreign_class_cannot_conform_to_objc_protocol , sema_tcd , none , <nl> + ERROR ( foreign_class_cannot_conform_to_objc_protocol , none , <nl> " Core Foundation class % 0 cannot conform to @ objc protocol % 1 because " <nl> " Core Foundation types are not classes in Objective - C " , <nl> ( Type , Type ) ) <nl> - ERROR ( protocol_has_missing_requirements , sema_tcd , none , <nl> + ERROR ( protocol_has_missing_requirements , none , <nl> " type % 0 cannot conform to protocol % 1 because it has requirements that " <nl> " cannot be satisfied " , ( Type , Type ) ) <nl> - ERROR ( witness_argument_name_mismatch , sema_tcd , none , <nl> + ERROR ( witness_argument_name_mismatch , none , <nl> " % select { method | initializer } 0 % 1 has different argument names from those " <nl> " required by protocol % 2 ( % 3 ) " , ( bool , DeclName , Type , DeclName ) ) <nl> - ERROR ( witness_initializer_not_required , sema_tcd , none , <nl> + ERROR ( witness_initializer_not_required , none , <nl> " initializer requirement % 0 can only be satisfied by a ` required ` " <nl> " initializer in % select { | the definition of } 1 non - final class % 2 " , <nl> ( DeclName , bool , Type ) ) <nl> - ERROR ( witness_initializer_failability , sema_tcd , none , <nl> + ERROR ( witness_initializer_failability , none , <nl> " non - failable initializer requirement % 0 " <nl> " % select { | in Objective - C protocol } 1 cannot be satisfied by a " <nl> " failable initializer ( ' init % select { ? | ! } 1 ' ) " , <nl> ( DeclName , bool ) ) <nl> - ERROR ( witness_self_non_subtype , sema_tcd , none , <nl> + ERROR ( witness_self_non_subtype , none , <nl> " protocol % 0 requirement % 1 cannot be satisfied by a non - final class " <nl> " ( % 2 ) because it uses ' Self ' in a non - parameter , non - result type " <nl> " position " , <nl> ( Type , DeclName , Type ) ) <nl> - ERROR ( witness_requires_dynamic_self , sema_tcd , none , <nl> + ERROR ( witness_requires_dynamic_self , none , <nl> " method % 0 in non - final class % 1 must return ` Self ` to conform to " <nl> " protocol % 2 " , <nl> ( DeclName , Type , Type ) ) <nl> <nl> - ERROR ( witness_not_accessible_proto , sema_tcd , none , <nl> + ERROR ( witness_not_accessible_proto , none , <nl> " % select { initializer % 1 | method % 1 | % select { | setter for } 2property % 1 " <nl> " | subscript % select { | setter } 2 } 0 must be declared " <nl> " % select { PRIVATE | internal | public } 3 because it matches a requirement " <nl> " in % select { PRIVATE | internal | public } 3 protocol % 4 " , <nl> ( RequirementKind , DeclName , bool , Accessibility , DeclName ) ) <nl> - ERROR ( witness_not_accessible_type , sema_tcd , none , <nl> + ERROR ( witness_not_accessible_type , none , <nl> " % select { initializer % 1 | method % 1 | % select { | setter for } 2property % 1 " <nl> " | subscript % select { | setter } 2 } 0 must be as accessible as its enclosing " <nl> " type because it matches a requirement in protocol % 4 " , <nl> ( RequirementKind , DeclName , bool , Accessibility , DeclName ) ) <nl> - ERROR ( type_witness_not_accessible_proto , sema_tcd , none , <nl> + ERROR ( type_witness_not_accessible_proto , none , <nl> " % 0 % 1 must be declared % select { PRIVATE | internal | public } 2 because it " <nl> " matches a requirement in % select { PRIVATE | internal | public } 2 protocol % 3 " , <nl> ( DescriptiveDeclKind , DeclName , Accessibility , DeclName ) ) <nl> - ERROR ( type_witness_not_accessible_type , sema_tcd , none , <nl> + ERROR ( type_witness_not_accessible_type , none , <nl> " % 0 % 1 must be as accessible as its enclosing type because it " <nl> " matches a requirement in protocol % 3 " , <nl> ( DescriptiveDeclKind , DeclName , Accessibility , DeclName ) ) <nl> <nl> - ERROR ( protocol_refine_access , sema_tcd , none , <nl> + ERROR ( protocol_refine_access , none , <nl> " % select { protocol must be declared % select { private | internal | PUBLIC } 2 " <nl> " because it refines " <nl> " | % select { PRIVATE | internal | public } 1 protocol cannot refine } 0 " <nl> " % select { a private | an internal | PUBLIC } 2 protocol " , <nl> ( bool , Accessibility , Accessibility ) ) <nl> - ERROR ( protocol_property_must_be_computed_var , sema_tcd , none , <nl> + ERROR ( protocol_property_must_be_computed_var , none , <nl> " immutable property requirement must be declared as ' var ' with a " <nl> " ' { get } ' specifier " , ( ) ) <nl> - ERROR ( protocol_property_must_be_computed , sema_tcd , none , <nl> + ERROR ( protocol_property_must_be_computed , none , <nl> " property in protocol must have explicit { get } or { get set } specifier " , <nl> ( ) ) <nl> - NOTE ( inherited_protocol_does_not_conform , sema_tcd , none , <nl> + NOTE ( inherited_protocol_does_not_conform , none , <nl> " type % 0 does not conform to inherited protocol % 1 " , ( Type , Type ) ) <nl> - NOTE ( no_witnesses , sema_tcd , none , <nl> + NOTE ( no_witnesses , none , <nl> " protocol requires % select { initializer % 1 | function % 1 | property % 1 | " <nl> " subscript } 0 with type % 2 " , ( RequirementKind , DeclName , Type ) ) <nl> - NOTE ( ambiguous_witnesses , sema_tcd , none , <nl> + NOTE ( ambiguous_witnesses , none , <nl> " multiple matching " <nl> " % select { initializers named % 1 | functions named % 1 | properties named % 1 | " <nl> " subscript operators } 0 with type % 2 " , ( RequirementKind , DeclName , Type ) ) <nl> - NOTE ( ambiguous_witnesses_wrong_name , sema_tcd , none , <nl> + NOTE ( ambiguous_witnesses_wrong_name , none , <nl> " multiple matching " <nl> " % select { initializers named % 1 | functions named % 1 | properties named % 1 | " <nl> " subscript operators } 0 with type % 2 " , ( RequirementKind , DeclName , Type ) ) <nl> - NOTE ( no_witnesses_type , sema_tcd , none , <nl> + NOTE ( no_witnesses_type , none , <nl> " protocol requires nested type % 0 " , ( Identifier ) ) <nl> - NOTE ( default_associated_type_req_fail , sema_tcd , none , <nl> + NOTE ( default_associated_type_req_fail , none , <nl> " default type % 0 for associated type % 1 ( from protocol % 2 ) " <nl> " does not conform to % 3 " , <nl> ( Type , DeclName , Type , Type ) ) <nl> - ERROR ( associated_type_access , sema_tcd , none , <nl> + ERROR ( associated_type_access , none , <nl> " associated type in % select { PRIVATE | an internal | a public } 0 protocol " <nl> " uses % select { a private | an internal | PUBLIC } 1 type in its " <nl> " % select { default definition | requirement } 2 " , <nl> ( Accessibility , Accessibility , unsigned ) ) <nl> <nl> - NOTE ( bad_associated_type_deduction , sema_tcd , none , <nl> + NOTE ( bad_associated_type_deduction , none , <nl> " unable to infer associated type % 0 for protocol % 1 " , <nl> ( DeclName , DeclName ) ) <nl> - NOTE ( associated_type_deduction_witness_failed , sema_tcd , none , <nl> + NOTE ( associated_type_deduction_witness_failed , none , <nl> " inferred type % 1 ( by matching requirement % 0 ) is invalid : " <nl> " does not conform to % 2 " , <nl> ( DeclName , Type , DeclName ) ) <nl> - NOTE ( ambiguous_associated_type_deduction , sema_tcd , none , <nl> + NOTE ( ambiguous_associated_type_deduction , none , <nl> " ambiguous inference of associated type % 0 : % 1 vs . % 2 " , <nl> ( DeclName , Type , Type ) ) <nl> - NOTE ( associated_type_deduction_witness , sema_tcd , none , <nl> + NOTE ( associated_type_deduction_witness , none , <nl> " matching requirement % 0 to this declaration inferred associated type to " <nl> " % 1 " , <nl> ( DeclName , Type ) ) <nl> - NOTE ( associated_type_deduction_default , sema_tcd , none , <nl> + NOTE ( associated_type_deduction_default , none , <nl> " using associated type default % 0 " , ( Type ) ) <nl> - NOTE ( ambiguous_witnesses_type , sema_tcd , none , <nl> + NOTE ( ambiguous_witnesses_type , none , <nl> " multiple matching types named % 0 " , ( Identifier ) ) <nl> - NOTE ( protocol_witness_exact_match , sema_tcd , none , <nl> + NOTE ( protocol_witness_exact_match , none , <nl> " candidate exactly matches % 0 " , ( StringRef ) ) <nl> - NOTE ( protocol_witness_renamed , sema_tcd , none , <nl> + NOTE ( protocol_witness_renamed , none , <nl> " candidate matches ( with renaming ) % 0 " , ( StringRef ) ) <nl> - NOTE ( protocol_witness_kind_conflict , sema_tcd , none , <nl> + NOTE ( protocol_witness_kind_conflict , none , <nl> " candidate is not % select { an initializer | a function | a variable | " <nl> " a subscript } 0 " , ( RequirementKind ) ) <nl> - NOTE ( protocol_witness_type_conflict , sema_tcd , none , <nl> + NOTE ( protocol_witness_type_conflict , none , <nl> " candidate has non - matching type % 0 % 1 " , ( Type , StringRef ) ) <nl> <nl> - NOTE ( protocol_witness_optionality_conflict , sema_tcd , none , <nl> + NOTE ( protocol_witness_optionality_conflict , none , <nl> " candidate % select { type has | result type has | parameter type has | " <nl> " parameter types have | result and parameter types have } 0 incorrect " <nl> " optionality % 1 " , <nl> ( unsigned , StringRef ) ) <nl> - ERROR ( err_protocol_witness_optionality , sema_tcd , none , <nl> + ERROR ( err_protocol_witness_optionality , none , <nl> " % select { type | result | parameter | parameters | " <nl> " result and parameters } 0 of % 1 % select { has | has | has | have | have | } 0 " <nl> " different optionality than required by protocol % 2 " , <nl> ( unsigned , DeclName , DeclName ) ) <nl> - WARNING ( warn_protocol_witness_optionality , sema_tcd , none , <nl> + WARNING ( warn_protocol_witness_optionality , none , <nl> " % select { type | result | parameter | parameters | " <nl> " result and parameters } 0 of % 1 % select { has | has | has | have | have | } 0 " <nl> " different optionality than expected by protocol % 2 " , <nl> ( unsigned , DeclName , DeclName ) ) <nl> <nl> - NOTE ( protocol_witness_static_conflict , sema_tcd , none , <nl> + NOTE ( protocol_witness_static_conflict , none , <nl> " candidate operates on % select { a type | an instance } 0 , not " <nl> " % select { an instance | a type } 0 as required " , ( bool ) ) <nl> - NOTE ( protocol_witness_prefix_postfix_conflict , sema_tcd , none , <nl> + NOTE ( protocol_witness_prefix_postfix_conflict , none , <nl> " candidate is % select { | prefix , | postfix , } 1not " <nl> " % select { prefix | postfix } 0 as required " , ( bool , unsigned ) ) <nl> - NOTE ( protocol_witness_mutating_conflict , sema_tcd , none , <nl> + NOTE ( protocol_witness_mutating_conflict , none , <nl> " candidate is marked ' mutating ' but protocol does not allow it " , ( ) ) <nl> - NOTE ( protocol_witness_settable_conflict , sema_tcd , none , <nl> + NOTE ( protocol_witness_settable_conflict , none , <nl> " candidate is not settable , but protocol requires it " , ( ) ) <nl> - NOTE ( protocol_witness_noreturn_conflict , sema_tcd , none , <nl> + NOTE ( protocol_witness_noreturn_conflict , none , <nl> " candidate is not @ noreturn , but protocol requires it " , ( ) ) <nl> - NOTE ( protocol_witness_rethrows_conflict , sema_tcd , none , <nl> + NOTE ( protocol_witness_rethrows_conflict , none , <nl> " candidate is not ' rethrows ' , but protocol requires it " , ( ) ) <nl> - NOTE ( protocol_witness_throws_conflict , sema_tcd , none , <nl> + NOTE ( protocol_witness_throws_conflict , none , <nl> " candidate throws , but protocol does not allow it " , ( ) ) <nl> - NOTE ( protocol_witness_not_objc , sema_tcd , none , <nl> + NOTE ( protocol_witness_not_objc , none , <nl> " candidate is not ' @ objc ' , but protocol requires it " , ( ) ) <nl> <nl> - NOTE ( protocol_witness_type , sema_tcd , none , <nl> + NOTE ( protocol_witness_type , none , <nl> " possibly intended match " , ( ) ) <nl> - NOTE ( protocol_witness_nonconform_type , sema_tcd , none , <nl> + NOTE ( protocol_witness_nonconform_type , none , <nl> " possibly intended match % 0 does not conform to % 1 " , ( Type , Type ) ) <nl> <nl> - NOTE ( protocol_requirement_here , sema_tcd , none , <nl> + NOTE ( protocol_requirement_here , none , <nl> " requirement % 0 declared here " , ( DeclName ) ) <nl> - NOTE ( protocol_conformance_here , sema_tcd , none , <nl> + NOTE ( protocol_conformance_here , none , <nl> " % select { | class } 0 % 1 declares conformance to protocol % 2 here " , <nl> ( bool , DeclName , DeclName ) ) <nl> - NOTE ( declared_protocol_conformance_here , sema_tcd , none , <nl> + NOTE ( declared_protocol_conformance_here , none , <nl> " % select { % 0 inherits conformance to protocol % 2 from superclass | " <nl> " % 0 declares conformance to protocol % 2 | " <nl> " % 0 implicitly conforms to protocol % 2 ( via conformance to % 3 ) | " <nl> " % 0 implicitly conforms to protocol % 2 } 1 here " , <nl> ( Type , unsigned , DeclName , DeclName ) ) <nl> <nl> - ERROR ( redundant_conformance , sema_tcd , none , <nl> + ERROR ( redundant_conformance , none , <nl> " redundant conformance of % 0 to protocol % 1 " , ( Type , DeclName ) ) <nl> - NOTE ( protocol_conformance_implied_here , sema_tcd , none , <nl> + NOTE ( protocol_conformance_implied_here , none , <nl> " implied protocol conformance % 0 here can be made explicit " , ( Identifier ) ) <nl> - WARNING ( optional_req_nonobjc_near_match , sema_tcd , none , <nl> + WARNING ( optional_req_nonobjc_near_match , none , <nl> " non - @ objc % select { initializer % 1 | method % 1 | property % 1 | subscript } 0 " <nl> " cannot satisfy optional requirement of @ objc protocol % 2 " , <nl> ( RequirementKind , DeclName , DeclName ) ) <nl> <nl> / / Protocols and existentials <nl> - ERROR ( assoc_type_outside_of_protocol , sema_nb , none , <nl> + ERROR ( assoc_type_outside_of_protocol , none , <nl> " cannot use associated type % 0 outside of its protocol " , ( Identifier ) ) <nl> <nl> - ERROR ( circular_protocol_def , sema_tcd , none , <nl> + ERROR ( circular_protocol_def , none , <nl> " circular protocol inheritance % 0 " , ( StringRef ) ) <nl> - NOTE ( protocol_here , sema_tcd , none , <nl> + NOTE ( protocol_here , none , <nl> " protocol % 0 declared here " , ( Identifier ) ) <nl> - ERROR ( protocol_composition_not_protocol , sema_tcd , none , <nl> + ERROR ( protocol_composition_not_protocol , none , <nl> " non - protocol type % 0 cannot be used within ' protocol < . . . > ' " , ( Type ) ) <nl> - ERROR ( objc_protocol_inherits_non_objc_protocol , sema_tcd , none , <nl> + ERROR ( objc_protocol_inherits_non_objc_protocol , none , <nl> " @ objc protocol % 0 cannot refine non - @ objc protocol % 1 " , ( Type , Type ) ) <nl> <nl> - ERROR ( requires_conformance_nonprotocol , sema_tcd , none , <nl> + ERROR ( requires_conformance_nonprotocol , none , <nl> " type % 0 constrained to non - protocol type % 1 " , ( TypeLoc , TypeLoc ) ) <nl> - ERROR ( requires_not_suitable_archetype , sema_tcd , none , <nl> + ERROR ( requires_not_suitable_archetype , none , <nl> " % select { | first | second } 0type % 1 in % select { conformance | same - type } 2 " <nl> " requirement does not refer to a generic parameter or associated type " , <nl> ( int , TypeLoc , int ) ) <nl> - ERROR ( requires_no_same_type_archetype , sema_tcd , none , <nl> + ERROR ( requires_no_same_type_archetype , none , <nl> " neither type in same - type refers to a generic parameter or " <nl> " associated type " , <nl> ( ) ) <nl> - ERROR ( requires_generic_params_made_equal , sema_tcd , none , <nl> + ERROR ( requires_generic_params_made_equal , none , <nl> " same - type requirement makes generic parameters % 0 and % 1 equivalent " , <nl> ( Identifier , Identifier ) ) <nl> - ERROR ( requires_generic_param_made_equal_to_concrete , sema_tcd , none , <nl> + ERROR ( requires_generic_param_made_equal_to_concrete , none , <nl> " same - type requirement makes generic parameter % 0 non - generic " , <nl> ( Identifier ) ) <nl> - ERROR ( requires_superclass_conflict , sema_tcd , none , <nl> + ERROR ( requires_superclass_conflict , none , <nl> " generic parameter % 0 cannot be a subclass of both % 1 and % 2 " , <nl> ( Identifier , Type , Type ) ) <nl> - ERROR ( recursive_requirement_reference , sema_tcd , none , <nl> + ERROR ( recursive_requirement_reference , none , <nl> " type may not reference itself as a requirement " , ( ) ) <nl> - ERROR ( recursive_same_type_constraint , sema_tcd , none , <nl> + ERROR ( recursive_same_type_constraint , none , <nl> " same - type constraint % 0 = = % 1 is recursive " , ( Type , Type ) ) <nl> - ERROR ( requires_same_type_conflict , sema_tcd , none , <nl> + ERROR ( requires_same_type_conflict , none , <nl> " generic parameter % 0 cannot be equal to both % 1 and % 2 " , <nl> ( Identifier , Type , Type ) ) <nl> - ERROR ( requires_generic_param_same_type_does_not_conform , sema_tcd , none , <nl> + ERROR ( requires_generic_param_same_type_does_not_conform , none , <nl> " same - type constraint type % 0 does not conform to required protocol % 1 " , <nl> ( Type , Identifier ) ) <nl> - ERROR ( dependent_superclass_constraint , sema_tcd , none , <nl> + ERROR ( dependent_superclass_constraint , none , <nl> " superclass constraint % 0 cannot depend on a type parameter " , <nl> ( Type ) ) <nl> <nl> - ERROR ( generic_param_access , sema_tcd , none , <nl> + ERROR ( generic_param_access , none , <nl> " % 0 % select { must be declared % select { private | internal | PUBLIC } 3 " <nl> " | cannot be declared % select { PRIVATE | internal | public } 2 } 1 because its " <nl> " generic % select { parameter | requirement } 4 uses " <nl> " % select { a private | an internal | PUBLIC } 3 type " , <nl> ( DescriptiveDeclKind , bool , Accessibility , Accessibility , bool ) ) <nl> <nl> - ERROR ( override_multiple_decls_base , sema_tcd , none , <nl> + ERROR ( override_multiple_decls_base , none , <nl> " declaration % 0 cannot override more than one superclass declaration " , <nl> ( DeclName ) ) <nl> - ERROR ( override_multiple_decls_arg_mismatch , sema_tcd , none , <nl> + ERROR ( override_multiple_decls_arg_mismatch , none , <nl> " declaration % 0 has different argument names from any potential " <nl> " overrides " , ( DeclName ) ) <nl> - NOTE ( overridden_near_match_here , sema_tcd , none , <nl> + NOTE ( overridden_near_match_here , none , <nl> " potential overridden % select { method | initializer } 0 % 1 here " , <nl> ( bool , DeclName ) ) <nl> - ERROR ( override_decl_extension , sema_tcd , none , <nl> + ERROR ( override_decl_extension , none , <nl> " declarations % select { in extensions | from extensions } 0 cannot " <nl> " % select { override | be overridden } 0 yet " , ( bool ) ) <nl> - NOTE ( overridden_here , sema_tcd , none , <nl> + NOTE ( overridden_here , none , <nl> " overridden declaration is here " , ( ) ) <nl> - ERROR ( override_objc_type_mismatch_method , sema_tcd , none , <nl> + ERROR ( override_objc_type_mismatch_method , none , <nl> " overriding method with selector % 0 has incompatible type % 1 " , <nl> ( ObjCSelector , Type ) ) <nl> - ERROR ( override_objc_type_mismatch_subscript , sema_tcd , none , <nl> + ERROR ( override_objc_type_mismatch_subscript , none , <nl> " overriding % select { | indexed | keyed } 0subscript with incompatible type " <nl> " % 1 " , <nl> ( unsigned , Type ) ) <nl> - NOTE ( overridden_here_with_type , sema_tcd , none , <nl> + NOTE ( overridden_here_with_type , none , <nl> " overridden declaration here has type % 0 " , ( Type ) ) <nl> - ERROR ( missing_override , sema_tcd , none , <nl> + ERROR ( missing_override , none , <nl> " overriding declaration requires an ' override ' keyword " , ( ) ) <nl> - ERROR ( override_unavailable , sema_tcd , none , <nl> + ERROR ( override_unavailable , none , <nl> " cannot override % 0 which has been marked unavailable " , ( Identifier ) ) <nl> <nl> - ERROR ( override_less_available , sema_tcd , none , <nl> + ERROR ( override_less_available , none , <nl> " overriding % 0 must be as available as declaration it overrides " , <nl> ( Identifier ) ) <nl> <nl> - ERROR ( override_accessor_less_available , sema_tcd , none , <nl> + ERROR ( override_accessor_less_available , none , <nl> " overriding % 0 for % 1 must be as available as declaration it overrides " , <nl> ( DescriptiveDeclKind , Identifier ) ) <nl> <nl> - ERROR ( override_let_property , sema_tcd , none , <nl> + ERROR ( override_let_property , none , <nl> " cannot override immutable ' let ' property % 0 with the getter of a ' var ' " , <nl> ( Identifier ) ) <nl> <nl> <nl> - ERROR ( override_not_accessible , sema_tcd , none , <nl> + ERROR ( override_not_accessible , none , <nl> " % select { | setter of } 0overriding % 1 must be as accessible as " <nl> " % select { its enclosing type | the declaration it overrides } 2 " , <nl> ( bool , DescriptiveDeclKind , bool ) ) <nl> <nl> - ERROR ( method_does_not_override , sema_tcd , none , <nl> + ERROR ( method_does_not_override , none , <nl> " method does not override any method from its superclass " , ( ) ) <nl> - ERROR ( property_does_not_override , sema_tcd , none , <nl> + ERROR ( property_does_not_override , none , <nl> " property does not override any property from its superclass " , ( ) ) <nl> - ERROR ( subscript_does_not_override , sema_tcd , none , <nl> + ERROR ( subscript_does_not_override , none , <nl> " subscript does not override any subscript from its superclass " , ( ) ) <nl> - ERROR ( initializer_does_not_override , sema_tcd , none , <nl> + ERROR ( initializer_does_not_override , none , <nl> " initializer does not override a designated initializer from its " <nl> " superclass " , ( ) ) <nl> - ERROR ( failable_initializer_override , sema_tcd , none , <nl> + ERROR ( failable_initializer_override , none , <nl> " failable initializer % 0 cannot override a non - failable initializer " , <nl> ( DeclName ) ) <nl> - NOTE ( nonfailable_initializer_override_here , sema_tcd , none , <nl> + NOTE ( nonfailable_initializer_override_here , none , <nl> " non - failable initializer % 0 overridden here " , ( DeclName ) ) <nl> <nl> - NOTE ( property_override_here , sema_tcd , none , <nl> + NOTE ( property_override_here , none , <nl> " attempt to override property here " , ( ) ) <nl> - NOTE ( subscript_override_here , sema_tcd , none , <nl> + NOTE ( subscript_override_here , none , <nl> " attempt to override subscript here " , ( ) ) <nl> - NOTE ( convenience_init_override_here , sema_tcd , none , <nl> + NOTE ( convenience_init_override_here , none , <nl> " attempt to override convenience initializer here " , ( ) ) <nl> - ERROR ( override_nonclass_decl , sema_tcd , none , <nl> + ERROR ( override_nonclass_decl , none , <nl> " ' override ' can only be specified on class members " , ( ) ) <nl> - ERROR ( override_property_type_mismatch , sema_tcd , none , <nl> + ERROR ( override_property_type_mismatch , none , <nl> " property % 0 with type % 1 cannot override a property with type % 2 " , <nl> ( Identifier , Type , Type ) ) <nl> - ERROR ( override_with_stored_property , sema_tcd , none , <nl> + ERROR ( override_with_stored_property , none , <nl> " cannot override with a stored property % 0 " , ( Identifier ) ) <nl> - ERROR ( observing_readonly_property , sema_tcd , none , <nl> + ERROR ( observing_readonly_property , none , <nl> " cannot observe read - only property % 0 ; it can ' t change " , ( Identifier ) ) <nl> - ERROR ( override_mutable_with_readonly_property , sema_tcd , none , <nl> + ERROR ( override_mutable_with_readonly_property , none , <nl> " cannot override mutable property with read - only property % 0 " , <nl> ( Identifier ) ) <nl> - ERROR ( override_argument_name_mismatch , sema_tcd , none , <nl> + ERROR ( override_argument_name_mismatch , none , <nl> " argument names for % select { method | initializer } 0 % 1 do not match those " <nl> " of overridden % select { method | initializer } 0 % 2 " , <nl> ( bool , DeclName , DeclName ) ) <nl> - ERROR ( override_ownership_mismatch , sema_tcd , none , <nl> + ERROR ( override_ownership_mismatch , none , <nl> " cannot override % select { strong | weak | unowned | unowned ( unsafe ) } 0 property " <nl> " with % select { strong | weak | unowned | unowned ( unsafe ) } 1 property " , <nl> ( / * Ownership * / unsigned , / * Ownership * / unsigned ) ) <nl> - ERROR ( override_throws , sema_tcd , none , <nl> + ERROR ( override_throws , none , <nl> " cannot override non - throwing % select { method | initializer } 0 with " <nl> " throwing % select { method | initializer } 0 " , ( bool ) ) <nl> - ERROR ( override_throws_objc , sema_tcd , none , <nl> + ERROR ( override_throws_objc , none , <nl> " overriding a throwing @ objc % select { method | initializer } 0 with " <nl> " a non - throwing % select { method | initializer } 0 is not supported " , ( bool ) ) <nl> <nl> - WARNING ( override_unnecessary_IUO , sema_tcd , none , <nl> + WARNING ( override_unnecessary_IUO , none , <nl> " overriding % 0 parameter of type % 1 with implicitly unwrapped optional " <nl> " type % 2 " , <nl> ( DescriptiveDeclKind , Type , Type ) ) <nl> - WARNING ( override_unnecessary_result_IUO , sema_tcd , none , <nl> + WARNING ( override_unnecessary_result_IUO , none , <nl> " overriding % 0 optional result type % 1 with implicitly unwrapped " <nl> " optional type % 2 " , <nl> ( DescriptiveDeclKind , Type , Type ) ) <nl> - NOTE ( override_unnecessary_IUO_remove , sema_tcd , none , <nl> + NOTE ( override_unnecessary_IUO_remove , none , <nl> " remove ' ! ' to make the parameter required " , ( ) ) <nl> - NOTE ( override_unnecessary_IUO_use_strict , sema_tcd , none , <nl> + NOTE ( override_unnecessary_IUO_use_strict , none , <nl> " use ' ? ' to make the result optional " , ( ) ) <nl> - NOTE ( override_unnecessary_IUO_silence , sema_tcd , none , <nl> + NOTE ( override_unnecessary_IUO_silence , none , <nl> " add parentheses to silence this warning " , ( ) ) <nl> <nl> - ERROR ( override_mutable_covariant_property , sema_tcd , none , <nl> + ERROR ( override_mutable_covariant_property , none , <nl> " cannot override mutable property % 0 of type % 1 with covariant type % 2 " , <nl> ( Identifier , Type , Type ) ) <nl> - ERROR ( override_mutable_covariant_subscript , sema_tcd , none , <nl> + ERROR ( override_mutable_covariant_subscript , none , <nl> " cannot override mutable subscript of type % 0 with covariant type % 1 " , <nl> ( Type , Type ) ) <nl> - ERROR ( decl_already_final , sema_tcd , none , <nl> + ERROR ( decl_already_final , none , <nl> " static declarations are already final " , ( ) ) <nl> - NOTE ( decl_init_here , sema_tcd , none , <nl> + NOTE ( decl_init_here , none , <nl> " initial value is here " , ( ) ) <nl> <nl> <nl> / / Inheritance <nl> - ERROR ( duplicate_inheritance , sema_tcd , none , <nl> + ERROR ( duplicate_inheritance , none , <nl> " duplicate inheritance from % 0 " , ( Type ) ) <nl> - ERROR ( multiple_inheritance , sema_tcd , none , <nl> + ERROR ( multiple_inheritance , none , <nl> " multiple inheritance from classes % 0 and % 1 " , ( Type , Type ) ) <nl> - ERROR ( non_class_inheritance , sema_tcd , none , <nl> + ERROR ( non_class_inheritance , none , <nl> " non - class type % 0 cannot inherit from class % 1 " , ( Type , Type ) ) <nl> - ERROR ( extension_class_inheritance , sema_tcd , none , <nl> + ERROR ( extension_class_inheritance , none , <nl> " extension of type % 0 cannot inherit from class % 1 " , ( Type , Type ) ) <nl> - ERROR ( inheritance_from_non_protocol_or_class , sema_tcd , none , <nl> + ERROR ( inheritance_from_non_protocol_or_class , none , <nl> " inheritance from non - protocol , non - class type % 0 " , ( Type ) ) <nl> - ERROR ( inheritance_from_non_protocol , sema_tcd , none , <nl> + ERROR ( inheritance_from_non_protocol , none , <nl> " inheritance from non - protocol type % 0 " , ( Type ) ) <nl> - ERROR ( superclass_not_first , sema_tcd , none , <nl> + ERROR ( superclass_not_first , none , <nl> " superclass % 0 must appear first in the inheritance clause " , ( Type ) ) <nl> - ERROR ( circular_class_inheritance , sema_tcd , none , <nl> + ERROR ( circular_class_inheritance , none , <nl> " circular class inheritance % 0 " , ( StringRef ) ) <nl> - NOTE ( class_here , sema_tcd , none , <nl> + NOTE ( class_here , none , <nl> " class % 0 declared here " , ( Identifier ) ) <nl> - ERROR ( inheritance_from_final_class , sema_tcd , none , <nl> + ERROR ( inheritance_from_final_class , none , <nl> " inheritance from a final class % 0 " , ( Identifier ) ) <nl> <nl> <nl> / / Enums <nl> - ERROR ( enum_case_access , sema_tcd , none , <nl> + ERROR ( enum_case_access , none , <nl> " enum case in % select { PRIVATE | an internal | a public } 0 enum uses " <nl> " % select { a private | an internal | PUBLIC } 1 type " , <nl> ( Accessibility , Accessibility ) ) <nl> - ERROR ( enum_stored_property , sema_tcd , none , <nl> + ERROR ( enum_stored_property , none , <nl> " enums may not contain stored properties " , ( ) ) <nl> <nl> / / Enum raw types <nl> - ERROR ( multiple_enum_raw_types , sema_tcd , none , <nl> + ERROR ( multiple_enum_raw_types , none , <nl> " multiple enum raw types % 0 and % 1 " , ( Type , Type ) ) <nl> - ERROR ( circular_enum_inheritance , sema_tcd , none , <nl> + ERROR ( circular_enum_inheritance , none , <nl> " circular enum raw types % 0 " , ( StringRef ) ) <nl> - ERROR ( raw_type_not_first , sema_tcd , none , <nl> + ERROR ( raw_type_not_first , none , <nl> " raw type % 0 must appear first in the enum inheritance clause " , ( Type ) ) <nl> - ERROR ( raw_type_not_literal_convertible , sema_tcd , none , <nl> + ERROR ( raw_type_not_literal_convertible , none , <nl> " raw type % 0 is not convertible from any literal " , <nl> ( Type ) ) <nl> - ERROR ( enum_raw_type_not_equatable , sema_tcd , none , <nl> + ERROR ( enum_raw_type_not_equatable , none , <nl> " RawRepresentable ' init ' cannot be synthesized because raw type % 0 is not " <nl> " Equatable " , ( Type ) ) <nl> - ERROR ( enum_raw_type_access , sema_tcd , none , <nl> + ERROR ( enum_raw_type_access , none , <nl> " enum % select { must be declared % select { private | internal | PUBLIC } 2 " <nl> " | cannot be declared % select { PRIVATE | internal | public } 1 } 0 because its " <nl> " raw type uses % select { a private | an internal | PUBLIC } 2 type " , <nl> ( bool , Accessibility , Accessibility ) ) <nl> <nl> - NOTE ( enum_here , sema_tcd , none , <nl> + NOTE ( enum_here , none , <nl> " enum % 0 declared here " , ( Identifier ) ) <nl> - ERROR ( empty_enum_raw_type , sema_tcd , none , <nl> + ERROR ( empty_enum_raw_type , none , <nl> " an enum with no cases cannot declare a raw type " , ( ) ) <nl> - ERROR ( enum_raw_value_without_raw_type , sema_tcd , none , <nl> + ERROR ( enum_raw_value_without_raw_type , none , <nl> " enum case cannot have a raw value if the enum does not have a raw type " , ( ) ) <nl> - ERROR ( enum_with_raw_type_case_with_argument , sema_tcd , none , <nl> + ERROR ( enum_with_raw_type_case_with_argument , none , <nl> " enum with raw type cannot have cases with arguments " , ( ) ) <nl> - NOTE ( enum_raw_type_here , sema_tcd , none , <nl> + NOTE ( enum_raw_type_here , none , <nl> " declared raw type % 0 here " , ( Type ) ) <nl> - ERROR ( objc_enum_no_raw_type , sema_tcd , none , <nl> + ERROR ( objc_enum_no_raw_type , none , <nl> " ' @ objc ' enum must declare an integer raw type " , ( ) ) <nl> - ERROR ( objc_enum_raw_type_not_integer , sema_tcd , none , <nl> + ERROR ( objc_enum_raw_type_not_integer , none , <nl> " ' @ objc ' enum raw type % 0 is not an integer type " , ( Type ) ) <nl> - ERROR ( enum_non_integer_raw_value_auto_increment , sema_tcd , none , <nl> + ERROR ( enum_non_integer_raw_value_auto_increment , none , <nl> " enum case must declare a raw value when the preceding raw value is not an integer " , ( ) ) <nl> - ERROR ( enum_non_integer_convertible_raw_type_no_value , sema_tcd , none , <nl> + ERROR ( enum_non_integer_convertible_raw_type_no_value , none , <nl> " enum cases require explicit raw values when the raw type is not integer " <nl> " or string literal convertible " , ( ) ) <nl> - ERROR ( enum_raw_value_not_unique , sema_tcd , none , <nl> + ERROR ( enum_raw_value_not_unique , none , <nl> " raw value for enum case is not unique " , ( ) ) <nl> - NOTE ( enum_raw_value_used_here , sema_tcd , none , <nl> + NOTE ( enum_raw_value_used_here , none , <nl> " raw value previously used here " , ( ) ) <nl> - NOTE ( enum_raw_value_incrementing_from_here , sema_tcd , none , <nl> + NOTE ( enum_raw_value_incrementing_from_here , none , <nl> " raw value auto - incremented from here " , ( ) ) <nl> - NOTE ( enum_raw_value_incrementing_from_zero , sema_tcd , none , <nl> + NOTE ( enum_raw_value_incrementing_from_zero , none , <nl> " raw value implicitly auto - incremented from zero " , ( ) ) <nl> <nl> / / Derived conformances <nl> <nl> - ERROR ( broken_raw_representable_requirement , sema_tcd , none , <nl> + ERROR ( broken_raw_representable_requirement , none , <nl> " RawRepresentable protocol is broken : unexpected requirement " , ( ) ) <nl> - ERROR ( broken_equatable_requirement , sema_tcd , none , <nl> + ERROR ( broken_equatable_requirement , none , <nl> " Equatable protocol is broken : unexpected requirement " , ( ) ) <nl> - ERROR ( broken_hashable_requirement , sema_tcd , none , <nl> + ERROR ( broken_hashable_requirement , none , <nl> " Hashable protocol is broken : unexpected requirement " , ( ) ) <nl> - ERROR ( broken_errortype_requirement , sema_tcd , none , <nl> + ERROR ( broken_errortype_requirement , none , <nl> " ErrorType protocol is broken : unexpected requirement " , ( ) ) <nl> - ERROR ( broken_int_hashable_conformance , sema_tcd , none , <nl> + ERROR ( broken_int_hashable_conformance , none , <nl> " Int type is broken : does not conform to Hashable " , ( ) ) <nl> - ERROR ( broken_int_integer_literal_convertible_conformance , sema_tcd , none , <nl> + ERROR ( broken_int_integer_literal_convertible_conformance , none , <nl> " Int type is broken : does not conform to IntegerLiteralConvertible " , ( ) ) <nl> - ERROR ( broken_equatable_eq_operator , sema_tcd , none , <nl> + ERROR ( broken_equatable_eq_operator , none , <nl> " Equatable protocol is broken : no infix operator declaration for ' = = ' " , ( ) ) <nl> - ERROR ( no_equal_overload_for_int , sema_tcd , none , <nl> + ERROR ( no_equal_overload_for_int , none , <nl> " no overload of ' = = ' for Int " , ( ) ) <nl> <nl> / / Dynamic Self <nl> - ERROR ( dynamic_self_non_method , sema_tcd , none , <nl> + ERROR ( dynamic_self_non_method , none , <nl> " % select { global | local } 0 function cannot return ' Self ' " , ( bool ) ) <nl> - ERROR ( dynamic_self_struct_enum , sema_tcd , none , <nl> + ERROR ( dynamic_self_struct_enum , none , <nl> " % select { struct | enum } 0 method cannot return ' Self ' ; " <nl> " did you mean to use the % select { struct | enum } 0 type % 1 ? " , <nl> ( int , Identifier ) ) <nl> <nl> / / Duplicate declarations <nl> - ERROR ( duplicate_enum_element , sema_tcd , none , <nl> + ERROR ( duplicate_enum_element , none , <nl> " duplicate definition of enum element " , ( ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Type Check Attributes <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - ERROR ( attr_only_only_one_decl_kind , sema_tcd , none , <nl> + ERROR ( attr_only_only_one_decl_kind , none , <nl> " % 0 may only be used on ' % 1 ' declarations " , ( DeclAttribute , StringRef ) ) <nl> <nl> <nl> - ERROR ( override_final , sema_tcd , none , <nl> + ERROR ( override_final , none , <nl> " % 0 overrides a ' final ' % 0 " , ( DescriptiveDeclKind ) ) <nl> <nl> - ERROR ( member_cannot_be_final , sema_tcd , none , <nl> + ERROR ( member_cannot_be_final , none , <nl> " only classes and class members may be marked with ' final ' " , <nl> ( ) ) <nl> <nl> - ERROR ( final_not_allowed_here , sema_tcd , none , <nl> + ERROR ( final_not_allowed_here , none , <nl> " ' final ' may only be applied to classes , properties , methods , and " <nl> " subscripts " , ( ) ) <nl> <nl> - ERROR ( final_not_on_accessors , sema_tcd , none , <nl> + ERROR ( final_not_on_accessors , none , <nl> " ' final ' cannot be applied to accessors , it must be put on the " <nl> " % select { var | let | subscript } 0 " , ( unsigned ) ) <nl> <nl> - ERROR ( override_noreturn_with_return , sema_tcd , none , <nl> + ERROR ( override_noreturn_with_return , none , <nl> " an override of a @ noreturn method should also be @ noreturn " , ( ) ) <nl> <nl> - ERROR ( override_rethrows_with_non_rethrows , sema_tcd , none , <nl> + ERROR ( override_rethrows_with_non_rethrows , none , <nl> " override of ' rethrows ' % select { method | initializer } 0 should also " <nl> " be ' rethrows ' " , ( bool ) ) <nl> - ERROR ( rethrows_without_throwing_parameter , sema_tcd , none , <nl> + ERROR ( rethrows_without_throwing_parameter , none , <nl> " ' rethrows ' function must take a throwing function argument " , ( ) ) <nl> <nl> - ERROR ( autoclosure_function_type , attribute_parsing , none , <nl> + ERROR ( autoclosure_function_type , none , <nl> " @ autoclosure may only be applied to values of function type " , <nl> ( ) ) <nl> - ERROR ( autoclosure_function_input_nonunit , attribute_parsing , none , <nl> + ERROR ( autoclosure_function_input_nonunit , none , <nl> " autoclosure argument type must be ' ( ) ' " , ( ) ) <nl> - ERROR ( noescape_function_type , attribute_parsing , none , <nl> + ERROR ( noescape_function_type , none , <nl> " @ noescape may only be applied to parameters of function type " , <nl> ( ) ) <nl> - ERROR ( noescape_implied_by_autoclosure , attribute_parsing , none , <nl> + ERROR ( noescape_implied_by_autoclosure , none , <nl> " @ noescape is implied by @ autoclosure and should not be " <nl> " redundantly specified " , ( ) ) <nl> - ERROR ( noescape_conflicts_escaping_autoclosure , attribute_parsing , none , <nl> + ERROR ( noescape_conflicts_escaping_autoclosure , none , <nl> " @ noescape conflicts with @ autoclosure ( escaping ) " , ( ) ) <nl> <nl> <nl> / / NSManaged attribute <nl> - ERROR ( attr_NSManaged_not_instance_member , sema_tcd , none , <nl> + ERROR ( attr_NSManaged_not_instance_member , none , <nl> " @ NSManaged only allowed on an instance property or method " , ( ) ) <nl> - ERROR ( attr_NSManaged_not_stored , sema_tcd , none , <nl> + ERROR ( attr_NSManaged_not_stored , none , <nl> " @ NSManaged not allowed on % select { computed | observing | addressed } 0 " <nl> " properties " , ( unsigned ) ) <nl> - ERROR ( attr_NSManaged_let_property , sema_tcd , none , <nl> + ERROR ( attr_NSManaged_let_property , none , <nl> " @ NSManaged not allowed on a ' let ' property " , ( ) ) <nl> - ERROR ( attr_NSManaged_initial_value , sema_tcd , none , <nl> + ERROR ( attr_NSManaged_initial_value , none , <nl> " @ NSManaged property cannot have an initial value " , ( ) ) <nl> - ERROR ( attr_NSManaged_NSCopying , sema_tcd , none , <nl> + ERROR ( attr_NSManaged_NSCopying , none , <nl> " @ NSManaged property cannot also be marked @ NSCopying " , ( ) ) <nl> - ERROR ( attr_NSManaged_method_body , sema_tcd , none , <nl> + ERROR ( attr_NSManaged_method_body , none , <nl> " @ NSManaged method cannot have a body ; it must be provided at runtime " , ( ) ) <nl> <nl> <nl> / / NSCopying attribute <nl> - ERROR ( nscopying_only_on_class_properties , sema_tcd , none , <nl> + ERROR ( nscopying_only_on_class_properties , none , <nl> " @ NSCopying may only be used on properties in classes " , <nl> ( ) ) <nl> - ERROR ( nscopying_only_mutable , sema_tcd , none , <nl> + ERROR ( nscopying_only_mutable , none , <nl> " @ NSCopying requires property to be mutable " , ( ) ) <nl> - ERROR ( nscopying_only_stored_property , sema_tcd , none , <nl> + ERROR ( nscopying_only_stored_property , none , <nl> " @ NSCopying is only valid on stored properties " , ( ) ) <nl> - ERROR ( nscopying_doesnt_conform , sema_tcd , none , <nl> + ERROR ( nscopying_doesnt_conform , none , <nl> " @ NSCopying is only valid with types that conform to " <nl> " the NSCopying protocol " , ( ) ) <nl> <nl> ERROR ( nscopying_doesnt_conform , sema_tcd , none , <nl> # define SELECT_APPLICATION_MAIN " select { ' UIApplicationMain ' | ' NSApplicationMain ' } " <nl> # define SELECT_APPLICATION_DELEGATE " select { ' UIApplicationDelegate ' | ' NSApplicationDelegate ' } " <nl> <nl> - ERROR ( attr_ApplicationMain_not_class , sema_tcd , none , <nl> + ERROR ( attr_ApplicationMain_not_class , none , <nl> " % " SELECT_APPLICATION_MAIN " 0 attribute may only be used on classes " , <nl> ( unsigned ) ) <nl> - ERROR ( attr_ApplicationMain_not_ApplicationDelegate , sema_tcd , none , <nl> + ERROR ( attr_ApplicationMain_not_ApplicationDelegate , none , <nl> " % " SELECT_APPLICATION_MAIN " 0 class must conform to the % " SELECT_APPLICATION_DELEGATE " 0 protocol " , <nl> ( unsigned ) ) <nl> - ERROR ( attr_generic_ApplicationMain_not_supported , sema_tcd , none , <nl> + ERROR ( attr_generic_ApplicationMain_not_supported , none , <nl> " generic % " SELECT_APPLICATION_MAIN " 0 classes are not supported " , <nl> ( unsigned ) ) <nl> - ERROR ( attr_ApplicationMain_multiple , sema_tcd , none , <nl> + ERROR ( attr_ApplicationMain_multiple , none , <nl> " % " SELECT_APPLICATION_MAIN " 0 attribute can only apply to one class in a module " , <nl> ( unsigned ) ) <nl> - ERROR ( attr_ApplicationMain_with_script , sema_tcd , none , <nl> + ERROR ( attr_ApplicationMain_with_script , none , <nl> " % " SELECT_APPLICATION_MAIN " 0 attribute cannot be used in a module that contains " <nl> " top - level code " , <nl> ( unsigned ) ) <nl> - NOTE ( attr_ApplicationMain_script_here , sema_tcd , none , <nl> + NOTE ( attr_ApplicationMain_script_here , none , <nl> " top - level code defined in this source file " , <nl> ( ) ) <nl> <nl> NOTE ( attr_ApplicationMain_script_here , sema_tcd , none , <nl> # undef SELECT_APPLICATION_DELEGATE <nl> <nl> / / lazy <nl> - ERROR ( lazy_not_on_let , sema_tcd , none , <nl> + ERROR ( lazy_not_on_let , none , <nl> " ' lazy ' cannot be used on a let " , ( ) ) <nl> - ERROR ( lazy_not_on_computed , sema_tcd , none , <nl> + ERROR ( lazy_not_on_computed , none , <nl> " ' lazy ' may not be used on a computed property " , ( ) ) <nl> <nl> - ERROR ( lazy_on_already_lazy_global , sema_tcd , none , <nl> + ERROR ( lazy_on_already_lazy_global , none , <nl> " ' lazy ' may not be used on an already - lazy global " , ( ) ) <nl> - ERROR ( lazy_not_in_protocol , sema_tcd , none , <nl> + ERROR ( lazy_not_in_protocol , none , <nl> " ' lazy ' isn ' t allowed on a protocol requirement " , ( ) ) <nl> - ERROR ( lazy_requires_initializer , sema_tcd , none , <nl> + ERROR ( lazy_requires_initializer , none , <nl> " lazy properties must have an initializer " , ( ) ) <nl> <nl> - ERROR ( lazy_requires_single_var , sema_tcd , none , <nl> + ERROR ( lazy_requires_single_var , none , <nl> " ' lazy ' cannot destructure an initializer " , ( ) ) <nl> <nl> - ERROR ( lazy_must_be_property , sema_tcd , none , <nl> + ERROR ( lazy_must_be_property , none , <nl> " lazy is only valid for members of a struct or class " , ( ) ) <nl> - ERROR ( lazy_not_observable , sema_tcd , none , <nl> + ERROR ( lazy_not_observable , none , <nl> " lazy properties may not have observers " , ( ) ) <nl> <nl> / / Debugger function attribute . <nl> - ERROR ( attr_for_debugger_support_only , sema_tcd , none , <nl> + ERROR ( attr_for_debugger_support_only , none , <nl> " @ LLDBDebuggerSupport may only be used when debugger support is on " , ( ) ) <nl> <nl> / / warn_unused_result <nl> - ERROR ( attr_warn_unused_result_mutable_variable , sema_tcd , none , <nl> + ERROR ( attr_warn_unused_result_mutable_variable , none , <nl> " ' mutable_variant ' parameter of ' warn_unused_result ' attribute does not " <nl> " make sense on a % select { non - function | non - method | non - instance method | " <nl> " method of a class | mutating method } 0 " , ( unsigned ) ) <nl> ERROR ( attr_warn_unused_result_mutable_variable , sema_tcd , none , <nl> / / Type Check Expressions <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - NOTE ( found_candidate , sema_tce , none , <nl> + NOTE ( found_candidate , none , <nl> " found this candidate " , ( ) ) <nl> - NOTE ( found_candidate_type , sema_tce , none , <nl> + NOTE ( found_candidate_type , none , <nl> " found candidate with type % 0 " , ( Type ) ) <nl> - NOTE ( first_declaration , sema_tce , none , <nl> + NOTE ( first_declaration , none , <nl> " first declaration " , ( ) ) <nl> - NOTE ( second_declaration , sema_tce , none , <nl> + NOTE ( second_declaration , none , <nl> " second declaration " , ( ) ) <nl> <nl> - ERROR ( no_IntegerLiteralType_found , sema_tce , none , <nl> + ERROR ( no_IntegerLiteralType_found , none , <nl> " standard library error : IntegerLiteralType not defined " , ( ) ) <nl> - ERROR ( no_FloatLiteralType_found , sema_tce , none , <nl> + ERROR ( no_FloatLiteralType_found , none , <nl> " standard library error : FloatLiteralType not defined " , ( ) ) <nl> - ERROR ( no_StringLiteralType_found , sema_tce , none , <nl> + ERROR ( no_StringLiteralType_found , none , <nl> " standard library error : StringLiteralType not defined " , ( ) ) <nl> - ERROR ( no_MaxBuiltinIntegerType_found , sema_tce , none , <nl> + ERROR ( no_MaxBuiltinIntegerType_found , none , <nl> " standard library error : _MaxBuiltinIntegerType is not properly defined " , ( ) ) <nl> - ERROR ( no_MaxBuiltinFloatType_found , sema_tce , none , <nl> + ERROR ( no_MaxBuiltinFloatType_found , none , <nl> " standard library error : _MaxBuiltinFloatType is not properly defined " , ( ) ) <nl> <nl> - ERROR ( no_member_of_module , sema_tce , none , <nl> + ERROR ( no_member_of_module , none , <nl> " module % 0 has no member named % 1 " , ( Identifier , DeclName ) ) <nl> <nl> - ERROR ( super_with_no_base_class , sema_tce , none , <nl> + ERROR ( super_with_no_base_class , none , <nl> " ' super ' members cannot be referenced in a root class " , ( ) ) <nl> <nl> - ERROR ( bad_init_ref_base , sema_tce , none , <nl> + ERROR ( bad_init_ref_base , none , <nl> " ' init ' can only refer to the initializers of " <nl> " ' self ' % select { | or ' super ' } 0 " , ( bool ) ) <nl> - ERROR ( init_delegation_outside_initializer , sema_tce , none , <nl> + ERROR ( init_delegation_outside_initializer , none , <nl> " initializer delegation can only occur within an initializer " , ( ) ) <nl> - ERROR ( init_delegates_and_chains , sema_tce , none , <nl> + ERROR ( init_delegates_and_chains , none , <nl> " initializer cannot both delegate ( ' self . init ' ) and chain to a " <nl> " superclass initializer ( ' super . init ' ) " , ( ) ) <nl> - NOTE ( init_delegation_or_chain , sema_tce , none , <nl> + NOTE ( init_delegation_or_chain , none , <nl> " previous % select { delegation | chaining } 0 call is here " , ( bool ) ) <nl> - ERROR ( delegating_convenience_super_init , sema_tce , none , <nl> + ERROR ( delegating_convenience_super_init , none , <nl> " convenience initializer for % 0 must delegate ( with ' self . init ' ) rather " <nl> " than chaining to a superclass initializer ( with ' super . init ' ) " , <nl> ( Type ) ) <nl> - ERROR ( delegating_designated_init , sema_tce , none , <nl> + ERROR ( delegating_designated_init , none , <nl> " designated initializer for % 0 cannot delegate ( with ' self . init ' ) ; " <nl> " did you mean this to be a convenience initializer ? " , <nl> ( Type ) ) <nl> - NOTE ( delegation_here , sema_tce , none , " delegation occurs here " , ( ) ) <nl> - ERROR ( chain_convenience_init , sema_tce , none , <nl> + NOTE ( delegation_here , none , " delegation occurs here " , ( ) ) <nl> + ERROR ( chain_convenience_init , none , <nl> " must call a designated initializer of the superclass % 0 " , <nl> ( Type ) ) <nl> - ERROR ( delegate_chain_nonoptional_to_optional , sema_tce , none , <nl> + ERROR ( delegate_chain_nonoptional_to_optional , none , <nl> " a non - failable initializer cannot % select { delegate | chain } 0 to " <nl> " failable initializer % 1 written with ' init ? ' " , ( bool , DeclName ) ) <nl> - NOTE ( init_force_unwrap , sema_tce , none , <nl> + NOTE ( init_force_unwrap , none , <nl> " force potentially - failing result with ' ! ' " , ( ) ) <nl> - NOTE ( init_propagate_failure , sema_tce , none , <nl> + NOTE ( init_propagate_failure , none , <nl> " propagate the failure with ' init ? ' " , ( ) ) <nl> - ERROR ( delegate_chain_nonoptional_to_optional_try , sema_tce , none , <nl> + ERROR ( delegate_chain_nonoptional_to_optional_try , none , <nl> " a non - failable initializer cannot use ' try ? ' to " <nl> " % select { delegate | chain } 0 to another initializer " , ( bool ) ) <nl> - NOTE ( init_delegate_force_try , sema_tce , none , <nl> + NOTE ( init_delegate_force_try , none , <nl> " force potentially - failing result with ' try ! ' " , ( ) ) <nl> - ERROR ( init_delegation_nested , sema_tce , none , <nl> + ERROR ( init_delegation_nested , none , <nl> " % select { initializer delegation ( ' self . init ' ) | " <nl> " initializer chaining ( ' super . init ' ) } 0 cannot be nested in another " <nl> " % select { expression | statement } 1 " , ( bool , bool ) ) <nl> <nl> - NOTE ( convenience_init_here , sema_tce , none , <nl> + NOTE ( convenience_init_here , none , <nl> " convenience initializer is declared here " , ( ) ) <nl> - ERROR ( designated_init_in_extension , sema_tcd , none , <nl> + ERROR ( designated_init_in_extension , none , <nl> " designated initializer cannot be declared in an extension of % 0 ; " <nl> " did you mean this to be a convenience initializer ? " , <nl> ( Type ) ) <nl> - ERROR ( enumstruct_convenience_init , sema_tce , none , <nl> + ERROR ( enumstruct_convenience_init , none , <nl> " delegating initializers in % 0 are not marked with ' convenience ' " , <nl> ( StringRef ) ) <nl> - ERROR ( nonclass_convenience_init , sema_tce , none , <nl> + ERROR ( nonclass_convenience_init , none , <nl> " convenience initializer not allowed in non - class type % 0 " , <nl> ( Type ) ) <nl> <nl> - ERROR ( dynamic_construct_class , sema_tce , none , <nl> + ERROR ( dynamic_construct_class , none , <nl> " constructing an object of class type % 0 with a metatype value must use " <nl> " a ' required ' initializer " , ( Type ) ) <nl> - NOTE ( note_nonrequired_initializer , sema_tce , none , <nl> + NOTE ( note_nonrequired_initializer , none , <nl> " selected % select { non - required | implicit } 0 initializer % 1 " , <nl> ( bool , DeclName ) ) <nl> - ERROR ( construct_protocol_value , sema_tce , none , <nl> + ERROR ( construct_protocol_value , none , <nl> " value of type % 0 is a protocol ; it cannot be instantiated " , <nl> ( Type ) ) <nl> - ERROR ( construct_protocol_by_name , sema_tce , none , <nl> + ERROR ( construct_protocol_by_name , none , <nl> " protocol type % 0 cannot be instantiated " , <nl> ( Type ) ) <nl> <nl> / / Operators <nl> - ERROR ( unknown_binop , sema_tce , none , <nl> + ERROR ( unknown_binop , none , <nl> " operator is not a known binary operator " , ( ) ) <nl> - ERROR ( non_assoc_adjacent , sema_tce , none , <nl> + ERROR ( non_assoc_adjacent , none , <nl> " non - associative operator is adjacent to operator of same precedence " , ( ) ) <nl> - ERROR ( incompatible_assoc , sema_tce , none , <nl> + ERROR ( incompatible_assoc , none , <nl> " operator is adjacent to operator of same precedence " <nl> " but incompatible associativity " , ( ) ) <nl> <nl> / / If you change this , also change enum TryKindForDiagnostics . <nl> # define TRY_KIND_SELECT ( SUB ) " % select { try | try ! | try ? } " # SUB <nl> <nl> - ERROR ( try_rhs , sema_tce , none , <nl> + ERROR ( try_rhs , none , <nl> " ' " TRY_KIND_SELECT ( 0 ) " ' cannot appear to the right of a " <nl> " non - assignment operator " , ( unsigned ) ) <nl> - ERROR ( try_if_rhs_noncovering , sema_tce , none , <nl> + ERROR ( try_if_rhs_noncovering , none , <nl> " ' " TRY_KIND_SELECT ( 0 ) " ' following conditional operator does not cover " <nl> " everything to its right " , ( unsigned ) ) <nl> - ERROR ( try_assign_rhs_noncovering , sema_tce , none , <nl> + ERROR ( try_assign_rhs_noncovering , none , <nl> " ' " TRY_KIND_SELECT ( 0 ) " ' following assignment operator does not cover " <nl> " everything to its right " , ( unsigned ) ) <nl> <nl> - ERROR ( reference_non_inout , sema_tce , none , <nl> + ERROR ( reference_non_inout , none , <nl> " reference to % 0 not used to initialize an inout parameter " , ( Type ) ) <nl> - NOTE ( subscript_decl_here , sema_tca , none , <nl> + NOTE ( subscript_decl_here , none , <nl> " subscript operator declared here " , ( ) ) <nl> - ERROR ( condition_broken_proto , sema_tce , none , <nl> + ERROR ( condition_broken_proto , none , <nl> " protocol ' BooleanType ' is broken " , ( ) ) <nl> <nl> - ERROR ( broken_bool , sema_tce , none , " type ' Bool ' is broken " , ( ) ) <nl> + ERROR ( broken_bool , none , " type ' Bool ' is broken " , ( ) ) <nl> <nl> - WARNING ( inject_forced_downcast , sema_tce , none , <nl> + WARNING ( inject_forced_downcast , none , <nl> " treating a forced downcast to % 0 as optional will never produce ' nil ' " , <nl> ( Type ) ) <nl> - NOTE ( forced_to_conditional_downcast , sema_tce , none , <nl> + NOTE ( forced_to_conditional_downcast , none , <nl> " use ' as ? ' to perform a conditional downcast to % 0 " , ( Type ) ) <nl> - NOTE ( silence_inject_forced_downcast , sema_tce , none , <nl> + NOTE ( silence_inject_forced_downcast , none , <nl> " add parentheses around the cast to silence this warning " , ( ) ) <nl> <nl> - ERROR ( conditional_downcast_foreign , sema_tce , none , <nl> + ERROR ( conditional_downcast_foreign , none , <nl> " conditional downcast to CoreFoundation type % 0 will always succeed " , <nl> ( Type ) ) <nl> <nl> - ERROR ( optional_used_as_boolean , sema_tce , none , <nl> + ERROR ( optional_used_as_boolean , none , <nl> " optional type % 0 cannot be used as a boolean ; " <nl> " test for ' ! = nil ' instead " , ( Type ) ) <nl> - ERROR ( optional_used_as_true_boolean , sema_tce , none , <nl> + ERROR ( optional_used_as_true_boolean , none , <nl> " optional type % 0 cannot be used as a boolean ; " <nl> " test for ' = = nil ' instead " , ( Type ) ) <nl> <nl> - ERROR ( migrate_from_raw_to_init , sema_tce , none , <nl> + ERROR ( migrate_from_raw_to_init , none , <nl> " static method ' fromRaw ' has been replaced with a failable initializer " <nl> " ' init ( rawValue : ) ' " , ( ) ) <nl> - ERROR ( migrate_from_allZeros , sema_tce , none , <nl> + ERROR ( migrate_from_allZeros , none , <nl> " static method ' allZeros ' has been replaced with the default initializer " , <nl> ( ) ) <nl> <nl> - ERROR ( migrate_to_raw_to_raw_value , sema_tce , none , <nl> + ERROR ( migrate_to_raw_to_raw_value , none , <nl> " method ' fromRaw ' has been replaced with a property ' rawValue ' " , ( ) ) <nl> <nl> - ERROR ( interpolation_missing_proto , sema_tce , none , <nl> + ERROR ( interpolation_missing_proto , none , <nl> " string interpolation requires the protocol ' StringInterpolationConvertible ' to be defined " , <nl> ( ) ) <nl> - ERROR ( interpolation_broken_proto , sema_tce , none , <nl> + ERROR ( interpolation_broken_proto , none , <nl> " protocol ' StringInterpolationConvertible ' is broken " , <nl> ( ) ) <nl> <nl> - ERROR ( object_literal_broken_proto , sema_tce , none , <nl> + ERROR ( object_literal_broken_proto , none , <nl> " object literal protocol is broken " , ( ) ) <nl> <nl> - ERROR ( discard_expr_outside_of_assignment , sema_tce , none , <nl> + ERROR ( discard_expr_outside_of_assignment , none , <nl> " ' _ ' can only appear in a pattern or on the left side of an assignment " , <nl> ( ) ) <nl> - ERROR ( inout_expr_outside_of_call , sema_tce , none , <nl> + ERROR ( inout_expr_outside_of_call , none , <nl> " ' & ' can only appear immediately in a call argument list " , ( ) ) <nl> <nl> <nl> - ERROR ( unresolved_member_no_inference , sema_tce , none , <nl> + ERROR ( unresolved_member_no_inference , none , <nl> " reference to member % 0 cannot be resolved without a contextual type " , <nl> ( Identifier ) ) <nl> <nl> - ERROR ( type_of_expression_is_ambiguous , sema_tce , none , <nl> + ERROR ( type_of_expression_is_ambiguous , none , <nl> " type of expression is ambiguous without more context " , ( ) ) <nl> <nl> - ERROR ( specific_type_of_expression_is_ambiguous , sema_tce , none , <nl> + ERROR ( specific_type_of_expression_is_ambiguous , none , <nl> " expression type % 0 is ambiguous without more context " , ( Type ) ) <nl> <nl> <nl> - ERROR ( missing_protocol , sema_tce , none , <nl> + ERROR ( missing_protocol , none , <nl> " missing protocol % 0 " , ( Identifier ) ) <nl> - ERROR ( nil_literal_broken_proto , sema_tce , none , <nl> + ERROR ( nil_literal_broken_proto , none , <nl> " protocol ' NilLiteralConvertible ' is broken " , ( ) ) <nl> <nl> - ERROR ( builtin_integer_literal_broken_proto , sema_tce , none , <nl> + ERROR ( builtin_integer_literal_broken_proto , none , <nl> " protocol ' _BuiltinIntegerLiteralConvertible ' is broken " , ( ) ) <nl> - ERROR ( integer_literal_broken_proto , sema_tce , none , <nl> + ERROR ( integer_literal_broken_proto , none , <nl> " protocol ' IntegerLiteralConvertible ' is broken " , ( ) ) <nl> <nl> - ERROR ( builtin_float_literal_broken_proto , sema_tce , none , <nl> + ERROR ( builtin_float_literal_broken_proto , none , <nl> " protocol ' _BuiltinFloatLiteralConvertible ' is broken " , ( ) ) <nl> - ERROR ( float_literal_broken_proto , sema_tce , none , <nl> + ERROR ( float_literal_broken_proto , none , <nl> " protocol ' FloatLiteralConvertible ' is broken " , ( ) ) <nl> <nl> - ERROR ( builtin_boolean_literal_broken_proto , sema_tce , none , <nl> + ERROR ( builtin_boolean_literal_broken_proto , none , <nl> " protocol ' _BuiltinBooleanLiteralConvertible ' is broken " , ( ) ) <nl> - ERROR ( boolean_literal_broken_proto , sema_tce , none , <nl> + ERROR ( boolean_literal_broken_proto , none , <nl> " protocol ' BooleanLiteralConvertible ' is broken " , ( ) ) <nl> <nl> - ERROR ( builtin_unicode_scalar_literal_broken_proto , sema_tce , none , <nl> + ERROR ( builtin_unicode_scalar_literal_broken_proto , none , <nl> " protocol ' _BuiltinUnicodeScalarLiteralConvertible ' is broken " , ( ) ) <nl> - ERROR ( unicode_scalar_literal_broken_proto , sema_tce , none , <nl> + ERROR ( unicode_scalar_literal_broken_proto , none , <nl> " protocol ' UnicodeScalarLiteralConvertible ' is broken " , ( ) ) <nl> <nl> - ERROR ( builtin_extended_grapheme_cluster_literal_broken_proto , sema_tce , none , <nl> + ERROR ( builtin_extended_grapheme_cluster_literal_broken_proto , none , <nl> " protocol ' _BuiltinExtendedGraphemeClusterLiteralConvertible ' is broken " , ( ) ) <nl> - ERROR ( extended_grapheme_cluster_literal_broken_proto , sema_tce , none , <nl> + ERROR ( extended_grapheme_cluster_literal_broken_proto , none , <nl> " protocol ' ExtendedGraphemeClusterLiteralConvertible ' is broken " , ( ) ) <nl> <nl> - ERROR ( builtin_string_literal_broken_proto , sema_tce , none , <nl> + ERROR ( builtin_string_literal_broken_proto , none , <nl> " protocol ' _BuiltinStringLiteralConvertible ' is broken " , ( ) ) <nl> - ERROR ( string_literal_broken_proto , sema_tce , none , <nl> + ERROR ( string_literal_broken_proto , none , <nl> " protocol ' StringLiteralConvertible ' is broken " , ( ) ) <nl> <nl> - ERROR ( bool_type_broken , sema_tce , none , <nl> + ERROR ( bool_type_broken , none , <nl> " could not find a Bool type defined for ' is ' " , ( ) ) <nl> <nl> / / Array literals <nl> - ERROR ( array_protocol_broken , sema_tce , none , <nl> + ERROR ( array_protocol_broken , none , <nl> " ArrayLiteralConvertible protocol definition is broken " , ( ) ) <nl> - ERROR ( type_is_not_array , sema_tce , none , <nl> + ERROR ( type_is_not_array , none , <nl> " contextual type % 0 cannot be used with array literal " , ( Type ) ) <nl> - NOTE ( meant_dictionary_lit , sema_tce , none , <nl> + NOTE ( meant_dictionary_lit , none , <nl> " did you mean to use a dictionary literal instead ? " , ( ) ) <nl> - ERROR ( should_use_empty_dictionary_literal , sema_tce , none , <nl> + ERROR ( should_use_empty_dictionary_literal , none , <nl> " use [ : ] to get an empty dictionary literal " , ( ) ) <nl> <nl> / / Dictionary literals <nl> - ERROR ( dictionary_protocol_broken , sema_tce , none , <nl> + ERROR ( dictionary_protocol_broken , none , <nl> " DictionaryLiteralConvertible protocol definition is broken " , ( ) ) <nl> - ERROR ( type_is_not_dictionary , sema_tce , none , <nl> + ERROR ( type_is_not_dictionary , none , <nl> " contextual type % 0 cannot be used with dictionary literal " , ( Type ) ) <nl> <nl> <nl> / / Generic specializations <nl> - ERROR ( cannot_explicitly_specialize_generic_function , tce_sema , none , <nl> + ERROR ( cannot_explicitly_specialize_generic_function , none , <nl> " cannot explicitly specialize a generic function " , ( ) ) <nl> - ERROR ( not_a_generic_definition , tce_sema , none , <nl> + ERROR ( not_a_generic_definition , none , <nl> " cannot specialize a non - generic definition " , ( ) ) <nl> - ERROR ( not_a_generic_type , tce_sema , none , <nl> + ERROR ( not_a_generic_type , none , <nl> " cannot specialize non - generic type % 0 " , ( Type ) ) <nl> - ERROR ( type_parameter_count_mismatch , tce_sema , none , <nl> + ERROR ( type_parameter_count_mismatch , none , <nl> " generic type % 0 specialized with % select { too many | too few } 3 type " <nl> " parameters ( got % 2 , but expected % 1 ) " , <nl> ( Identifier , unsigned , unsigned , bool ) ) <nl> - ERROR ( generic_type_requires_arguments , tce_sema , none , <nl> + ERROR ( generic_type_requires_arguments , none , <nl> " reference to generic type % 0 requires arguments in < . . . > " , ( Type ) ) <nl> - NOTE ( generic_type_declared_here , tce_sema , none , <nl> + NOTE ( generic_type_declared_here , none , <nl> " generic type % 0 declared here " , ( Identifier ) ) <nl> <nl> / / Ambiguities <nl> - ERROR ( ambiguous_decl_ref , tce_sema , none , <nl> + ERROR ( ambiguous_decl_ref , none , <nl> " ambiguous use of % 0 " , ( DeclName ) ) <nl> - ERROR ( ambiguous_operator_ref , tce_sema , none , <nl> + ERROR ( ambiguous_operator_ref , none , <nl> " ambiguous use of operator % 0 " , ( DeclName ) ) <nl> <nl> / / Cannot capture inout - ness of a parameter <nl> / / Partial application of foreign functions not supported <nl> - ERROR ( partial_application_of_function_invalid , tce_sema , none , <nl> + ERROR ( partial_application_of_function_invalid , none , <nl> " partial application of % select { " <nl> " function with ' inout ' parameters | " <nl> " ' mutating ' method | " <nl> ERROR ( partial_application_of_function_invalid , tce_sema , none , <nl> " } 0 is not allowed " , <nl> ( unsigned ) ) <nl> <nl> - ERROR ( self_assignment_var , tce_sema , none , <nl> + ERROR ( self_assignment_var , none , <nl> " assigning a variable to itself " , ( ) ) <nl> - ERROR ( self_assignment_prop , tce_sema , none , <nl> + ERROR ( self_assignment_prop , none , <nl> " assigning a property to itself " , ( ) ) <nl> - ERROR ( property_use_in_closure_without_explicit_self , tce_sema , none , <nl> + ERROR ( property_use_in_closure_without_explicit_self , none , <nl> " reference to property % 0 in closure requires explicit ' self . ' to make " <nl> " capture semantics explicit " , ( Identifier ) ) <nl> - ERROR ( method_call_in_closure_without_explicit_self , tce_sema , none , <nl> + ERROR ( method_call_in_closure_without_explicit_self , none , <nl> " call to method % 0 in closure requires explicit ' self . ' to make " <nl> " capture semantics explicit " , ( Identifier ) ) <nl> - ERROR ( implicit_use_of_self_in_closure , tce_sema , none , <nl> + ERROR ( implicit_use_of_self_in_closure , none , <nl> " implicit use of ' self ' in closure ; use ' self . ' to make " <nl> " capture semantics explicit " , ( ) ) <nl> - ERROR ( capture_before_declaration , tce_sema , none , <nl> + ERROR ( capture_before_declaration , none , <nl> " cannot capture % 0 before it is declared " , ( Identifier ) ) <nl> - ERROR ( transitive_capture_before_declaration , tce_sema , none , <nl> + ERROR ( transitive_capture_before_declaration , none , <nl> " cannot capture % 0 , which would use % 1 before it is declared " , <nl> ( Identifier , Identifier ) ) <nl> - NOTE ( transitive_capture_through_here , tce_sema , none , <nl> + NOTE ( transitive_capture_through_here , none , <nl> " % 0 , declared here , captures % 1 " , <nl> ( Identifier , Identifier ) ) <nl> <nl> - WARNING ( recursive_accessor_reference , tce_sema , none , <nl> + WARNING ( recursive_accessor_reference , none , <nl> " attempting to % select { access | modify } 1 % 0 within its own " <nl> " % select { getter | setter } 1 " , ( Identifier , bool ) ) <nl> - NOTE ( recursive_accessor_reference_silence , tce_sema , none , <nl> + NOTE ( recursive_accessor_reference_silence , none , <nl> " access ' self ' explicitly to silence this warning " , ( ) ) <nl> - WARNING ( store_in_willset , tce_sema , none , <nl> + WARNING ( store_in_willset , none , <nl> " attempting to store to property % 0 within its own willSet , which is " <nl> " about to be overwritten by the new value " , ( Identifier ) ) <nl> <nl> - ERROR ( value_of_module_type , tce_sema , none , <nl> + ERROR ( value_of_module_type , none , <nl> " expected module member name after module name " , ( ) ) <nl> <nl> - ERROR ( value_of_metatype_type , tce_sema , none , <nl> + ERROR ( value_of_metatype_type , none , <nl> " expected member name or constructor call after type name " , ( ) ) <nl> <nl> - NOTE ( add_parens_to_type , tce_sema , none , <nl> + NOTE ( add_parens_to_type , none , <nl> " add arguments after the type to construct a value of the type " , ( ) ) <nl> - NOTE ( add_self_to_type , tce_sema , none , <nl> + NOTE ( add_self_to_type , none , <nl> " use ' . self ' to reference the type object " , ( ) ) <nl> <nl> - WARNING ( warn_unqualified_access , tce_sema , none , <nl> + WARNING ( warn_unqualified_access , none , <nl> " use of % 0 treated as a reference to % 1 in % 2 % 3 " , <nl> ( Identifier , DescriptiveDeclKind , DescriptiveDeclKind , DeclName ) ) <nl> - NOTE ( fix_unqualified_access_member , tce_sema , none , <nl> + NOTE ( fix_unqualified_access_member , none , <nl> " use ' self . ' to silence this warning " , ( ) ) <nl> - NOTE ( fix_unqualified_access_top_level , tce_sema , none , <nl> + NOTE ( fix_unqualified_access_top_level , none , <nl> " use ' % 0 ' to reference the % 1 " , <nl> ( StringRef , DescriptiveDeclKind , Identifier ) ) <nl> - NOTE ( fix_unqualified_access_top_level_multi , tce_sema , none , <nl> + NOTE ( fix_unqualified_access_top_level_multi , none , <nl> " use ' % 0 ' to reference the % 1 in module % 2 " , <nl> ( StringRef , DescriptiveDeclKind , Identifier ) ) <nl> <nl> - ERROR ( type_of_metatype , tce_sema , none , <nl> + ERROR ( type_of_metatype , none , <nl> " ' . dynamicType ' is not allowed after a type name " , ( ) ) <nl> - ERROR ( invalid_noescape_use , tce_sema , none , <nl> + ERROR ( invalid_noescape_use , none , <nl> " @ noescape parameter % 0 may only be called " , ( Identifier ) ) <nl> - NOTE ( noescape_autoclosure , tce_sema , none , <nl> + NOTE ( noescape_autoclosure , none , <nl> " parameter % 0 is implicitly @ noescape because it was declared @ autoclosure " , <nl> ( Identifier ) ) <nl> <nl> - ERROR ( closure_noescape_use , tce_sema , none , <nl> + ERROR ( closure_noescape_use , none , <nl> " closure use of @ noescape parameter % 0 may allow it to escape " , <nl> ( Identifier ) ) <nl> - ERROR ( decl_closure_noescape_use , tce_sema , none , <nl> + ERROR ( decl_closure_noescape_use , none , <nl> " declaration closing over @ noescape parameter % 0 may allow it to escape " , <nl> ( Identifier ) ) <nl> <nl> - ERROR ( capture_across_type_decl , tce_sema , none , <nl> + ERROR ( capture_across_type_decl , none , <nl> " % 0 declaration cannot close over value % 1 defined in outer scope " , <nl> ( DescriptiveDeclKind , Identifier ) ) <nl> <nl> ERROR ( capture_across_type_decl , tce_sema , none , <nl> / / Type Check Statements <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - ERROR ( jump_out_of_defer , sema_tcs , none , <nl> + ERROR ( jump_out_of_defer , none , <nl> " ' % 0 ' cannot transfer control out of a defer statement " , <nl> ( StringRef ) ) <nl> <nl> - ERROR ( return_invalid_outside_func , sema_tcs , none , <nl> + ERROR ( return_invalid_outside_func , none , <nl> " return invalid outside of a func " , ( ) ) <nl> <nl> - ERROR ( return_expr_missing , sema_tcs , none , <nl> + ERROR ( return_expr_missing , none , <nl> " non - void function should return a value " , ( ) ) <nl> - ERROR ( return_non_failable_init , sema_tcs , none , <nl> + ERROR ( return_non_failable_init , none , <nl> " only a failable initializer can return ' nil ' " , ( ) ) <nl> - NOTE ( make_init_failable , sema_tcs , none , <nl> + NOTE ( make_init_failable , none , <nl> " use ' init ? ' to make the initializer % 0 failable " , ( DeclName ) ) <nl> - ERROR ( return_init_non_nil , sema_tcs , none , <nl> + ERROR ( return_init_non_nil , none , <nl> " ' nil ' is the only return value permitted in an initializer " , <nl> ( ) ) <nl> <nl> - WARNING ( if_always_true , sema_tcd , none , <nl> + WARNING ( if_always_true , none , <nl> " ' if ' condition is always true " , ( ) ) <nl> - WARNING ( while_always_true , sema_tcd , none , <nl> + WARNING ( while_always_true , none , <nl> " ' while ' condition is always true " , ( ) ) <nl> <nl> - WARNING ( guard_always_succeeds , sema_tcd , none , <nl> + WARNING ( guard_always_succeeds , none , <nl> " ' guard ' condition is always true , body is unreachable " , ( ) ) <nl> <nl> <nl> - ERROR ( expression_unused_function , sema_tcs , none , <nl> + ERROR ( expression_unused_function , none , <nl> " expression resolves to an unused function " , ( ) ) <nl> - ERROR ( expression_unused_lvalue , sema_tcs , none , <nl> + ERROR ( expression_unused_lvalue , none , <nl> " expression resolves to an unused l - value " , ( ) ) <nl> - WARNING ( expression_unused_result , sema_tcs , none , <nl> + WARNING ( expression_unused_result , none , <nl> " result of call to % 0 is unused " , ( DeclName ) ) <nl> - WARNING ( expression_unused_init_result , sema_tcs , none , <nl> + WARNING ( expression_unused_init_result , none , <nl> " result of initializer is unused " , ( ) ) <nl> - WARNING ( expression_unused_result_message , sema_tcs , none , <nl> + WARNING ( expression_unused_result_message , none , <nl> " result of call to % 0 is unused : % 1 " , ( DeclName , StringRef ) ) <nl> - WARNING ( expression_unused_result_nonmutating , sema_tcs , none , <nl> + WARNING ( expression_unused_result_nonmutating , none , <nl> " result of call to non - mutating function % 0 is unused ; " <nl> " use % 1 to mutate in - place " , ( DeclName , DeclName ) ) <nl> - WARNING ( expression_unused_optional_try , sema_tcs , none , <nl> + WARNING ( expression_unused_optional_try , none , <nl> " result of ' try ? ' is unused " , ( ) ) <nl> <nl> - ERROR ( assignment_lhs_not_lvalue , sema_tcs , none , <nl> + ERROR ( assignment_lhs_not_lvalue , none , <nl> " cannot assign to immutable expression of type % 0 " , ( Type ) ) <nl> - ERROR ( assignment_lhs_is_immutable_variable , sema_tcs , none , <nl> + ERROR ( assignment_lhs_is_immutable_variable , none , <nl> " cannot assign to value : % 0 " , ( StringRef ) ) <nl> - ERROR ( assignment_lhs_is_immutable_property , sema_tcs , none , <nl> + ERROR ( assignment_lhs_is_immutable_property , none , <nl> " cannot assign to property : % 0 " , ( StringRef ) ) <nl> - ERROR ( assignment_subscript_has_immutable_base , sema_tcs , none , <nl> + ERROR ( assignment_subscript_has_immutable_base , none , <nl> " cannot assign through subscript : % 0 " , ( StringRef ) ) <nl> - ERROR ( assignment_bang_has_immutable_subcomponent , sema_tcs , none , <nl> + ERROR ( assignment_bang_has_immutable_subcomponent , none , <nl> " cannot assign through ' ! ' : % 0 " , ( StringRef ) ) <nl> <nl> - NOTE ( change_to_mutating , sema_tcs , none , <nl> + NOTE ( change_to_mutating , none , <nl> " mark % select { method | accessor } 0 ' mutating ' to make ' self ' mutable " , <nl> ( bool ) ) <nl> <nl> / / For Stmt <nl> - WARNING ( deprecated_c_style_for_stmt , sema_tcs , none , <nl> + WARNING ( deprecated_c_style_for_stmt , none , <nl> " C - style for statement is deprecated and will be removed in a future version of Swift " , ( ) ) <nl> - NOTE ( cant_fix_c_style_for_stmt , sema_tcs , none , <nl> + NOTE ( cant_fix_c_style_for_stmt , none , <nl> " C - style for statement can ' t be automatically fixed to for - in , because the loop variable is modified inside the loop " , ( ) ) <nl> <nl> / / ForEach Stmt <nl> - ERROR ( sequence_protocol_broken , sema_tcs , none , <nl> + ERROR ( sequence_protocol_broken , none , <nl> " SequenceType protocol definition is broken " , ( ) ) <nl> - ERROR ( generator_protocol_broken , sema_tcs , none , <nl> + ERROR ( generator_protocol_broken , none , <nl> " GeneratorType protocol definition is broken " , ( ) ) <nl> <nl> - ERROR ( label_shadowed , sema_tcs , none , <nl> + ERROR ( label_shadowed , none , <nl> " label % 0 cannot be reused on an inner statement " , ( Identifier ) ) <nl> - ERROR ( break_outside_loop , sema_tcs , none , <nl> + ERROR ( break_outside_loop , none , <nl> " ' break ' is only allowed inside a loop , if , do , or switch " , ( ) ) <nl> - ERROR ( unlabeled_break_outside_loop , sema_tcs , none , <nl> + ERROR ( unlabeled_break_outside_loop , none , <nl> " unlabeled ' break ' is only allowed inside a loop or switch , a " <nl> " labeled break is required to exit an if or do " , ( ) ) <nl> <nl> - ERROR ( continue_outside_loop , sema_tcs , none , <nl> + ERROR ( continue_outside_loop , none , <nl> " ' continue ' is only allowed inside a loop " , ( ) ) <nl> - ERROR ( continue_not_in_this_stmt , sema_tcs , none , <nl> + ERROR ( continue_not_in_this_stmt , none , <nl> " ' continue ' cannot be used with % 0 statements " , ( StringRef ) ) <nl> <nl> / / Switch Stmt <nl> - ERROR ( no_match_operator , sema_tcs , none , <nl> + ERROR ( no_match_operator , none , <nl> " no binary ' ~ = ' operator available for ' switch ' statement " , ( ) ) <nl> - ERROR ( fallthrough_outside_switch , sema_tcs , none , <nl> + ERROR ( fallthrough_outside_switch , none , <nl> " ' fallthrough ' is only allowed inside a switch " , ( ) ) <nl> - ERROR ( fallthrough_from_last_case , sema_tcs , none , <nl> + ERROR ( fallthrough_from_last_case , none , <nl> " ' fallthrough ' without a following ' case ' or ' default ' block " , ( ) ) <nl> - ERROR ( fallthrough_into_case_with_var_binding , sema_tcs , none , <nl> + ERROR ( fallthrough_into_case_with_var_binding , none , <nl> " ' fallthrough ' cannot transfer control to a case label that declares variables " , <nl> ( ) ) <nl> <nl> - ERROR ( unnecessary_cast_over_optionset , sema_tcs , none , <nl> + ERROR ( unnecessary_cast_over_optionset , none , <nl> " unnecessary cast over raw value of % 0 " , ( Type ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Type Check Patterns <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - ERROR ( cannot_infer_type_for_pattern , sema_tcp , none , <nl> + ERROR ( cannot_infer_type_for_pattern , none , <nl> " type annotation missing in pattern " , ( ) ) <nl> - ERROR ( refutable_pattern_requires_initializer , sema_tcd , none , <nl> + ERROR ( refutable_pattern_requires_initializer , none , <nl> " pattern matching requires an initializer value to match against " , ( ) ) <nl> - ERROR ( invalid_pattern , sema_tcd , none , <nl> + ERROR ( invalid_pattern , none , <nl> " invalid pattern " , ( ) ) <nl> - WARNING ( var_pattern_didnt_bind_variables , sema_tcp , none , <nl> + WARNING ( var_pattern_didnt_bind_variables , none , <nl> " ' % 0 ' pattern has no effect ; sub - pattern didn ' t bind any variables " , <nl> ( StringRef ) ) <nl> - ERROR ( iflet_pattern_matching , sema_tcp , none , <nl> + ERROR ( iflet_pattern_matching , none , <nl> " pattern matching in a condition requires the ' case ' keyword " , ( ) ) <nl> - ERROR ( iflet_implicitly_unwraps , sema_tcp , none , <nl> + ERROR ( iflet_implicitly_unwraps , none , <nl> " pattern matching in a condition implicitly unwraps optionals " , ( ) ) <nl> - ERROR ( type_pattern_missing_is , sema_tcp , none , <nl> + ERROR ( type_pattern_missing_is , none , <nl> " ' is ' keyword required to pattern match against type name " , ( ) ) <nl> <nl> <nl> - ERROR ( pattern_type_mismatch_context , sema_tcp , none , <nl> + ERROR ( pattern_type_mismatch_context , none , <nl> " type annotation does not match contextual type % 0 " , ( Type ) ) <nl> <nl> - ERROR ( tuple_pattern_in_non_tuple_context , sema_tcp , none , <nl> + ERROR ( tuple_pattern_in_non_tuple_context , none , <nl> " tuple pattern cannot match values of the non - tuple type % 0 " , ( Type ) ) <nl> - ERROR ( closure_argument_list_tuple , sema_tcp , none , <nl> + ERROR ( closure_argument_list_tuple , none , <nl> " contextual closure type % 0 expects % 1 argument % s1 , " <nl> " but % 2 were used in closure body " , ( Type , unsigned , unsigned ) ) <nl> - ERROR ( closure_argument_list_missing , sema_tcp , none , <nl> + ERROR ( closure_argument_list_missing , none , <nl> " contextual type for closure argument list expects % 0 argument % s0 , " <nl> " which cannot be implicitly ignored " , ( unsigned ) ) <nl> <nl> - ERROR ( tuple_pattern_length_mismatch , sema_tcp , none , <nl> + ERROR ( tuple_pattern_length_mismatch , none , <nl> " tuple pattern has the wrong length for tuple type % 0 " , ( Type ) ) <nl> - ERROR ( tuple_pattern_label_mismatch , sema_tcp , none , <nl> + ERROR ( tuple_pattern_label_mismatch , none , <nl> " tuple pattern element label % 0 must be % 1 " , ( Identifier , Identifier ) ) <nl> - ERROR ( enum_element_pattern_member_not_found , sema_tcp , none , <nl> + ERROR ( enum_element_pattern_member_not_found , none , <nl> " enum case ' % 0 ' not found in type % 1 " , ( StringRef , Type ) ) <nl> - ERROR ( optional_element_pattern_not_valid_type , sema_tcp , none , <nl> + ERROR ( optional_element_pattern_not_valid_type , none , <nl> " ' ? ' pattern cannot match values of type % 0 " , ( Type ) ) <nl> - ERROR ( condition_optional_element_pattern_not_valid_type , sema_tcp , none , <nl> + ERROR ( condition_optional_element_pattern_not_valid_type , none , <nl> " initializer for conditional binding must have Optional type , not % 0 " , <nl> ( Type ) ) <nl> - ERROR ( enum_element_pattern_not_member_of_enum , sema_tcp , none , <nl> + ERROR ( enum_element_pattern_not_member_of_enum , none , <nl> " enum case ' % 0 ' is not a member of type % 1 " , ( StringRef , Type ) ) <nl> - ERROR ( nominal_type_pattern_not_nominal_type , sema_tcp , none , <nl> + ERROR ( nominal_type_pattern_not_nominal_type , none , <nl> " non - nominal type % 0 cannot be used with property pattern syntax " , ( Type ) ) <nl> - ERROR ( nominal_type_pattern_type_mismatch , sema_tcp , none , <nl> + ERROR ( nominal_type_pattern_type_mismatch , none , <nl> " type % 0 of pattern does not match deduced type % 1 " , ( Type , Type ) ) <nl> - ERROR ( nominal_type_pattern_property_not_found , sema_tcp , none , <nl> + ERROR ( nominal_type_pattern_property_not_found , none , <nl> " property ' % 0 ' not found in type % 1 " , ( StringRef , Type ) ) <nl> - ERROR ( nominal_type_pattern_property_ambiguous , sema_tcp , none , <nl> + ERROR ( nominal_type_pattern_property_ambiguous , none , <nl> " property name ' % 0 ' in type % 1 is ambiguous " , ( StringRef , Type ) ) <nl> - ERROR ( nominal_type_pattern_not_property , sema_tcp , none , <nl> + ERROR ( nominal_type_pattern_not_property , none , <nl> " member ' % 0 ' of type % 1 is not a property " , ( StringRef , Type ) ) <nl> - ERROR ( nominal_type_pattern_static_property , sema_tcp , none , <nl> + ERROR ( nominal_type_pattern_static_property , none , <nl> " cannot match type property ' % 0 ' of type % 1 in a ' case ' pattern " , <nl> ( StringRef , Type ) ) <nl> - ERROR ( nominal_type_subpattern_without_property_name , pattern_parsing , none , <nl> + ERROR ( nominal_type_subpattern_without_property_name , none , <nl> " subpattern of a struct or class pattern must have a keyword name " , ( ) ) <nl> - ERROR ( ambiguous_enum_pattern_type , sema_tcp , none , <nl> + ERROR ( ambiguous_enum_pattern_type , none , <nl> " generic enum type % 0 is ambiguous without explicit generic parameters " <nl> " when matching value of type % 1 " , ( Type , Type ) ) <nl> - WARNING ( type_inferred_to_undesirable_type , sema_tcp , none , <nl> + WARNING ( type_inferred_to_undesirable_type , none , <nl> " % select { variable | constant } 2 % 0 inferred to have type % 1 , " <nl> " which may be unexpected " , ( Identifier , Type , bool ) ) <nl> - NOTE ( add_explicit_type_annotation_to_silence , sema_tcp , none , <nl> + NOTE ( add_explicit_type_annotation_to_silence , none , <nl> " add an explicit type annotation to silence this warning " , ( ) ) <nl> - ERROR ( isa_pattern_value , sema_tcp , none , <nl> + ERROR ( isa_pattern_value , none , <nl> " downcast pattern value of type % 0 cannot be used " , ( Type ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> ERROR ( isa_pattern_value , sema_tcp , none , <nl> <nl> <nl> <nl> - ERROR ( try_unhandled , sema , none , <nl> + ERROR ( try_unhandled , none , <nl> " errors thrown from here are not handled " , ( ) ) <nl> - ERROR ( throwing_call_unhandled , sema , none , <nl> + ERROR ( throwing_call_unhandled , none , <nl> " call can throw , but the error is not handled " , ( ) ) <nl> - ERROR ( tryless_throwing_call_unhandled , sema , none , <nl> + ERROR ( tryless_throwing_call_unhandled , none , <nl> " call can throw , but it is not marked with ' try ' and " <nl> " the error is not handled " , ( ) ) <nl> - ERROR ( throw_in_nonthrowing_function , sema , none , <nl> + ERROR ( throw_in_nonthrowing_function , none , <nl> " error is not handled because the enclosing function " <nl> " is not declared ' throws ' " , ( ) ) <nl> <nl> - ERROR ( throwing_call_in_rethrows_function , sema , none , <nl> + ERROR ( throwing_call_in_rethrows_function , none , <nl> " call can throw , but the error is not handled ; a function declared " <nl> " ' rethrows ' may only throw if its parameter does " , ( ) ) <nl> - ERROR ( tryless_throwing_call_in_rethrows_function , sema , none , <nl> + ERROR ( tryless_throwing_call_in_rethrows_function , none , <nl> " call can throw , but it is not marked with ' try ' and " <nl> " the error is not handled ; a function declared " <nl> " ' rethrows ' may only throw if its parameter does " , ( ) ) <nl> - ERROR ( throw_in_rethrows_function , sema , none , <nl> + ERROR ( throw_in_rethrows_function , none , <nl> " a function declared ' rethrows ' may only throw if its parameter does " , ( ) ) <nl> - NOTE ( because_rethrows_argument_throws , sema , none , <nl> + NOTE ( because_rethrows_argument_throws , none , <nl> " call is to ' rethrows ' function , but argument function can throw " , ( ) ) <nl> - NOTE ( because_rethrows_default_argument_throws , sema , none , <nl> + NOTE ( because_rethrows_default_argument_throws , none , <nl> " call is to ' rethrows ' function , but a defaulted argument function " <nl> " can throw " , ( ) ) <nl> <nl> - ERROR ( throwing_call_in_nonthrowing_autoclosure , sema , none , <nl> + ERROR ( throwing_call_in_nonthrowing_autoclosure , none , <nl> " call can throw , but it is executed in a non - throwing " <nl> " autoclosure " , ( ) ) <nl> - ERROR ( tryless_throwing_call_in_nonthrowing_autoclosure , sema , none , <nl> + ERROR ( tryless_throwing_call_in_nonthrowing_autoclosure , none , <nl> " call can throw , but it is not marked with ' try ' and " <nl> " it is executed in a non - throwing autoclosure " , ( ) ) <nl> - ERROR ( throw_in_nonthrowing_autoclosure , sema , none , <nl> + ERROR ( throw_in_nonthrowing_autoclosure , none , <nl> " error is not handled because it is thrown in a non - throwing " <nl> " autoclosure " , ( ) ) <nl> <nl> - ERROR ( try_unhandled_in_nonexhaustive_catch , sema , none , <nl> + ERROR ( try_unhandled_in_nonexhaustive_catch , none , <nl> " errors thrown from here are not handled because the " <nl> " enclosing catch is not exhaustive " , ( ) ) <nl> - ERROR ( throwing_call_in_nonexhaustive_catch , sema , none , <nl> + ERROR ( throwing_call_in_nonexhaustive_catch , none , <nl> " call can throw , but the enclosing catch is not exhaustive " , ( ) ) <nl> - ERROR ( tryless_throwing_call_in_nonexhaustive_catch , sema , none , <nl> + ERROR ( tryless_throwing_call_in_nonexhaustive_catch , none , <nl> " call can throw , but it is not marked with ' try ' and " <nl> " the enclosing catch is not exhaustive " , ( ) ) <nl> - ERROR ( throw_in_nonexhaustive_catch , sema , none , <nl> + ERROR ( throw_in_nonexhaustive_catch , none , <nl> " error is not handled because the enclosing catch is not exhaustive " , ( ) ) <nl> <nl> - ERROR ( throwing_call_in_illegal_context , sema , none , <nl> + ERROR ( throwing_call_in_illegal_context , none , <nl> " call can throw , but errors cannot be thrown out of % 0 " , <nl> ( StringRef ) ) <nl> - ERROR ( throw_in_illegal_context , sema , none , <nl> + ERROR ( throw_in_illegal_context , none , <nl> " errors cannot be thrown out of % 0 " , ( StringRef ) ) <nl> <nl> - ERROR ( throwing_operator_without_try , sema , none , <nl> + ERROR ( throwing_operator_without_try , none , <nl> " operator can throw but expression is not marked with ' try ' " , ( ) ) <nl> - ERROR ( throwing_call_without_try , sema , none , <nl> + ERROR ( throwing_call_without_try , none , <nl> " call can throw but is not marked with ' try ' " , ( ) ) <nl> - WARNING ( no_throw_in_try , sema , none , <nl> + WARNING ( no_throw_in_try , none , <nl> " no calls to throwing functions occur within ' try ' expression " , ( ) ) <nl> <nl> - WARNING ( no_throw_in_do_with_catch , sema , none , <nl> + WARNING ( no_throw_in_do_with_catch , none , <nl> " ' catch ' block is unreachable because no errors are thrown in ' do ' block " , ( ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Type Check Types <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - ERROR ( sugar_type_not_found , sema_tct , none , <nl> + ERROR ( sugar_type_not_found , none , <nl> " broken standard library : cannot find " <nl> " % select { Array | Optional | ImplicitlyUnwrappedOptional | Dictionary | " <nl> " ErrorType } 0 type " , ( unsigned ) ) <nl> - ERROR ( optional_intrinsics_not_found , sema_tct , none , <nl> + ERROR ( optional_intrinsics_not_found , none , <nl> " broken standard library : cannot find intrinsic operations on " <nl> " Optional < T > " , ( ) ) <nl> - ERROR ( pointer_argument_intrinsics_not_found , sema_tct , none , <nl> + ERROR ( pointer_argument_intrinsics_not_found , none , <nl> " broken standard library : cannot find intrinsic operations on " <nl> " UnsafeMutablePointer < T > " , ( ) ) <nl> - ERROR ( array_literal_intrinsics_not_found , sema_tct , none , <nl> + ERROR ( array_literal_intrinsics_not_found , none , <nl> " broken standard library : cannot find intrinsic operations on " <nl> " Array < T > " , ( ) ) <nl> - ERROR ( bool_intrinsics_not_found , sema_tct , none , <nl> + ERROR ( bool_intrinsics_not_found , none , <nl> " broken standard library : cannot find intrinsic operations on Bool " , ( ) ) <nl> - ERROR ( self_in_nominal , sema_tct , none , <nl> + ERROR ( self_in_nominal , none , <nl> " ' Self ' is only available in a protocol or as the result of a " <nl> " method in a class ; did you mean % 0 ? " , ( Identifier ) ) <nl> - ERROR ( class_super_access , sema_tcd , none , <nl> + ERROR ( class_super_access , none , <nl> " class % select { must be declared % select { private | internal | PUBLIC } 2 " <nl> " | cannot be declared % select { PRIVATE | internal | public } 1 } 0 because its " <nl> " superclass is % select { private | internal | PUBLIC } 2 " , <nl> ( bool , Accessibility , Accessibility ) ) <nl> - ERROR ( dot_protocol_on_non_existential , sema_tct , none , <nl> + ERROR ( dot_protocol_on_non_existential , none , <nl> " cannot use ' Protocol ' with non - protocol type % 0 " , ( Type ) ) <nl> - ERROR ( tuple_single_element , sema_tcd , none , <nl> + ERROR ( tuple_single_element , none , <nl> " cannot create a single - element tuple with an element label " , ( ) ) <nl> - ERROR ( tuple_ellipsis , sema_tcd , none , <nl> + ERROR ( tuple_ellipsis , none , <nl> " cannot create a variadic tuple " , ( ) ) <nl> <nl> / / Ownership <nl> - ERROR ( invalid_ownership_type , attribute_parsing , none , <nl> + ERROR ( invalid_ownership_type , none , <nl> " ' % select { strong | weak | unowned | unowned } 0 ' may only be applied to " <nl> " class and class - bound protocol types , not % 1 " , <nl> ( / * Ownership * / unsigned , Type ) ) <nl> - ERROR ( invalid_ownership_protocol_type , attribute_parsing , none , <nl> + ERROR ( invalid_ownership_protocol_type , none , <nl> " ' % select { strong | weak | unowned | unowned } 0 ' may not be applied to " <nl> " non - class - bound protocol % 1 ; consider adding a class bound " , <nl> ( / * Ownership * / unsigned , Type ) ) <nl> - ERROR ( invalid_weak_ownership_not_optional , attribute_parsing , none , <nl> + ERROR ( invalid_weak_ownership_not_optional , none , <nl> " ' weak ' variable should have optional type % 0 " , ( Type ) ) <nl> - ERROR ( invalid_weak_let , attribute_parsing , none , <nl> + ERROR ( invalid_weak_let , none , <nl> " ' weak ' must be a mutable variable , because it may change at runtime " , ( ) ) <nl> <nl> / / required <nl> - ERROR ( required_initializer_nonclass , attribute_parsing , none , <nl> + ERROR ( required_initializer_nonclass , none , <nl> " ' required ' initializer in non - class type % 0 " , ( Type ) ) <nl> - ERROR ( required_initializer_in_extension , attribute_parsing , none , <nl> + ERROR ( required_initializer_in_extension , none , <nl> " ' required ' initializer must be declared directly in class % 0 " <nl> " ( not in an extension ) " , ( Type ) ) <nl> - ERROR ( required_initializer_missing , attribute_parsing , none , <nl> + ERROR ( required_initializer_missing , none , <nl> " ' required ' initializer % 0 must be provided by subclass of % 1 " , <nl> ( DeclName , Type ) ) <nl> - NOTE ( required_initializer_here , sema_tcd , none , <nl> + NOTE ( required_initializer_here , none , <nl> " ' required ' initializer is declared in superclass here " , ( ) ) <nl> <nl> - ERROR ( required_initializer_not_accessible , sema_tcd , none , <nl> + ERROR ( required_initializer_not_accessible , none , <nl> " ' required ' initializer must be as accessible as its enclosing type " , ( ) ) <nl> - ERROR ( required_initializer_missing_keyword , sema_tcd , none , <nl> + ERROR ( required_initializer_missing_keyword , none , <nl> " ' required ' modifier must be present on all overrides of a required " <nl> " initializer " , ( ) ) <nl> - ERROR ( required_initializer_override_wrong_keyword , sema_tcd , none , <nl> + ERROR ( required_initializer_override_wrong_keyword , none , <nl> " use the ' required ' modifier to override a required initializer " , ( ) ) <nl> - WARNING ( required_initializer_override_keyword , sema_tcd , none , <nl> + WARNING ( required_initializer_override_keyword , none , <nl> " ' override ' is implied when overriding a required initializer " , ( ) ) <nl> - NOTE ( overridden_required_initializer_here , sema_tcd , none , <nl> + NOTE ( overridden_required_initializer_here , none , <nl> " overridden required initializer is here " , ( ) ) <nl> <nl> / / Functions <nl> - ERROR ( attribute_requires_function_type , attribute_parsing , none , <nl> + ERROR ( attribute_requires_function_type , none , <nl> " attribute only applies to syntactic function types " , ( ) ) <nl> - ERROR ( objc_block_cannot_be_thin , attribute_parsing , none , <nl> + ERROR ( objc_block_cannot_be_thin , none , <nl> " @ objc_block function type cannot be @ thin " , ( ) ) <nl> - ERROR ( attribute_not_supported , attribute_parsing , none , <nl> + ERROR ( attribute_not_supported , none , <nl> " this attribute is not supported " , ( ) ) <nl> - ERROR ( convention_with_deprecated_representation_attribute , attribute_parsing , none , <nl> + ERROR ( convention_with_deprecated_representation_attribute , none , <nl> " @ convention attribute cannot be used with deprecated @ % 0 attribute " , <nl> ( StringRef ) ) <nl> - ERROR ( unsupported_convention , type_parsing , none , <nl> + ERROR ( unsupported_convention , none , <nl> " convention ' % 0 ' not supported " , ( StringRef ) ) <nl> - ERROR ( unreferenced_generic_parameter , type_parsing , none , <nl> + ERROR ( unreferenced_generic_parameter , none , <nl> " generic parameter ' % 0 ' is not used in function signature " , ( StringRef ) ) <nl> - WARNING ( deprecated_convention_attribute , type_parsing , none , <nl> + WARNING ( deprecated_convention_attribute , none , <nl> " ' @ % 0 ' attribute is deprecated ; ' @ convention ( % 1 ) ' should be used " <nl> " instead " , ( StringRef , StringRef ) ) <nl> <nl> / / SIL <nl> - ERROR ( opened_non_protocol , decl_parsing , none , <nl> + ERROR ( opened_non_protocol , none , <nl> " @ opened cannot be applied to non - protocol type % 0 " , ( Type ) ) <nl> - ERROR ( sil_function_ellipsis , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( sil_function_ellipsis , PointsToFirstBadToken , <nl> " SIL function types cannot be variadic " , ( ) ) <nl> - ERROR ( sil_function_label , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( sil_function_label , PointsToFirstBadToken , <nl> " SIL function types cannot have labeled inputs " , ( ) ) <nl> - ERROR ( sil_function_repeat_convention , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( sil_function_repeat_convention , PointsToFirstBadToken , <nl> " repeated % select { parameter | result | callee } 0 convention attribute " , <nl> ( unsigned ) ) <nl> - ERROR ( sil_function_multiple_results , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( sil_function_multiple_results , PointsToFirstBadToken , <nl> " SIL function types cannot have multiple results " , ( ) ) <nl> - ERROR ( sil_function_multiple_error_results , type_parsing , PointsToFirstBadToken , <nl> + ERROR ( sil_function_multiple_error_results , PointsToFirstBadToken , <nl> " SIL function types cannot have multiple @ error results " , ( ) ) <nl> - ERROR ( unsupported_sil_convention , type_parsing , none , <nl> + ERROR ( unsupported_sil_convention , none , <nl> " convention ' % 0 ' not supported in SIL " , ( StringRef ) ) <nl> - ERROR ( sil_deprecated_convention_attribute , type_parsing , none , <nl> + ERROR ( sil_deprecated_convention_attribute , none , <nl> " ' @ % 0 ' attribute is deprecated ; ' @ convention ( % 1 ) ' must be used instead " , <nl> ( StringRef , StringRef ) ) <nl> <nl> / / SIL Metatypes <nl> - ERROR ( sil_metatype_without_repr , type_parsing , none , <nl> + ERROR ( sil_metatype_without_repr , none , <nl> " metatypes in SIL must have @ thin , @ thick , or @ objc_metatype attribute " , <nl> ( ) ) <nl> - ERROR ( sil_metatype_multiple_reprs , type_parsing , none , <nl> + ERROR ( sil_metatype_multiple_reprs , none , <nl> " metatypes in SIL can only be one of @ thin , @ thick , or @ objc_metatype " , <nl> ( ) ) <nl> <nl> ERROR ( sil_metatype_multiple_reprs , type_parsing , none , <nl> / / @ objc and @ nonobjc <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - ERROR ( attr_used_without_required_module , sema_tcd , none , <nl> + ERROR ( attr_used_without_required_module , none , <nl> " % 0 attribute used without importing module % 1 " , <nl> ( DeclAttribute , Identifier ) ) <nl> <nl> - ERROR ( invalid_objc_decl_context , sema_tcd , none , <nl> + ERROR ( invalid_objc_decl_context , none , <nl> " @ objc can only be used with members of classes , @ objc protocols , and " <nl> " concrete extensions of classes " , ( ) ) <nl> - ERROR ( invalid_objc_decl , sema_tcd , none , <nl> + ERROR ( invalid_objc_decl , none , <nl> " only classes , protocols , methods , initializers , properties , and " <nl> " subscript declarations can be declared @ objc " , ( ) ) <nl> - ERROR ( invalid_objc_swift_rooted_class , sema_tcd , none , <nl> + ERROR ( invalid_objc_swift_rooted_class , none , <nl> " only classes that inherit from NSObject can be declared @ objc " , ( ) ) <nl> - ERROR ( invalid_nonobjc_decl , sema_tcd , none , <nl> + ERROR ( invalid_nonobjc_decl , none , <nl> " only methods , initializers , properties and subscript declarations can " <nl> " be declared @ nonobjc " , ( ) ) <nl> - ERROR ( objc_in_extension_context , sema_objc , none , <nl> + ERROR ( objc_in_extension_context , none , <nl> " members of constrained extensions cannot be declared @ objc " , ( ) ) <nl> - ERROR ( objc_in_generic_extension , sema_objc , none , <nl> + ERROR ( objc_in_generic_extension , none , <nl> " @ objc is not supported within extensions of generic classes " , ( ) ) <nl> - ERROR ( objc_for_generic_class , sema_objc , none , <nl> + ERROR ( objc_for_generic_class , none , <nl> " generic subclasses of ' @ objc ' classes cannot have an explicit ' @ objc ' " <nl> " attribute because they are not directly visible from Objective - C " , ( ) ) <nl> - ERROR ( objc_getter_for_nonobjc_property , sema_tcd , none , <nl> + ERROR ( objc_getter_for_nonobjc_property , none , <nl> " ' @ objc ' getter for non - ' @ objc ' property " , ( ) ) <nl> - ERROR ( objc_getter_for_nonobjc_subscript , sema_tcd , none , <nl> + ERROR ( objc_getter_for_nonobjc_subscript , none , <nl> " ' @ objc ' getter for non - ' @ objc ' subscript " , ( ) ) <nl> - ERROR ( objc_setter_for_nonobjc_property , sema_tcd , none , <nl> + ERROR ( objc_setter_for_nonobjc_property , none , <nl> " ' @ objc ' setter for non - ' @ objc ' property " , ( ) ) <nl> - ERROR ( objc_setter_for_nonobjc_subscript , sema_tcd , none , <nl> + ERROR ( objc_setter_for_nonobjc_subscript , none , <nl> " ' @ objc ' setter for non - ' @ objc ' subscript " , ( ) ) <nl> - ERROR ( objc_enum_generic , sema_tcd , none , <nl> + ERROR ( objc_enum_generic , none , <nl> " ' @ objc ' enum cannot be generic " , ( ) ) <nl> - ERROR ( objc_name_req_nullary , sema_objc , none , <nl> + ERROR ( objc_name_req_nullary , none , <nl> " ' @ objc ' % select { class | protocol | enum | enum case | property } 0 must have a simple name " , ( int ) ) <nl> - ERROR ( objc_name_subscript , sema_objc , none , <nl> + ERROR ( objc_name_subscript , none , <nl> " ' @ objc ' subscript cannot have a name ; did you mean to put " <nl> " the name on the getter or setter ? " , ( ) ) <nl> - ERROR ( objc_name_func_mismatch , sema_objc , none , <nl> + ERROR ( objc_name_func_mismatch , none , <nl> " ' @ objc ' % select { initializer | method } 0 name provides " <nl> " % select { one argument name | names for % 1 arguments } 2 , but " <nl> " % select { initializer | method } 0 has % select { one parameter | % 3 parameters } 4 " <nl> " % select { | ( % select { | including } 4the error parameter ) } 5 " , <nl> ( bool , unsigned , bool , unsigned , bool , bool ) ) <nl> - ERROR ( objc_enum_case_req_name , sema_objc , none , <nl> + ERROR ( objc_enum_case_req_name , none , <nl> " attribute has no effect ; cases within an ' @ objc ' enum are already " <nl> " exposed to Objective - C " , ( ) ) <nl> - ERROR ( objc_enum_case_req_objc_enum , sema_objc , none , <nl> + ERROR ( objc_enum_case_req_objc_enum , none , <nl> " ' @ objc ' enum case is not allowed outside of an ' @ objc ' enum " , ( ) ) <nl> - ERROR ( objc_enum_case_multi , sema_objc , none , <nl> + ERROR ( objc_enum_case_multi , none , <nl> " ' @ objc ' enum case declaration defines multiple enum cases with the same Objective - C name " , ( ) ) <nl> <nl> / / If you change this , also change enum ObjCReason <nl> # define OBJC_ATTR_SELECT " select { marked dynamic | marked @ objc | marked @ IBOutlet | marked @ NSManaged | a member of an @ objc protocol | implicitly @ objc | an @ objc override } " <nl> <nl> - ERROR ( objc_invalid_on_var , sema_objc , none , <nl> + ERROR ( objc_invalid_on_var , none , <nl> " property cannot be % " OBJC_ATTR_SELECT " 0 " <nl> " because its type cannot be represented in Objective - C " , ( unsigned ) ) <nl> - ERROR ( objc_invalid_subscript_key_type , sema_objc , none , <nl> + ERROR ( objc_invalid_subscript_key_type , none , <nl> " subscript cannot be % " OBJC_ATTR_SELECT " 0 because its key " <nl> " type % 1 is neither an integer nor an object " , ( unsigned , Type ) ) <nl> - ERROR ( objc_invalid_on_subscript , sema_objc , none , <nl> + ERROR ( objc_invalid_on_subscript , none , <nl> " subscript cannot be % " OBJC_ATTR_SELECT " 0 because its type " <nl> " cannot be represented in Objective - C " , ( unsigned ) ) <nl> - ERROR ( objc_invalid_with_generic_params , sema_objc , none , <nl> + ERROR ( objc_invalid_with_generic_params , none , <nl> " method cannot be % " OBJC_ATTR_SELECT " 0 because it has generic " <nl> " parameters " , ( unsigned ) ) <nl> - ERROR ( objc_convention_invalid , sema_objc , none , <nl> + ERROR ( objc_convention_invalid , none , <nl> " % 0 is not representable in Objective - C , so it cannot be used " <nl> " with ' @ convention ( % 1 ) ' " , ( Type , StringRef ) ) <nl> - NOTE ( not_objc_empty_protocol_composition , sema_objc , none , <nl> + NOTE ( not_objc_empty_protocol_composition , none , <nl> " ' protocol < > ' is not considered ' @ objc ' ; use ' AnyObject ' instead " , ( ) ) <nl> - NOTE ( not_objc_protocol , sema_objc , none , <nl> + NOTE ( not_objc_protocol , none , <nl> " protocol % 0 is not ' @ objc ' " , ( Type ) ) <nl> - NOTE ( not_objc_empty_tuple , sema_objc , none , <nl> + NOTE ( not_objc_empty_tuple , none , <nl> " empty tuple type cannot be represented in Objective - C " , ( ) ) <nl> - NOTE ( not_objc_tuple , sema_objc , none , <nl> + NOTE ( not_objc_tuple , none , <nl> " tuples cannot be represented in Objective - C " , ( ) ) <nl> - NOTE ( not_objc_swift_class , sema_objc , none , <nl> + NOTE ( not_objc_swift_class , none , <nl> " classes not annotated with @ objc cannot be represented " <nl> " in Objective - C " , ( ) ) <nl> - NOTE ( not_objc_swift_struct , sema_objc , none , <nl> + NOTE ( not_objc_swift_struct , none , <nl> " Swift structs cannot be represented in Objective - C " , ( ) ) <nl> - NOTE ( not_objc_swift_enum , sema_objc , none , <nl> + NOTE ( not_objc_swift_enum , none , <nl> " non - ' @ objc ' enums cannot be represented in Objective - C " , ( ) ) <nl> - NOTE ( not_objc_generic_type_param , sema_objc , none , <nl> + NOTE ( not_objc_generic_type_param , none , <nl> " generic type parameters cannot be represented in Objective - C " , ( ) ) <nl> - NOTE ( not_objc_function_type_param , sema_objc , none , <nl> + NOTE ( not_objc_function_type_param , none , <nl> " function types cannot be represented in Objective - C unless their " <nl> " parameters and returns can be " , ( ) ) <nl> - NOTE ( not_objc_function_type_throwing , sema_objc , none , <nl> + NOTE ( not_objc_function_type_throwing , none , <nl> " throwing function types cannot be represented in Objective - C " , ( ) ) <nl> - NOTE ( objc_inferring_on_objc_protocol_member , sema_objc , none , <nl> + NOTE ( objc_inferring_on_objc_protocol_member , none , <nl> " inferring ' @ objc ' because the declaration is a member of " <nl> " an ' @ objc ' protocol " , ( ) ) <nl> - NOTE ( objc_overriding_objc_decl , sema_objc , none , <nl> + NOTE ( objc_overriding_objc_decl , none , <nl> " overriding ' @ objc ' % select { property | subscript | initializer | method } 0 % 1 " <nl> " here " , ( unsigned , DeclName ) ) <nl> <nl> - ERROR ( objc_invalid_on_func_curried , sema_objc , none , <nl> + ERROR ( objc_invalid_on_func_curried , none , <nl> " method cannot be % " OBJC_ATTR_SELECT " 0 because curried functions " <nl> " cannot be represented in Objective - C " , ( unsigned ) ) <nl> - ERROR ( objc_observing_accessor , sema_objc , none , <nl> + ERROR ( objc_observing_accessor , none , <nl> " observing accessors are not allowed to be marked @ objc " , ( ) ) <nl> - ERROR ( objc_invalid_on_func_variadic , sema_objc , none , <nl> + ERROR ( objc_invalid_on_func_variadic , none , <nl> " method cannot be % " OBJC_ATTR_SELECT " 0 because it has a variadic " <nl> " parameter " , ( unsigned ) ) <nl> - ERROR ( objc_invalid_on_func_param_type , sema_objc , none , <nl> + ERROR ( objc_invalid_on_func_param_type , none , <nl> " method cannot be % " OBJC_ATTR_SELECT " 1 because the type of the " <nl> " parameter % 0 cannot be represented in Objective - C " , ( unsigned , unsigned ) ) <nl> - ERROR ( objc_invalid_on_func_single_param_type , sema_objc , none , <nl> + ERROR ( objc_invalid_on_func_single_param_type , none , <nl> " method cannot be % " OBJC_ATTR_SELECT " 0 because the type of the " <nl> " parameter cannot be represented in Objective - C " , ( unsigned ) ) <nl> - ERROR ( objc_invalid_on_func_result_type , sema_objc , none , <nl> + ERROR ( objc_invalid_on_func_result_type , none , <nl> " method cannot be % " OBJC_ATTR_SELECT " 0 because its result type " <nl> " cannot be represented in Objective - C " , ( unsigned ) ) <nl> - ERROR ( objc_invalid_on_foreign_class , sema_objc , none , <nl> + ERROR ( objc_invalid_on_foreign_class , none , <nl> " method cannot be % " OBJC_ATTR_SELECT " 0 because Core Foundation " <nl> " types are not classes in Objective - C " , ( unsigned ) ) <nl> - ERROR ( objc_invalid_on_throwing_optional_result , sema_objc , none , <nl> + ERROR ( objc_invalid_on_throwing_optional_result , none , <nl> " throwing method cannot be % " OBJC_ATTR_SELECT " 0 because " <nl> " it returns a value of optional type % 1 ; ' nil ' indicates failure to " <nl> " Objective - C " , <nl> ( unsigned , Type ) ) <nl> - ERROR ( objc_invalid_on_throwing_result , sema_objc , none , <nl> + ERROR ( objc_invalid_on_throwing_result , none , <nl> " throwing method cannot be % " OBJC_ATTR_SELECT " 0 because " <nl> " it returns a value of type % 1 ; return ' Void ' or a type that bridges " <nl> " to an Objective - C class " , <nl> ( unsigned , Type ) ) <nl> - ERROR ( objc_invalid_on_failing_init , sema_objc , none , <nl> + ERROR ( objc_invalid_on_failing_init , none , <nl> " a failable and throwing initializer cannot be " <nl> " % " OBJC_ATTR_SELECT " 0 because ' nil ' indicates failure to Objective - C " , <nl> ( unsigned ) ) <nl> <nl> - ERROR ( objc_override_method_selector_mismatch , sema_objc , none , <nl> + ERROR ( objc_override_method_selector_mismatch , none , <nl> " Objective - C method has a different selector from the " <nl> " method it overrides ( % 0 vs . % 1 ) " , ( ObjCSelector , ObjCSelector ) ) <nl> <nl> - ERROR ( objc_override_property_name_mismatch , sema_objc , none , <nl> + ERROR ( objc_override_property_name_mismatch , none , <nl> " Objective - C property has a different name from the " <nl> " property it overrides ( % 0 vs . % 1 ) " , ( Identifier , Identifier ) ) <nl> <nl> - ERROR ( broken_bridged_to_objc_protocol , sema_tcd , none , <nl> + ERROR ( broken_bridged_to_objc_protocol , none , <nl> " _BridgedToObjectiveC protocol is broken " , ( ) ) <nl> <nl> - ERROR ( type_not_bridged , sema_objc , none , <nl> + ERROR ( type_not_bridged , none , <nl> " % 0 is not bridged to Objective - C " , ( Type ) ) <nl> - ERROR ( missing_bridging_function , sema_objc , Fatal , <nl> + ERROR ( missing_bridging_function , Fatal , <nl> " missing ' % select { _forceBridgeFromObjectiveC | " <nl> " _conditionallyBridgeFromObjectiveC } 0 ' " , ( bool ) ) <nl> - ERROR ( missing_nserror_bridging_function , sema_objc , none , <nl> + ERROR ( missing_nserror_bridging_function , none , <nl> " missing _bridgeNSError " , ( ) ) <nl> <nl> # define OBJC_DIAG_SELECT " % select { initializer % 1 | implicit initializer % 1 | deinitializer | implicit deinitializer | method % 1 | getter for % 1 | subscript getter | setter for % 1 | subscript setter } 0 " <nl> <nl> # define OBJC_DIAG_SELECT_2 " % select { initializer % 3 | implicit initializer % 3 | deinitializer | implicit deinitializer | method % 3 | getter for % 3 | subscript getter | setter for % 3 | subscript setter } 2 " <nl> <nl> - ERROR ( objc_redecl , sema_objc , none , <nl> + ERROR ( objc_redecl , none , <nl> OBJC_DIAG_SELECT " with Objective - C selector % 4 conflicts with " <nl> OBJC_DIAG_SELECT_2 " with the same Objective - C selector " , <nl> ( unsigned , DeclName , unsigned , DeclName , ObjCSelector ) ) <nl> - NOTE ( objc_declared_here , sema_objc , none , <nl> + NOTE ( objc_declared_here , none , <nl> OBJC_DIAG_SELECT " declared here " , <nl> ( unsigned , DeclName ) ) <nl> <nl> - ERROR ( objc_redecl_same , sema_objc , none , <nl> + ERROR ( objc_redecl_same , none , <nl> OBJC_DIAG_SELECT " with Objective - C selector % 2 conflicts with " <nl> " previous declaration with the same Objective - C selector " , <nl> ( unsigned , DeclName , ObjCSelector ) ) <nl> <nl> - ERROR ( objc_override_other , sema_objc , none , <nl> + ERROR ( objc_override_other , none , <nl> OBJC_DIAG_SELECT " with Objective - C selector % 4 conflicts with " <nl> OBJC_DIAG_SELECT_2 " from superclass % 5 with the same Objective - C " <nl> " selector " , <nl> ( unsigned , DeclName , unsigned , DeclName , ObjCSelector , Type ) ) <nl> <nl> - ERROR ( objc_class_method_not_permitted , sema_objc , none , <nl> + ERROR ( objc_class_method_not_permitted , none , <nl> OBJC_DIAG_SELECT " defines Objective - C class method % 2 , which is " <nl> " not permitted by Swift " , ( unsigned , DeclName , ObjCSelector ) ) <nl> <nl> - NOTE ( objc_witness_selector_mismatch , sema_objc , none , <nl> + NOTE ( objc_witness_selector_mismatch , none , <nl> " Objective - C method % 2 provided by " OBJC_DIAG_SELECT <nl> " does not match the requirement ' s selector ( % 3 ) " , <nl> ( unsigned , DeclName , ObjCSelector , ObjCSelector ) ) <nl> <nl> - ERROR ( objc_optional_requirement_conflict , sema_objc , none , <nl> + ERROR ( objc_optional_requirement_conflict , none , <nl> " Objective - C method % 4 provided by " OBJC_DIAG_SELECT <nl> " conflicts with optional requirement " OBJC_DIAG_SELECT_2 <nl> " in protocol % 5 " , <nl> ( unsigned , DeclName , unsigned , DeclName , ObjCSelector , DeclName ) ) <nl> <nl> - ERROR ( nonobjc_not_allowed , sema_objc , none , <nl> + ERROR ( nonobjc_not_allowed , none , <nl> " declaration is % " OBJC_ATTR_SELECT " 0 , and cannot be marked @ nonobjc " , <nl> ( unsigned ) ) <nl> <nl> ERROR ( nonobjc_not_allowed , sema_objc , none , <nl> / / dynamic <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - ERROR ( dynamic_not_in_class , sema_dynamic , none , <nl> + ERROR ( dynamic_not_in_class , none , <nl> " only members of classes may be dynamic " , ( ) ) <nl> - ERROR ( dynamic_with_final , sema_dynamic , none , <nl> + ERROR ( dynamic_with_final , none , <nl> " a declaration cannot be both ' final ' and ' dynamic ' " , <nl> ( ) ) <nl> <nl> ERROR ( dynamic_with_final , sema_dynamic , none , <nl> / / @ available <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - ERROR ( availability_decl_unavailable , sema_avail , none , <nl> + ERROR ( availability_decl_unavailable , none , <nl> " % 0 is unavailable " , ( DeclName ) ) <nl> <nl> - ERROR ( availability_decl_unavailable_rename , sema_avail , none , <nl> + ERROR ( availability_decl_unavailable_rename , none , <nl> " % 0 has been renamed to ' % 1 ' " , ( DeclName , StringRef ) ) <nl> <nl> - ERROR ( availability_decl_unavailable_rename_msg , sema_avail , none , <nl> + ERROR ( availability_decl_unavailable_rename_msg , none , <nl> " % 0 has been renamed to ' % 1 ' : % 2 " , ( DeclName , StringRef , StringRef ) ) <nl> <nl> - ERROR ( availability_decl_unavailable_msg , sema_avail , none , <nl> + ERROR ( availability_decl_unavailable_msg , none , <nl> " % 0 is unavailable : % 1 " , ( DeclName , StringRef ) ) <nl> <nl> - ERROR ( availability_decl_unavailable_in_swift , sema_avail , none , <nl> + ERROR ( availability_decl_unavailable_in_swift , none , <nl> " % 0 is unavailable in Swift " , ( DeclName ) ) <nl> <nl> - ERROR ( availability_decl_unavailable_in_swift_msg , sema_avail , none , <nl> + ERROR ( availability_decl_unavailable_in_swift_msg , none , <nl> " % 0 is unavailable in Swift : % 1 " , ( DeclName , StringRef ) ) <nl> <nl> - NOTE ( availability_marked_unavailable , sema_avail , none , <nl> + NOTE ( availability_marked_unavailable , none , <nl> " % 0 has been explicitly marked unavailable here " , ( DeclName ) ) <nl> <nl> - NOTE ( availability_obsoleted , sema_avail , none , <nl> + NOTE ( availability_obsoleted , none , <nl> " % 0 was obsoleted in % 1 % 2 " , <nl> ( DeclName , StringRef , clang : : VersionTuple ) ) <nl> <nl> - WARNING ( availability_deprecated , sema_avail , none , <nl> + WARNING ( availability_deprecated , none , <nl> " % 0 % select { is | % select { is | was } 3 } 1 deprecated " <nl> " % select { | % select { on | in } 3 % 2 % select { | % 4 } 3 } 1 " , <nl> ( DeclName , bool , StringRef , bool , clang : : VersionTuple ) ) <nl> <nl> - WARNING ( availability_deprecated_msg , sema_avail , none , <nl> + WARNING ( availability_deprecated_msg , none , <nl> " % 0 % select { is | % select { is | was } 3 } 1 deprecated " <nl> " % select { | % select { on | in } 3 % 2 % select { | % 4 } 3 } 1 : % 5 " , <nl> ( DeclName , bool , StringRef , bool , clang : : VersionTuple , StringRef ) ) <nl> <nl> - WARNING ( availability_deprecated_rename , sema_avail , none , <nl> + WARNING ( availability_deprecated_rename , none , <nl> " % 0 % select { is | % select { is | was } 3 } 1 deprecated " <nl> " % select { | % select { on | in } 3 % 2 % select { | % 4 } 3 } 1 : renamed to ' % 5 ' " , <nl> ( DeclName , bool , StringRef , bool , clang : : VersionTuple , StringRef ) ) <nl> <nl> - NOTE ( note_deprecated_rename , sema_avail , none , <nl> + NOTE ( note_deprecated_rename , none , <nl> " use ' % 0 ' instead " , ( StringRef ) ) <nl> <nl> - ERROR ( availability_decl_more_than_enclosing , sema_avail , none , <nl> + ERROR ( availability_decl_more_than_enclosing , none , <nl> " declaration cannot be more available than enclosing scope " , ( ) ) <nl> <nl> - NOTE ( availability_decl_more_than_enclosing_enclosing_here , sema_avail , none , <nl> + NOTE ( availability_decl_more_than_enclosing_enclosing_here , none , <nl> " enclosing scope here " , ( ) ) <nl> <nl> - ERROR ( availability_decl_only_version_newer , sema_avail , none , <nl> + ERROR ( availability_decl_only_version_newer , none , <nl> " % 0 is only available on % 1 % 2 or newer " , <nl> ( DeclName , StringRef , clang : : VersionTuple ) ) <nl> <nl> - NOTE ( availability_guard_with_version_check , sema_avail , none , <nl> + NOTE ( availability_guard_with_version_check , none , <nl> " add ' if # available ' version check " , ( ) ) <nl> <nl> - NOTE ( availability_add_attribute , sema_avail , none , <nl> + NOTE ( availability_add_attribute , none , <nl> " add @ available attribute to enclosing % 0 " , ( DescriptiveDeclKind ) ) <nl> <nl> - ERROR ( availability_accessor_only_version_newer , sema_avail , none , <nl> + ERROR ( availability_accessor_only_version_newer , none , <nl> " % select { getter | setter } 0 for % 1 is only available on % 2 % 3 " <nl> " or newer " , <nl> ( / * AccessorKind * / unsigned , DeclName , StringRef , clang : : VersionTuple ) ) <nl> <nl> - ERROR ( availability_inout_accessor_only_version_newer , sema_avail , none , <nl> + ERROR ( availability_inout_accessor_only_version_newer , none , <nl> " cannot pass as inout because % select { getter | setter } 0 for % 1 is only " <nl> " available on % 2 % 3 or newer " , <nl> ( / * AccessorKind * / unsigned , DeclName , StringRef , clang : : VersionTuple ) ) <nl> <nl> - ERROR ( availability_query_required_for_platform , sema_avail , none , <nl> + ERROR ( availability_query_required_for_platform , none , <nl> " condition required for target platform ' % 0 ' " , ( StringRef ) ) <nl> <nl> - WARNING ( availability_query_useless_min_deployment , sema_avail , none , <nl> + WARNING ( availability_query_useless_min_deployment , none , <nl> " unnecessary check for ' % 0 ' ; minimum deployment target ensures guard " <nl> " will always be true " , ( StringRef ) ) <nl> <nl> - WARNING ( availability_query_useless_enclosing_scope , sema_avail , none , <nl> + WARNING ( availability_query_useless_enclosing_scope , none , <nl> " unnecessary check for ' % 0 ' ; enclosing scope ensures guard " <nl> " will always be true " , ( StringRef ) ) <nl> <nl> - NOTE ( availability_query_useless_enclosing_scope_here , sema_avail , none , <nl> + NOTE ( availability_query_useless_enclosing_scope_here , none , <nl> " enclosing scope here " , ( ) ) <nl> <nl> - ERROR ( availability_global_script_no_potential , sema_avail , <nl> + ERROR ( availability_global_script_no_potential , <nl> none , " global variable cannot be marked potentially " <nl> " unavailable with ' @ available ' in script mode " , ( ) ) <nl> <nl> - ERROR ( availability_stored_property_no_potential , sema_avail , <nl> + ERROR ( availability_stored_property_no_potential , <nl> none , " stored properties cannot be marked potentially unavailable with " <nl> " ' @ available ' " , ( ) ) <nl> <nl> - ERROR ( availability_protocol_requires_version , sema_avail , <nl> + ERROR ( availability_protocol_requires_version , <nl> none , " protocol % 0 requires % 1 to be available on % 2 % 3 and newer " , <nl> ( DeclName , DeclName , StringRef , clang : : VersionTuple ) ) <nl> <nl> - NOTE ( availability_protocol_requirement_here , sema_avail , none , <nl> + NOTE ( availability_protocol_requirement_here , none , <nl> " protocol requirement here " , ( ) ) <nl> <nl> - NOTE ( availability_conformance_introduced_here , sema_avail , none , <nl> + NOTE ( availability_conformance_introduced_here , none , <nl> " conformance introduced here " , ( ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Variable usage diagnostics <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> - WARNING ( pbd_never_used_stmtcond , sema_varusage , none , <nl> + WARNING ( pbd_never_used_stmtcond , none , <nl> " value % 0 was defined but never used ; consider replacing " <nl> " with boolean test " , <nl> ( Identifier ) ) <nl> <nl> - WARNING ( pbd_never_used , sema_varusage , none , <nl> + WARNING ( pbd_never_used , none , <nl> " initialization of % select { variable | immutable value } 1 % 0 was never used " <nl> " ; consider replacing with assignment to ' _ ' or removing it " , <nl> ( Identifier , unsigned ) ) <nl> <nl> <nl> - WARNING ( capture_never_used , sema_varusage , none , <nl> + WARNING ( capture_never_used , none , <nl> " capture % 0 was never used " , <nl> ( Identifier ) ) <nl> <nl> - WARNING ( variable_never_used , sema_varusage , none , <nl> + WARNING ( variable_never_used , none , <nl> " % select { variable | immutable value } 1 % 0 was never used ; " <nl> " consider replacing with ' _ ' or removing it " , <nl> ( Identifier , unsigned ) ) <nl> - WARNING ( variable_never_mutated , sema_varusage , none , <nl> + WARNING ( variable_never_mutated , none , <nl> " % select { variable | parameter } 1 % 0 was never mutated ; " <nl> " consider changing to ' let ' constant " , <nl> ( Identifier , unsigned ) ) <nl> - WARNING ( variable_never_read , sema_varusage , none , <nl> + WARNING ( variable_never_read , none , <nl> " % select { variable | parameter } 1 % 0 was written to , but never read " , <nl> ( Identifier , unsigned ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Naming convention diagnostics <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> - WARNING ( omit_needless_words , sema_tcd , none , <nl> + WARNING ( omit_needless_words , none , <nl> " % 0 could be named % 1 [ - Womit - needless - words ] " , ( DeclName , DeclName ) ) <nl> <nl> - WARNING ( extraneous_default_args_in_call , sema_tcd , none , <nl> + WARNING ( extraneous_default_args_in_call , none , <nl> " call to % 0 has extraneous arguments that could use defaults " , <nl> ( DeclName ) ) <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Circular reference diagnostics <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> - ERROR ( circular_reference , sema_tcd , none , <nl> + ERROR ( circular_reference , none , <nl> " circular reference " , ( ) ) <nl> - NOTE ( circular_reference_through , sema_tcd , none , <nl> + NOTE ( circular_reference_through , none , <nl> " through reference here " , ( ) ) <nl> <nl> # ifndef DIAG_NO_UNDEF <nl> mmm a / include / swift / AST / DiagnosticsSema . h <nl> ppp b / include / swift / AST / DiagnosticsSema . h <nl> namespace swift { <nl> } ; <nl> <nl> / / Declare common diagnostics objects with their appropriate types . <nl> - # define DIAG ( KIND , ID , Category , Options , Text , Signature ) \ <nl> + # define DIAG ( KIND , ID , Options , Text , Signature ) \ <nl> extern detail : : DiagWithArguments < void Signature > : : type ID ; <nl> # include " DiagnosticsSema . def " <nl> } <nl> mmm a / include / swift / Basic / DiagnosticConsumer . h <nl> ppp b / include / swift / Basic / DiagnosticConsumer . h <nl> namespace swift { <nl> <nl> / / / \ brief Describes the kind of diagnostic . <nl> / / / <nl> - enum class DiagnosticKind { <nl> + enum class DiagnosticKind : uint8_t { <nl> Error , <nl> Warning , <nl> Note <nl> mmm a / include / swift / Basic / DiagnosticOptions . h <nl> ppp b / include / swift / Basic / DiagnosticOptions . h <nl> class DiagnosticOptions { <nl> / / / When emitting fixits as code edits , apply all fixits from diagnostics <nl> / / / without any filtering . <nl> bool FixitCodeForAllDiagnostics = false ; <nl> + <nl> + / / / Suppress all warnings <nl> + bool SuppressWarnings = false ; <nl> + <nl> + / / / Treat all warnings as errors <nl> + bool WarningsAsErrors = false ; <nl> } ; <nl> <nl> } <nl> mmm a / include / swift / Option / Options . td <nl> ppp b / include / swift / Option / Options . td <nl> def solver_memory_threshold : Separate < [ " - " ] , " solver - memory - threshold " > , <nl> Flags < [ FrontendOption , HelpHidden , DoesNotAffectIncrementalBuild ] > , <nl> HelpText < " Set the upper bound for memory consumption , in bytes , by the constraint solver " > ; <nl> <nl> + / / Diagnostic control options <nl> + def suppress_warnings : Flag < [ " - " ] , " suppress - warnings " > , <nl> + Flags < [ FrontendOption , DoesNotAffectIncrementalBuild ] > , <nl> + HelpText < " Suppress all warnings " > ; <nl> + <nl> + def warnings_as_errors : Flag < [ " - " ] , " warnings - as - errors " > , <nl> + Flags < [ FrontendOption , DoesNotAffectIncrementalBuild ] > , <nl> + HelpText < " Treat warnings as errors " > ; <nl> + <nl> / / Platform options . <nl> def enable_app_extension : Flag < [ " - " ] , " application - extension " > , <nl> Flags < [ FrontendOption , NoInteractiveOption ] > , <nl> mmm a / lib / AST / DiagnosticEngine . cpp <nl> ppp b / lib / AST / DiagnosticEngine . cpp <nl> enum class DiagnosticOptions { <nl> / / / After a fatal error subsequent diagnostics are suppressed . <nl> Fatal , <nl> } ; <nl> + struct StoredDiagnosticInfo { <nl> + DiagnosticKind kind : 2 ; <nl> + bool pointsToFirstBadToken : 1 ; <nl> + bool isFatal : 1 ; <nl> + <nl> + StoredDiagnosticInfo ( DiagnosticKind k , bool firstBadToken , bool fatal ) <nl> + : kind ( k ) , pointsToFirstBadToken ( firstBadToken ) , isFatal ( fatal ) { } <nl> + StoredDiagnosticInfo ( DiagnosticKind k , DiagnosticOptions opts ) <nl> + : StoredDiagnosticInfo ( k , <nl> + opts = = DiagnosticOptions : : PointsToFirstBadToken , <nl> + opts = = DiagnosticOptions : : Fatal ) { } <nl> + } ; <nl> <nl> / / Reproduce the DiagIDs , as we want both the size and access to the raw ids <nl> / / themselves . <nl> enum LocalDiagID : uint32_t { <nl> - # define DIAG ( KIND , ID , Category , Options , Text , Signature ) ID , <nl> + # define DIAG ( KIND , ID , Options , Text , Signature ) ID , <nl> # include " swift / AST / DiagnosticsAll . def " <nl> NumDiags <nl> } ; <nl> } <nl> <nl> - static const char * DiagnosticStrings [ ] = { <nl> - # define ERROR ( ID , Category , Options , Text , Signature ) Text , <nl> - # define WARNING ( ID , Category , Options , Text , Signature ) Text , <nl> - # define NOTE ( ID , Category , Options , Text , Signature ) Text , <nl> + / / TODO : categorization <nl> + static StoredDiagnosticInfo storedDiagnosticInfos [ ] = { <nl> + # define ERROR ( ID , Options , Text , Signature ) \ <nl> + StoredDiagnosticInfo ( DiagnosticKind : : Error , DiagnosticOptions : : Options ) , <nl> + # define WARNING ( ID , Options , Text , Signature ) \ <nl> + StoredDiagnosticInfo ( DiagnosticKind : : Warning , DiagnosticOptions : : Options ) , <nl> + # define NOTE ( ID , Options , Text , Signature ) \ <nl> + StoredDiagnosticInfo ( DiagnosticKind : : Note , DiagnosticOptions : : Options ) , <nl> # include " swift / AST / DiagnosticsAll . def " <nl> - " < not a diagnostic > " , <nl> } ; <nl> - <nl> - static bool DiagnosticPointsToFirstBadToken [ ] = { <nl> - # define ERROR ( ID , Category , Options , Text , Signature ) \ <nl> - DiagnosticOptions : : Options = = DiagnosticOptions : : PointsToFirstBadToken , <nl> - # define WARNING ( ID , Category , Options , Text , Signature ) \ <nl> - DiagnosticOptions : : Options = = DiagnosticOptions : : PointsToFirstBadToken , <nl> - # define NOTE ( ID , Category , Options , Text , Signature ) \ <nl> - DiagnosticOptions : : Options = = DiagnosticOptions : : PointsToFirstBadToken , <nl> + static_assert ( sizeof ( storedDiagnosticInfos ) / sizeof ( StoredDiagnosticInfo ) = = <nl> + LocalDiagID : : NumDiags , <nl> + " array size mismatch " ) ; <nl> + <nl> + static const char * diagnosticStrings [ ] = { <nl> + # define ERROR ( ID , Options , Text , Signature ) Text , <nl> + # define WARNING ( ID , Options , Text , Signature ) Text , <nl> + # define NOTE ( ID , Options , Text , Signature ) Text , <nl> # include " swift / AST / DiagnosticsAll . def " <nl> " < not a diagnostic > " , <nl> } ; <nl> <nl> DiagnosticState : : DiagnosticState ( ) { <nl> - / / Initialize our per - diagnostic state to the default <nl> - perDiagnosticState . resize ( LocalDiagID : : NumDiags ) ; <nl> - # define ERROR ( ID , Category , Options , Text , Signature ) \ <nl> - perDiagnosticState [ LocalDiagID : : ID ] = \ <nl> - DiagnosticOptions : : Options = = DiagnosticOptions : : Fatal ? Behavior : : Fatal \ <nl> - : Behavior : : Error ; <nl> - # define WARNING ( ID , Category , Options , Text , Signature ) \ <nl> - perDiagnosticState [ LocalDiagID : : ID ] = Behavior : : Warning ; <nl> - # define NOTE ( ID , Category , Options , Text , Signature ) \ <nl> - perDiagnosticState [ LocalDiagID : : ID ] = Behavior : : Note ; <nl> - # include " swift / AST / DiagnosticsAll . def " <nl> + / / Initialize our per - diagnostic state to default <nl> + perDiagnosticBehavior . resize ( LocalDiagID : : NumDiags , Behavior : : Unspecified ) ; <nl> } <nl> <nl> static CharSourceRange toCharSourceRange ( SourceManager & SM , SourceRange SR ) { <nl> void InFlightDiagnostic : : flush ( ) { <nl> } <nl> <nl> bool DiagnosticEngine : : isDiagnosticPointsToFirstBadToken ( DiagID ID ) const { <nl> - return DiagnosticPointsToFirstBadToken [ ( unsigned ) ID ] ; <nl> + return storedDiagnosticInfos [ ( unsigned ) ID ] . pointsToFirstBadToken ; <nl> } <nl> <nl> / / / \ brief Skip forward to one of the given delimiters . <nl> DiagnosticState : : Behavior DiagnosticState : : determineBehavior ( DiagID id ) { <nl> return lvl ; <nl> } ; <nl> <nl> - auto behavior = perDiagnosticState [ ( unsigned ) id ] ; <nl> + / / We determine how to handle a diagnostic based on the following rules <nl> + / / 1 ) If current state dictates a certain behavior , follow that <nl> + / / 2 ) If the user provided a behavior for this specific diagnostic , follow <nl> + / / that <nl> + / / 3 ) If the user provided a behavior for this diagnostic ' s kind , follow <nl> + / / that <nl> + / / 4 ) Otherwise remap the diagnostic kind <nl> + <nl> + auto diagInfo = storedDiagnosticInfos [ ( unsigned ) id ] ; <nl> + bool isNote = diagInfo . kind = = DiagnosticKind : : Note ; <nl> + <nl> + / / 1 ) If current state dictates a certain behavior , follow that <nl> <nl> / / Notes relating to ignored diagnostics should also be ignored <nl> - if ( previousBehavior = = Behavior : : Ignore & & behavior = = Behavior : : Note ) <nl> + if ( previousBehavior = = Behavior : : Ignore & & isNote ) <nl> return set ( Behavior : : Ignore ) ; <nl> <nl> / / Suppress diagnostics when in a fatal state , except for follow - on notes <nl> - / / about the original fatal diag <nl> - if ( fatalErrorOccurred ) { <nl> - bool emitAnyways = showDiagnosticsAfterFatalError | | <nl> - ( behavior = = Behavior : : Note & & <nl> - previousBehavior ! = Behavior : : Ignore ) ; <nl> - if ( ! emitAnyways ) <nl> + if ( fatalErrorOccurred ) <nl> + if ( ! showDiagnosticsAfterFatalError & & ! isNote ) <nl> return set ( Behavior : : Ignore ) ; <nl> - } <nl> <nl> - if ( behavior = = Behavior : : Warning & & ignoreAllWarnings ) <nl> - return set ( Behavior : : Ignore ) ; <nl> + / / 2 ) If the user provided a behavior for this specific diagnostic , follow <nl> + / / that <nl> + <nl> + if ( perDiagnosticBehavior [ ( unsigned ) id ] ! = Behavior : : Unspecified ) <nl> + return set ( perDiagnosticBehavior [ ( unsigned ) id ] ) ; <nl> + <nl> + / / 3 ) If the user provided a behavior for this diagnostic ' s kind , follow <nl> + / / that <nl> + if ( diagInfo . kind = = DiagnosticKind : : Warning ) { <nl> + if ( suppressWarnings ) <nl> + return set ( Behavior : : Ignore ) ; <nl> + if ( warningsAsErrors ) <nl> + return set ( Behavior : : Error ) ; <nl> + } <nl> <nl> - return set ( behavior ) ; <nl> + / / 4 ) Otherwise remap the diagnostic kind <nl> + switch ( diagInfo . kind ) { <nl> + case DiagnosticKind : : Note : <nl> + return set ( Behavior : : Note ) ; <nl> + case DiagnosticKind : : Error : <nl> + return set ( diagInfo . isFatal ? Behavior : : Fatal : Behavior : : Error ) ; <nl> + case DiagnosticKind : : Warning : <nl> + return set ( Behavior : : Warning ) ; <nl> + } <nl> } <nl> <nl> void DiagnosticEngine : : flushActiveDiagnostic ( ) { <nl> void DiagnosticEngine : : emitDiagnostic ( const Diagnostic & diagnostic ) { <nl> llvm : : SmallString < 256 > Text ; <nl> { <nl> llvm : : raw_svector_ostream Out ( Text ) ; <nl> - formatDiagnosticText ( DiagnosticStrings [ ( unsigned ) diagnostic . getID ( ) ] , diagnostic . getArgs ( ) , Out ) ; <nl> + formatDiagnosticText ( diagnosticStrings [ ( unsigned ) diagnostic . getID ( ) ] , <nl> + diagnostic . getArgs ( ) , Out ) ; <nl> } <nl> <nl> / / Pass the diagnostic off to the consumer . <nl> void DiagnosticEngine : : emitDiagnostic ( const Diagnostic & diagnostic ) { <nl> Info . Ranges = diagnostic . getRanges ( ) ; <nl> Info . FixIts = diagnostic . getFixIts ( ) ; <nl> for ( auto & Consumer : Consumers ) { <nl> - Consumer - > handleDiagnostic ( SourceMgr , loc , toDiagnosticKind ( behavior ) , Text , Info ) ; <nl> + Consumer - > handleDiagnostic ( SourceMgr , loc , toDiagnosticKind ( behavior ) , Text , <nl> + Info ) ; <nl> } <nl> } <nl> <nl> mmm a / lib / AST / DiagnosticList . cpp <nl> ppp b / lib / AST / DiagnosticList . cpp <nl> <nl> using namespace swift ; <nl> <nl> enum class swift : : DiagID : uint32_t { <nl> - # define DIAG ( KIND , ID , Category , Options , Text , Signature ) ID , <nl> + # define DIAG ( KIND , ID , Options , Text , Signature ) ID , <nl> # include " swift / AST / DiagnosticsAll . def " <nl> } ; <nl> <nl> enum class swift : : DiagID : uint32_t { <nl> / / diagnostic IDs . <nl> namespace swift { <nl> namespace diag { <nl> - # define DIAG ( KIND , ID , Category , Options , Text , Signature ) \ <nl> + # define DIAG ( KIND , ID , Options , Text , Signature ) \ <nl> detail : : DiagWithArguments < void Signature > : : type ID = { DiagID : : ID } ; <nl> # include " swift / AST / DiagnosticsAll . def " <nl> } <nl> mmm a / lib / Driver / Driver . cpp <nl> ppp b / lib / Driver / Driver . cpp <nl> static void validateArgs ( DiagnosticEngine & diags , const ArgList & Args ) { <nl> } <nl> } <nl> } <nl> + <nl> + / / Check for conflicting warning control flags <nl> + if ( Args . hasArg ( options : : OPT_suppress_warnings ) & & <nl> + Args . hasArg ( options : : OPT_warnings_as_errors ) ) { <nl> + diags . diagnose ( SourceLoc ( ) , diag : : error_conflicting_options , <nl> + " - warnings - as - errors " , " - suppress - warnings " ) ; <nl> + } <nl> } <nl> <nl> static void computeArgsHash ( SmallString < 32 > & out , const DerivedArgList & args ) { <nl> mmm a / lib / Driver / ToolChains . cpp <nl> ppp b / lib / Driver / ToolChains . cpp <nl> static void addCommonFrontendArgs ( const ToolChain & TC , <nl> inputArgs . AddLastArg ( arguments , options : : OPT_parse_stdlib ) ; <nl> inputArgs . AddLastArg ( arguments , options : : OPT_resource_dir ) ; <nl> inputArgs . AddLastArg ( arguments , options : : OPT_solver_memory_threshold ) ; <nl> + inputArgs . AddLastArg ( arguments , options : : OPT_suppress_warnings ) ; <nl> inputArgs . AddLastArg ( arguments , options : : OPT_profile_generate ) ; <nl> inputArgs . AddLastArg ( arguments , options : : OPT_profile_coverage_mapping ) ; <nl> + inputArgs . AddLastArg ( arguments , options : : OPT_warnings_as_errors ) ; <nl> <nl> / / Pass on any build config options <nl> inputArgs . AddAllArgs ( arguments , options : : OPT_D ) ; <nl> mmm a / lib / Frontend / CompilerInvocation . cpp <nl> ppp b / lib / Frontend / CompilerInvocation . cpp <nl> static bool ParseDiagnosticArgs ( DiagnosticOptions & Opts , ArgList & Args , <nl> Args . hasArg ( OPT_show_diagnostics_after_fatal ) ; <nl> Opts . UseColor | = Args . hasArg ( OPT_color_diagnostics ) ; <nl> Opts . FixitCodeForAllDiagnostics | = Args . hasArg ( OPT_fixit_all ) ; <nl> + Opts . SuppressWarnings | = Args . hasArg ( OPT_suppress_warnings ) ; <nl> + Opts . WarningsAsErrors | = Args . hasArg ( OPT_warnings_as_errors ) ; <nl> + <nl> + assert ( ! ( Opts . WarningsAsErrors & & Opts . SuppressWarnings ) & & <nl> + " conflicting arguments ; should of been caught by driver " ) ; <nl> <nl> return false ; <nl> } <nl> mmm a / lib / Frontend / Frontend . cpp <nl> ppp b / lib / Frontend / Frontend . cpp <nl> bool CompilerInstance : : setup ( const CompilerInvocation & Invok ) { <nl> if ( Invocation . getDiagnosticOptions ( ) . ShowDiagnosticsAfterFatalError ) { <nl> Diagnostics . setShowDiagnosticsAfterFatalError ( ) ; <nl> } <nl> + if ( Invocation . getDiagnosticOptions ( ) . SuppressWarnings ) { <nl> + Diagnostics . setSuppressWarnings ( true ) ; <nl> + } <nl> + if ( Invocation . getDiagnosticOptions ( ) . WarningsAsErrors ) { <nl> + Diagnostics . setWarningsAsErrors ( true ) ; <nl> + } <nl> <nl> / / If we are asked to emit a module documentation file , configure lexing and <nl> / / parsing to remember comments . <nl> new file mode 100644 <nl> index 000000000000 . . d512aa395a28 <nl> mmm / dev / null <nl> ppp b / test / Driver / warnings - control . swift <nl> <nl> + / / RUN : not % target - swiftc_driver % s 2 > & 1 | FileCheck - check - prefix = DEFAULT % s <nl> + / / RUN : not % target - swiftc_driver - warnings - as - errors % s 2 > & 1 | FileCheck - check - prefix = WERR % s <nl> + / / RUN : not % target - swiftc_driver - suppress - warnings % s 2 > & 1 | FileCheck - check - prefix = NOWARN % s <nl> + <nl> + / / RUN : not % target - swiftc_driver - suppress - warnings - warnings - as - errors % s 2 > & 1 | FileCheck - check - prefix = FLAGS_CONFLICT % s <nl> + / / FLAGS_CONFLICT : error : conflicting options ' - warnings - as - errors ' and ' - suppress - warnings ' <nl> + <nl> + func foo ( ) - > Int { <nl> + let x = 1 <nl> + var y = 2 <nl> + / / DEFAULT : warning : variable ' y ' was never mutated ; consider changing to ' let ' constant <nl> + / / WERR : error : variable ' y ' was never mutated ; consider changing to ' let ' constant <nl> + / / NOWARN - NOT : variable ' y ' was never mutated <nl> + return x + y <nl> + } <nl> + <nl> + func bar ( ) { <nl> + foo ( ) <nl> + / / To help anchor the checks , have an error . Put it inside a later function , to help make sure it comes after <nl> + xyz <nl> + / / DEFAULT : error : use of unresolved identifier ' xyz ' <nl> + / / WERR : error : use of unresolved identifier ' xyz ' <nl> + / / NOWARN : error : use of unresolved identifier ' xyz ' <nl> + } <nl>
Merge pull request from milseman / warning_control
apple/swift
2fa08e3e3058e2ce88dceb2aac2e9f72c60df429
2016-01-15T22:37:30Z
mmm a / xbmc / addons / Scraper . cpp <nl> ppp b / xbmc / addons / Scraper . cpp <nl> CScraper : : CScraper ( const cp_extension_t * ext ) : <nl> { <nl> if ( ext ) <nl> { <nl> - m_language = CAddonMgr : : Get ( ) . GetExtValue ( ext - > configuration , " language " ) ; <nl> - m_requiressettings = CAddonMgr : : Get ( ) . GetExtValue ( ext - > configuration , " requiressettings " ) . Equals ( " true " ) ; <nl> - CStdString persistence = CAddonMgr : : Get ( ) . GetExtValue ( ext - > configuration , " cachepersistence " ) ; <nl> + m_language = CAddonMgr : : Get ( ) . GetExtValue ( ext - > configuration , " @ language " ) ; <nl> + m_requiressettings = CAddonMgr : : Get ( ) . GetExtValue ( ext - > configuration , " @ requiressettings " ) . Equals ( " true " ) ; <nl> + CStdString persistence = CAddonMgr : : Get ( ) . GetExtValue ( ext - > configuration , " @ cachepersistence " ) ; <nl> if ( ! persistence . IsEmpty ( ) ) <nl> m_persistence . SetFromTimeString ( persistence ) ; <nl> } <nl>
fixed : empty scraper extension attributes
xbmc/xbmc
058e007d45d421e6a367f0ec2fb48455594aa658
2010-08-26T17:26:35Z
mmm a / tensorflow / compiler / aot / BUILD <nl> ppp b / tensorflow / compiler / aot / BUILD <nl> cc_library ( <nl> " : tfcompile_proto " , <nl> " / / tensorflow / compiler / xla / legacy_flags : buffer_assignment_flags " , <nl> " / / tensorflow / compiler / xla / legacy_flags : debug_options_flags " , <nl> - " / / tensorflow / compiler / xla / legacy_flags : hlo_graph_dumper_flags " , <nl> " / / tensorflow / compiler / xla / legacy_flags : service_flags " , <nl> " / / tensorflow / compiler / xla / legacy_flags : util_flags " , <nl> " / / tensorflow / compiler / xla / service : compiler " , <nl> mmm a / tensorflow / compiler / aot / tfcompile_main . cc <nl> ppp b / tensorflow / compiler / aot / tfcompile_main . cc <nl> limitations under the License . <nl> # include " tensorflow / compiler / aot / tfcompile_util . h " <nl> # include " tensorflow / compiler / xla / legacy_flags / buffer_assignment_flags . h " <nl> # include " tensorflow / compiler / xla / legacy_flags / debug_options_flags . h " <nl> - # include " tensorflow / compiler / xla / legacy_flags / hlo_graph_dumper_flags . h " <nl> # include " tensorflow / compiler / xla / legacy_flags / service_flags . h " <nl> # include " tensorflow / compiler / xla / legacy_flags / util_flags . h " <nl> # include " tensorflow / compiler / xla / service / compiler . h " <nl> int main ( int argc , char * * argv ) { <nl> std : : vector < tensorflow : : Flag > flag_list ; <nl> AppendMainFlags ( & flag_list , & flags ) ; <nl> xla : : legacy_flags : : AppendBufferAssignmentFlags ( & flag_list ) ; <nl> - xla : : legacy_flags : : AppendHloGraphDumperFlags ( & flag_list ) ; <nl> xla : : legacy_flags : : AppendDebugOptionsFlags ( & flag_list ) ; <nl> xla : : legacy_flags : : AppendServiceFlags ( & flag_list ) ; <nl> xla : : legacy_flags : : AppendUtilFlags ( & flag_list ) ; <nl> mmm a / tensorflow / compiler / xla / legacy_flags / BUILD <nl> ppp b / tensorflow / compiler / xla / legacy_flags / BUILD <nl> cc_library ( <nl> ] , <nl> ) <nl> <nl> - cc_library ( <nl> - name = " hlo_graph_dumper_flags " , <nl> - srcs = [ " hlo_graph_dumper_flags . cc " ] , <nl> - hdrs = [ " hlo_graph_dumper_flags . h " ] , <nl> - deps = [ <nl> - " : parse_flags_from_env " , <nl> - " / / tensorflow / compiler / xla : types " , <nl> - " / / tensorflow / core : framework_internal " , <nl> - " / / tensorflow / core : lib " , <nl> - ] , <nl> - ) <nl> - <nl> cc_library ( <nl> name = " service_flags " , <nl> srcs = [ " service_flags . cc " ] , <nl> mmm a / tensorflow / compiler / xla / legacy_flags / debug_options_flags . cc <nl> ppp b / tensorflow / compiler / xla / legacy_flags / debug_options_flags . cc <nl> struct DebugOptionsFlags { <nl> string xla_generate_hlo_graph ; <nl> bool xla_hlo_graph_addresses ; <nl> bool xla_hlo_graph_layout ; <nl> + string xla_hlo_graph_path ; <nl> + bool xla_hlo_dump_as_graphdef ; <nl> string xla_log_hlo_text ; <nl> string xla_generate_hlo_text_to ; <nl> <nl> void AllocateFlags ( ) { <nl> flag_values - > xla_generate_hlo_graph = " " ; <nl> flag_values - > xla_hlo_graph_addresses = false ; <nl> flag_values - > xla_hlo_graph_layout = false ; <nl> + flag_values - > xla_hlo_graph_path = " / tmp / " ; <nl> + flag_values - > xla_hlo_dump_as_graphdef = false ; <nl> flag_values - > xla_log_hlo_text = " " ; <nl> flag_values - > xla_generate_hlo_text_to = " " ; <nl> flag_values - > xla_disable_hlo_passes = " " ; <nl> void AllocateFlags ( ) { <nl> " xla_hlo_graph_layout " , & flag_values - > xla_hlo_graph_layout , <nl> " With xla_generate_hlo_graph , show layout of HLO ops in " <nl> " graph dump . " ) , <nl> + tensorflow : : Flag ( <nl> + " xla_hlo_graph_path " , & flag_values - > xla_hlo_graph_path , <nl> + " With xla_generate_hlo_graph , dump the graphs into this path . " ) , <nl> + tensorflow : : Flag ( " xla_hlo_dump_as_graphdef " , <nl> + & flag_values - > xla_hlo_dump_as_graphdef , <nl> + " Dump HLO graphs as TensorFlow GraphDefs . " ) , <nl> tensorflow : : Flag ( <nl> " xla_log_hlo_text " , & flag_values - > xla_log_hlo_text , <nl> " HLO modules matching this regex will be dumped to LOG ( INFO ) . " ) , <nl> xla : : DebugOptions GetDebugOptionsFromFlags ( ) { <nl> options . set_xla_generate_hlo_graph ( flag_values - > xla_generate_hlo_graph ) ; <nl> options . set_xla_hlo_graph_addresses ( flag_values - > xla_hlo_graph_addresses ) ; <nl> options . set_xla_hlo_graph_layout ( flag_values - > xla_hlo_graph_layout ) ; <nl> + options . set_xla_hlo_graph_path ( flag_values - > xla_hlo_graph_path ) ; <nl> options . set_xla_log_hlo_text ( flag_values - > xla_log_hlo_text ) ; <nl> options . set_xla_generate_hlo_text_to ( flag_values - > xla_generate_hlo_text_to ) ; <nl> <nl> deleted file mode 100644 <nl> index ba43a5919522f . . 0000000000000 <nl> mmm a / tensorflow / compiler / xla / legacy_flags / hlo_graph_dumper_flags . cc <nl> ppp / dev / null <nl> <nl> - / * Copyright 2017 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> - <nl> - / / Legacy flags for XLA ' s hlo_graph_dumper module . <nl> - <nl> - # include < mutex > / / NOLINT ( build / c + + 11 ) : only using std : : call_once , not mutex . <nl> - # include < vector > <nl> - <nl> - # include " tensorflow / compiler / xla / legacy_flags / hlo_graph_dumper_flags . h " <nl> - # include " tensorflow / compiler / xla / legacy_flags / parse_flags_from_env . h " <nl> - # include " tensorflow / core / platform / types . h " <nl> - # include " tensorflow / core / util / command_line_flags . h " <nl> - <nl> - namespace xla { <nl> - namespace legacy_flags { <nl> - <nl> - / / Pointers to the parsed value of the flags and flag descriptors , initialized <nl> - / / via flags_init . <nl> - static HloGraphDumperFlags * flags ; <nl> - static std : : vector < tensorflow : : Flag > * flag_list ; <nl> - static std : : once_flag flags_init ; <nl> - <nl> - / / Allocate * flags . Called via call_once ( & flags_init , . . . ) . <nl> - static void AllocateFlags ( ) { <nl> - flags = new HloGraphDumperFlags ; <nl> - flags - > xla_hlo_dump_graph_path = " / tmp / " ; <nl> - flags - > xla_hlo_dump_as_graphdef = false ; <nl> - flag_list = new std : : vector < tensorflow : : Flag > ( { <nl> - tensorflow : : Flag ( " xla_hlo_dump_graph_path " , <nl> - & flags - > xla_hlo_dump_graph_path , <nl> - " Path to write dumped HLO graphs to " ) , <nl> - tensorflow : : Flag ( " xla_hlo_dump_as_graphdef " , <nl> - & flags - > xla_hlo_dump_as_graphdef , <nl> - " Dumps HLO graphs as tensorflow GraphDefs " ) , <nl> - } ) ; <nl> - ParseFlagsFromEnv ( * flag_list ) ; <nl> - } <nl> - <nl> - / / Append to * append_to flag definitions associated with XLA ' s hlo_graph_dumper <nl> - / / module . <nl> - void AppendHloGraphDumperFlags ( std : : vector < tensorflow : : Flag > * append_to ) { <nl> - std : : call_once ( flags_init , & AllocateFlags ) ; <nl> - append_to - > insert ( append_to - > end ( ) , flag_list - > begin ( ) , flag_list - > end ( ) ) ; <nl> - } <nl> - <nl> - / / Return a pointer to the HloGraphDumperFlags struct ; <nl> - / / repeated calls return the same pointer . <nl> - / / This should be called only after Flags : : Parse ( ) has returned . <nl> - HloGraphDumperFlags * GetHloGraphDumperFlags ( ) { <nl> - std : : call_once ( flags_init , & AllocateFlags ) ; <nl> - return flags ; <nl> - } <nl> - <nl> - } / / namespace legacy_flags <nl> - } / / namespace xla <nl> deleted file mode 100644 <nl> index d0b4d092ff100 . . 0000000000000 <nl> mmm a / tensorflow / compiler / xla / legacy_flags / hlo_graph_dumper_flags . h <nl> ppp / dev / null <nl> <nl> - / * Copyright 2017 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> - <nl> - # ifndef TENSORFLOW_COMPILER_XLA_LEGACY_FLAGS_HLO_GRAPH_DUMPER_FLAGS_H_ <nl> - # define TENSORFLOW_COMPILER_XLA_LEGACY_FLAGS_HLO_GRAPH_DUMPER_FLAGS_H_ <nl> - <nl> - / / Legacy flags for XLA ' s hlo_graph_dumper module . <nl> - <nl> - # include < vector > <nl> - <nl> - # include " tensorflow / compiler / xla / types . h " <nl> - # include " tensorflow / core / platform / types . h " <nl> - # include " tensorflow / core / util / command_line_flags . h " <nl> - <nl> - namespace xla { <nl> - namespace legacy_flags { <nl> - <nl> - / / Append to * flag_list flag definitions associated with XLA ' s hlo_graph_dumper <nl> - / / module . <nl> - void AppendHloGraphDumperFlags ( std : : vector < tensorflow : : Flag > * flag_list ) ; <nl> - <nl> - / / The values of flags associated with XLA ' s hlo_graph_dumper module . <nl> - typedef struct { <nl> - string xla_hlo_dump_graph_path ; / / Path to write dumped HLO graphs to <nl> - / / If set , dumps HLO graphs as tensorflow GraphDef ; otherwise , dumps HLO <nl> - / / graphs as DOT graph . <nl> - bool xla_hlo_dump_as_graphdef ; <nl> - } HloGraphDumperFlags ; <nl> - <nl> - / / Return a pointer to the HloGraphDumperFlags struct ; <nl> - / / repeated calls return the same pointer . <nl> - / / This should be called only after Flags : : Parse ( ) has returned . <nl> - HloGraphDumperFlags * GetHloGraphDumperFlags ( ) ; <nl> - <nl> - } / / namespace legacy_flags <nl> - } / / namespace xla <nl> - <nl> - # endif / / TENSORFLOW_COMPILER_XLA_LEGACY_FLAGS_HLO_GRAPH_DUMPER_FLAGS_H_ <nl> mmm a / tensorflow / compiler / xla / service / BUILD <nl> ppp b / tensorflow / compiler / xla / service / BUILD <nl> cc_library ( <nl> " / / tensorflow / compiler / xla : shape_util " , <nl> " / / tensorflow / compiler / xla : types " , <nl> " / / tensorflow / compiler / xla : window_util " , <nl> - " / / tensorflow / compiler / xla / legacy_flags : hlo_graph_dumper_flags " , <nl> + " / / tensorflow / compiler / xla : xla_proto " , <nl> " / / tensorflow / core : lib " , <nl> " / / tensorflow / core : regexp_internal " , <nl> ] , <nl> mmm a / tensorflow / compiler / xla / service / graphviz_example . cc <nl> ppp b / tensorflow / compiler / xla / service / graphviz_example . cc <nl> int main ( int argc , char * * argv ) { <nl> <nl> auto module = xla : : MakeBigGraph ( ) ; <nl> <nl> - printf ( " Graph URL : % s \ n " , <nl> - xla : : hlo_graph_dumper : : DumpGraph ( <nl> - * module - > entry_computation ( ) , " Example computation " , <nl> - / * show_addresses = * / false , / * show_layouts = * / false ) <nl> - . c_str ( ) ) ; <nl> + printf ( " Graph URL : % s \ n " , xla : : hlo_graph_dumper : : DumpGraph ( <nl> + * module - > entry_computation ( ) , <nl> + " Example computation " , xla : : DebugOptions ( ) ) <nl> + . c_str ( ) ) ; <nl> return 0 ; <nl> } <nl> mmm a / tensorflow / compiler / xla / service / hlo_graph_dumper . cc <nl> ppp b / tensorflow / compiler / xla / service / hlo_graph_dumper . cc <nl> limitations under the License . <nl> # include < string > <nl> <nl> # include " tensorflow / compiler / xla / layout_util . h " <nl> - # include " tensorflow / compiler / xla / legacy_flags / hlo_graph_dumper_flags . h " <nl> # include " tensorflow / compiler / xla / literal_util . h " <nl> # include " tensorflow / compiler / xla / service / hlo_module . h " <nl> # include " tensorflow / compiler / xla / service / hlo_tfgraph_builder . h " <nl> namespace { <nl> <nl> class FileGraphRenderer : public GraphRendererInterface { <nl> public : <nl> - string RenderGraph ( const string & graph , GraphKind graph_kind ) override { <nl> + string RenderGraph ( const string & graph , GraphKind graph_kind , <nl> + const DebugOptions & debug_options ) override { <nl> static std : : atomic < int > output_num ( 0 ) ; <nl> - legacy_flags : : HloGraphDumperFlags * flags = <nl> - legacy_flags : : GetHloGraphDumperFlags ( ) ; <nl> string file_extension ; <nl> switch ( graph_kind ) { <nl> case DOT_GRAPH : <nl> class FileGraphRenderer : public GraphRendererInterface { <nl> break ; <nl> } <nl> string path = <nl> - JoinPath ( flags - > xla_hlo_dump_graph_path , <nl> + JoinPath ( debug_options . xla_hlo_graph_path ( ) , <nl> StrCat ( " hlo_graph_ " , output_num + + , " . XXXXXX " , file_extension ) ) ; <nl> auto status = Status : : OK ( ) ; <nl> int fd = mkstemps ( & path [ 0 ] , file_extension . length ( ) ) ; <nl> XLA_REGISTER_GRAPH_RENDERER ( FileGraphRenderer , 0 ) ; <nl> } / / namespace <nl> <nl> string DumpGraph ( const HloComputation & computation , const string & label , <nl> - bool show_addresses , bool show_layouts , <nl> + const DebugOptions & debug_options , <nl> const HloExecutionProfile * hlo_execution_profile ) { <nl> string graph ; <nl> string graph_url ; <nl> - legacy_flags : : HloGraphDumperFlags * flags = <nl> - legacy_flags : : GetHloGraphDumperFlags ( ) ; <nl> - if ( flags - > xla_hlo_dump_as_graphdef ) { <nl> + if ( debug_options . xla_hlo_dump_as_graphdef ( ) ) { <nl> HloTfGraphBuilder builder ; <nl> TF_CHECK_OK ( builder . AddComputation ( computation ) ) ; <nl> CHECK ( tensorflow : : protobuf : : TextFormat : : PrintToString ( builder . GetGraphDef ( ) , <nl> string DumpGraph ( const HloComputation & computation , const string & label , <nl> / / renderers support rendering GraphDefs . Always dump GraphDefs to files <nl> / / for now . <nl> graph_url = FileGraphRenderer ( ) . RenderGraph ( <nl> - graph , GraphRendererInterface : : TF_GRAPHDEF ) ; <nl> + graph , GraphRendererInterface : : TF_GRAPHDEF , debug_options ) ; <nl> } else { <nl> - graph = ComputationToDotGraph ( computation , label , show_addresses , <nl> - show_layouts , hlo_execution_profile ) ; <nl> + graph = ComputationToDotGraph ( <nl> + computation , label , debug_options . xla_hlo_graph_addresses ( ) , <nl> + debug_options . xla_hlo_graph_layout ( ) , hlo_execution_profile ) ; <nl> graph_url = GetGraphRenderer ( ) - > RenderGraph ( <nl> - graph , GraphRendererInterface : : DOT_GRAPH ) ; <nl> + graph , GraphRendererInterface : : DOT_GRAPH , debug_options ) ; <nl> } <nl> LOG ( INFO ) < < " computation " < < computation . name ( ) < < " [ " < < label <nl> < < " ] : " < < graph_url ; <nl> string MaybeDumpHloModule ( const HloModule & module , const string & label , <nl> if ( ! debug_options . xla_generate_hlo_graph ( ) . empty ( ) & & <nl> RE2 : : PartialMatch ( module . name ( ) , <nl> debug_options . xla_generate_hlo_graph ( ) ) ) { <nl> - graph_url = DumpGraph ( * module . entry_computation ( ) , label , <nl> - debug_options . xla_hlo_graph_addresses ( ) , <nl> - debug_options . xla_hlo_graph_layout ( ) , profile ) ; <nl> + graph_url = <nl> + DumpGraph ( * module . entry_computation ( ) , label , debug_options , profile ) ; <nl> } <nl> if ( ! debug_options . xla_log_hlo_text ( ) . empty ( ) & & <nl> RE2 : : PartialMatch ( module . name ( ) , debug_options . xla_log_hlo_text ( ) ) ) { <nl> mmm a / tensorflow / compiler / xla / service / hlo_graph_dumper . h <nl> ppp b / tensorflow / compiler / xla / service / hlo_graph_dumper . h <nl> limitations under the License . <nl> # include " tensorflow / compiler / xla / service / hlo_computation . h " <nl> # include " tensorflow / compiler / xla / service / hlo_execution_profile . h " <nl> # include " tensorflow / compiler / xla / types . h " <nl> + # include " tensorflow / compiler / xla / xla . pb . h " <nl> <nl> namespace xla { <nl> namespace hlo_graph_dumper { <nl> class GraphRendererInterface { <nl> <nl> / / Renders a DOT graph , returning a description of the rendered output <nl> / / ( e . g . , a URL ) <nl> - virtual string RenderGraph ( const string & graph , GraphKind graph_kind ) = 0 ; <nl> + virtual string RenderGraph ( const string & graph , GraphKind graph_kind , <nl> + const DebugOptions & debug_options ) = 0 ; <nl> } ; <nl> <nl> / / Dump the given HLO module if a dump is requested in its debug options . Based <nl> string MaybeDumpHloModule ( const HloModule & module , const string & label , <nl> / / graph ( e . g . , a URL ) based on the renderer . The " best " renderer in the <nl> / / registry is used . <nl> string DumpGraph ( const HloComputation & computation , const string & label , <nl> - bool show_addresses , bool show_layouts , <nl> + const DebugOptions & debug_options , <nl> const HloExecutionProfile * hlo_execution_profile = nullptr ) ; <nl> <nl> / / Dumps the HloModule : : ToString ( ) as a file into the provided directory path <nl> mmm a / tensorflow / compiler / xla / service / hlo_subcomputation_unification_test . cc <nl> ppp b / tensorflow / compiler / xla / service / hlo_subcomputation_unification_test . cc <nl> TEST_F ( HloSubcomputationUnificationTest , UnifyIdentities ) { <nl> EXPECT_NE ( x - > to_apply ( ) , y - > to_apply ( ) ) ; <nl> if ( VLOG_IS_ON ( 1 ) ) { <nl> hlo_graph_dumper : : DumpGraph ( * module - > entry_computation ( ) , <nl> - " before unification " , false , false , nullptr ) ; <nl> + " before unification " , <nl> + module - > config ( ) . debug_options ( ) ) ; <nl> } <nl> EXPECT_TRUE ( HloSubcomputationUnification ( ) . Run ( module . get ( ) ) . ValueOrDie ( ) ) ; <nl> if ( VLOG_IS_ON ( 1 ) ) { <nl> hlo_graph_dumper : : DumpGraph ( * module - > entry_computation ( ) , <nl> - " after unification " , false , false , nullptr ) ; <nl> + " after unification " , <nl> + module - > config ( ) . debug_options ( ) ) ; <nl> } <nl> EXPECT_EQ ( 2 , module - > computations ( ) . size ( ) ) ; <nl> EXPECT_EQ ( x - > to_apply ( ) , y - > to_apply ( ) ) ; <nl> TEST_F ( HloSubcomputationUnificationTest , UnifyAdditions ) { <nl> EXPECT_NE ( x - > to_apply ( ) , y - > to_apply ( ) ) ; <nl> if ( VLOG_IS_ON ( 1 ) ) { <nl> hlo_graph_dumper : : DumpGraph ( * module - > entry_computation ( ) , <nl> - " before unification " , false , false , nullptr ) ; <nl> + " before unification " , <nl> + module - > config ( ) . debug_options ( ) ) ; <nl> } <nl> EXPECT_TRUE ( HloSubcomputationUnification ( ) . Run ( module . get ( ) ) . ValueOrDie ( ) ) ; <nl> if ( VLOG_IS_ON ( 1 ) ) { <nl> hlo_graph_dumper : : DumpGraph ( * module - > entry_computation ( ) , <nl> - " after unification " , false , false , nullptr ) ; <nl> + " after unification " , <nl> + module - > config ( ) . debug_options ( ) ) ; <nl> } <nl> EXPECT_EQ ( 2 , module - > computations ( ) . size ( ) ) ; <nl> EXPECT_EQ ( x - > to_apply ( ) , y - > to_apply ( ) ) ; <nl> TEST_F ( HloSubcomputationUnificationTest , DifferentParameterShapes ) { <nl> EXPECT_NE ( x - > to_apply ( ) , y - > to_apply ( ) ) ; <nl> if ( VLOG_IS_ON ( 1 ) ) { <nl> hlo_graph_dumper : : DumpGraph ( * module - > entry_computation ( ) , <nl> - " before unification " , false , false , nullptr ) ; <nl> + " before unification " , <nl> + module - > config ( ) . debug_options ( ) ) ; <nl> } <nl> EXPECT_FALSE ( HloSubcomputationUnification ( ) . Run ( module . get ( ) ) . ValueOrDie ( ) ) ; <nl> if ( VLOG_IS_ON ( 1 ) ) { <nl> hlo_graph_dumper : : DumpGraph ( * module - > entry_computation ( ) , <nl> - " after unification " , false , false , nullptr ) ; <nl> + " after unification " , <nl> + module - > config ( ) . debug_options ( ) ) ; <nl> } <nl> EXPECT_EQ ( 3 , module - > computations ( ) . size ( ) ) ; <nl> EXPECT_NE ( x - > to_apply ( ) , y - > to_apply ( ) ) ; <nl> mmm a / tensorflow / compiler / xla / service / layout_assignment . cc <nl> ppp b / tensorflow / compiler / xla / service / layout_assignment . cc <nl> StatusOr < bool > LayoutAssignment : : Run ( HloModule * module ) { <nl> if ( VLOG_IS_ON ( 10 ) ) { <nl> hlo_graph_dumper : : DumpGraph ( * module - > entry_computation ( ) , <nl> " before layout assignment " , <nl> - / * show_addresses = * / false , <nl> - / * show_layouts = * / true ) ; <nl> + module - > config ( ) . debug_options ( ) ) ; <nl> } <nl> <nl> / / Assign layouts to computations in an order such that a callee computation <nl> StatusOr < bool > LayoutAssignment : : Run ( HloModule * module ) { <nl> if ( VLOG_IS_ON ( 10 ) ) { <nl> hlo_graph_dumper : : DumpGraph ( * module - > entry_computation ( ) , <nl> " after layout assignment " , <nl> - / * show_addresses = * / false , <nl> - / * show_layouts = * / true ) ; <nl> + module - > config ( ) . debug_options ( ) ) ; <nl> } <nl> <nl> / / All layouts are reset then reassigned by this pass . <nl> mmm a / tensorflow / compiler / xla / tools / BUILD <nl> ppp b / tensorflow / compiler / xla / tools / BUILD <nl> cc_binary ( <nl> " / / tensorflow / compiler / xla / client : computation " , <nl> " / / tensorflow / compiler / xla / client : local_client " , <nl> " / / tensorflow / compiler / xla / legacy_flags : debug_options_flags " , <nl> - " / / tensorflow / compiler / xla / legacy_flags : hlo_graph_dumper_flags " , <nl> " / / tensorflow / compiler / xla / service " , <nl> " / / tensorflow / compiler / xla / service : hlo_graph_dumper " , <nl> " / / tensorflow / compiler / xla / service : session_proto " , <nl> mmm a / tensorflow / compiler / xla / tools / dumped_computation_to_tf_graphdef . cc <nl> ppp b / tensorflow / compiler / xla / tools / dumped_computation_to_tf_graphdef . cc <nl> limitations under the License . <nl> # include " tensorflow / compiler / xla / client / computation . h " <nl> # include " tensorflow / compiler / xla / client / local_client . h " <nl> # include " tensorflow / compiler / xla / legacy_flags / debug_options_flags . h " <nl> - # include " tensorflow / compiler / xla / legacy_flags / hlo_graph_dumper_flags . h " <nl> # include " tensorflow / compiler / xla / service / service . h " <nl> # include " tensorflow / compiler / xla / service / session . pb . h " <nl> # include " tensorflow / compiler / xla / statusor . h " <nl> int main ( int argc , char * * argv ) { <nl> <nl> tensorflow : : port : : InitMain ( argv [ 0 ] , & argc , & argv ) ; <nl> <nl> - xla : : legacy_flags : : HloGraphDumperFlags * dumper_flags = <nl> - xla : : legacy_flags : : GetHloGraphDumperFlags ( ) ; <nl> - dumper_flags - > xla_hlo_dump_as_graphdef = true ; <nl> - <nl> tensorflow : : gtl : : ArraySlice < char * > args ( argv , argc ) ; <nl> args . pop_front ( ) ; / / Pop off the binary name , argv [ 0 ] <nl> xla : : tools : : RealMain ( args ) ; <nl> mmm a / tensorflow / compiler / xla / xla . proto <nl> ppp b / tensorflow / compiler / xla / xla . proto <nl> message DebugOptions { <nl> string xla_generate_hlo_graph = 1 ; <nl> <nl> / / Show addresses of HLO ops in graph dump . <nl> - bool xla_hlo_graph_addresses = 21 ; <nl> + bool xla_hlo_graph_addresses = 2 ; <nl> <nl> / / Show layout of HLO ops in graph dump . <nl> - bool xla_hlo_graph_layout = 22 ; <nl> + bool xla_hlo_graph_layout = 3 ; <nl> + <nl> + / / Path to dump HLO graphs to . <nl> + string xla_hlo_graph_path = 4 ; <nl> + <nl> + / / Dump HLO graphs as TensorFlow GraphDefs . <nl> + bool xla_hlo_dump_as_graphdef = 5 ; <nl> <nl> / / HLO modules matching this regex will be dumped to LOG ( INFO ) . Set to " . * " to <nl> / / dump * all * HLO modules . <nl> - string xla_log_hlo_text = 23 ; <nl> + string xla_log_hlo_text = 6 ; <nl> <nl> / / Dump all HLO modules as text into the provided directory path . <nl> - string xla_generate_hlo_text_to = 24 ; <nl> + string xla_generate_hlo_text_to = 7 ; <nl> + <nl> + / / Dump compilation artifacts as JSON into this directory . <nl> + string xla_dump_debug_json_to = 8 ; <nl> <nl> / / List of HLO passes to disable . These names must exactly match the pass <nl> / / names as specified by the HloPassInterface : : name ( ) method . <nl> - repeated string xla_disable_hlo_passes = 2 ; <nl> + repeated string xla_disable_hlo_passes = 30 ; <nl> <nl> / / Numerical optimization level for the XLA compiler backend ; the specific <nl> / / interpretation of this value is left to the backends . <nl> - int32 xla_backend_optimization_level = 3 ; <nl> + int32 xla_backend_optimization_level = 31 ; <nl> <nl> / / When true , " unsafe " mathematical optimizations are enabled . These <nl> / / transformations include but are not limited to : <nl> message DebugOptions { <nl> / / function , or transforming x / y into x * ( 1 / y ) ) . <nl> / / - Assuming that operations never produce or consume NaN or + / - Inf . <nl> / / - Assuming that + 0 and - 0 are indistinguishable . <nl> - bool xla_enable_fast_math = 4 ; <nl> + bool xla_enable_fast_math = 32 ; <nl> <nl> / / Embed the compiler IR as a string in the executable . <nl> - bool xla_embed_ir_in_executable = 5 ; <nl> + bool xla_embed_ir_in_executable = 33 ; <nl> <nl> / / Dump the compiler IR into this file / path . <nl> - string xla_dump_ir_to = 6 ; <nl> - <nl> - / / Dump compilation artifacts as JSON into this directory . <nl> - string xla_dump_debug_json_to = 7 ; <nl> + string xla_dump_ir_to = 34 ; <nl> <nl> / / When generating calls to Eigen in the CPU backend , use multi - threaded Eigen <nl> / / mode . <nl> - bool xla_cpu_multi_thread_eigen = 8 ; <nl> + bool xla_cpu_multi_thread_eigen = 60 ; <nl> <nl> / / Path to directory with cuda / ptx tools and libraries . <nl> - string xla_gpu_cuda_data_dir = 9 ; <nl> + string xla_gpu_cuda_data_dir = 61 ; <nl> <nl> / / Enable flush - to - zero semantics in the GPU backend . <nl> - bool xla_gpu_ftz = 10 ; <nl> + bool xla_gpu_ftz = 62 ; <nl> <nl> / / If true , in LLVM - based backends , emit ! alias . scope metadata in <nl> / / generated IR . <nl> - bool xla_llvm_enable_alias_scope_metadata = 11 ; <nl> + bool xla_llvm_enable_alias_scope_metadata = 63 ; <nl> <nl> / / If true , in LLVM - based backends , emit ! noalias metadata in the <nl> / / generated IR . <nl> - bool xla_llvm_enable_noalias_metadata = 12 ; <nl> + bool xla_llvm_enable_noalias_metadata = 64 ; <nl> <nl> / / If true , in LLVM - based backends , emit ! invariant . load metadata in <nl> / / the generated IR . <nl> - bool xla_llvm_enable_invariant_load_metadata = 13 ; <nl> + bool xla_llvm_enable_invariant_load_metadata = 65 ; <nl> <nl> / / Extra options to pass to the compilation backend ; specific interpretation <nl> / / of these values is left to the backend . <nl>
[ XLA ] Move remaining hlo graph dumper flags into debug_options .
tensorflow/tensorflow
7ab72bf2205b1775607932b6ccbcd7099368705e
2017-06-28T20:48:39Z
mmm a / src / google / protobuf / compiler / js / embed . cc <nl> ppp b / src / google / protobuf / compiler / js / embed . cc <nl> <nl> # include < iostream > <nl> # include < string > <nl> <nl> - const char output_file [ ] = " well_known_types_embed . cc " ; <nl> - <nl> static bool AsciiIsPrint ( unsigned char c ) { <nl> return c > = 32 & & c < 127 ; <nl> } <nl>
Remove unused output_file variable from js_embed
protocolbuffers/protobuf
7ccb251be68fc44a1a42c14d2bb403462d0f5ca2
2017-06-05T19:57:31Z
mmm a / BUILD <nl> ppp b / BUILD <nl> cc_library ( <nl> " src / compiler / node_generator_helpers . h " , <nl> " src / compiler / objective_c_generator . h " , <nl> " src / compiler / objective_c_generator_helpers . h " , <nl> + " src / compiler / php_generator . h " , <nl> + " src / compiler / php_generator_helpers . h " , <nl> " src / compiler / python_generator . h " , <nl> " src / compiler / ruby_generator . h " , <nl> " src / compiler / ruby_generator_helpers - inl . h " , <nl> cc_library ( <nl> " src / compiler / csharp_generator . cc " , <nl> " src / compiler / node_generator . cc " , <nl> " src / compiler / objective_c_generator . cc " , <nl> + " src / compiler / php_generator . cc " , <nl> " src / compiler / python_generator . cc " , <nl> " src / compiler / ruby_generator . cc " , <nl> ] , <nl> cc_binary ( <nl> ) <nl> <nl> <nl> + cc_binary ( <nl> + name = " grpc_php_plugin " , <nl> + srcs = [ <nl> + " src / compiler / php_plugin . cc " , <nl> + ] , <nl> + deps = [ <nl> + " / / external : protobuf_compiler " , <nl> + " : grpc_plugin_support " , <nl> + ] , <nl> + ) <nl> + <nl> + <nl> cc_binary ( <nl> name = " grpc_python_plugin " , <nl> srcs = [ <nl> mmm a / CMakeLists . txt <nl> ppp b / CMakeLists . txt <nl> add_library ( grpc_plugin_support <nl> src / compiler / csharp_generator . cc <nl> src / compiler / node_generator . cc <nl> src / compiler / objective_c_generator . cc <nl> + src / compiler / php_generator . cc <nl> src / compiler / python_generator . cc <nl> src / compiler / ruby_generator . cc <nl> ) <nl> if ( gRPC_INSTALL ) <nl> endif ( ) <nl> <nl> <nl> + add_executable ( grpc_php_plugin <nl> + src / compiler / php_plugin . cc <nl> + ) <nl> + <nl> + target_include_directories ( grpc_php_plugin <nl> + PRIVATE $ { CMAKE_CURRENT_SOURCE_DIR } <nl> + PRIVATE $ { CMAKE_CURRENT_SOURCE_DIR } / include <nl> + PRIVATE $ { BORINGSSL_ROOT_DIR } / include <nl> + PRIVATE $ { PROTOBUF_ROOT_DIR } / src <nl> + PRIVATE $ { ZLIB_ROOT_DIR } <nl> + PRIVATE $ { CMAKE_CURRENT_BINARY_DIR } / third_party / zlib <nl> + ) <nl> + <nl> + target_link_libraries ( grpc_php_plugin <nl> + $ { _gRPC_PROTOBUF_PROTOC_LIBRARIES } <nl> + grpc_plugin_support <nl> + ) <nl> + <nl> + <nl> + if ( gRPC_INSTALL ) <nl> + install ( TARGETS grpc_php_plugin EXPORT gRPCTargets <nl> + RUNTIME DESTINATION $ { CMAKE_INSTALL_BINDIR } <nl> + LIBRARY DESTINATION $ { CMAKE_INSTALL_LIBDIR } <nl> + ARCHIVE DESTINATION $ { CMAKE_INSTALL_LIBDIR } <nl> + ) <nl> + endif ( ) <nl> + <nl> + <nl> add_executable ( grpc_python_plugin <nl> src / compiler / python_plugin . cc <nl> ) <nl> mmm a / Makefile <nl> ppp b / Makefile <nl> PC_LIBS_GRPCXX = <nl> <nl> CPPFLAGS : = - Ithird_party / googletest / include $ ( CPPFLAGS ) <nl> <nl> - PROTOC_PLUGINS_ALL = $ ( BINDIR ) / $ ( CONFIG ) / grpc_cpp_plugin $ ( BINDIR ) / $ ( CONFIG ) / grpc_csharp_plugin $ ( BINDIR ) / $ ( CONFIG ) / grpc_node_plugin $ ( BINDIR ) / $ ( CONFIG ) / grpc_objective_c_plugin $ ( BINDIR ) / $ ( CONFIG ) / grpc_python_plugin $ ( BINDIR ) / $ ( CONFIG ) / grpc_ruby_plugin <nl> + PROTOC_PLUGINS_ALL = $ ( BINDIR ) / $ ( CONFIG ) / grpc_cpp_plugin $ ( BINDIR ) / $ ( CONFIG ) / grpc_csharp_plugin $ ( BINDIR ) / $ ( CONFIG ) / grpc_node_plugin $ ( BINDIR ) / $ ( CONFIG ) / grpc_objective_c_plugin $ ( BINDIR ) / $ ( CONFIG ) / grpc_php_plugin $ ( BINDIR ) / $ ( CONFIG ) / grpc_python_plugin $ ( BINDIR ) / $ ( CONFIG ) / grpc_ruby_plugin <nl> PROTOC_PLUGINS_DIR = $ ( BINDIR ) / $ ( CONFIG ) <nl> <nl> ifeq ( $ ( HAS_SYSTEM_PROTOBUF ) , true ) <nl> client_fuzzer : $ ( BINDIR ) / $ ( CONFIG ) / client_fuzzer <nl> combiner_test : $ ( BINDIR ) / $ ( CONFIG ) / combiner_test <nl> compression_test : $ ( BINDIR ) / $ ( CONFIG ) / compression_test <nl> concurrent_connectivity_test : $ ( BINDIR ) / $ ( CONFIG ) / concurrent_connectivity_test <nl> + connection_refused_test : $ ( BINDIR ) / $ ( CONFIG ) / connection_refused_test <nl> dns_resolver_connectivity_test : $ ( BINDIR ) / $ ( CONFIG ) / dns_resolver_connectivity_test <nl> dns_resolver_test : $ ( BINDIR ) / $ ( CONFIG ) / dns_resolver_test <nl> dualstack_socket_test : $ ( BINDIR ) / $ ( CONFIG ) / dualstack_socket_test <nl> grpc_cpp_plugin : $ ( BINDIR ) / $ ( CONFIG ) / grpc_cpp_plugin <nl> grpc_csharp_plugin : $ ( BINDIR ) / $ ( CONFIG ) / grpc_csharp_plugin <nl> grpc_node_plugin : $ ( BINDIR ) / $ ( CONFIG ) / grpc_node_plugin <nl> grpc_objective_c_plugin : $ ( BINDIR ) / $ ( CONFIG ) / grpc_objective_c_plugin <nl> + grpc_php_plugin : $ ( BINDIR ) / $ ( CONFIG ) / grpc_php_plugin <nl> grpc_python_plugin : $ ( BINDIR ) / $ ( CONFIG ) / grpc_python_plugin <nl> grpc_ruby_plugin : $ ( BINDIR ) / $ ( CONFIG ) / grpc_ruby_plugin <nl> grpc_tool_test : $ ( BINDIR ) / $ ( CONFIG ) / grpc_tool_test <nl> buildtests_c : privatelibs_c \ <nl> $ ( BINDIR ) / $ ( CONFIG ) / combiner_test \ <nl> $ ( BINDIR ) / $ ( CONFIG ) / compression_test \ <nl> $ ( BINDIR ) / $ ( CONFIG ) / concurrent_connectivity_test \ <nl> + $ ( BINDIR ) / $ ( CONFIG ) / connection_refused_test \ <nl> $ ( BINDIR ) / $ ( CONFIG ) / dns_resolver_connectivity_test \ <nl> $ ( BINDIR ) / $ ( CONFIG ) / dns_resolver_test \ <nl> $ ( BINDIR ) / $ ( CONFIG ) / dualstack_socket_test \ <nl> test_c : buildtests_c <nl> $ ( Q ) $ ( BINDIR ) / $ ( CONFIG ) / compression_test | | ( echo test compression_test failed ; exit 1 ) <nl> $ ( E ) " [ RUN ] Testing concurrent_connectivity_test " <nl> $ ( Q ) $ ( BINDIR ) / $ ( CONFIG ) / concurrent_connectivity_test | | ( echo test concurrent_connectivity_test failed ; exit 1 ) <nl> + $ ( E ) " [ RUN ] Testing connection_refused_test " <nl> + $ ( Q ) $ ( BINDIR ) / $ ( CONFIG ) / connection_refused_test | | ( echo test connection_refused_test failed ; exit 1 ) <nl> $ ( E ) " [ RUN ] Testing dns_resolver_connectivity_test " <nl> $ ( Q ) $ ( BINDIR ) / $ ( CONFIG ) / dns_resolver_connectivity_test | | ( echo test dns_resolver_connectivity_test failed ; exit 1 ) <nl> $ ( E ) " [ RUN ] Testing dns_resolver_test " <nl> else <nl> $ ( Q ) $ ( INSTALL ) - d $ ( prefix ) / bin <nl> $ ( Q ) $ ( INSTALL ) $ ( BINDIR ) / $ ( CONFIG ) / grpc_objective_c_plugin $ ( prefix ) / bin / grpc_objective_c_plugin <nl> $ ( Q ) $ ( INSTALL ) - d $ ( prefix ) / bin <nl> + $ ( Q ) $ ( INSTALL ) $ ( BINDIR ) / $ ( CONFIG ) / grpc_php_plugin $ ( prefix ) / bin / grpc_php_plugin <nl> + $ ( Q ) $ ( INSTALL ) - d $ ( prefix ) / bin <nl> $ ( Q ) $ ( INSTALL ) $ ( BINDIR ) / $ ( CONFIG ) / grpc_python_plugin $ ( prefix ) / bin / grpc_python_plugin <nl> $ ( Q ) $ ( INSTALL ) - d $ ( prefix ) / bin <nl> $ ( Q ) $ ( INSTALL ) $ ( BINDIR ) / $ ( CONFIG ) / grpc_ruby_plugin $ ( prefix ) / bin / grpc_ruby_plugin <nl> LIBGRPC_TEST_UTIL_SRC = \ <nl> test / core / end2end / data / test_root_cert . c \ <nl> test / core / security / oauth2_utils . c \ <nl> test / core / end2end / cq_verifier . c \ <nl> + test / core / end2end / fake_resolver . c \ <nl> test / core / end2end / fixtures / http_proxy . c \ <nl> test / core / end2end / fixtures / proxy . c \ <nl> test / core / iomgr / endpoint_tests . c \ <nl> endif <nl> <nl> LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ <nl> test / core / end2end / cq_verifier . c \ <nl> + test / core / end2end / fake_resolver . c \ <nl> test / core / end2end / fixtures / http_proxy . c \ <nl> test / core / end2end / fixtures / proxy . c \ <nl> test / core / iomgr / endpoint_tests . c \ <nl> LIBGRPC_PLUGIN_SUPPORT_SRC = \ <nl> src / compiler / csharp_generator . cc \ <nl> src / compiler / node_generator . cc \ <nl> src / compiler / objective_c_generator . cc \ <nl> + src / compiler / php_generator . cc \ <nl> src / compiler / python_generator . cc \ <nl> src / compiler / ruby_generator . cc \ <nl> <nl> endif <nl> endif <nl> <nl> <nl> + CONNECTION_REFUSED_TEST_SRC = \ <nl> + test / core / end2end / connection_refused_test . c \ <nl> + <nl> + CONNECTION_REFUSED_TEST_OBJS = $ ( addprefix $ ( OBJDIR ) / $ ( CONFIG ) / , $ ( addsuffix . o , $ ( basename $ ( CONNECTION_REFUSED_TEST_SRC ) ) ) ) <nl> + ifeq ( $ ( NO_SECURE ) , true ) <nl> + <nl> + # You can ' t build secure targets if you don ' t have OpenSSL . <nl> + <nl> + $ ( BINDIR ) / $ ( CONFIG ) / connection_refused_test : openssl_dep_error <nl> + <nl> + else <nl> + <nl> + <nl> + <nl> + $ ( BINDIR ) / $ ( CONFIG ) / connection_refused_test : $ ( CONNECTION_REFUSED_TEST_OBJS ) $ ( LIBDIR ) / $ ( CONFIG ) / libgrpc_test_util . a $ ( LIBDIR ) / $ ( CONFIG ) / libgrpc . a $ ( LIBDIR ) / $ ( CONFIG ) / libgpr_test_util . a $ ( LIBDIR ) / $ ( CONFIG ) / libgpr . a <nl> + $ ( E ) " [ LD ] Linking $ @ " <nl> + $ ( Q ) mkdir - p ` dirname $ @ ` <nl> + $ ( Q ) $ ( LD ) $ ( LDFLAGS ) $ ( CONNECTION_REFUSED_TEST_OBJS ) $ ( LIBDIR ) / $ ( CONFIG ) / libgrpc_test_util . a $ ( LIBDIR ) / $ ( CONFIG ) / libgrpc . a $ ( LIBDIR ) / $ ( CONFIG ) / libgpr_test_util . a $ ( LIBDIR ) / $ ( CONFIG ) / libgpr . a $ ( LDLIBS ) $ ( LDLIBS_SECURE ) - o $ ( BINDIR ) / $ ( CONFIG ) / connection_refused_test <nl> + <nl> + endif <nl> + <nl> + $ ( OBJDIR ) / $ ( CONFIG ) / test / core / end2end / connection_refused_test . o : $ ( LIBDIR ) / $ ( CONFIG ) / libgrpc_test_util . a $ ( LIBDIR ) / $ ( CONFIG ) / libgrpc . a $ ( LIBDIR ) / $ ( CONFIG ) / libgpr_test_util . a $ ( LIBDIR ) / $ ( CONFIG ) / libgpr . a <nl> + <nl> + deps_connection_refused_test : $ ( CONNECTION_REFUSED_TEST_OBJS : . o = . dep ) <nl> + <nl> + ifneq ( $ ( NO_SECURE ) , true ) <nl> + ifneq ( $ ( NO_DEPS ) , true ) <nl> + - include $ ( CONNECTION_REFUSED_TEST_OBJS : . o = . dep ) <nl> + endif <nl> + endif <nl> + <nl> + <nl> DNS_RESOLVER_CONNECTIVITY_TEST_SRC = \ <nl> test / core / client_config / resolvers / dns_resolver_connectivity_test . c \ <nl> <nl> ifneq ( $ ( NO_DEPS ) , true ) <nl> endif <nl> <nl> <nl> + GRPC_PHP_PLUGIN_SRC = \ <nl> + src / compiler / php_plugin . cc \ <nl> + <nl> + GRPC_PHP_PLUGIN_OBJS = $ ( addprefix $ ( OBJDIR ) / $ ( CONFIG ) / , $ ( addsuffix . o , $ ( basename $ ( GRPC_PHP_PLUGIN_SRC ) ) ) ) <nl> + <nl> + <nl> + <nl> + ifeq ( $ ( NO_PROTOBUF ) , true ) <nl> + <nl> + # You can ' t build the protoc plugins or protobuf - enabled targets if you don ' t have protobuf 3 . 0 . 0 + . <nl> + <nl> + $ ( BINDIR ) / $ ( CONFIG ) / grpc_php_plugin : protobuf_dep_error <nl> + <nl> + else <nl> + <nl> + $ ( BINDIR ) / $ ( CONFIG ) / grpc_php_plugin : $ ( PROTOBUF_DEP ) $ ( GRPC_PHP_PLUGIN_OBJS ) $ ( LIBDIR ) / $ ( CONFIG ) / libgrpc_plugin_support . a <nl> + $ ( E ) " [ HOSTLD ] Linking $ @ " <nl> + $ ( Q ) mkdir - p ` dirname $ @ ` <nl> + $ ( Q ) $ ( HOST_LDXX ) $ ( HOST_LDFLAGS ) $ ( GRPC_PHP_PLUGIN_OBJS ) $ ( LIBDIR ) / $ ( CONFIG ) / libgrpc_plugin_support . a $ ( HOST_LDLIBSXX ) $ ( HOST_LDLIBS_PROTOC ) $ ( HOST_LDLIBS ) $ ( HOST_LDLIBS_PROTOC ) - o $ ( BINDIR ) / $ ( CONFIG ) / grpc_php_plugin <nl> + <nl> + endif <nl> + <nl> + $ ( OBJDIR ) / $ ( CONFIG ) / src / compiler / php_plugin . o : $ ( LIBDIR ) / $ ( CONFIG ) / libgrpc_plugin_support . a <nl> + <nl> + deps_grpc_php_plugin : $ ( GRPC_PHP_PLUGIN_OBJS : . o = . dep ) <nl> + <nl> + ifneq ( $ ( NO_DEPS ) , true ) <nl> + - include $ ( GRPC_PHP_PLUGIN_OBJS : . o = . dep ) <nl> + endif <nl> + <nl> + <nl> GRPC_PYTHON_PLUGIN_SRC = \ <nl> src / compiler / python_plugin . cc \ <nl> <nl> mmm a / build . yaml <nl> ppp b / build . yaml <nl> filegroups : <nl> build : test <nl> headers : <nl> - test / core / end2end / cq_verifier . h <nl> + - test / core / end2end / fake_resolver . h <nl> - test / core / end2end / fixtures / http_proxy . h <nl> - test / core / end2end / fixtures / proxy . h <nl> - test / core / iomgr / endpoint_tests . h <nl> filegroups : <nl> - test / core / util / slice_splitter . h <nl> src : <nl> - test / core / end2end / cq_verifier . c <nl> + - test / core / end2end / fake_resolver . c <nl> - test / core / end2end / fixtures / http_proxy . c <nl> - test / core / end2end / fixtures / proxy . c <nl> - test / core / iomgr / endpoint_tests . c <nl> libs : <nl> deps : <nl> - grpc + + _reflection <nl> - grpc + + <nl> - - grpc + + _test_config <nl> - name : grpc_plugin_support <nl> build : protoc <nl> language : c + + <nl> libs : <nl> - src / compiler / node_generator_helpers . h <nl> - src / compiler / objective_c_generator . h <nl> - src / compiler / objective_c_generator_helpers . h <nl> + - src / compiler / php_generator . h <nl> + - src / compiler / php_generator_helpers . h <nl> - src / compiler / python_generator . h <nl> - src / compiler / ruby_generator . h <nl> - src / compiler / ruby_generator_helpers - inl . h <nl> libs : <nl> - src / compiler / csharp_generator . cc <nl> - src / compiler / node_generator . cc <nl> - src / compiler / objective_c_generator . cc <nl> + - src / compiler / php_generator . cc <nl> - src / compiler / python_generator . cc <nl> - src / compiler / ruby_generator . cc <nl> filegroups : <nl> targets : <nl> - grpc <nl> - gpr_test_util <nl> - gpr <nl> + - name : connection_refused_test <nl> + cpu_cost : 0 . 1 <nl> + build : test <nl> + language : c <nl> + src : <nl> + - test / core / end2end / connection_refused_test . c <nl> + deps : <nl> + - grpc_test_util <nl> + - grpc <nl> + - gpr_test_util <nl> + - gpr <nl> - name : dns_resolver_connectivity_test <nl> cpu_cost : 0 . 1 <nl> build : test <nl> targets : <nl> secure : false <nl> vs_config_type : Application <nl> vs_project_guid : ' { 19564640 - CEE6 - 4921 - ABA5 - 676ED79A36F6 } ' <nl> + - name : grpc_php_plugin <nl> + build : protoc <nl> + language : c + + <nl> + src : <nl> + - src / compiler / php_plugin . cc <nl> + deps : <nl> + - grpc_plugin_support <nl> + secure : false <nl> + vs_config_type : Application <nl> - name : grpc_python_plugin <nl> build : protoc <nl> language : c + + <nl> mmm a / composer . json <nl> ppp b / composer . json <nl> <nl> " license " : " BSD - 3 - Clause " , <nl> " require " : { <nl> " php " : " > = 5 . 5 . 0 " , <nl> - " stanley - cheung / protobuf - php " : " v0 . 6 " <nl> + " google / protobuf " : " v3 . 1 . 0 - alpha - 1 " <nl> } , <nl> " require - dev " : { <nl> " google / auth " : " v0 . 9 " <nl> mmm a / doc / PROTOCOL - HTTP2 . md <nl> ppp b / doc / PROTOCOL - HTTP2 . md <nl> grpc - ruby / 1 . 2 . 3 <nl> grpc - ruby - jruby / 1 . 3 . 4 <nl> grpc - java - android / 0 . 9 . 1 ( gingerbread / 1 . 2 . 4 ; nexus5 ; tmobile ) <nl> ` ` ` <nl> + <nl> + # # # # Idempotency and Retries <nl> + <nl> + Unless explicitly defined to be , gRPC Calls are not assumed to be idempotent . Specifically : <nl> + <nl> + * Calls that cannot be proven to have started will not be retried . <nl> + * There is no mechanisim for duplicate suppression as it is not necessary . <nl> + * Calls that are marked as idempotent may be sent multiple times . <nl> + <nl> + <nl> # # # # HTTP2 Transport Mapping <nl> <nl> # # # # # Stream Identification <nl> new file mode 100644 <nl> index 00000000000 . . 74b7862c7df <nl> mmm / dev / null <nl> ppp b / doc / environment_variables . md <nl> <nl> + gRPC environment variables <nl> + mmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + <nl> + gRPC C core based implementations ( those contained in this repository ) expose <nl> + some configuration as environment variables that can be set . <nl> + <nl> + * GRPC_ABORT_ON_LEAKS <nl> + A debugging aid to cause a call to abort ( ) when gRPC objects are leaked past <nl> + grpc_shutdown ( ) . Set to 1 to cause the abort , if unset or 0 it does not <nl> + abort the process . <nl> + <nl> + * GOOGLE_APPLICATION_CREDENTIALS <nl> + The path to find the credentials to use when Google credentials are created <nl> + <nl> + * GRPC_SSL_CIPHER_SUITES <nl> + A colon separated list of cipher suites to use with OpenSSL <nl> + Defaults to : <nl> + ECDHE - RSA - AES128 - GCM - SHA256 : ECDHE - RSA - AES128 - SHA256 : ECDHE - RSA - AES256 - SHA384 : ECDHE - RSA - AES256 - GCM - SHA384 <nl> + <nl> + * GRPC_DEFAULT_SSL_ROOTS_FILE_PATH <nl> + PEM file to load SSL roots from <nl> + <nl> + * GRPC_POLL_STRATEGY [ posix - style environments only ] <nl> + Declares which polling engines to try when starting gRPC . <nl> + This is a comma - separated list of engines , which are tried in priority order <nl> + first - > last . <nl> + Available polling engines include : <nl> + - epoll ( linux - only ) - a polling engine based around the epoll family of <nl> + system calls <nl> + - poll - a portable polling engine based around poll ( ) , intended to be a <nl> + fallback engine when nothing better exists <nl> + - legacy - the ( deprecated ) original polling engine for gRPC <nl> + <nl> + * GRPC_TRACE <nl> + A comma separated list of tracers that provide additional insight into how <nl> + gRPC C core is processing requests via debug logs . Available tracers include : <nl> + - api - traces api calls to the C core <nl> + - channel - traces operations on the C core channel stack <nl> + - combiner - traces combiner lock state <nl> + - compression - traces compression operations <nl> + - connectivity_state - traces connectivity state changes to channels <nl> + - channel_stack_builder - traces information about channel stacks being built <nl> + - http - traces state in the http2 transport engine <nl> + - http1 - traces HTTP / 1 . x operations performed by gRPC <nl> + - flowctl - traces http2 flow control <nl> + - op_failure - traces error information when failure is pushed onto a <nl> + completion queue <nl> + - pending_tags - [ debug builds only ] traces still - in - progress tags on <nl> + completion queues <nl> + - round_robin - traces the round_robin load balancing policy <nl> + - glb - traces the grpclb load balancer <nl> + - queue_pluck <nl> + - queue_timeout <nl> + - secure_endpoint - traces bytes flowing through encrypted channels <nl> + - transport_security - traces metadata about secure channel establishment <nl> + - tcp - traces bytes in and out of a channel <nl> + ' all ' can additionally be used to turn all traces on . <nl> + Individual traces can be disabled by prefixing them with ' - ' . <nl> + Example : <nl> + export GRPC_TRACE = all , - pending_tags <nl> + <nl> + * GRPC_VERBOSITY <nl> + Default gRPC logging verbosity - one of : <nl> + - DEBUG - log all gRPC messages <nl> + - INFO - log INFO and ERROR message <nl> + - ERROR - log only errors <nl> + <nl> mmm a / etc / roots . pem <nl> ppp b / etc / roots . pem <nl> fQjGGoe9GKhzvSbKYAydzpmfz1wPMOG + FDHqAjAU9JM8SaczepBGR7NjfRObTrdv <nl> GDeAU / 7dIOA1mjbRxwG55tzd8 / 8dLDoWV9mSOdY = <nl> mmm - - END CERTIFICATEmmm - - <nl> <nl> - # Issuer : CN = IGC / A O = PM / SGDN OU = DCSSI <nl> - # Subject : CN = IGC / A O = PM / SGDN OU = DCSSI <nl> - # Label : " IGC / A " <nl> - # Serial : 245102874772 <nl> - # MD5 Fingerprint : 0c : 7f : dd : 6a : f4 : 2a : b9 : c8 : 9b : bd : 20 : 7e : a9 : db : 5c : 37 <nl> - # SHA1 Fingerprint : 60 : d6 : 89 : 74 : b5 : c2 : 65 : 9e : 8a : 0f : c1 : 88 : 7c : 88 : d2 : 46 : 69 : 1b : 18 : 2c <nl> - # SHA256 Fingerprint : b9 : be : a7 : 86 : 0a : 96 : 2e : a3 : 61 : 1d : ab : 97 : ab : 6d : a3 : e2 : 1c : 10 : 68 : b9 : 7d : 55 : 57 : 5e : d0 : e1 : 12 : 79 : c1 : 1c : 89 : 32 <nl> mmmmmmBEGIN CERTIFICATEmmm - - <nl> - MIIEAjCCAuqgAwIBAgIFORFFEJQwDQYJKoZIhvcNAQEFBQAwgYUxCzAJBgNVBAYT <nl> - AkZSMQ8wDQYDVQQIEwZGcmFuY2UxDjAMBgNVBAcTBVBhcmlzMRAwDgYDVQQKEwdQ <nl> - TS9TR0ROMQ4wDAYDVQQLEwVEQ1NTSTEOMAwGA1UEAxMFSUdDL0ExIzAhBgkqhkiG <nl> - 9w0BCQEWFGlnY2FAc2dkbi5wbS5nb3V2LmZyMB4XDTAyMTIxMzE0MjkyM1oXDTIw <nl> - MTAxNzE0MjkyMlowgYUxCzAJBgNVBAYTAkZSMQ8wDQYDVQQIEwZGcmFuY2UxDjAM <nl> - BgNVBAcTBVBhcmlzMRAwDgYDVQQKEwdQTS9TR0ROMQ4wDAYDVQQLEwVEQ1NTSTEO <nl> - MAwGA1UEAxMFSUdDL0ExIzAhBgkqhkiG9w0BCQEWFGlnY2FAc2dkbi5wbS5nb3V2 <nl> - LmZyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsh / R0GLFMzvABIaI <nl> - s9z4iPf930Pfeo2aSVz2TqrMHLmh6yeJ8kbpO0px1R2OLc / mratjUMdUC24SyZA2 <nl> - xtgv2pGqaMVy / hcKshd + ebUyiHDKcMCWSo7kVc0dJ5S / znIq7Fz5cyD + vfcuiWe4 <nl> - u0dzEvfRNWk68gq5rv9GQkaiv6GFGvm / 5P9JhfejcIYyHF2fYPepraX / z9E0 + X1b <nl> - F8bc1g4oa8Ld8fUzaJ1O / Id8NhLWo4DoQw1VYZTqZDdH6nfK0LJYBcNdfrGoRpAx <nl> - Vs5wKpayMLh35nnAvSk7 / ZR3TL0gzUEl4C7HG7vupARB0l2tEmqKm0f7yd1GQOGd <nl> - PDPQtQIDAQABo3cwdTAPBgNVHRMBAf8EBTADAQH / MAsGA1UdDwQEAwIBRjAVBgNV <nl> - HSAEDjAMMAoGCCqBegF5AQEBMB0GA1UdDgQWBBSjBS8YYFDCiQrdKyFP / 45OqDAx <nl> - NjAfBgNVHSMEGDAWgBSjBS8YYFDCiQrdKyFP / 45OqDAxNjANBgkqhkiG9w0BAQUF <nl> - AAOCAQEABdwm2Pp3FURo / C9mOnTgXeQp / wYHE4RKq89toB9RlPhJy3Q2FLwV3duJ <nl> - L92PoF189RLrn544pEfMs5bZvpwlqwN + Mw + VgQ39FuCIvjfwbF3QMZsyK10XZZOY <nl> - YLxuj7GoPB7ZHPOpJkL5ZB3C55L29B5aqhlSXa / oovdgoPaN8In1buAKBQGVyYsg <nl> - Crpa / JosPL3Dt8ldeCUFP1YUmwza + zpI / pdpXsoQhvdOlgQITeywvl3cO45Pwf2a <nl> - NjSaTFR + FwNIlQgRHAdvhQh + XU3Endv7rs6y0bO4g2wdsrN58dhwmX7wEwLOXt1R <nl> - 0982gaEbeC9xs / FZTEYYKKuF0mBWWg = = <nl> mmmmmmEND CERTIFICATEmmm - - <nl> - <nl> # Issuer : O = SECOM Trust Systems CO . , LTD . OU = Security Communication EV RootCA1 <nl> # Subject : O = SECOM Trust Systems CO . , LTD . OU = Security Communication EV RootCA1 <nl> # Label : " Security Communication EV RootCA1 " <nl> h7U / 2k3ZIQAw3pDaDtMaSKk + hQsUi4y8QZ5q9w5wwDX3OaJdZtB7WZ + oRxKaJyOk <nl> LY4ng5IgodcVf / EuGO70SH8vf / GhGLWhC5SgYiAynB321O + / TIho <nl> mmm - - END CERTIFICATEmmm - - <nl> <nl> - # Issuer : CN = EBG Elektronik Sertifika Hizmet Sağlayıcısı O = EBG Bilişim Teknolojileri ve Hizmetleri A . Ş . <nl> - # Subject : CN = EBG Elektronik Sertifika Hizmet Sağlayıcısı O = EBG Bilişim Teknolojileri ve Hizmetleri A . Ş . <nl> - # Label : " EBG Elektronik Sertifika Hizmet Sa \ xC4 \ x9Flay \ xc4 \ xb1 \ x63 \ xc4 \ xb1s \ xc4 \ xb1 " <nl> - # Serial : 5525761995591021570 <nl> - # MD5 Fingerprint : 2c : 20 : 26 : 9d : cb : 1a : 4a : 00 : 85 : b5 : b7 : 5a : ae : c2 : 01 : 37 <nl> - # SHA1 Fingerprint : 8c : 96 : ba : eb : dd : 2b : 07 : 07 : 48 : ee : 30 : 32 : 66 : a0 : f3 : 98 : 6e : 7c : ae : 58 <nl> - # SHA256 Fingerprint : 35 : ae : 5b : dd : d8 : f7 : ae : 63 : 5c : ff : ba : 56 : 82 : a8 : f0 : 0b : 95 : f4 : 84 : 62 : c7 : 10 : 8e : e9 : a0 : e5 : 29 : 2b : 07 : 4a : af : b2 <nl> mmmmmmBEGIN CERTIFICATEmmm - - <nl> - MIIF5zCCA8 + gAwIBAgIITK9zQhyOdAIwDQYJKoZIhvcNAQEFBQAwgYAxODA2BgNV <nl> - BAMML0VCRyBFbGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sx <nl> - c8SxMTcwNQYDVQQKDC5FQkcgQmlsacWfaW0gVGVrbm9sb2ppbGVyaSB2ZSBIaXpt <nl> - ZXRsZXJpIEEuxZ4uMQswCQYDVQQGEwJUUjAeFw0wNjA4MTcwMDIxMDlaFw0xNjA4 <nl> - MTQwMDMxMDlaMIGAMTgwNgYDVQQDDC9FQkcgRWxla3Ryb25payBTZXJ0aWZpa2Eg <nl> - SGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTE3MDUGA1UECgwuRUJHIEJpbGnFn2ltIFRl <nl> - a25vbG9qaWxlcmkgdmUgSGl6bWV0bGVyaSBBLsWeLjELMAkGA1UEBhMCVFIwggIi <nl> - MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDuoIRh0DpqZhAy2DE4f6en5f2h <nl> - 4fuXd7hxlugTlkaDT7byX3JWbhNgpQGR4lvFzVcfd2NR / y8927k / qqk153nQ9dAk <nl> - tiHq6yOU / im / + 4mRDGSaBUorzAzu8T2bgmmkTPiab + ci2hC6X5L8GCcKqKpE + i4s <nl> - tPtGmggDg3KriORqcsnlZR9uKg + ds + g75AxuetpX / dfreYteIAbTdgtsApWjluTL <nl> - dlHRKJ2hGvxEok3MenaoDT2 / F08iiFD9rrbskFBKW5 + VQarKD7JK / oCZTqNGFav4 <nl> - c0JqwmZ2sQomFd2TkuzbqV9UIlKRcF0T6kjsbgNs2d1s / OsNA / + mgxKb8amTD8Um <nl> - TDGyY5lhcucqZJnSuOl14nypqZoaqsNW2xCaPINStnuWt6yHd6i58mcLlEOzrz5z <nl> - + kI2sSXFCjEmN1ZnuqMLfdb3ic1nobc6HmZP9qBVFCVMLDMNpkGMvQQxahByCp0O <nl> - Lna9XvNRiYuoP1Vzv9s6xiQFlpJIqkuNKgPlV5EQ9GooFW5Hd4RcUXSfGenmHmMW <nl> - OeMRFeNYGkS9y8RsZteEBt8w9DeiQyJ50hBs37vmExH8nYQKE3vwO9D8owrXieqW <nl> - fo1IhR5kX9tUoqzVegJ5a9KK8GfaZXINFHDk6Y54jzJ0fFfy1tb0Nokb + Clsi7n2 <nl> - l9GkLqq + CxnCRelwXQIDAJ3Zo2MwYTAPBgNVHRMBAf8EBTADAQH / MA4GA1UdDwEB <nl> - / wQEAwIBBjAdBgNVHQ4EFgQU587GT / wWZ5b6SqMHwQSny2re2kcwHwYDVR0jBBgw <nl> - FoAU587GT / wWZ5b6SqMHwQSny2re2kcwDQYJKoZIhvcNAQEFBQADggIBAJuYml2 + <nl> - 8ygjdsZs93 / mQJ7ANtyVDR2tFcU22NU57 / IeIl6zgrRdu0waypIN30ckHrMk2pGI <nl> - 6YNw3ZPX6bqz3xZaPt7gyPvT / Wwp + BVGoGgmzJNSroIBk5DKd8pNSe / iWtkqvTDO <nl> - TLKBtjDOWU / aWR1qeqRFsIImgYZ29fUQALjuswnoT4cCB64kXPBfrAowzIpAoHME <nl> - wfuJJPaaHFy3PApnNgUIMbOv2AFoKuB4j3TeuFGkjGwgPaL7s9QJ / XvCgKqTbCmY <nl> - Iai7FvOpEl90tYeY8pUm3zTvilORiF0alKM / fCL414i6poyWqD1SNGKfAB5UVUJn <nl> - xk1Gj7sURT0KlhaOEKGXmdXTMIXM3rRyt7yKPBgpaP3ccQfuJDlq + u2lrDgv + R4Q <nl> - DgZxGhBM / nV + / x5XOULK1 + EVoVZVWRvRo68R2E7DpSvvkL / A7IITW43WciyTTo9q <nl> - Kd + FPNMN4KIYEsxVL0e3p5sC / kH2iExt2qkBR4NkJ2IQgtYSe14DHzSpyZH + r11t <nl> - hie3I6p1GMog57AP14kOpmciY / SDQSsGS7tY1dHXt7kQY9iJSrSq3RZj9W6 + YKH4 <nl> - 7ejWkE8axsWgKdOnIaj1Wjz3x0miIZpKlVIglnKaZsv30oZDfCK + lvm9AahH3eU7 <nl> - QPl1K5srRmSGjR70j / sHd9DqSaIcjVIUpgqT <nl> mmmmmmEND CERTIFICATEmmm - - <nl> - <nl> # Issuer : O = certSIGN OU = certSIGN ROOT CA <nl> # Subject : O = certSIGN OU = certSIGN ROOT CA <nl> # Label : " certSIGN ROOT CA " <nl> Y7BXN0Ute4qcvwXqZVUz9zkQxSgqIXobisQk + T8VyJoVIPVVYpbtbZNQvOSqeK3Z <nl> ywplh6ZmwcSBo3c6WB4L7oOLnR7SUqTMHW + wmG2UMbX4cQrcufx9MmDm66 + KAQ = = <nl> mmm - - END CERTIFICATEmmm - - <nl> <nl> - # Issuer : CN = Juur - SK O = AS Sertifitseerimiskeskus <nl> - # Subject : CN = Juur - SK O = AS Sertifitseerimiskeskus <nl> - # Label : " Juur - SK " <nl> - # Serial : 999181308 <nl> - # MD5 Fingerprint : aa : 8e : 5d : d9 : f8 : db : 0a : 58 : b7 : 8d : 26 : 87 : 6c : 82 : 35 : 55 <nl> - # SHA1 Fingerprint : 40 : 9d : 4b : d9 : 17 : b5 : 5c : 27 : b6 : 9b : 64 : cb : 98 : 22 : 44 : 0d : cd : 09 : b8 : 89 <nl> - # SHA256 Fingerprint : ec : c3 : e9 : c3 : 40 : 75 : 03 : be : e0 : 91 : aa : 95 : 2f : 41 : 34 : 8f : f8 : 8b : aa : 86 : 3b : 22 : 64 : be : fa : c8 : 07 : 90 : 15 : 74 : e9 : 39 <nl> mmmmmmBEGIN CERTIFICATEmmm - - <nl> - MIIE5jCCA86gAwIBAgIEO45L / DANBgkqhkiG9w0BAQUFADBdMRgwFgYJKoZIhvcN <nl> - AQkBFglwa2lAc2suZWUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKExlBUyBTZXJ0aWZp <nl> - dHNlZXJpbWlza2Vza3VzMRAwDgYDVQQDEwdKdXVyLVNLMB4XDTAxMDgzMDE0MjMw <nl> - MVoXDTE2MDgyNjE0MjMwMVowXTEYMBYGCSqGSIb3DQEJARYJcGtpQHNrLmVlMQsw <nl> - CQYDVQQGEwJFRTEiMCAGA1UEChMZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEQ <nl> - MA4GA1UEAxMHSnV1ci1TSzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB <nl> - AIFxNj4zB9bjMI0TfncyRsvPGbJgMUaXhvSYRqTCZUXP00B841oiqBB4M8yIsdOB <nl> - SvZiF3tfTQou0M + LI + 5PAk676w7KvRhj6IAcjeEcjT3g / 1tf6mTll + g / mX8MCgkz <nl> - ABpTpyHhOEvWgxutr2TC + Rx6jGZITWYfGAriPrsfB2WThbkasLnE + w0R9vXW + RvH <nl> - LCu3GFH + 4Hv2qEivbDtPL + / 40UceJlfwUR0zlv / vWT3aTdEVNMfqPxZIe5EcgEMP <nl> - PbgFPtGzlc3Yyg / CQ2fbt5PgIoIuvvVoKIO5wTtpeyDaTpxt4brNj3pssAki14sL <nl> - 2xzVWiZbDcDq5WDQn / 413z8CAwEAAaOCAawwggGoMA8GA1UdEwEB / wQFMAMBAf8w <nl> - ggEWBgNVHSAEggENMIIBCTCCAQUGCisGAQQBzh8BAQEwgfYwgdAGCCsGAQUFBwIC <nl> - MIHDHoHAAFMAZQBlACAAcwBlAHIAdABpAGYAaQBrAGEAYQB0ACAAbwBuACAAdgDk <nl> - AGwAagBhAHMAdABhAHQAdQBkACAAQQBTAC0AaQBzACAAUwBlAHIAdABpAGYAaQB0 <nl> - AHMAZQBlAHIAaQBtAGkAcwBrAGUAcwBrAHUAcwAgAGEAbABhAG0ALQBTAEsAIABz <nl> - AGUAcgB0AGkAZgBpAGsAYQBhAHQAaQBkAGUAIABrAGkAbgBuAGkAdABhAG0AaQBz <nl> - AGUAawBzMCEGCCsGAQUFBwIBFhVodHRwOi8vd3d3LnNrLmVlL2Nwcy8wKwYDVR0f <nl> - BCQwIjAgoB6gHIYaaHR0cDovL3d3dy5zay5lZS9qdXVyL2NybC8wHQYDVR0OBBYE <nl> - FASqekej5ImvGs8KQKcYP2 / v6X2 + MB8GA1UdIwQYMBaAFASqekej5ImvGs8KQKcY <nl> - P2 / v6X2 + MA4GA1UdDwEB / wQEAwIB5jANBgkqhkiG9w0BAQUFAAOCAQEAe8EYlFOi <nl> - CfP + JmeaUOTDBS8rNXiRTHyoERF5TElZrMj3hWVcRrs7EKACr81Ptcw2Kuxd / u + g <nl> - kcm2k298gFTsxwhwDY77guwqYHhpNjbRxZyLabVAyJRld / JXIWY7zoVAtjNjGr95 <nl> - HvxcHdMdkxuLDF2FvZkwMhgJkVLpfKG6 / 2SSmuz + Ne6ML678IIbsSt4beDI3poHS <nl> - na9aEhbKmVv8b20OxaAehsmR0FyYgl9jDIpaq9iVpszLita / ZEuOyoqysOkhMp6q <nl> - qIWYNIE5ITuoOlIyPfZrN4YGWhWY3PARZv40ILcD9EEQfTmEeZZyY7aWAuVrua0Z <nl> - TbvGRNs2yyqcjg = = <nl> mmmmmmEND CERTIFICATEmmm - - <nl> - <nl> # Issuer : CN = Hongkong Post Root CA 1 O = Hongkong Post <nl> # Subject : CN = Hongkong Post Root CA 1 O = Hongkong Post <nl> # Label : " Hongkong Post Root CA 1 " <nl> mmm a / examples / node / static_codegen / greeter_client . js <nl> ppp b / examples / node / static_codegen / greeter_client . js <nl> var grpc = require ( ' grpc ' ) ; <nl> function main ( ) { <nl> var client = new services . GreeterClient ( ' localhost : 50051 ' , <nl> grpc . credentials . createInsecure ( ) ) ; <nl> + var request = new messages . HelloRequest ( ) ; <nl> var user ; <nl> if ( process . argv . length > = 3 ) { <nl> user = process . argv [ 2 ] ; <nl> } else { <nl> user = ' world ' ; <nl> } <nl> - var request = new messages . HelloRequest ( ) ; <nl> request . setName ( user ) ; <nl> client . sayHello ( request , function ( err , response ) { <nl> console . log ( ' Greeting : ' , response . getMessage ( ) ) ; <nl> mmm a / include / grpc + + / ext / reflection . pb . h <nl> ppp b / include / grpc + + / ext / reflection . pb . h <nl> <nl> <nl> # include < google / protobuf / stubs / common . h > <nl> <nl> - # if GOOGLE_PROTOBUF_VERSION < 3000000 <nl> + # if GOOGLE_PROTOBUF_VERSION < 3001000 <nl> # error This file was generated by a newer version of protoc which is <nl> # error incompatible with your Protocol Buffer headers . Please update <nl> # error your headers . <nl> # endif <nl> - # if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION <nl> + # if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION <nl> # error This file was generated by an older version of protoc which is <nl> # error incompatible with your Protocol Buffer headers . Please <nl> # error regenerate this file with a newer version of protoc . <nl> namespace v1alpha { <nl> <nl> / / Internal implementation detail - - do not call these . <nl> void protobuf_AddDesc_reflection_2eproto ( ) ; <nl> + void protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> void protobuf_AssignDesc_reflection_2eproto ( ) ; <nl> void protobuf_ShutdownFile_reflection_2eproto ( ) ; <nl> <nl> class ServerReflectionRequest : public : : google : : protobuf : : Message / * @ @ protoc_i <nl> MESSAGE_REQUEST_NOT_SET = 0 , <nl> } ; <nl> <nl> + static const ServerReflectionRequest * internal_default_instance ( ) ; <nl> + <nl> void Swap ( ServerReflectionRequest * other ) ; <nl> <nl> / / implements Message mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> class ServerReflectionRequest : public : : google : : protobuf : : Message / * @ @ protoc_i <nl> void Clear ( ) ; <nl> bool IsInitialized ( ) const ; <nl> <nl> - int ByteSize ( ) const ; <nl> + size_t ByteSizeLong ( ) const ; <nl> bool MergePartialFromCodedStream ( <nl> : : google : : protobuf : : io : : CodedInputStream * input ) ; <nl> void SerializeWithCachedSizes ( <nl> class ServerReflectionRequest : public : : google : : protobuf : : Message / * @ @ protoc_i <nl> void SharedDtor ( ) ; <nl> void SetCachedSize ( int size ) const ; <nl> void InternalSwap ( ServerReflectionRequest * other ) ; <nl> + void UnsafeMergeFrom ( const ServerReflectionRequest & from ) ; <nl> private : <nl> inline : : google : : protobuf : : Arena * GetArenaNoVirtual ( ) const { <nl> return _internal_metadata_ . arena ( ) ; <nl> class ServerReflectionRequest : public : : google : : protobuf : : Message / * @ @ protoc_i <nl> inline void clear_has_message_request ( ) ; <nl> <nl> : : google : : protobuf : : internal : : InternalMetadataWithArena _internal_metadata_ ; <nl> - bool _is_default_instance_ ; <nl> : : google : : protobuf : : internal : : ArenaStringPtr host_ ; <nl> union MessageRequestUnion { <nl> MessageRequestUnion ( ) { } <nl> class ServerReflectionRequest : public : : google : : protobuf : : Message / * @ @ protoc_i <nl> mutable int _cached_size_ ; <nl> : : google : : protobuf : : uint32 _oneof_case_ [ 1 ] ; <nl> <nl> - friend void protobuf_AddDesc_reflection_2eproto ( ) ; <nl> + friend void protobuf_InitDefaults_reflection_2eproto_impl ( ) ; <nl> + friend void protobuf_AddDesc_reflection_2eproto_impl ( ) ; <nl> friend void protobuf_AssignDesc_reflection_2eproto ( ) ; <nl> friend void protobuf_ShutdownFile_reflection_2eproto ( ) ; <nl> <nl> void InitAsDefaultInstance ( ) ; <nl> - static ServerReflectionRequest * default_instance_ ; <nl> } ; <nl> + extern : : google : : protobuf : : internal : : ExplicitlyConstructed < ServerReflectionRequest > ServerReflectionRequest_default_instance_ ; <nl> + <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> class ExtensionRequest : public : : google : : protobuf : : Message / * @ @ protoc_insertion_point ( class_definition : grpc . reflection . v1alpha . ExtensionRequest ) * / { <nl> class ExtensionRequest : public : : google : : protobuf : : Message / * @ @ protoc_insertio <nl> static const : : google : : protobuf : : Descriptor * descriptor ( ) ; <nl> static const ExtensionRequest & default_instance ( ) ; <nl> <nl> + static const ExtensionRequest * internal_default_instance ( ) ; <nl> + <nl> void Swap ( ExtensionRequest * other ) ; <nl> <nl> / / implements Message mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> class ExtensionRequest : public : : google : : protobuf : : Message / * @ @ protoc_insertio <nl> void Clear ( ) ; <nl> bool IsInitialized ( ) const ; <nl> <nl> - int ByteSize ( ) const ; <nl> + size_t ByteSizeLong ( ) const ; <nl> bool MergePartialFromCodedStream ( <nl> : : google : : protobuf : : io : : CodedInputStream * input ) ; <nl> void SerializeWithCachedSizes ( <nl> class ExtensionRequest : public : : google : : protobuf : : Message / * @ @ protoc_insertio <nl> void SharedDtor ( ) ; <nl> void SetCachedSize ( int size ) const ; <nl> void InternalSwap ( ExtensionRequest * other ) ; <nl> + void UnsafeMergeFrom ( const ExtensionRequest & from ) ; <nl> private : <nl> inline : : google : : protobuf : : Arena * GetArenaNoVirtual ( ) const { <nl> return _internal_metadata_ . arena ( ) ; <nl> class ExtensionRequest : public : : google : : protobuf : : Message / * @ @ protoc_insertio <nl> private : <nl> <nl> : : google : : protobuf : : internal : : InternalMetadataWithArena _internal_metadata_ ; <nl> - bool _is_default_instance_ ; <nl> : : google : : protobuf : : internal : : ArenaStringPtr containing_type_ ; <nl> : : google : : protobuf : : int32 extension_number_ ; <nl> mutable int _cached_size_ ; <nl> - friend void protobuf_AddDesc_reflection_2eproto ( ) ; <nl> + friend void protobuf_InitDefaults_reflection_2eproto_impl ( ) ; <nl> + friend void protobuf_AddDesc_reflection_2eproto_impl ( ) ; <nl> friend void protobuf_AssignDesc_reflection_2eproto ( ) ; <nl> friend void protobuf_ShutdownFile_reflection_2eproto ( ) ; <nl> <nl> void InitAsDefaultInstance ( ) ; <nl> - static ExtensionRequest * default_instance_ ; <nl> } ; <nl> + extern : : google : : protobuf : : internal : : ExplicitlyConstructed < ExtensionRequest > ExtensionRequest_default_instance_ ; <nl> + <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> class ServerReflectionResponse : public : : google : : protobuf : : Message / * @ @ protoc_insertion_point ( class_definition : grpc . reflection . v1alpha . ServerReflectionResponse ) * / { <nl> class ServerReflectionResponse : public : : google : : protobuf : : Message / * @ @ protoc_ <nl> MESSAGE_RESPONSE_NOT_SET = 0 , <nl> } ; <nl> <nl> + static const ServerReflectionResponse * internal_default_instance ( ) ; <nl> + <nl> void Swap ( ServerReflectionResponse * other ) ; <nl> <nl> / / implements Message mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> class ServerReflectionResponse : public : : google : : protobuf : : Message / * @ @ protoc_ <nl> void Clear ( ) ; <nl> bool IsInitialized ( ) const ; <nl> <nl> - int ByteSize ( ) const ; <nl> + size_t ByteSizeLong ( ) const ; <nl> bool MergePartialFromCodedStream ( <nl> : : google : : protobuf : : io : : CodedInputStream * input ) ; <nl> void SerializeWithCachedSizes ( <nl> class ServerReflectionResponse : public : : google : : protobuf : : Message / * @ @ protoc_ <nl> void SharedDtor ( ) ; <nl> void SetCachedSize ( int size ) const ; <nl> void InternalSwap ( ServerReflectionResponse * other ) ; <nl> + void UnsafeMergeFrom ( const ServerReflectionResponse & from ) ; <nl> private : <nl> inline : : google : : protobuf : : Arena * GetArenaNoVirtual ( ) const { <nl> return _internal_metadata_ . arena ( ) ; <nl> class ServerReflectionResponse : public : : google : : protobuf : : Message / * @ @ protoc_ <nl> inline void clear_has_message_response ( ) ; <nl> <nl> : : google : : protobuf : : internal : : InternalMetadataWithArena _internal_metadata_ ; <nl> - bool _is_default_instance_ ; <nl> : : google : : protobuf : : internal : : ArenaStringPtr valid_host_ ; <nl> : : grpc : : reflection : : v1alpha : : ServerReflectionRequest * original_request_ ; <nl> union MessageResponseUnion { <nl> class ServerReflectionResponse : public : : google : : protobuf : : Message / * @ @ protoc_ <nl> mutable int _cached_size_ ; <nl> : : google : : protobuf : : uint32 _oneof_case_ [ 1 ] ; <nl> <nl> - friend void protobuf_AddDesc_reflection_2eproto ( ) ; <nl> + friend void protobuf_InitDefaults_reflection_2eproto_impl ( ) ; <nl> + friend void protobuf_AddDesc_reflection_2eproto_impl ( ) ; <nl> friend void protobuf_AssignDesc_reflection_2eproto ( ) ; <nl> friend void protobuf_ShutdownFile_reflection_2eproto ( ) ; <nl> <nl> void InitAsDefaultInstance ( ) ; <nl> - static ServerReflectionResponse * default_instance_ ; <nl> } ; <nl> + extern : : google : : protobuf : : internal : : ExplicitlyConstructed < ServerReflectionResponse > ServerReflectionResponse_default_instance_ ; <nl> + <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> class FileDescriptorResponse : public : : google : : protobuf : : Message / * @ @ protoc_insertion_point ( class_definition : grpc . reflection . v1alpha . FileDescriptorResponse ) * / { <nl> class FileDescriptorResponse : public : : google : : protobuf : : Message / * @ @ protoc_in <nl> static const : : google : : protobuf : : Descriptor * descriptor ( ) ; <nl> static const FileDescriptorResponse & default_instance ( ) ; <nl> <nl> + static const FileDescriptorResponse * internal_default_instance ( ) ; <nl> + <nl> void Swap ( FileDescriptorResponse * other ) ; <nl> <nl> / / implements Message mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> class FileDescriptorResponse : public : : google : : protobuf : : Message / * @ @ protoc_in <nl> void Clear ( ) ; <nl> bool IsInitialized ( ) const ; <nl> <nl> - int ByteSize ( ) const ; <nl> + size_t ByteSizeLong ( ) const ; <nl> bool MergePartialFromCodedStream ( <nl> : : google : : protobuf : : io : : CodedInputStream * input ) ; <nl> void SerializeWithCachedSizes ( <nl> class FileDescriptorResponse : public : : google : : protobuf : : Message / * @ @ protoc_in <nl> void SharedDtor ( ) ; <nl> void SetCachedSize ( int size ) const ; <nl> void InternalSwap ( FileDescriptorResponse * other ) ; <nl> + void UnsafeMergeFrom ( const FileDescriptorResponse & from ) ; <nl> private : <nl> inline : : google : : protobuf : : Arena * GetArenaNoVirtual ( ) const { <nl> return _internal_metadata_ . arena ( ) ; <nl> class FileDescriptorResponse : public : : google : : protobuf : : Message / * @ @ protoc_in <nl> private : <nl> <nl> : : google : : protobuf : : internal : : InternalMetadataWithArena _internal_metadata_ ; <nl> - bool _is_default_instance_ ; <nl> : : google : : protobuf : : RepeatedPtrField < : : std : : string > file_descriptor_proto_ ; <nl> mutable int _cached_size_ ; <nl> - friend void protobuf_AddDesc_reflection_2eproto ( ) ; <nl> + friend void protobuf_InitDefaults_reflection_2eproto_impl ( ) ; <nl> + friend void protobuf_AddDesc_reflection_2eproto_impl ( ) ; <nl> friend void protobuf_AssignDesc_reflection_2eproto ( ) ; <nl> friend void protobuf_ShutdownFile_reflection_2eproto ( ) ; <nl> <nl> void InitAsDefaultInstance ( ) ; <nl> - static FileDescriptorResponse * default_instance_ ; <nl> } ; <nl> + extern : : google : : protobuf : : internal : : ExplicitlyConstructed < FileDescriptorResponse > FileDescriptorResponse_default_instance_ ; <nl> + <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> class ExtensionNumberResponse : public : : google : : protobuf : : Message / * @ @ protoc_insertion_point ( class_definition : grpc . reflection . v1alpha . ExtensionNumberResponse ) * / { <nl> class ExtensionNumberResponse : public : : google : : protobuf : : Message / * @ @ protoc_i <nl> static const : : google : : protobuf : : Descriptor * descriptor ( ) ; <nl> static const ExtensionNumberResponse & default_instance ( ) ; <nl> <nl> + static const ExtensionNumberResponse * internal_default_instance ( ) ; <nl> + <nl> void Swap ( ExtensionNumberResponse * other ) ; <nl> <nl> / / implements Message mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> class ExtensionNumberResponse : public : : google : : protobuf : : Message / * @ @ protoc_i <nl> void Clear ( ) ; <nl> bool IsInitialized ( ) const ; <nl> <nl> - int ByteSize ( ) const ; <nl> + size_t ByteSizeLong ( ) const ; <nl> bool MergePartialFromCodedStream ( <nl> : : google : : protobuf : : io : : CodedInputStream * input ) ; <nl> void SerializeWithCachedSizes ( <nl> class ExtensionNumberResponse : public : : google : : protobuf : : Message / * @ @ protoc_i <nl> void SharedDtor ( ) ; <nl> void SetCachedSize ( int size ) const ; <nl> void InternalSwap ( ExtensionNumberResponse * other ) ; <nl> + void UnsafeMergeFrom ( const ExtensionNumberResponse & from ) ; <nl> private : <nl> inline : : google : : protobuf : : Arena * GetArenaNoVirtual ( ) const { <nl> return _internal_metadata_ . arena ( ) ; <nl> class ExtensionNumberResponse : public : : google : : protobuf : : Message / * @ @ protoc_i <nl> private : <nl> <nl> : : google : : protobuf : : internal : : InternalMetadataWithArena _internal_metadata_ ; <nl> - bool _is_default_instance_ ; <nl> - : : google : : protobuf : : internal : : ArenaStringPtr base_type_name_ ; <nl> : : google : : protobuf : : RepeatedField < : : google : : protobuf : : int32 > extension_number_ ; <nl> mutable int _extension_number_cached_byte_size_ ; <nl> + : : google : : protobuf : : internal : : ArenaStringPtr base_type_name_ ; <nl> mutable int _cached_size_ ; <nl> - friend void protobuf_AddDesc_reflection_2eproto ( ) ; <nl> + friend void protobuf_InitDefaults_reflection_2eproto_impl ( ) ; <nl> + friend void protobuf_AddDesc_reflection_2eproto_impl ( ) ; <nl> friend void protobuf_AssignDesc_reflection_2eproto ( ) ; <nl> friend void protobuf_ShutdownFile_reflection_2eproto ( ) ; <nl> <nl> void InitAsDefaultInstance ( ) ; <nl> - static ExtensionNumberResponse * default_instance_ ; <nl> } ; <nl> + extern : : google : : protobuf : : internal : : ExplicitlyConstructed < ExtensionNumberResponse > ExtensionNumberResponse_default_instance_ ; <nl> + <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> class ListServiceResponse : public : : google : : protobuf : : Message / * @ @ protoc_insertion_point ( class_definition : grpc . reflection . v1alpha . ListServiceResponse ) * / { <nl> class ListServiceResponse : public : : google : : protobuf : : Message / * @ @ protoc_inser <nl> static const : : google : : protobuf : : Descriptor * descriptor ( ) ; <nl> static const ListServiceResponse & default_instance ( ) ; <nl> <nl> + static const ListServiceResponse * internal_default_instance ( ) ; <nl> + <nl> void Swap ( ListServiceResponse * other ) ; <nl> <nl> / / implements Message mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> class ListServiceResponse : public : : google : : protobuf : : Message / * @ @ protoc_inser <nl> void Clear ( ) ; <nl> bool IsInitialized ( ) const ; <nl> <nl> - int ByteSize ( ) const ; <nl> + size_t ByteSizeLong ( ) const ; <nl> bool MergePartialFromCodedStream ( <nl> : : google : : protobuf : : io : : CodedInputStream * input ) ; <nl> void SerializeWithCachedSizes ( <nl> class ListServiceResponse : public : : google : : protobuf : : Message / * @ @ protoc_inser <nl> void SharedDtor ( ) ; <nl> void SetCachedSize ( int size ) const ; <nl> void InternalSwap ( ListServiceResponse * other ) ; <nl> + void UnsafeMergeFrom ( const ListServiceResponse & from ) ; <nl> private : <nl> inline : : google : : protobuf : : Arena * GetArenaNoVirtual ( ) const { <nl> return _internal_metadata_ . arena ( ) ; <nl> class ListServiceResponse : public : : google : : protobuf : : Message / * @ @ protoc_inser <nl> private : <nl> <nl> : : google : : protobuf : : internal : : InternalMetadataWithArena _internal_metadata_ ; <nl> - bool _is_default_instance_ ; <nl> : : google : : protobuf : : RepeatedPtrField < : : grpc : : reflection : : v1alpha : : ServiceResponse > service_ ; <nl> mutable int _cached_size_ ; <nl> - friend void protobuf_AddDesc_reflection_2eproto ( ) ; <nl> + friend void protobuf_InitDefaults_reflection_2eproto_impl ( ) ; <nl> + friend void protobuf_AddDesc_reflection_2eproto_impl ( ) ; <nl> friend void protobuf_AssignDesc_reflection_2eproto ( ) ; <nl> friend void protobuf_ShutdownFile_reflection_2eproto ( ) ; <nl> <nl> void InitAsDefaultInstance ( ) ; <nl> - static ListServiceResponse * default_instance_ ; <nl> } ; <nl> + extern : : google : : protobuf : : internal : : ExplicitlyConstructed < ListServiceResponse > ListServiceResponse_default_instance_ ; <nl> + <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> class ServiceResponse : public : : google : : protobuf : : Message / * @ @ protoc_insertion_point ( class_definition : grpc . reflection . v1alpha . ServiceResponse ) * / { <nl> class ServiceResponse : public : : google : : protobuf : : Message / * @ @ protoc_insertion <nl> static const : : google : : protobuf : : Descriptor * descriptor ( ) ; <nl> static const ServiceResponse & default_instance ( ) ; <nl> <nl> + static const ServiceResponse * internal_default_instance ( ) ; <nl> + <nl> void Swap ( ServiceResponse * other ) ; <nl> <nl> / / implements Message mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> class ServiceResponse : public : : google : : protobuf : : Message / * @ @ protoc_insertion <nl> void Clear ( ) ; <nl> bool IsInitialized ( ) const ; <nl> <nl> - int ByteSize ( ) const ; <nl> + size_t ByteSizeLong ( ) const ; <nl> bool MergePartialFromCodedStream ( <nl> : : google : : protobuf : : io : : CodedInputStream * input ) ; <nl> void SerializeWithCachedSizes ( <nl> class ServiceResponse : public : : google : : protobuf : : Message / * @ @ protoc_insertion <nl> void SharedDtor ( ) ; <nl> void SetCachedSize ( int size ) const ; <nl> void InternalSwap ( ServiceResponse * other ) ; <nl> + void UnsafeMergeFrom ( const ServiceResponse & from ) ; <nl> private : <nl> inline : : google : : protobuf : : Arena * GetArenaNoVirtual ( ) const { <nl> return _internal_metadata_ . arena ( ) ; <nl> class ServiceResponse : public : : google : : protobuf : : Message / * @ @ protoc_insertion <nl> private : <nl> <nl> : : google : : protobuf : : internal : : InternalMetadataWithArena _internal_metadata_ ; <nl> - bool _is_default_instance_ ; <nl> : : google : : protobuf : : internal : : ArenaStringPtr name_ ; <nl> mutable int _cached_size_ ; <nl> - friend void protobuf_AddDesc_reflection_2eproto ( ) ; <nl> + friend void protobuf_InitDefaults_reflection_2eproto_impl ( ) ; <nl> + friend void protobuf_AddDesc_reflection_2eproto_impl ( ) ; <nl> friend void protobuf_AssignDesc_reflection_2eproto ( ) ; <nl> friend void protobuf_ShutdownFile_reflection_2eproto ( ) ; <nl> <nl> void InitAsDefaultInstance ( ) ; <nl> - static ServiceResponse * default_instance_ ; <nl> } ; <nl> + extern : : google : : protobuf : : internal : : ExplicitlyConstructed < ServiceResponse > ServiceResponse_default_instance_ ; <nl> + <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> class ErrorResponse : public : : google : : protobuf : : Message / * @ @ protoc_insertion_point ( class_definition : grpc . reflection . v1alpha . ErrorResponse ) * / { <nl> class ErrorResponse : public : : google : : protobuf : : Message / * @ @ protoc_insertion_p <nl> static const : : google : : protobuf : : Descriptor * descriptor ( ) ; <nl> static const ErrorResponse & default_instance ( ) ; <nl> <nl> + static const ErrorResponse * internal_default_instance ( ) ; <nl> + <nl> void Swap ( ErrorResponse * other ) ; <nl> <nl> / / implements Message mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> class ErrorResponse : public : : google : : protobuf : : Message / * @ @ protoc_insertion_p <nl> void Clear ( ) ; <nl> bool IsInitialized ( ) const ; <nl> <nl> - int ByteSize ( ) const ; <nl> + size_t ByteSizeLong ( ) const ; <nl> bool MergePartialFromCodedStream ( <nl> : : google : : protobuf : : io : : CodedInputStream * input ) ; <nl> void SerializeWithCachedSizes ( <nl> class ErrorResponse : public : : google : : protobuf : : Message / * @ @ protoc_insertion_p <nl> void SharedDtor ( ) ; <nl> void SetCachedSize ( int size ) const ; <nl> void InternalSwap ( ErrorResponse * other ) ; <nl> + void UnsafeMergeFrom ( const ErrorResponse & from ) ; <nl> private : <nl> inline : : google : : protobuf : : Arena * GetArenaNoVirtual ( ) const { <nl> return _internal_metadata_ . arena ( ) ; <nl> class ErrorResponse : public : : google : : protobuf : : Message / * @ @ protoc_insertion_p <nl> private : <nl> <nl> : : google : : protobuf : : internal : : InternalMetadataWithArena _internal_metadata_ ; <nl> - bool _is_default_instance_ ; <nl> : : google : : protobuf : : internal : : ArenaStringPtr error_message_ ; <nl> : : google : : protobuf : : int32 error_code_ ; <nl> mutable int _cached_size_ ; <nl> - friend void protobuf_AddDesc_reflection_2eproto ( ) ; <nl> + friend void protobuf_InitDefaults_reflection_2eproto_impl ( ) ; <nl> + friend void protobuf_AddDesc_reflection_2eproto_impl ( ) ; <nl> friend void protobuf_AssignDesc_reflection_2eproto ( ) ; <nl> friend void protobuf_ShutdownFile_reflection_2eproto ( ) ; <nl> <nl> void InitAsDefaultInstance ( ) ; <nl> - static ErrorResponse * default_instance_ ; <nl> } ; <nl> + extern : : google : : protobuf : : internal : : ExplicitlyConstructed < ErrorResponse > ErrorResponse_default_instance_ ; <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> <nl> <nl> inline void ServerReflectionRequest : : clear_has_message_request ( ) { <nl> inline ServerReflectionRequest : : MessageRequestCase ServerReflectionRequest : : message_request_case ( ) const { <nl> return ServerReflectionRequest : : MessageRequestCase ( _oneof_case_ [ 0 ] ) ; <nl> } <nl> + inline const ServerReflectionRequest * ServerReflectionRequest : : internal_default_instance ( ) { <nl> + return & ServerReflectionRequest_default_instance_ . get ( ) ; <nl> + } <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> / / ExtensionRequest <nl> inline void ExtensionRequest : : set_extension_number ( : : google : : protobuf : : int32 val <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ExtensionRequest . extension_number ) <nl> } <nl> <nl> + inline const ExtensionRequest * ExtensionRequest : : internal_default_instance ( ) { <nl> + return & ExtensionRequest_default_instance_ . get ( ) ; <nl> + } <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> / / ServerReflectionResponse <nl> inline void ServerReflectionResponse : : set_allocated_valid_host ( : : std : : string * va <nl> <nl> / / optional . grpc . reflection . v1alpha . ServerReflectionRequest original_request = 2 ; <nl> inline bool ServerReflectionResponse : : has_original_request ( ) const { <nl> - return ! _is_default_instance_ & & original_request_ ! = NULL ; <nl> + return this ! = internal_default_instance ( ) & & original_request_ ! = NULL ; <nl> } <nl> inline void ServerReflectionResponse : : clear_original_request ( ) { <nl> if ( GetArenaNoVirtual ( ) = = NULL & & original_request_ ! = NULL ) delete original_request_ ; <nl> inline void ServerReflectionResponse : : clear_original_request ( ) { <nl> } <nl> inline const : : grpc : : reflection : : v1alpha : : ServerReflectionRequest & ServerReflectionResponse : : original_request ( ) const { <nl> / / @ @ protoc_insertion_point ( field_get : grpc . reflection . v1alpha . ServerReflectionResponse . original_request ) <nl> - return original_request_ ! = NULL ? * original_request_ : * default_instance_ - > original_request_ ; <nl> + return original_request_ ! = NULL ? * original_request_ <nl> + : * : : grpc : : reflection : : v1alpha : : ServerReflectionRequest : : internal_default_instance ( ) ; <nl> } <nl> inline : : grpc : : reflection : : v1alpha : : ServerReflectionRequest * ServerReflectionResponse : : mutable_original_request ( ) { <nl> <nl> inline void ServerReflectionResponse : : clear_has_message_response ( ) { <nl> inline ServerReflectionResponse : : MessageResponseCase ServerReflectionResponse : : message_response_case ( ) const { <nl> return ServerReflectionResponse : : MessageResponseCase ( _oneof_case_ [ 0 ] ) ; <nl> } <nl> + inline const ServerReflectionResponse * ServerReflectionResponse : : internal_default_instance ( ) { <nl> + return & ServerReflectionResponse_default_instance_ . get ( ) ; <nl> + } <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> / / FileDescriptorResponse <nl> FileDescriptorResponse : : mutable_file_descriptor_proto ( ) { <nl> return & file_descriptor_proto_ ; <nl> } <nl> <nl> + inline const FileDescriptorResponse * FileDescriptorResponse : : internal_default_instance ( ) { <nl> + return & FileDescriptorResponse_default_instance_ . get ( ) ; <nl> + } <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> / / ExtensionNumberResponse <nl> ExtensionNumberResponse : : mutable_extension_number ( ) { <nl> return & extension_number_ ; <nl> } <nl> <nl> + inline const ExtensionNumberResponse * ExtensionNumberResponse : : internal_default_instance ( ) { <nl> + return & ExtensionNumberResponse_default_instance_ . get ( ) ; <nl> + } <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> / / ListServiceResponse <nl> ListServiceResponse : : service ( ) const { <nl> return service_ ; <nl> } <nl> <nl> + inline const ListServiceResponse * ListServiceResponse : : internal_default_instance ( ) { <nl> + return & ListServiceResponse_default_instance_ . get ( ) ; <nl> + } <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> / / ServiceResponse <nl> inline void ServiceResponse : : set_allocated_name ( : : std : : string * name ) { <nl> / / @ @ protoc_insertion_point ( field_set_allocated : grpc . reflection . v1alpha . ServiceResponse . name ) <nl> } <nl> <nl> + inline const ServiceResponse * ServiceResponse : : internal_default_instance ( ) { <nl> + return & ServiceResponse_default_instance_ . get ( ) ; <nl> + } <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> / / ErrorResponse <nl> inline void ErrorResponse : : set_allocated_error_message ( : : std : : string * error_mess <nl> / / @ @ protoc_insertion_point ( field_set_allocated : grpc . reflection . v1alpha . ErrorResponse . error_message ) <nl> } <nl> <nl> + inline const ErrorResponse * ErrorResponse : : internal_default_instance ( ) { <nl> + return & ErrorResponse_default_instance_ . get ( ) ; <nl> + } <nl> # endif / / ! PROTOBUF_INLINE_NOT_IN_HEADERS <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> new file mode 100644 <nl> index 00000000000 . . 5dac02cec43 <nl> mmm / dev / null <nl> ppp b / src / compiler / php_generator . cc <nl> <nl> + / * <nl> + * <nl> + * Copyright 2016 , Google Inc . <nl> + * All rights reserved . <nl> + * <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 disclaimer <nl> + * in the documentation and / or other materials provided with the <nl> + * distribution . <nl> + * * Neither the name of Google Inc . nor the names of its <nl> + * contributors may be used to endorse or promote products derived from <nl> + * 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> + * / <nl> + <nl> + # include < map > <nl> + <nl> + # include " src / compiler / config . h " <nl> + # include " src / compiler / generator_helpers . h " <nl> + # include " src / compiler / php_generator_helpers . h " <nl> + <nl> + using grpc : : protobuf : : FileDescriptor ; <nl> + using grpc : : protobuf : : ServiceDescriptor ; <nl> + using grpc : : protobuf : : MethodDescriptor ; <nl> + using grpc : : protobuf : : Descriptor ; <nl> + using grpc : : protobuf : : io : : Printer ; <nl> + using grpc : : protobuf : : io : : StringOutputStream ; <nl> + using std : : map ; <nl> + <nl> + namespace grpc_php_generator { <nl> + namespace { <nl> + <nl> + grpc : : string MessageIdentifierName ( const grpc : : string & name ) { <nl> + std : : vector < grpc : : string > tokens = grpc_generator : : tokenize ( name , " . " ) ; <nl> + std : : ostringstream oss ; <nl> + for ( unsigned int i = 0 ; i < tokens . size ( ) ; i + + ) { <nl> + oss < < ( i = = 0 ? " " : " \ \ " ) <nl> + < < grpc_generator : : CapitalizeFirstLetter ( tokens [ i ] ) ; <nl> + } <nl> + return oss . str ( ) ; <nl> + } <nl> + <nl> + void PrintMethod ( const MethodDescriptor * method , Printer * out ) { <nl> + const Descriptor * input_type = method - > input_type ( ) ; <nl> + const Descriptor * output_type = method - > output_type ( ) ; <nl> + map < grpc : : string , grpc : : string > vars ; <nl> + vars [ " service_name " ] = method - > service ( ) - > full_name ( ) ; <nl> + vars [ " name " ] = method - > name ( ) ; <nl> + vars [ " input_type_id " ] = MessageIdentifierName ( input_type - > full_name ( ) ) ; <nl> + vars [ " output_type_id " ] = MessageIdentifierName ( output_type - > full_name ( ) ) ; <nl> + <nl> + out - > Print ( " / * * \ n " ) ; <nl> + out - > Print ( GetPHPComments ( method , " * " ) . c_str ( ) ) ; <nl> + if ( method - > client_streaming ( ) ) { <nl> + out - > Print ( vars , <nl> + " * @ param array $ $ metadata metadata \ n " <nl> + " * @ param array $ $ options call options \ n * / \ n " <nl> + " public function $ name $ ( $ $ metadata = [ ] , " <nl> + " $ $ options = [ ] ) { \ n " ) ; <nl> + out - > Indent ( ) ; <nl> + if ( method - > server_streaming ( ) ) { <nl> + out - > Print ( " return $ $ this - > _bidiRequest ( " ) ; <nl> + } else { <nl> + out - > Print ( " return $ $ this - > _clientStreamRequest ( " ) ; <nl> + } <nl> + out - > Print ( vars , <nl> + " ' / $ service_name $ / $ name $ ' , \ n " <nl> + " [ ' \ \ $ output_type_id $ ' , ' decode ' ] , \ n " <nl> + " $ $ metadata , $ $ options ) ; \ n " ) ; <nl> + } else { <nl> + out - > Print ( vars , <nl> + " * @ param \ \ $ input_type_id $ $ $ argument input argument \ n " <nl> + " * @ param array $ $ metadata metadata \ n " <nl> + " * @ param array $ $ options call options \ n * / \ n " <nl> + " public function $ name $ ( \ \ $ input_type_id $ $ $ argument , \ n " <nl> + " $ $ metadata = [ ] , $ $ options = [ ] ) { \ n " ) ; <nl> + out - > Indent ( ) ; <nl> + if ( method - > server_streaming ( ) ) { <nl> + out - > Print ( " return $ $ this - > _serverStreamRequest ( " ) ; <nl> + } else { <nl> + out - > Print ( " return $ $ this - > _simpleRequest ( " ) ; <nl> + } <nl> + out - > Print ( vars , <nl> + " ' / $ service_name $ / $ name $ ' , \ n " <nl> + " $ $ argument , \ n " <nl> + " [ ' \ \ $ output_type_id $ ' , ' decode ' ] , \ n " <nl> + " $ $ metadata , $ $ options ) ; \ n " ) ; <nl> + } <nl> + out - > Outdent ( ) ; <nl> + out - > Print ( " } \ n \ n " ) ; <nl> + } <nl> + <nl> + / / Prints out the service descriptor object <nl> + void PrintService ( const ServiceDescriptor * service , Printer * out ) { <nl> + map < grpc : : string , grpc : : string > vars ; <nl> + out - > Print ( GetPHPComments ( service , " / / " ) . c_str ( ) ) ; <nl> + vars [ " name " ] = service - > name ( ) ; <nl> + out - > Print ( vars , " class $ name $ Client extends \ \ Grpc \ \ BaseStub { \ n \ n " ) ; <nl> + out - > Indent ( ) ; <nl> + out - > Print ( <nl> + " / * * \ n * @ param string $ $ hostname hostname \ n " <nl> + " * @ param array $ $ opts channel options \ n " <nl> + " * @ param Grpc \ \ Channel $ $ channel ( optional ) re - use channel " <nl> + " object \ n * / \ n " <nl> + " public function __construct ( $ $ hostname , $ $ opts , " <nl> + " $ $ channel = null ) { \ n " ) ; <nl> + out - > Indent ( ) ; <nl> + out - > Print ( " parent : : __construct ( $ $ hostname , $ $ opts , $ $ channel ) ; \ n " ) ; <nl> + out - > Outdent ( ) ; <nl> + out - > Print ( " } \ n \ n " ) ; <nl> + for ( int i = 0 ; i < service - > method_count ( ) ; i + + ) { <nl> + grpc : : string method_name = <nl> + grpc_generator : : LowercaseFirstLetter ( service - > method ( i ) - > name ( ) ) ; <nl> + PrintMethod ( service - > method ( i ) , out ) ; <nl> + } <nl> + out - > Outdent ( ) ; <nl> + out - > Print ( " } \ n \ n " ) ; <nl> + } <nl> + <nl> + void PrintServices ( const FileDescriptor * file , Printer * out ) { <nl> + map < grpc : : string , grpc : : string > vars ; <nl> + vars [ " package " ] = MessageIdentifierName ( file - > package ( ) ) ; <nl> + out - > Print ( vars , " namespace $ package $ { \ n \ n " ) ; <nl> + out - > Indent ( ) ; <nl> + for ( int i = 0 ; i < file - > service_count ( ) ; i + + ) { <nl> + PrintService ( file - > service ( i ) , out ) ; <nl> + } <nl> + out - > Outdent ( ) ; <nl> + out - > Print ( " } \ n " ) ; <nl> + } <nl> + } <nl> + <nl> + grpc : : string GenerateFile ( const FileDescriptor * file ) { <nl> + grpc : : string output ; <nl> + { <nl> + StringOutputStream output_stream ( & output ) ; <nl> + Printer out ( & output_stream , ' $ ' ) ; <nl> + <nl> + if ( file - > service_count ( ) = = 0 ) { <nl> + return output ; <nl> + } <nl> + out . Print ( " < ? php \ n " ) ; <nl> + out . Print ( " / / GENERATED CODE - - DO NOT EDIT ! \ n \ n " ) ; <nl> + <nl> + grpc : : string leading_comments = GetPHPComments ( file , " / / " ) ; <nl> + if ( ! leading_comments . empty ( ) ) { <nl> + out . Print ( " / / Original file comments : \ n " ) ; <nl> + out . Print ( leading_comments . c_str ( ) ) ; <nl> + } <nl> + <nl> + PrintServices ( file , & out ) ; <nl> + } <nl> + return output ; <nl> + } <nl> + <nl> + } / / namespace grpc_php_generator <nl> new file mode 100644 <nl> index 00000000000 . . 905dc909a9a <nl> mmm / dev / null <nl> ppp b / src / compiler / php_generator . h <nl> <nl> + / * <nl> + * <nl> + * Copyright 2016 , Google Inc . <nl> + * All rights reserved . <nl> + * <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 disclaimer <nl> + * in the documentation and / or other materials provided with the <nl> + * distribution . <nl> + * * Neither the name of Google Inc . nor the names of its <nl> + * contributors may be used to endorse or promote products derived from <nl> + * 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> + * / <nl> + <nl> + # ifndef GRPC_INTERNAL_COMPILER_PHP_GENERATOR_H <nl> + # define GRPC_INTERNAL_COMPILER_PHP_GENERATOR_H <nl> + <nl> + # include " src / compiler / config . h " <nl> + <nl> + namespace grpc_php_generator { <nl> + <nl> + grpc : : string GenerateFile ( const grpc : : protobuf : : FileDescriptor * file ) ; <nl> + <nl> + } / / namespace grpc_php_generator <nl> + <nl> + # endif / / GRPC_INTERNAL_COMPILER_PHP_GENERATOR_H <nl> new file mode 100644 <nl> index 00000000000 . . 61c4d21fffa <nl> mmm / dev / null <nl> ppp b / src / compiler / php_generator_helpers . h <nl> <nl> + / * <nl> + * <nl> + * Copyright 2016 , Google Inc . <nl> + * All rights reserved . <nl> + * <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 disclaimer <nl> + * in the documentation and / or other materials provided with the <nl> + * distribution . <nl> + * * Neither the name of Google Inc . nor the names of its <nl> + * contributors may be used to endorse or promote products derived from <nl> + * 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> + * / <nl> + <nl> + # ifndef GRPC_INTERNAL_COMPILER_PHP_GENERATOR_HELPERS_H <nl> + # define GRPC_INTERNAL_COMPILER_PHP_GENERATOR_HELPERS_H <nl> + <nl> + # include < algorithm > <nl> + <nl> + # include " src / compiler / config . h " <nl> + # include " src / compiler / generator_helpers . h " <nl> + <nl> + namespace grpc_php_generator { <nl> + <nl> + inline grpc : : string GetPHPServiceFilename ( const grpc : : string & filename ) { <nl> + return grpc_generator : : StripProto ( filename ) + " _grpc_pb . php " ; <nl> + } <nl> + <nl> + / / Get leading or trailing comments in a string . Comment lines start with " / / " . <nl> + / / Leading detached comments are put in in front of leading comments . <nl> + template < typename DescriptorType > <nl> + inline grpc : : string GetPHPComments ( const DescriptorType * desc , <nl> + grpc : : string prefix ) { <nl> + return grpc_generator : : GetPrefixedComments ( desc , true , prefix ) ; <nl> + } <nl> + <nl> + } / / namespace grpc_php_generator <nl> + <nl> + # endif / / GRPC_INTERNAL_COMPILER_PHP_GENERATOR_HELPERS_H <nl> new file mode 100644 <nl> index 00000000000 . . 88acad6524f <nl> mmm / dev / null <nl> ppp b / src / compiler / php_plugin . cc <nl> <nl> + / * <nl> + * <nl> + * Copyright 2016 , Google Inc . <nl> + * All rights reserved . <nl> + * <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 disclaimer <nl> + * in the documentation and / or other materials provided with the <nl> + * distribution . <nl> + * * Neither the name of Google Inc . nor the names of its <nl> + * contributors may be used to endorse or promote products derived from <nl> + * 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> + * / <nl> + <nl> + / / Generates PHP gRPC service interface out of Protobuf IDL . <nl> + <nl> + # include < memory > <nl> + <nl> + # include " src / compiler / config . h " <nl> + # include " src / compiler / php_generator . h " <nl> + # include " src / compiler / php_generator_helpers . h " <nl> + <nl> + using grpc_php_generator : : GenerateFile ; <nl> + using grpc_php_generator : : GetPHPServiceFilename ; <nl> + <nl> + class PHPGrpcGenerator : public grpc : : protobuf : : compiler : : CodeGenerator { <nl> + public : <nl> + PHPGrpcGenerator ( ) { } <nl> + ~ PHPGrpcGenerator ( ) { } <nl> + <nl> + bool Generate ( const grpc : : protobuf : : FileDescriptor * file , <nl> + const grpc : : string & parameter , <nl> + grpc : : protobuf : : compiler : : GeneratorContext * context , <nl> + grpc : : string * error ) const { <nl> + grpc : : string code = GenerateFile ( file ) ; <nl> + if ( code . size ( ) = = 0 ) { <nl> + return true ; <nl> + } <nl> + <nl> + / / Get output file name <nl> + grpc : : string file_name = GetPHPServiceFilename ( file - > name ( ) ) ; <nl> + <nl> + std : : unique_ptr < grpc : : protobuf : : io : : ZeroCopyOutputStream > output ( <nl> + context - > Open ( file_name ) ) ; <nl> + grpc : : protobuf : : io : : CodedOutputStream coded_out ( output . get ( ) ) ; <nl> + coded_out . WriteRaw ( code . data ( ) , code . size ( ) ) ; <nl> + return true ; <nl> + } <nl> + } ; <nl> + <nl> + int main ( int argc , char * argv [ ] ) { <nl> + PHPGrpcGenerator generator ; <nl> + return grpc : : protobuf : : compiler : : PluginMain ( argc , argv , & generator ) ; <nl> + } <nl> mmm a / src / core / ext / client_config / client_channel . c <nl> ppp b / src / core / ext / client_config / client_channel . c <nl> static void on_resolver_result_changed ( grpc_exec_ctx * exec_ctx , void * arg , <nl> lb_policy_args . additional_args = <nl> grpc_resolver_result_get_lb_policy_args ( chand - > resolver_result ) ; <nl> lb_policy_args . client_channel_factory = chand - > client_channel_factory ; <nl> - lb_policy = grpc_lb_policy_create ( <nl> - exec_ctx , <nl> - grpc_resolver_result_get_lb_policy_name ( chand - > resolver_result ) , <nl> - & lb_policy_args ) ; <nl> + <nl> + / / Special case : If all of the addresses are balancer addresses , <nl> + / / assume that we should use the grpclb policy , regardless of what the <nl> + / / resolver actually specified . <nl> + const char * lb_policy_name = <nl> + grpc_resolver_result_get_lb_policy_name ( chand - > resolver_result ) ; <nl> + bool found_backend_address = false ; <nl> + for ( size_t i = 0 ; i < lb_policy_args . addresses - > num_addresses ; + + i ) { <nl> + if ( ! lb_policy_args . addresses - > addresses [ i ] . is_balancer ) { <nl> + found_backend_address = true ; <nl> + break ; <nl> + } <nl> + } <nl> + if ( ! found_backend_address ) { <nl> + if ( lb_policy_name ! = NULL & & strcmp ( lb_policy_name , " grpclb " ) ! = 0 ) { <nl> + gpr_log ( GPR_INFO , <nl> + " resolver requested LB policy % s but provided only balancer " <nl> + " addresses , no backend addresses - - forcing use of grpclb LB " <nl> + " policy " , <nl> + ( lb_policy_name = = NULL ? " ( none ) " : lb_policy_name ) ) ; <nl> + } <nl> + lb_policy_name = " grpclb " ; <nl> + } <nl> + / / Use pick_first if nothing was specified and we didn ' t select grpclb <nl> + / / above . <nl> + if ( lb_policy_name = = NULL ) lb_policy_name = " pick_first " ; <nl> + <nl> + lb_policy = <nl> + grpc_lb_policy_create ( exec_ctx , lb_policy_name , & lb_policy_args ) ; <nl> if ( lb_policy ! = NULL ) { <nl> GRPC_LB_POLICY_REF ( lb_policy , " config_change " ) ; <nl> GRPC_ERROR_UNREF ( state_error ) ; <nl> static bool pick_subchannel ( grpc_exec_ctx * exec_ctx , grpc_call_element * elem , <nl> int r ; <nl> GRPC_LB_POLICY_REF ( lb_policy , " pick_subchannel " ) ; <nl> gpr_mu_unlock ( & chand - > mu ) ; <nl> - const grpc_lb_policy_pick_args inputs = { calld - > pollent , initial_metadata , <nl> - initial_metadata_flags , <nl> - & calld - > lb_token_mdelem } ; <nl> + / / TODO ( dgq ) : make this deadline configurable somehow . <nl> + const grpc_lb_policy_pick_args inputs = { <nl> + calld - > pollent , initial_metadata , initial_metadata_flags , <nl> + & calld - > lb_token_mdelem , gpr_inf_future ( GPR_CLOCK_MONOTONIC ) } ; <nl> r = grpc_lb_policy_pick ( exec_ctx , lb_policy , & inputs , connected_subchannel , <nl> NULL , on_ready ) ; <nl> GRPC_LB_POLICY_UNREF ( exec_ctx , lb_policy , " pick_subchannel " ) ; <nl> mmm a / src / core / ext / client_config / lb_policy . h <nl> ppp b / src / core / ext / client_config / lb_policy . h <nl> typedef struct grpc_lb_policy_pick_args { <nl> grpc_polling_entity * pollent ; <nl> / * * Initial metadata associated with the picking call . * / <nl> grpc_metadata_batch * initial_metadata ; <nl> - / * * See \ a GRPC_INITIAL_METADATA_ * in grpc_types . h * / <nl> + / * * Bitmask used for selective cancelling . See \ a <nl> + * grpc_lb_policy_cancel_picks ( ) and \ a GRPC_INITIAL_METADATA_ * in <nl> + * grpc_types . h * / <nl> uint32_t initial_metadata_flags ; <nl> / * * Storage for LB token in \ a initial_metadata , or NULL if not used * / <nl> grpc_linked_mdelem * lb_token_mdelem_storage ; <nl> + / * * Deadline for the call to the LB server * / <nl> + gpr_timespec deadline ; <nl> } grpc_lb_policy_pick_args ; <nl> <nl> struct grpc_lb_policy_vtable { <nl> mmm a / src / core / ext / lb_policy / grpclb / grpclb . c <nl> ppp b / src / core / ext / lb_policy / grpclb / grpclb . c <nl> <nl> # include < grpc / support / alloc . h > <nl> # include < grpc / support / host_port . h > <nl> # include < grpc / support / string_util . h > <nl> + # include < grpc / support / time . h > <nl> <nl> # include " src / core / ext / client_config / client_channel_factory . h " <nl> # include " src / core / ext / client_config / lb_policy_factory . h " <nl> static void wrapped_rr_closure ( grpc_exec_ctx * exec_ctx , void * arg , <nl> typedef struct pending_pick { <nl> struct pending_pick * next ; <nl> <nl> - / * polling entity for the pick ( ) ' s async notification * / <nl> - grpc_polling_entity * pollent ; <nl> - <nl> - / * the initial metadata for the pick . See grpc_lb_policy_pick ( ) * / <nl> - grpc_metadata_batch * initial_metadata ; <nl> - <nl> - / * storage for the lb token initial metadata mdelem * / <nl> - grpc_linked_mdelem * lb_token_mdelem_storage ; <nl> - <nl> - / * bitmask passed to pick ( ) and used for selective cancelling . See <nl> - * grpc_lb_policy_cancel_picks ( ) * / <nl> - uint32_t initial_metadata_flags ; <nl> + / * original pick ( ) ' s arguments * / <nl> + grpc_lb_policy_pick_args pick_args ; <nl> <nl> / * output argument where to store the pick ( ) ed connected subchannel , or NULL <nl> * upon error . * / <nl> static void add_pending_pick ( pending_pick * * root , <nl> memset ( pp , 0 , sizeof ( pending_pick ) ) ; <nl> memset ( & pp - > wrapped_on_complete_arg , 0 , sizeof ( wrapped_rr_closure_arg ) ) ; <nl> pp - > next = * root ; <nl> - pp - > pollent = pick_args - > pollent ; <nl> + pp - > pick_args = * pick_args ; <nl> pp - > target = target ; <nl> - pp - > initial_metadata = pick_args - > initial_metadata ; <nl> - pp - > initial_metadata_flags = pick_args - > initial_metadata_flags ; <nl> - pp - > lb_token_mdelem_storage = pick_args - > lb_token_mdelem_storage ; <nl> pp - > wrapped_on_complete_arg . wrapped_closure = on_complete ; <nl> pp - > wrapped_on_complete_arg . target = target ; <nl> pp - > wrapped_on_complete_arg . initial_metadata = pick_args - > initial_metadata ; <nl> typedef struct glb_lb_policy { <nl> / * * mutex protecting remaining members * / <nl> gpr_mu mu ; <nl> <nl> + / * * who the client is trying to communicate with * / <nl> const char * server_name ; <nl> grpc_client_channel_factory * cc_factory ; <nl> <nl> + / * * deadline for the LB ' s call * / <nl> + gpr_timespec deadline ; <nl> + <nl> / * * for communicating with the LB server * / <nl> grpc_channel * lb_channel ; <nl> <nl> static void rr_handover ( grpc_exec_ctx * exec_ctx , glb_lb_policy * glb_policy , <nl> gpr_log ( GPR_INFO , " Pending pick about to PICK from 0x % " PRIxPTR " " , <nl> ( intptr_t ) glb_policy - > rr_policy ) ; <nl> } <nl> - const grpc_lb_policy_pick_args pick_args = { <nl> - pp - > pollent , pp - > initial_metadata , pp - > initial_metadata_flags , <nl> - pp - > lb_token_mdelem_storage } ; <nl> - grpc_lb_policy_pick ( exec_ctx , glb_policy - > rr_policy , & pick_args , pp - > target , <nl> + grpc_lb_policy_pick ( exec_ctx , glb_policy - > rr_policy , & pp - > pick_args , <nl> + pp - > target , <nl> ( void * * ) & pp - > wrapped_on_complete_arg . lb_token , <nl> & pp - > wrapped_on_complete ) ; <nl> pp - > wrapped_on_complete_arg . owning_pending_node = pp ; <nl> static grpc_lb_policy * glb_create ( grpc_exec_ctx * exec_ctx , <nl> & addr_strs [ addr_index + + ] , <nl> ( const struct sockaddr * ) & args - > addresses - > addresses [ i ] <nl> . address . addr , <nl> - true ) = = 0 ) ; <nl> + true ) > 0 ) ; <nl> } <nl> } <nl> } <nl> static void glb_shutdown ( grpc_exec_ctx * exec_ctx , grpc_lb_policy * pol ) { <nl> * pp - > target = NULL ; <nl> grpc_exec_ctx_sched ( exec_ctx , & pp - > wrapped_on_complete , GRPC_ERROR_NONE , <nl> NULL ) ; <nl> - gpr_free ( pp ) ; <nl> pp = next ; <nl> } <nl> <nl> static void glb_cancel_pick ( grpc_exec_ctx * exec_ctx , grpc_lb_policy * pol , <nl> pending_pick * next = pp - > next ; <nl> if ( pp - > target = = target ) { <nl> grpc_polling_entity_del_from_pollset_set ( <nl> - exec_ctx , pp - > pollent , glb_policy - > base . interested_parties ) ; <nl> + exec_ctx , pp - > pick_args . pollent , glb_policy - > base . interested_parties ) ; <nl> * target = NULL ; <nl> grpc_exec_ctx_sched ( <nl> exec_ctx , & pp - > wrapped_on_complete , <nl> GRPC_ERROR_CREATE_REFERENCING ( " Pick Cancelled " , & error , 1 ) , NULL ) ; <nl> - gpr_free ( pp ) ; <nl> } else { <nl> pp - > next = glb_policy - > pending_picks ; <nl> glb_policy - > pending_picks = pp ; <nl> static void glb_cancel_picks ( grpc_exec_ctx * exec_ctx , grpc_lb_policy * pol , <nl> glb_policy - > pending_picks = NULL ; <nl> while ( pp ! = NULL ) { <nl> pending_pick * next = pp - > next ; <nl> - if ( ( pp - > initial_metadata_flags & initial_metadata_flags_mask ) = = <nl> + if ( ( pp - > pick_args . initial_metadata_flags & initial_metadata_flags_mask ) = = <nl> initial_metadata_flags_eq ) { <nl> grpc_polling_entity_del_from_pollset_set ( <nl> - exec_ctx , pp - > pollent , glb_policy - > base . interested_parties ) ; <nl> + exec_ctx , pp - > pick_args . pollent , glb_policy - > base . interested_parties ) ; <nl> grpc_exec_ctx_sched ( <nl> exec_ctx , & pp - > wrapped_on_complete , <nl> GRPC_ERROR_CREATE_REFERENCING ( " Pick Cancelled " , & error , 1 ) , NULL ) ; <nl> - gpr_free ( pp ) ; <nl> } else { <nl> pp - > next = glb_policy - > pending_picks ; <nl> glb_policy - > pending_picks = pp ; <nl> static int glb_pick ( grpc_exec_ctx * exec_ctx , grpc_lb_policy * pol , <nl> const grpc_lb_policy_pick_args * pick_args , <nl> grpc_connected_subchannel * * target , void * * user_data , <nl> grpc_closure * on_complete ) { <nl> - glb_lb_policy * glb_policy = ( glb_lb_policy * ) pol ; <nl> - <nl> if ( pick_args - > lb_token_mdelem_storage = = NULL ) { <nl> * target = NULL ; <nl> grpc_exec_ctx_sched ( <nl> static int glb_pick ( grpc_exec_ctx * exec_ctx , grpc_lb_policy * pol , <nl> return 1 ; <nl> } <nl> <nl> + glb_lb_policy * glb_policy = ( glb_lb_policy * ) pol ; <nl> gpr_mu_lock ( & glb_policy - > mu ) ; <nl> - int r ; <nl> + glb_policy - > deadline = pick_args - > deadline ; <nl> + bool pick_done ; <nl> <nl> if ( glb_policy - > rr_policy ! = NULL ) { <nl> if ( grpc_lb_glb_trace ) { <nl> static int glb_pick ( grpc_exec_ctx * exec_ctx , grpc_lb_policy * pol , <nl> grpc_closure_init ( & glb_policy - > wrapped_on_complete , wrapped_rr_closure , <nl> & glb_policy - > wc_arg ) ; <nl> <nl> - r = grpc_lb_policy_pick ( exec_ctx , glb_policy - > rr_policy , pick_args , target , <nl> + pick_done = <nl> + grpc_lb_policy_pick ( exec_ctx , glb_policy - > rr_policy , pick_args , target , <nl> ( void * * ) & glb_policy - > wc_arg . lb_token , <nl> & glb_policy - > wrapped_on_complete ) ; <nl> - if ( r ! = 0 ) { <nl> + if ( pick_done ) { <nl> / * synchronous grpc_lb_policy_pick call . Unref the RR policy . * / <nl> if ( grpc_lb_glb_trace ) { <nl> gpr_log ( GPR_INFO , " Unreffing RR ( 0x % " PRIxPTR " ) " , <nl> static int glb_pick ( grpc_exec_ctx * exec_ctx , grpc_lb_policy * pol , <nl> GRPC_MDELEM_REF ( glb_policy - > wc_arg . lb_token ) ) ; <nl> } <nl> } else { <nl> + / * else , the pending pick will be registered and taken care of by the <nl> + * pending pick list inside the RR policy ( glb_policy - > rr_policy ) * / <nl> grpc_polling_entity_add_to_pollset_set ( exec_ctx , pick_args - > pollent , <nl> glb_policy - > base . interested_parties ) ; <nl> add_pending_pick ( & glb_policy - > pending_picks , pick_args , target , <nl> static int glb_pick ( grpc_exec_ctx * exec_ctx , grpc_lb_policy * pol , <nl> if ( ! glb_policy - > started_picking ) { <nl> start_picking ( exec_ctx , glb_policy ) ; <nl> } <nl> - r = 0 ; <nl> + pick_done = false ; <nl> } <nl> gpr_mu_unlock ( & glb_policy - > mu ) ; <nl> - return r ; <nl> + return pick_done ; <nl> } <nl> <nl> static grpc_connectivity_state glb_check_connectivity ( <nl> static void srv_status_rcvd_cb ( grpc_exec_ctx * exec_ctx , void * arg , <nl> grpc_error * error ) ; <nl> <nl> static lb_client_data * lb_client_data_create ( glb_lb_policy * glb_policy ) { <nl> + GPR_ASSERT ( glb_policy - > server_name ! = NULL ) ; <nl> + GPR_ASSERT ( glb_policy - > server_name [ 0 ] ! = ' \ 0 ' ) ; <nl> + <nl> lb_client_data * lb_client = gpr_malloc ( sizeof ( lb_client_data ) ) ; <nl> memset ( lb_client , 0 , sizeof ( lb_client_data ) ) ; <nl> <nl> static lb_client_data * lb_client_data_create ( glb_lb_policy * glb_policy ) { <nl> grpc_closure_init ( & lb_client - > close_sent , close_sent_cb , lb_client ) ; <nl> grpc_closure_init ( & lb_client - > srv_status_rcvd , srv_status_rcvd_cb , lb_client ) ; <nl> <nl> - / * TODO ( dgq ) : get the deadline from the parent channel . * / <nl> - lb_client - > deadline = gpr_inf_future ( GPR_CLOCK_MONOTONIC ) ; <nl> + lb_client - > deadline = glb_policy - > deadline ; <nl> <nl> / * Note the following LB call progresses every time there ' s activity in \ a <nl> * glb_policy - > base . interested_parties , which is comprised of the polling <nl> static lb_client_data * lb_client_data_create ( glb_lb_policy * glb_policy ) { <nl> lb_client - > lb_call = grpc_channel_create_pollset_set_call ( <nl> glb_policy - > lb_channel , NULL , GRPC_PROPAGATE_DEFAULTS , <nl> glb_policy - > base . interested_parties , <nl> - " / grpc . lb . v1 . LoadBalancer / BalanceLoad " , NULL , lb_client - > deadline , NULL ) ; <nl> + " / grpc . lb . v1 . LoadBalancer / BalanceLoad " , glb_policy - > server_name , <nl> + lb_client - > deadline , NULL ) ; <nl> <nl> grpc_metadata_array_init ( & lb_client - > initial_metadata_recv ) ; <nl> grpc_metadata_array_init ( & lb_client - > trailing_metadata_recv ) ; <nl> <nl> - grpc_grpclb_request * request = grpc_grpclb_request_create ( <nl> - " load . balanced . service . name " ) ; / * FIXME ( dgq ) : get the name of the load <nl> - balanced service from the resolver * / <nl> + grpc_grpclb_request * request = <nl> + grpc_grpclb_request_create ( glb_policy - > server_name ) ; <nl> gpr_slice request_payload_slice = grpc_grpclb_request_encode ( request ) ; <nl> lb_client - > request_payload = <nl> grpc_raw_byte_buffer_create ( & request_payload_slice , 1 ) ; <nl> mmm a / src / core / ext / resolver / dns / native / dns_resolver . c <nl> ppp b / src / core / ext / resolver / dns / native / dns_resolver . c <nl> <nl> typedef struct { <nl> / * * base class : must be first * / <nl> grpc_resolver base ; <nl> - / * * refcount * / <nl> - gpr_refcount refs ; <nl> / * * target name * / <nl> char * target_name ; <nl> / * * name to resolve ( usually the same as target_name ) * / <nl> char * name_to_resolve ; <nl> / * * default port to use * / <nl> char * default_port ; <nl> - / * * load balancing policy name * / <nl> - char * lb_policy_name ; <nl> <nl> / * * mutex guarding the rest of the state * / <nl> gpr_mu mu ; <nl> static void dns_on_resolved ( grpc_exec_ctx * exec_ctx , void * arg , <nl> } <nl> grpc_resolved_addresses_destroy ( r - > addresses ) ; <nl> result = grpc_resolver_result_create ( r - > target_name , addresses , <nl> - r - > lb_policy_name , NULL ) ; <nl> + NULL / * lb_policy_name * / , NULL ) ; <nl> } else { <nl> gpr_timespec now = gpr_now ( GPR_CLOCK_MONOTONIC ) ; <nl> gpr_timespec next_try = gpr_backoff_step ( & r - > backoff_state , now ) ; <nl> static void dns_destroy ( grpc_exec_ctx * exec_ctx , grpc_resolver * gr ) { <nl> gpr_free ( r - > target_name ) ; <nl> gpr_free ( r - > name_to_resolve ) ; <nl> gpr_free ( r - > default_port ) ; <nl> - gpr_free ( r - > lb_policy_name ) ; <nl> gpr_free ( r ) ; <nl> } <nl> <nl> static grpc_resolver * dns_create ( grpc_resolver_args * args , <nl> - const char * default_port , <nl> - const char * lb_policy_name ) { <nl> + const char * default_port ) { <nl> if ( 0 ! = strcmp ( args - > uri - > authority , " " ) ) { <nl> gpr_log ( GPR_ERROR , " authority based dns uri ' s not supported " ) ; <nl> return NULL ; <nl> static grpc_resolver * dns_create ( grpc_resolver_args * args , <nl> / / Create resolver . <nl> dns_resolver * r = gpr_malloc ( sizeof ( dns_resolver ) ) ; <nl> memset ( r , 0 , sizeof ( * r ) ) ; <nl> - gpr_ref_init ( & r - > refs , 1 ) ; <nl> gpr_mu_init ( & r - > mu ) ; <nl> grpc_resolver_init ( & r - > base , & dns_resolver_vtable ) ; <nl> r - > target_name = gpr_strdup ( path ) ; <nl> static grpc_resolver * dns_create ( grpc_resolver_args * args , <nl> r - > default_port = gpr_strdup ( default_port ) ; <nl> gpr_backoff_init ( & r - > backoff_state , BACKOFF_MULTIPLIER , BACKOFF_JITTER , <nl> BACKOFF_MIN_SECONDS * 1000 , BACKOFF_MAX_SECONDS * 1000 ) ; <nl> - r - > lb_policy_name = gpr_strdup ( lb_policy_name ) ; <nl> return & r - > base ; <nl> } <nl> <nl> static void dns_factory_unref ( grpc_resolver_factory * factory ) { } <nl> <nl> static grpc_resolver * dns_factory_create_resolver ( <nl> grpc_resolver_factory * factory , grpc_resolver_args * args ) { <nl> - return dns_create ( args , " https " , " pick_first " ) ; <nl> + return dns_create ( args , " https " ) ; <nl> } <nl> <nl> static char * dns_factory_get_default_host_name ( grpc_resolver_factory * factory , <nl> mmm a / src / core / ext / resolver / sockaddr / sockaddr_resolver . c <nl> ppp b / src / core / ext / resolver / sockaddr / sockaddr_resolver . c <nl> <nl> typedef struct { <nl> / * * base class : must be first * / <nl> grpc_resolver base ; <nl> - / * * refcount * / <nl> - gpr_refcount refs ; <nl> - / * * load balancing policy name * / <nl> - char * lb_policy_name ; <nl> - <nl> + / * * the path component of the uri passed in * / <nl> + char * target_name ; <nl> / * * the addresses that we ' ve ' resolved ' * / <nl> grpc_lb_addresses * addresses ; <nl> - <nl> / * * mutex guarding the rest of the state * / <nl> gpr_mu mu ; <nl> / * * have we published ? * / <nl> static void sockaddr_maybe_finish_next_locked ( grpc_exec_ctx * exec_ctx , <nl> if ( r - > next_completion ! = NULL & & ! r - > published ) { <nl> r - > published = true ; <nl> * r - > target_result = grpc_resolver_result_create ( <nl> - " " , grpc_lb_addresses_copy ( r - > addresses , NULL / * user_data_copy * / ) , <nl> - r - > lb_policy_name , NULL ) ; <nl> + r - > target_name , <nl> + grpc_lb_addresses_copy ( r - > addresses , NULL / * user_data_copy * / ) , <nl> + NULL / * lb_policy_name * / , NULL ) ; <nl> grpc_exec_ctx_sched ( exec_ctx , r - > next_completion , GRPC_ERROR_NONE , NULL ) ; <nl> r - > next_completion = NULL ; <nl> } <nl> static void sockaddr_destroy ( grpc_exec_ctx * exec_ctx , grpc_resolver * gr ) { <nl> sockaddr_resolver * r = ( sockaddr_resolver * ) gr ; <nl> gpr_mu_destroy ( & r - > mu ) ; <nl> grpc_lb_addresses_destroy ( r - > addresses , NULL / * user_data_destroy * / ) ; <nl> - gpr_free ( r - > lb_policy_name ) ; <nl> + gpr_free ( r - > target_name ) ; <nl> gpr_free ( r ) ; <nl> } <nl> <nl> char * unix_get_default_authority ( grpc_resolver_factory * factory , <nl> <nl> static void do_nothing ( void * ignored ) { } <nl> <nl> - static grpc_resolver * sockaddr_create ( <nl> - grpc_resolver_args * args , const char * default_lb_policy_name , <nl> - int parse ( grpc_uri * uri , struct sockaddr_storage * dst , size_t * len ) ) { <nl> - bool errors_found = false ; <nl> - sockaddr_resolver * r ; <nl> - gpr_slice path_slice ; <nl> - gpr_slice_buffer path_parts ; <nl> - <nl> + static grpc_resolver * sockaddr_create ( grpc_resolver_args * args , <nl> + int parse ( grpc_uri * uri , <nl> + struct sockaddr_storage * dst , <nl> + size_t * len ) ) { <nl> if ( 0 ! = strcmp ( args - > uri - > authority , " " ) ) { <nl> gpr_log ( GPR_ERROR , " authority based uri ' s not supported by the % s scheme " , <nl> args - > uri - > scheme ) ; <nl> return NULL ; <nl> } <nl> - <nl> - r = gpr_malloc ( sizeof ( sockaddr_resolver ) ) ; <nl> - memset ( r , 0 , sizeof ( * r ) ) ; <nl> - <nl> - r - > lb_policy_name = <nl> - gpr_strdup ( grpc_uri_get_query_arg ( args - > uri , " lb_policy " ) ) ; <nl> - const char * lb_enabled_qpart = <nl> - grpc_uri_get_query_arg ( args - > uri , " lb_enabled " ) ; <nl> - / * anything other than " 0 " is interpreted as true * / <nl> - const bool lb_enabled = <nl> - ( lb_enabled_qpart ! = NULL & & ( strcmp ( " 0 " , lb_enabled_qpart ) ! = 0 ) ) ; <nl> - <nl> - if ( r - > lb_policy_name ! = NULL & & strcmp ( " grpclb " , r - > lb_policy_name ) = = 0 & & <nl> - ! lb_enabled ) { <nl> - / * we want grpclb but the " resolved " addresses aren ' t LB enabled . Bail <nl> - * out , as this is meant mostly for tests . * / <nl> - gpr_log ( GPR_ERROR , <nl> - " Requested ' grpclb ' LB policy but resolved addresses don ' t " <nl> - " support load balancing . " ) ; <nl> - abort ( ) ; <nl> - } <nl> - <nl> - if ( r - > lb_policy_name = = NULL ) { <nl> - r - > lb_policy_name = gpr_strdup ( default_lb_policy_name ) ; <nl> - } <nl> - <nl> - path_slice = <nl> + / * Construct addresses . * / <nl> + gpr_slice path_slice = <nl> gpr_slice_new ( args - > uri - > path , strlen ( args - > uri - > path ) , do_nothing ) ; <nl> + gpr_slice_buffer path_parts ; <nl> gpr_slice_buffer_init ( & path_parts ) ; <nl> - <nl> gpr_slice_split ( path_slice , " , " , & path_parts ) ; <nl> - r - > addresses = grpc_lb_addresses_create ( path_parts . count ) ; <nl> - for ( size_t i = 0 ; i < r - > addresses - > num_addresses ; i + + ) { <nl> + grpc_lb_addresses * addresses = grpc_lb_addresses_create ( path_parts . count ) ; <nl> + bool errors_found = false ; <nl> + for ( size_t i = 0 ; i < addresses - > num_addresses ; i + + ) { <nl> grpc_uri ith_uri = * args - > uri ; <nl> char * part_str = gpr_dump_slice ( path_parts . slices [ i ] , GPR_DUMP_ASCII ) ; <nl> ith_uri . path = part_str ; <nl> - if ( ! parse ( & ith_uri , ( struct sockaddr_storage * ) ( & r - > addresses - > addresses [ i ] <nl> - . address . addr ) , <nl> - & r - > addresses - > addresses [ i ] . address . len ) ) { <nl> + if ( ! parse ( <nl> + & ith_uri , <nl> + ( struct sockaddr_storage * ) ( & addresses - > addresses [ i ] . address . addr ) , <nl> + & addresses - > addresses [ i ] . address . len ) ) { <nl> errors_found = true ; <nl> } <nl> gpr_free ( part_str ) ; <nl> - r - > addresses - > addresses [ i ] . is_balancer = lb_enabled ; <nl> if ( errors_found ) break ; <nl> } <nl> - <nl> gpr_slice_buffer_destroy ( & path_parts ) ; <nl> gpr_slice_unref ( path_slice ) ; <nl> if ( errors_found ) { <nl> - gpr_free ( r - > lb_policy_name ) ; <nl> - grpc_lb_addresses_destroy ( r - > addresses , NULL / * user_data_destroy * / ) ; <nl> - gpr_free ( r ) ; <nl> + grpc_lb_addresses_destroy ( addresses , NULL / * user_data_destroy * / ) ; <nl> return NULL ; <nl> } <nl> - <nl> - gpr_ref_init ( & r - > refs , 1 ) ; <nl> + / * Instantiate resolver . * / <nl> + sockaddr_resolver * r = gpr_malloc ( sizeof ( sockaddr_resolver ) ) ; <nl> + memset ( r , 0 , sizeof ( * r ) ) ; <nl> + r - > target_name = gpr_strdup ( args - > uri - > path ) ; <nl> + r - > addresses = addresses ; <nl> gpr_mu_init ( & r - > mu ) ; <nl> grpc_resolver_init ( & r - > base , & sockaddr_resolver_vtable ) ; <nl> - <nl> return & r - > base ; <nl> } <nl> <nl> static void sockaddr_factory_unref ( grpc_resolver_factory * factory ) { } <nl> # define DECL_FACTORY ( name ) \ <nl> static grpc_resolver * name # # _factory_create_resolver ( \ <nl> grpc_resolver_factory * factory , grpc_resolver_args * args ) { \ <nl> - return sockaddr_create ( args , " pick_first " , parse_ # # name ) ; \ <nl> + return sockaddr_create ( args , parse_ # # name ) ; \ <nl> } \ <nl> static const grpc_resolver_factory_vtable name # # _factory_vtable = { \ <nl> sockaddr_factory_ref , sockaddr_factory_unref , \ <nl> mmm a / src / core / ext / transport / cronet / transport / cronet_transport . c <nl> ppp b / src / core / ext / transport / cronet / transport / cronet_transport . c <nl> static const char * op_id_string ( enum e_op_id i ) { <nl> return " UNKNOWN " ; <nl> } <nl> <nl> + static void free_read_buffer ( stream_obj * s ) { <nl> + if ( s - > state . rs . read_buffer & & <nl> + s - > state . rs . read_buffer ! = s - > state . rs . grpc_header_bytes ) { <nl> + gpr_free ( s - > state . rs . read_buffer ) ; <nl> + s - > state . rs . read_buffer = NULL ; <nl> + } <nl> + } <nl> + <nl> / * <nl> Add a new stream op to op storage . <nl> * / <nl> static void on_failed ( cronet_bidirectional_stream * stream , int net_error ) { <nl> gpr_free ( s - > state . ws . write_buffer ) ; <nl> s - > state . ws . write_buffer = NULL ; <nl> } <nl> + free_read_buffer ( s ) ; <nl> gpr_mu_unlock ( & s - > mu ) ; <nl> execute_from_storage ( s ) ; <nl> } <nl> static void on_canceled ( cronet_bidirectional_stream * stream ) { <nl> gpr_free ( s - > state . ws . write_buffer ) ; <nl> s - > state . ws . write_buffer = NULL ; <nl> } <nl> + free_read_buffer ( s ) ; <nl> gpr_mu_unlock ( & s - > mu ) ; <nl> execute_from_storage ( s ) ; <nl> } <nl> static void on_succeeded ( cronet_bidirectional_stream * stream ) { <nl> cronet_bidirectional_stream_destroy ( s - > cbs ) ; <nl> s - > state . state_callback_received [ OP_SUCCEEDED ] = true ; <nl> s - > cbs = NULL ; <nl> + free_read_buffer ( s ) ; <nl> gpr_mu_unlock ( & s - > mu ) ; <nl> execute_from_storage ( s ) ; <nl> } <nl> static void create_grpc_frame ( gpr_slice_buffer * write_slice_buffer , <nl> * / <nl> static void convert_metadata_to_cronet_headers ( <nl> grpc_linked_mdelem * head , const char * host , char * * pp_url , <nl> - cronet_bidirectional_stream_header * * pp_headers , size_t * p_num_headers ) { <nl> + cronet_bidirectional_stream_header * * pp_headers , size_t * p_num_headers , <nl> + const char * * method ) { <nl> grpc_linked_mdelem * curr = head ; <nl> / * Walk the linked list and get number of header fields * / <nl> size_t num_headers_available = 0 ; <nl> static void convert_metadata_to_cronet_headers ( <nl> curr = curr - > next ; <nl> const char * key = grpc_mdstr_as_c_string ( mdelem - > key ) ; <nl> const char * value = grpc_mdstr_as_c_string ( mdelem - > value ) ; <nl> - if ( mdelem - > key = = GRPC_MDSTR_METHOD | | mdelem - > key = = GRPC_MDSTR_SCHEME | | <nl> + if ( mdelem - > key = = GRPC_MDSTR_SCHEME | | <nl> mdelem - > key = = GRPC_MDSTR_AUTHORITY ) { <nl> / * Cronet populates these fields on its own * / <nl> continue ; <nl> } <nl> + if ( mdelem - > key = = GRPC_MDSTR_METHOD ) { <nl> + if ( mdelem - > value = = GRPC_MDSTR_PUT ) { <nl> + * method = " PUT " ; <nl> + } else { <nl> + / * POST method in default * / <nl> + * method = " POST " ; <nl> + } <nl> + continue ; <nl> + } <nl> if ( mdelem - > key = = GRPC_MDSTR_PATH ) { <nl> / * Create URL by appending : path value to the hostname * / <nl> gpr_asprintf ( pp_url , " https : / / % s % s " , host , value ) ; <nl> static enum e_op_result execute_stream_op ( grpc_exec_ctx * exec_ctx , <nl> s - > cbs = cronet_bidirectional_stream_create ( s - > curr_ct . engine , s - > curr_gs , <nl> & cronet_callbacks ) ; <nl> CRONET_LOG ( GPR_DEBUG , " % p = cronet_bidirectional_stream_create ( ) " , s - > cbs ) ; <nl> - char * url ; <nl> + char * url = NULL ; <nl> + const char * method = NULL ; <nl> s - > header_array . headers = NULL ; <nl> convert_metadata_to_cronet_headers ( <nl> stream_op - > send_initial_metadata - > list . head , s - > curr_ct . host , & url , <nl> - & s - > header_array . headers , & s - > header_array . count ) ; <nl> + & s - > header_array . headers , & s - > header_array . count , & method ) ; <nl> s - > header_array . capacity = s - > header_array . count ; <nl> CRONET_LOG ( GPR_DEBUG , " cronet_bidirectional_stream_start ( % p , % s ) " , s - > cbs , <nl> url ) ; <nl> - cronet_bidirectional_stream_start ( s - > cbs , url , 0 , " POST " , & s - > header_array , <nl> + cronet_bidirectional_stream_start ( s - > cbs , url , 0 , method , & s - > header_array , <nl> false ) ; <nl> stream_state - > state_op_done [ OP_SEND_INITIAL_METADATA ] = true ; <nl> result = ACTION_TAKEN_WITH_CALLBACK ; <nl> static enum e_op_result execute_stream_op ( grpc_exec_ctx * exec_ctx , <nl> uint8_t * dst_p = GPR_SLICE_START_PTR ( read_data_slice ) ; <nl> memcpy ( dst_p , stream_state - > rs . read_buffer , <nl> ( size_t ) stream_state - > rs . length_field ) ; <nl> + free_read_buffer ( s ) ; <nl> gpr_slice_buffer_init ( & stream_state - > rs . read_slice_buffer ) ; <nl> gpr_slice_buffer_add ( & stream_state - > rs . read_slice_buffer , <nl> read_data_slice ) ; <nl> mmm a / src / core / lib / channel / message_size_filter . c <nl> ppp b / src / core / lib / channel / message_size_filter . c <nl> static void recv_message_ready ( grpc_exec_ctx * exec_ctx , void * user_data , <nl> gpr_asprintf ( & message_string , <nl> " Received message larger than max ( % u vs . % d ) " , <nl> ( * calld - > recv_message ) - > length , chand - > max_recv_size ) ; <nl> - gpr_slice message = gpr_slice_from_copied_string ( message_string ) ; <nl> + grpc_error * new_error = grpc_error_set_int ( <nl> + GRPC_ERROR_CREATE ( message_string ) , GRPC_ERROR_INT_GRPC_STATUS , <nl> + GRPC_STATUS_INVALID_ARGUMENT ) ; <nl> + if ( error = = GRPC_ERROR_NONE ) { <nl> + error = new_error ; <nl> + } else { <nl> + error = grpc_error_add_child ( error , new_error ) ; <nl> + GRPC_ERROR_UNREF ( new_error ) ; <nl> + } <nl> gpr_free ( message_string ) ; <nl> - grpc_call_element_send_close_with_message ( <nl> - exec_ctx , elem , GRPC_STATUS_INVALID_ARGUMENT , & message ) ; <nl> } <nl> / / Invoke the next callback . <nl> grpc_exec_ctx_sched ( exec_ctx , calld - > next_recv_message_ready , error , NULL ) ; <nl> } <nl> <nl> - / / Start transport op . <nl> + / / Start transport stream op . <nl> static void start_transport_stream_op ( grpc_exec_ctx * exec_ctx , <nl> grpc_call_element * elem , <nl> grpc_transport_stream_op * op ) { <nl> mmm a / src / core / lib / iomgr / udp_server . c <nl> ppp b / src / core / lib / iomgr / udp_server . c <nl> <nl> <nl> # include < grpc / support / port_platform . h > <nl> <nl> - # ifdef GRPC_NEED_UDP <nl> # ifdef GPR_POSIX_SOCKET <nl> <nl> # include " src / core / lib / iomgr / udp_server . h " <nl> static void deactivated_all_ports ( grpc_exec_ctx * exec_ctx , grpc_udp_server * s ) { <nl> sp - > destroyed_closure . cb = destroyed_port ; <nl> sp - > destroyed_closure . cb_arg = s ; <nl> <nl> + / * Call the orphan_cb to signal that the FD is about to be closed and <nl> + * should no longer be used . * / <nl> GPR_ASSERT ( sp - > orphan_cb ) ; <nl> sp - > orphan_cb ( sp - > emfd ) ; <nl> <nl> void grpc_udp_server_destroy ( grpc_exec_ctx * exec_ctx , grpc_udp_server * s , <nl> / * shutdown all fd ' s * / <nl> if ( s - > active_ports ) { <nl> for ( i = 0 ; i < s - > nports ; i + + ) { <nl> + server_port * sp = & s - > ports [ i ] ; <nl> + / * Call the orphan_cb to signal that the FD is about to be closed and <nl> + * should no longer be used . * / <nl> + GPR_ASSERT ( sp - > orphan_cb ) ; <nl> + sp - > orphan_cb ( sp - > emfd ) ; <nl> + <nl> grpc_fd_shutdown ( exec_ctx , s - > ports [ i ] . emfd ) ; <nl> } <nl> gpr_mu_unlock ( & s - > mu ) ; <nl> void grpc_udp_server_start ( grpc_exec_ctx * exec_ctx , grpc_udp_server * s , <nl> } <nl> <nl> # endif <nl> - # endif <nl> mmm a / src / core / lib / surface / byte_buffer . c <nl> ppp b / src / core / lib / surface / byte_buffer . c <nl> grpc_byte_buffer * grpc_raw_byte_buffer_from_reader ( <nl> grpc_byte_buffer * grpc_byte_buffer_copy ( grpc_byte_buffer * bb ) { <nl> switch ( bb - > type ) { <nl> case GRPC_BB_RAW : <nl> - return grpc_raw_byte_buffer_create ( bb - > data . raw . slice_buffer . slices , <nl> - bb - > data . raw . slice_buffer . count ) ; <nl> + return grpc_raw_compressed_byte_buffer_create ( <nl> + bb - > data . raw . slice_buffer . slices , bb - > data . raw . slice_buffer . count , <nl> + bb - > data . raw . compression ) ; <nl> } <nl> GPR_UNREACHABLE_CODE ( return NULL ) ; <nl> } <nl> mmm a / src / core / lib / surface / call . c <nl> ppp b / src / core / lib / surface / call . c <nl> static void receiving_slice_ready ( grpc_exec_ctx * exec_ctx , void * bctlp , <nl> } <nl> } <nl> <nl> - static void process_data_after_md ( grpc_exec_ctx * exec_ctx , batch_control * bctl , <nl> - bool success ) { <nl> + static void process_data_after_md ( grpc_exec_ctx * exec_ctx , <nl> + batch_control * bctl ) { <nl> grpc_call * call = bctl - > call ; <nl> if ( call - > receiving_stream = = NULL ) { <nl> * call - > receiving_buffer = NULL ; <nl> static void process_data_after_md ( grpc_exec_ctx * exec_ctx , batch_control * bctl , <nl> grpc_closure_init ( & call - > receiving_slice_ready , receiving_slice_ready , <nl> bctl ) ; <nl> continue_receiving_slices ( exec_ctx , bctl ) ; <nl> - / * early out * / <nl> - return ; <nl> } <nl> } <nl> <nl> static void receiving_stream_ready ( grpc_exec_ctx * exec_ctx , void * bctlp , <nl> grpc_error * error ) { <nl> batch_control * bctl = bctlp ; <nl> grpc_call * call = bctl - > call ; <nl> - <nl> + if ( error ! = GRPC_ERROR_NONE ) { <nl> + grpc_status_code status ; <nl> + const char * msg ; <nl> + grpc_error_get_status ( error , & status , & msg ) ; <nl> + close_with_status ( exec_ctx , call , status , msg ) ; <nl> + } <nl> gpr_mu_lock ( & bctl - > call - > mu ) ; <nl> if ( bctl - > call - > has_initial_md_been_received | | error ! = GRPC_ERROR_NONE | | <nl> call - > receiving_stream = = NULL ) { <nl> gpr_mu_unlock ( & bctl - > call - > mu ) ; <nl> - process_data_after_md ( exec_ctx , bctlp , error ) ; <nl> + process_data_after_md ( exec_ctx , bctlp ) ; <nl> } else { <nl> call - > saved_receiving_stream_ready_bctlp = bctlp ; <nl> gpr_mu_unlock ( & bctl - > call - > mu ) ; <nl> mmm a / src / cpp / ext / reflection . pb . cc <nl> ppp b / src / cpp / ext / reflection . pb . cc <nl> void protobuf_AssignDesc_reflection_2eproto ( ) { <nl> ServerReflectionRequest_reflection_ = <nl> : : google : : protobuf : : internal : : GeneratedMessageReflection : : NewGeneratedMessageReflection ( <nl> ServerReflectionRequest_descriptor_ , <nl> - ServerReflectionRequest : : default_instance_ , <nl> + ServerReflectionRequest : : internal_default_instance ( ) , <nl> ServerReflectionRequest_offsets_ , <nl> - 1 , <nl> - 1 , <nl> void protobuf_AssignDesc_reflection_2eproto ( ) { <nl> ServerReflectionRequest_default_oneof_instance_ , <nl> GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ServerReflectionRequest , _oneof_case_ [ 0 ] ) , <nl> sizeof ( ServerReflectionRequest ) , <nl> - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ServerReflectionRequest , _internal_metadata_ ) , <nl> - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ServerReflectionRequest , _is_default_instance_ ) ) ; <nl> + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ServerReflectionRequest , _internal_metadata_ ) ) ; <nl> ExtensionRequest_descriptor_ = file - > message_type ( 1 ) ; <nl> static const int ExtensionRequest_offsets_ [ 2 ] = { <nl> GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ExtensionRequest , containing_type_ ) , <nl> void protobuf_AssignDesc_reflection_2eproto ( ) { <nl> ExtensionRequest_reflection_ = <nl> : : google : : protobuf : : internal : : GeneratedMessageReflection : : NewGeneratedMessageReflection ( <nl> ExtensionRequest_descriptor_ , <nl> - ExtensionRequest : : default_instance_ , <nl> + ExtensionRequest : : internal_default_instance ( ) , <nl> ExtensionRequest_offsets_ , <nl> - 1 , <nl> - 1 , <nl> - 1 , <nl> sizeof ( ExtensionRequest ) , <nl> - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ExtensionRequest , _internal_metadata_ ) , <nl> - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ExtensionRequest , _is_default_instance_ ) ) ; <nl> + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ExtensionRequest , _internal_metadata_ ) ) ; <nl> ServerReflectionResponse_descriptor_ = file - > message_type ( 2 ) ; <nl> static const int ServerReflectionResponse_offsets_ [ 7 ] = { <nl> GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ServerReflectionResponse , valid_host_ ) , <nl> void protobuf_AssignDesc_reflection_2eproto ( ) { <nl> ServerReflectionResponse_reflection_ = <nl> : : google : : protobuf : : internal : : GeneratedMessageReflection : : NewGeneratedMessageReflection ( <nl> ServerReflectionResponse_descriptor_ , <nl> - ServerReflectionResponse : : default_instance_ , <nl> + ServerReflectionResponse : : internal_default_instance ( ) , <nl> ServerReflectionResponse_offsets_ , <nl> - 1 , <nl> - 1 , <nl> void protobuf_AssignDesc_reflection_2eproto ( ) { <nl> ServerReflectionResponse_default_oneof_instance_ , <nl> GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ServerReflectionResponse , _oneof_case_ [ 0 ] ) , <nl> sizeof ( ServerReflectionResponse ) , <nl> - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ServerReflectionResponse , _internal_metadata_ ) , <nl> - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ServerReflectionResponse , _is_default_instance_ ) ) ; <nl> + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ServerReflectionResponse , _internal_metadata_ ) ) ; <nl> FileDescriptorResponse_descriptor_ = file - > message_type ( 3 ) ; <nl> static const int FileDescriptorResponse_offsets_ [ 1 ] = { <nl> GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( FileDescriptorResponse , file_descriptor_proto_ ) , <nl> void protobuf_AssignDesc_reflection_2eproto ( ) { <nl> FileDescriptorResponse_reflection_ = <nl> : : google : : protobuf : : internal : : GeneratedMessageReflection : : NewGeneratedMessageReflection ( <nl> FileDescriptorResponse_descriptor_ , <nl> - FileDescriptorResponse : : default_instance_ , <nl> + FileDescriptorResponse : : internal_default_instance ( ) , <nl> FileDescriptorResponse_offsets_ , <nl> - 1 , <nl> - 1 , <nl> - 1 , <nl> sizeof ( FileDescriptorResponse ) , <nl> - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( FileDescriptorResponse , _internal_metadata_ ) , <nl> - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( FileDescriptorResponse , _is_default_instance_ ) ) ; <nl> + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( FileDescriptorResponse , _internal_metadata_ ) ) ; <nl> ExtensionNumberResponse_descriptor_ = file - > message_type ( 4 ) ; <nl> static const int ExtensionNumberResponse_offsets_ [ 2 ] = { <nl> GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ExtensionNumberResponse , base_type_name_ ) , <nl> void protobuf_AssignDesc_reflection_2eproto ( ) { <nl> ExtensionNumberResponse_reflection_ = <nl> : : google : : protobuf : : internal : : GeneratedMessageReflection : : NewGeneratedMessageReflection ( <nl> ExtensionNumberResponse_descriptor_ , <nl> - ExtensionNumberResponse : : default_instance_ , <nl> + ExtensionNumberResponse : : internal_default_instance ( ) , <nl> ExtensionNumberResponse_offsets_ , <nl> - 1 , <nl> - 1 , <nl> - 1 , <nl> sizeof ( ExtensionNumberResponse ) , <nl> - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ExtensionNumberResponse , _internal_metadata_ ) , <nl> - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ExtensionNumberResponse , _is_default_instance_ ) ) ; <nl> + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ExtensionNumberResponse , _internal_metadata_ ) ) ; <nl> ListServiceResponse_descriptor_ = file - > message_type ( 5 ) ; <nl> static const int ListServiceResponse_offsets_ [ 1 ] = { <nl> GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ListServiceResponse , service_ ) , <nl> void protobuf_AssignDesc_reflection_2eproto ( ) { <nl> ListServiceResponse_reflection_ = <nl> : : google : : protobuf : : internal : : GeneratedMessageReflection : : NewGeneratedMessageReflection ( <nl> ListServiceResponse_descriptor_ , <nl> - ListServiceResponse : : default_instance_ , <nl> + ListServiceResponse : : internal_default_instance ( ) , <nl> ListServiceResponse_offsets_ , <nl> - 1 , <nl> - 1 , <nl> - 1 , <nl> sizeof ( ListServiceResponse ) , <nl> - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ListServiceResponse , _internal_metadata_ ) , <nl> - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ListServiceResponse , _is_default_instance_ ) ) ; <nl> + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ListServiceResponse , _internal_metadata_ ) ) ; <nl> ServiceResponse_descriptor_ = file - > message_type ( 6 ) ; <nl> static const int ServiceResponse_offsets_ [ 1 ] = { <nl> GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ServiceResponse , name_ ) , <nl> void protobuf_AssignDesc_reflection_2eproto ( ) { <nl> ServiceResponse_reflection_ = <nl> : : google : : protobuf : : internal : : GeneratedMessageReflection : : NewGeneratedMessageReflection ( <nl> ServiceResponse_descriptor_ , <nl> - ServiceResponse : : default_instance_ , <nl> + ServiceResponse : : internal_default_instance ( ) , <nl> ServiceResponse_offsets_ , <nl> - 1 , <nl> - 1 , <nl> - 1 , <nl> sizeof ( ServiceResponse ) , <nl> - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ServiceResponse , _internal_metadata_ ) , <nl> - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ServiceResponse , _is_default_instance_ ) ) ; <nl> + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ServiceResponse , _internal_metadata_ ) ) ; <nl> ErrorResponse_descriptor_ = file - > message_type ( 7 ) ; <nl> static const int ErrorResponse_offsets_ [ 2 ] = { <nl> GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ErrorResponse , error_code_ ) , <nl> void protobuf_AssignDesc_reflection_2eproto ( ) { <nl> ErrorResponse_reflection_ = <nl> : : google : : protobuf : : internal : : GeneratedMessageReflection : : NewGeneratedMessageReflection ( <nl> ErrorResponse_descriptor_ , <nl> - ErrorResponse : : default_instance_ , <nl> + ErrorResponse : : internal_default_instance ( ) , <nl> ErrorResponse_offsets_ , <nl> - 1 , <nl> - 1 , <nl> - 1 , <nl> sizeof ( ErrorResponse ) , <nl> - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ErrorResponse , _internal_metadata_ ) , <nl> - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ErrorResponse , _is_default_instance_ ) ) ; <nl> + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET ( ErrorResponse , _internal_metadata_ ) ) ; <nl> } <nl> <nl> namespace { <nl> <nl> GOOGLE_PROTOBUF_DECLARE_ONCE ( protobuf_AssignDescriptors_once_ ) ; <nl> - inline void protobuf_AssignDescriptorsOnce ( ) { <nl> + void protobuf_AssignDescriptorsOnce ( ) { <nl> : : google : : protobuf : : GoogleOnceInit ( & protobuf_AssignDescriptors_once_ , <nl> & protobuf_AssignDesc_reflection_2eproto ) ; <nl> } <nl> void protobuf_RegisterTypes ( const : : std : : string & ) GOOGLE_ATTRIBUTE_COLD ; <nl> void protobuf_RegisterTypes ( const : : std : : string & ) { <nl> protobuf_AssignDescriptorsOnce ( ) ; <nl> : : google : : protobuf : : MessageFactory : : InternalRegisterGeneratedMessage ( <nl> - ServerReflectionRequest_descriptor_ , & ServerReflectionRequest : : default_instance ( ) ) ; <nl> + ServerReflectionRequest_descriptor_ , ServerReflectionRequest : : internal_default_instance ( ) ) ; <nl> : : google : : protobuf : : MessageFactory : : InternalRegisterGeneratedMessage ( <nl> - ExtensionRequest_descriptor_ , & ExtensionRequest : : default_instance ( ) ) ; <nl> + ExtensionRequest_descriptor_ , ExtensionRequest : : internal_default_instance ( ) ) ; <nl> : : google : : protobuf : : MessageFactory : : InternalRegisterGeneratedMessage ( <nl> - ServerReflectionResponse_descriptor_ , & ServerReflectionResponse : : default_instance ( ) ) ; <nl> + ServerReflectionResponse_descriptor_ , ServerReflectionResponse : : internal_default_instance ( ) ) ; <nl> : : google : : protobuf : : MessageFactory : : InternalRegisterGeneratedMessage ( <nl> - FileDescriptorResponse_descriptor_ , & FileDescriptorResponse : : default_instance ( ) ) ; <nl> + FileDescriptorResponse_descriptor_ , FileDescriptorResponse : : internal_default_instance ( ) ) ; <nl> : : google : : protobuf : : MessageFactory : : InternalRegisterGeneratedMessage ( <nl> - ExtensionNumberResponse_descriptor_ , & ExtensionNumberResponse : : default_instance ( ) ) ; <nl> + ExtensionNumberResponse_descriptor_ , ExtensionNumberResponse : : internal_default_instance ( ) ) ; <nl> : : google : : protobuf : : MessageFactory : : InternalRegisterGeneratedMessage ( <nl> - ListServiceResponse_descriptor_ , & ListServiceResponse : : default_instance ( ) ) ; <nl> + ListServiceResponse_descriptor_ , ListServiceResponse : : internal_default_instance ( ) ) ; <nl> : : google : : protobuf : : MessageFactory : : InternalRegisterGeneratedMessage ( <nl> - ServiceResponse_descriptor_ , & ServiceResponse : : default_instance ( ) ) ; <nl> + ServiceResponse_descriptor_ , ServiceResponse : : internal_default_instance ( ) ) ; <nl> : : google : : protobuf : : MessageFactory : : InternalRegisterGeneratedMessage ( <nl> - ErrorResponse_descriptor_ , & ErrorResponse : : default_instance ( ) ) ; <nl> + ErrorResponse_descriptor_ , ErrorResponse : : internal_default_instance ( ) ) ; <nl> } <nl> <nl> } / / namespace <nl> <nl> void protobuf_ShutdownFile_reflection_2eproto ( ) { <nl> - delete ServerReflectionRequest : : default_instance_ ; <nl> + ServerReflectionRequest_default_instance_ . Shutdown ( ) ; <nl> delete ServerReflectionRequest_default_oneof_instance_ ; <nl> delete ServerReflectionRequest_reflection_ ; <nl> - delete ExtensionRequest : : default_instance_ ; <nl> + ExtensionRequest_default_instance_ . Shutdown ( ) ; <nl> delete ExtensionRequest_reflection_ ; <nl> - delete ServerReflectionResponse : : default_instance_ ; <nl> + ServerReflectionResponse_default_instance_ . Shutdown ( ) ; <nl> delete ServerReflectionResponse_default_oneof_instance_ ; <nl> delete ServerReflectionResponse_reflection_ ; <nl> - delete FileDescriptorResponse : : default_instance_ ; <nl> + FileDescriptorResponse_default_instance_ . Shutdown ( ) ; <nl> delete FileDescriptorResponse_reflection_ ; <nl> - delete ExtensionNumberResponse : : default_instance_ ; <nl> + ExtensionNumberResponse_default_instance_ . Shutdown ( ) ; <nl> delete ExtensionNumberResponse_reflection_ ; <nl> - delete ListServiceResponse : : default_instance_ ; <nl> + ListServiceResponse_default_instance_ . Shutdown ( ) ; <nl> delete ListServiceResponse_reflection_ ; <nl> - delete ServiceResponse : : default_instance_ ; <nl> + ServiceResponse_default_instance_ . Shutdown ( ) ; <nl> delete ServiceResponse_reflection_ ; <nl> - delete ErrorResponse : : default_instance_ ; <nl> + ErrorResponse_default_instance_ . Shutdown ( ) ; <nl> delete ErrorResponse_reflection_ ; <nl> } <nl> <nl> - void protobuf_AddDesc_reflection_2eproto ( ) GOOGLE_ATTRIBUTE_COLD ; <nl> - void protobuf_AddDesc_reflection_2eproto ( ) { <nl> - static bool already_here = false ; <nl> - if ( already_here ) return ; <nl> - already_here = true ; <nl> + void protobuf_InitDefaults_reflection_2eproto_impl ( ) { <nl> GOOGLE_PROTOBUF_VERIFY_VERSION ; <nl> <nl> + : : google : : protobuf : : internal : : GetEmptyString ( ) ; <nl> + ServerReflectionRequest_default_instance_ . DefaultConstruct ( ) ; <nl> + ServerReflectionRequest_default_oneof_instance_ = new ServerReflectionRequestOneofInstance ( ) ; <nl> + : : google : : protobuf : : internal : : GetEmptyString ( ) ; <nl> + ExtensionRequest_default_instance_ . DefaultConstruct ( ) ; <nl> + : : google : : protobuf : : internal : : GetEmptyString ( ) ; <nl> + ServerReflectionResponse_default_instance_ . DefaultConstruct ( ) ; <nl> + ServerReflectionResponse_default_oneof_instance_ = new ServerReflectionResponseOneofInstance ( ) ; <nl> + : : google : : protobuf : : internal : : GetEmptyString ( ) ; <nl> + FileDescriptorResponse_default_instance_ . DefaultConstruct ( ) ; <nl> + : : google : : protobuf : : internal : : GetEmptyString ( ) ; <nl> + ExtensionNumberResponse_default_instance_ . DefaultConstruct ( ) ; <nl> + ListServiceResponse_default_instance_ . DefaultConstruct ( ) ; <nl> + : : google : : protobuf : : internal : : GetEmptyString ( ) ; <nl> + ServiceResponse_default_instance_ . DefaultConstruct ( ) ; <nl> + : : google : : protobuf : : internal : : GetEmptyString ( ) ; <nl> + ErrorResponse_default_instance_ . DefaultConstruct ( ) ; <nl> + ServerReflectionRequest_default_instance_ . get_mutable ( ) - > InitAsDefaultInstance ( ) ; <nl> + ExtensionRequest_default_instance_ . get_mutable ( ) - > InitAsDefaultInstance ( ) ; <nl> + ServerReflectionResponse_default_instance_ . get_mutable ( ) - > InitAsDefaultInstance ( ) ; <nl> + FileDescriptorResponse_default_instance_ . get_mutable ( ) - > InitAsDefaultInstance ( ) ; <nl> + ExtensionNumberResponse_default_instance_ . get_mutable ( ) - > InitAsDefaultInstance ( ) ; <nl> + ListServiceResponse_default_instance_ . get_mutable ( ) - > InitAsDefaultInstance ( ) ; <nl> + ServiceResponse_default_instance_ . get_mutable ( ) - > InitAsDefaultInstance ( ) ; <nl> + ErrorResponse_default_instance_ . get_mutable ( ) - > InitAsDefaultInstance ( ) ; <nl> + } <nl> + <nl> + GOOGLE_PROTOBUF_DECLARE_ONCE ( protobuf_InitDefaults_reflection_2eproto_once_ ) ; <nl> + void protobuf_InitDefaults_reflection_2eproto ( ) { <nl> + : : google : : protobuf : : GoogleOnceInit ( & protobuf_InitDefaults_reflection_2eproto_once_ , <nl> + & protobuf_InitDefaults_reflection_2eproto_impl ) ; <nl> + } <nl> + void protobuf_AddDesc_reflection_2eproto_impl ( ) { <nl> + GOOGLE_PROTOBUF_VERIFY_VERSION ; <nl> + <nl> + protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> : : google : : protobuf : : DescriptorPool : : InternalAddGeneratedFile ( <nl> " \ n \ 020reflection . proto \ 022 \ 027grpc . reflection . v1al " <nl> " pha \ " \ 212 \ 002 \ n \ 027ServerReflectionRequest \ 022 \ 014 \ n \ 004host \ 030 " <nl> void protobuf_AddDesc_reflection_2eproto ( ) { <nl> " a . ServerReflectionResponse ( \ 0010 \ 001b \ 006proto3 " , 1318 ) ; <nl> : : google : : protobuf : : MessageFactory : : InternalRegisterGeneratedFile ( <nl> " reflection . proto " , & protobuf_RegisterTypes ) ; <nl> - ServerReflectionRequest : : default_instance_ = new ServerReflectionRequest ( ) ; <nl> - ServerReflectionRequest_default_oneof_instance_ = new ServerReflectionRequestOneofInstance ( ) ; <nl> - ExtensionRequest : : default_instance_ = new ExtensionRequest ( ) ; <nl> - ServerReflectionResponse : : default_instance_ = new ServerReflectionResponse ( ) ; <nl> - ServerReflectionResponse_default_oneof_instance_ = new ServerReflectionResponseOneofInstance ( ) ; <nl> - FileDescriptorResponse : : default_instance_ = new FileDescriptorResponse ( ) ; <nl> - ExtensionNumberResponse : : default_instance_ = new ExtensionNumberResponse ( ) ; <nl> - ListServiceResponse : : default_instance_ = new ListServiceResponse ( ) ; <nl> - ServiceResponse : : default_instance_ = new ServiceResponse ( ) ; <nl> - ErrorResponse : : default_instance_ = new ErrorResponse ( ) ; <nl> - ServerReflectionRequest : : default_instance_ - > InitAsDefaultInstance ( ) ; <nl> - ExtensionRequest : : default_instance_ - > InitAsDefaultInstance ( ) ; <nl> - ServerReflectionResponse : : default_instance_ - > InitAsDefaultInstance ( ) ; <nl> - FileDescriptorResponse : : default_instance_ - > InitAsDefaultInstance ( ) ; <nl> - ExtensionNumberResponse : : default_instance_ - > InitAsDefaultInstance ( ) ; <nl> - ListServiceResponse : : default_instance_ - > InitAsDefaultInstance ( ) ; <nl> - ServiceResponse : : default_instance_ - > InitAsDefaultInstance ( ) ; <nl> - ErrorResponse : : default_instance_ - > InitAsDefaultInstance ( ) ; <nl> : : google : : protobuf : : internal : : OnShutdown ( & protobuf_ShutdownFile_reflection_2eproto ) ; <nl> } <nl> <nl> + GOOGLE_PROTOBUF_DECLARE_ONCE ( protobuf_AddDesc_reflection_2eproto_once_ ) ; <nl> + void protobuf_AddDesc_reflection_2eproto ( ) { <nl> + : : google : : protobuf : : GoogleOnceInit ( & protobuf_AddDesc_reflection_2eproto_once_ , <nl> + & protobuf_AddDesc_reflection_2eproto_impl ) ; <nl> + } <nl> / / Force AddDescriptors ( ) to be called at static initialization time . <nl> struct StaticDescriptorInitializer_reflection_2eproto { <nl> StaticDescriptorInitializer_reflection_2eproto ( ) { <nl> struct StaticDescriptorInitializer_reflection_2eproto { <nl> } <nl> } static_descriptor_initializer_reflection_2eproto_ ; <nl> <nl> + namespace { <nl> + <nl> + static void MergeFromFail ( int line ) GOOGLE_ATTRIBUTE_COLD GOOGLE_ATTRIBUTE_NORETURN ; <nl> + static void MergeFromFail ( int line ) { <nl> + : : google : : protobuf : : internal : : MergeFromFail ( __FILE__ , line ) ; <nl> + } <nl> + <nl> + } / / namespace <nl> + <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> <nl> # if ! defined ( _MSC_VER ) | | _MSC_VER > = 1900 <nl> const int ServerReflectionRequest : : kListServicesFieldNumber ; <nl> <nl> ServerReflectionRequest : : ServerReflectionRequest ( ) <nl> : : : google : : protobuf : : Message ( ) , _internal_metadata_ ( NULL ) { <nl> + if ( this ! = internal_default_instance ( ) ) protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> SharedCtor ( ) ; <nl> / / @ @ protoc_insertion_point ( constructor : grpc . reflection . v1alpha . ServerReflectionRequest ) <nl> } <nl> <nl> void ServerReflectionRequest : : InitAsDefaultInstance ( ) { <nl> - _is_default_instance_ = true ; <nl> ServerReflectionRequest_default_oneof_instance_ - > file_by_filename_ . UnsafeSetDefault ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> ServerReflectionRequest_default_oneof_instance_ - > file_containing_symbol_ . UnsafeSetDefault ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> - ServerReflectionRequest_default_oneof_instance_ - > file_containing_extension_ = const_cast < : : grpc : : reflection : : v1alpha : : ExtensionRequest * > ( & : : grpc : : reflection : : v1alpha : : ExtensionRequest : : default_instance ( ) ) ; <nl> + ServerReflectionRequest_default_oneof_instance_ - > file_containing_extension_ = const_cast < : : grpc : : reflection : : v1alpha : : ExtensionRequest * > ( <nl> + : : grpc : : reflection : : v1alpha : : ExtensionRequest : : internal_default_instance ( ) ) ; <nl> ServerReflectionRequest_default_oneof_instance_ - > all_extension_numbers_of_type_ . UnsafeSetDefault ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> ServerReflectionRequest_default_oneof_instance_ - > list_services_ . UnsafeSetDefault ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> ServerReflectionRequest : : ServerReflectionRequest ( const ServerReflectionRequest & <nl> : : : google : : protobuf : : Message ( ) , <nl> _internal_metadata_ ( NULL ) { <nl> SharedCtor ( ) ; <nl> - MergeFrom ( from ) ; <nl> + UnsafeMergeFrom ( from ) ; <nl> / / @ @ protoc_insertion_point ( copy_constructor : grpc . reflection . v1alpha . ServerReflectionRequest ) <nl> } <nl> <nl> void ServerReflectionRequest : : SharedCtor ( ) { <nl> - _is_default_instance_ = false ; <nl> - : : google : : protobuf : : internal : : GetEmptyString ( ) ; <nl> - _cached_size_ = 0 ; <nl> host_ . UnsafeSetDefault ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> clear_has_message_request ( ) ; <nl> + _cached_size_ = 0 ; <nl> } <nl> <nl> ServerReflectionRequest : : ~ ServerReflectionRequest ( ) { <nl> void ServerReflectionRequest : : SharedDtor ( ) { <nl> if ( has_message_request ( ) ) { <nl> clear_message_request ( ) ; <nl> } <nl> - if ( this ! = default_instance_ ) { <nl> - } <nl> } <nl> <nl> void ServerReflectionRequest : : SetCachedSize ( int size ) const { <nl> const : : google : : protobuf : : Descriptor * ServerReflectionRequest : : descriptor ( ) { <nl> } <nl> <nl> const ServerReflectionRequest & ServerReflectionRequest : : default_instance ( ) { <nl> - if ( default_instance_ = = NULL ) protobuf_AddDesc_reflection_2eproto ( ) ; <nl> - return * default_instance_ ; <nl> + protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> + return * internal_default_instance ( ) ; <nl> } <nl> <nl> - ServerReflectionRequest * ServerReflectionRequest : : default_instance_ = NULL ; <nl> + : : google : : protobuf : : internal : : ExplicitlyConstructed < ServerReflectionRequest > ServerReflectionRequest_default_instance_ ; <nl> <nl> ServerReflectionRequest * ServerReflectionRequest : : New ( : : google : : protobuf : : Arena * arena ) const { <nl> ServerReflectionRequest * n = new ServerReflectionRequest ; <nl> ServerReflectionRequest * ServerReflectionRequest : : New ( : : google : : protobuf : : Arena * <nl> <nl> void ServerReflectionRequest : : clear_message_request ( ) { <nl> / / @ @ protoc_insertion_point ( one_of_clear_start : grpc . reflection . v1alpha . ServerReflectionRequest ) <nl> - switch ( message_request_case ( ) ) { <nl> + switch ( message_request_case ( ) ) { <nl> case kFileByFilename : { <nl> message_request_ . file_by_filename_ . DestroyNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> break ; <nl> bool ServerReflectionRequest : : MergePartialFromCodedStream ( <nl> } else { <nl> goto handle_unusual ; <nl> } <nl> - if ( input - > ExpectTag ( 34 ) ) goto parse_file_containing_symbol ; <nl> + goto after_list_services ; <nl> break ; <nl> } <nl> <nl> / / optional string file_containing_symbol = 4 ; <nl> case 4 : { <nl> if ( tag = = 34 ) { <nl> - parse_file_containing_symbol : <nl> DO_ ( : : google : : protobuf : : internal : : WireFormatLite : : ReadString ( <nl> input , this - > mutable_file_containing_symbol ( ) ) ) ; <nl> DO_ ( : : google : : protobuf : : internal : : WireFormatLite : : VerifyUtf8String ( <nl> bool ServerReflectionRequest : : MergePartialFromCodedStream ( <nl> } else { <nl> goto handle_unusual ; <nl> } <nl> - if ( input - > ExpectTag ( 42 ) ) goto parse_file_containing_extension ; <nl> + goto after_list_services ; <nl> break ; <nl> } <nl> <nl> / / optional . grpc . reflection . v1alpha . ExtensionRequest file_containing_extension = 5 ; <nl> case 5 : { <nl> if ( tag = = 42 ) { <nl> - parse_file_containing_extension : <nl> DO_ ( : : google : : protobuf : : internal : : WireFormatLite : : ReadMessageNoVirtual ( <nl> input , mutable_file_containing_extension ( ) ) ) ; <nl> } else { <nl> goto handle_unusual ; <nl> } <nl> - if ( input - > ExpectTag ( 50 ) ) goto parse_all_extension_numbers_of_type ; <nl> + goto after_list_services ; <nl> break ; <nl> } <nl> <nl> / / optional string all_extension_numbers_of_type = 6 ; <nl> case 6 : { <nl> if ( tag = = 50 ) { <nl> - parse_all_extension_numbers_of_type : <nl> DO_ ( : : google : : protobuf : : internal : : WireFormatLite : : ReadString ( <nl> input , this - > mutable_all_extension_numbers_of_type ( ) ) ) ; <nl> DO_ ( : : google : : protobuf : : internal : : WireFormatLite : : VerifyUtf8String ( <nl> bool ServerReflectionRequest : : MergePartialFromCodedStream ( <nl> } else { <nl> goto handle_unusual ; <nl> } <nl> + after_list_services : <nl> if ( input - > ExpectAtEnd ( ) ) goto success ; <nl> break ; <nl> } <nl> void ServerReflectionRequest : : SerializeWithCachedSizes ( <nl> <nl> : : google : : protobuf : : uint8 * ServerReflectionRequest : : InternalSerializeWithCachedSizesToArray ( <nl> bool deterministic , : : google : : protobuf : : uint8 * target ) const { <nl> + ( void ) deterministic ; / / Unused <nl> / / @ @ protoc_insertion_point ( serialize_to_array_start : grpc . reflection . v1alpha . ServerReflectionRequest ) <nl> / / optional string host = 1 ; <nl> if ( this - > host ( ) . size ( ) > 0 ) { <nl> : : google : : protobuf : : uint8 * ServerReflectionRequest : : InternalSerializeWithCachedS <nl> return target ; <nl> } <nl> <nl> - int ServerReflectionRequest : : ByteSize ( ) const { <nl> + size_t ServerReflectionRequest : : ByteSizeLong ( ) const { <nl> / / @ @ protoc_insertion_point ( message_byte_size_start : grpc . reflection . v1alpha . ServerReflectionRequest ) <nl> - int total_size = 0 ; <nl> + size_t total_size = 0 ; <nl> <nl> / / optional string host = 1 ; <nl> if ( this - > host ( ) . size ( ) > 0 ) { <nl> int ServerReflectionRequest : : ByteSize ( ) const { <nl> break ; <nl> } <nl> } <nl> + int cached_size = : : google : : protobuf : : internal : : ToCachedSize ( total_size ) ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN ( ) ; <nl> - _cached_size_ = total_size ; <nl> + _cached_size_ = cached_size ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_END ( ) ; <nl> return total_size ; <nl> } <nl> <nl> void ServerReflectionRequest : : MergeFrom ( const : : google : : protobuf : : Message & from ) { <nl> / / @ @ protoc_insertion_point ( generalized_merge_from_start : grpc . reflection . v1alpha . ServerReflectionRequest ) <nl> - if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) { <nl> - : : google : : protobuf : : internal : : MergeFromFail ( __FILE__ , __LINE__ ) ; <nl> - } <nl> - const ServerReflectionRequest * source = <nl> + if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) MergeFromFail ( __LINE__ ) ; <nl> + const ServerReflectionRequest * source = <nl> : : google : : protobuf : : internal : : DynamicCastToGenerated < const ServerReflectionRequest > ( <nl> & from ) ; <nl> if ( source = = NULL ) { <nl> void ServerReflectionRequest : : MergeFrom ( const : : google : : protobuf : : Message & from ) <nl> : : google : : protobuf : : internal : : ReflectionOps : : Merge ( from , this ) ; <nl> } else { <nl> / / @ @ protoc_insertion_point ( generalized_merge_from_cast_success : grpc . reflection . v1alpha . ServerReflectionRequest ) <nl> - MergeFrom ( * source ) ; <nl> + UnsafeMergeFrom ( * source ) ; <nl> } <nl> } <nl> <nl> void ServerReflectionRequest : : MergeFrom ( const ServerReflectionRequest & from ) { <nl> / / @ @ protoc_insertion_point ( class_specific_merge_from_start : grpc . reflection . v1alpha . ServerReflectionRequest ) <nl> - if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) { <nl> - : : google : : protobuf : : internal : : MergeFromFail ( __FILE__ , __LINE__ ) ; <nl> + if ( GOOGLE_PREDICT_TRUE ( & from ! = this ) ) { <nl> + UnsafeMergeFrom ( from ) ; <nl> + } else { <nl> + MergeFromFail ( __LINE__ ) ; <nl> } <nl> + } <nl> + <nl> + void ServerReflectionRequest : : UnsafeMergeFrom ( const ServerReflectionRequest & from ) { <nl> + GOOGLE_DCHECK ( & from ! = this ) ; <nl> switch ( from . message_request_case ( ) ) { <nl> case kFileByFilename : { <nl> set_file_by_filename ( from . file_by_filename ( ) ) ; <nl> void ServerReflectionRequest : : CopyFrom ( const ServerReflectionRequest & from ) { <nl> / / @ @ protoc_insertion_point ( class_specific_copy_from_start : grpc . reflection . v1alpha . ServerReflectionRequest ) <nl> if ( & from = = this ) return ; <nl> Clear ( ) ; <nl> - MergeFrom ( from ) ; <nl> + UnsafeMergeFrom ( from ) ; <nl> } <nl> <nl> bool ServerReflectionRequest : : IsInitialized ( ) const { <nl> : : google : : protobuf : : Metadata ServerReflectionRequest : : GetMetadata ( ) const { <nl> void ServerReflectionRequest : : clear_host ( ) { <nl> host_ . ClearToEmptyNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - const : : std : : string & ServerReflectionRequest : : host ( ) const { <nl> + const : : std : : string & ServerReflectionRequest : : host ( ) const { <nl> / / @ @ protoc_insertion_point ( field_get : grpc . reflection . v1alpha . ServerReflectionRequest . host ) <nl> return host_ . GetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - void ServerReflectionRequest : : set_host ( const : : std : : string & value ) { <nl> + void ServerReflectionRequest : : set_host ( const : : std : : string & value ) { <nl> <nl> host_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , value ) ; <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ServerReflectionRequest . host ) <nl> } <nl> - void ServerReflectionRequest : : set_host ( const char * value ) { <nl> + void ServerReflectionRequest : : set_host ( const char * value ) { <nl> <nl> host_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , : : std : : string ( value ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_char : grpc . reflection . v1alpha . ServerReflectionRequest . host ) <nl> } <nl> - void ServerReflectionRequest : : set_host ( const char * value , size_t size ) { <nl> + void ServerReflectionRequest : : set_host ( const char * value , size_t size ) { <nl> <nl> host_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , <nl> : : std : : string ( reinterpret_cast < const char * > ( value ) , size ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_pointer : grpc . reflection . v1alpha . ServerReflectionRequest . host ) <nl> } <nl> - : : std : : string * ServerReflectionRequest : : mutable_host ( ) { <nl> + : : std : : string * ServerReflectionRequest : : mutable_host ( ) { <nl> <nl> / / @ @ protoc_insertion_point ( field_mutable : grpc . reflection . v1alpha . ServerReflectionRequest . host ) <nl> return host_ . MutableNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - : : std : : string * ServerReflectionRequest : : release_host ( ) { <nl> + : : std : : string * ServerReflectionRequest : : release_host ( ) { <nl> / / @ @ protoc_insertion_point ( field_release : grpc . reflection . v1alpha . ServerReflectionRequest . host ) <nl> <nl> return host_ . ReleaseNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - void ServerReflectionRequest : : set_allocated_host ( : : std : : string * host ) { <nl> + void ServerReflectionRequest : : set_allocated_host ( : : std : : string * host ) { <nl> if ( host ! = NULL ) { <nl> <nl> } else { <nl> void ServerReflectionRequest : : clear_file_by_filename ( ) { <nl> clear_has_message_request ( ) ; <nl> } <nl> } <nl> - const : : std : : string & ServerReflectionRequest : : file_by_filename ( ) const { <nl> + const : : std : : string & ServerReflectionRequest : : file_by_filename ( ) const { <nl> / / @ @ protoc_insertion_point ( field_get : grpc . reflection . v1alpha . ServerReflectionRequest . file_by_filename ) <nl> if ( has_file_by_filename ( ) ) { <nl> return message_request_ . file_by_filename_ . GetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> return * & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ; <nl> } <nl> - void ServerReflectionRequest : : set_file_by_filename ( const : : std : : string & value ) { <nl> + void ServerReflectionRequest : : set_file_by_filename ( const : : std : : string & value ) { <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ServerReflectionRequest . file_by_filename ) <nl> if ( ! has_file_by_filename ( ) ) { <nl> clear_message_request ( ) ; <nl> void ServerReflectionRequest : : clear_file_by_filename ( ) { <nl> message_request_ . file_by_filename_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , value ) ; <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ServerReflectionRequest . file_by_filename ) <nl> } <nl> - void ServerReflectionRequest : : set_file_by_filename ( const char * value ) { <nl> + void ServerReflectionRequest : : set_file_by_filename ( const char * value ) { <nl> if ( ! has_file_by_filename ( ) ) { <nl> clear_message_request ( ) ; <nl> set_has_file_by_filename ( ) ; <nl> void ServerReflectionRequest : : clear_file_by_filename ( ) { <nl> : : std : : string ( value ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_char : grpc . reflection . v1alpha . ServerReflectionRequest . file_by_filename ) <nl> } <nl> - void ServerReflectionRequest : : set_file_by_filename ( const char * value , size_t size ) { <nl> + void ServerReflectionRequest : : set_file_by_filename ( const char * value , size_t size ) { <nl> if ( ! has_file_by_filename ( ) ) { <nl> clear_message_request ( ) ; <nl> set_has_file_by_filename ( ) ; <nl> void ServerReflectionRequest : : clear_file_by_filename ( ) { <nl> reinterpret_cast < const char * > ( value ) , size ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_pointer : grpc . reflection . v1alpha . ServerReflectionRequest . file_by_filename ) <nl> } <nl> - : : std : : string * ServerReflectionRequest : : mutable_file_by_filename ( ) { <nl> + : : std : : string * ServerReflectionRequest : : mutable_file_by_filename ( ) { <nl> if ( ! has_file_by_filename ( ) ) { <nl> clear_message_request ( ) ; <nl> set_has_file_by_filename ( ) ; <nl> void ServerReflectionRequest : : clear_file_by_filename ( ) { <nl> / / @ @ protoc_insertion_point ( field_mutable : grpc . reflection . v1alpha . ServerReflectionRequest . file_by_filename ) <nl> return message_request_ . file_by_filename_ . MutableNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - : : std : : string * ServerReflectionRequest : : release_file_by_filename ( ) { <nl> + : : std : : string * ServerReflectionRequest : : release_file_by_filename ( ) { <nl> / / @ @ protoc_insertion_point ( field_release : grpc . reflection . v1alpha . ServerReflectionRequest . file_by_filename ) <nl> if ( has_file_by_filename ( ) ) { <nl> clear_has_message_request ( ) ; <nl> void ServerReflectionRequest : : clear_file_by_filename ( ) { <nl> return NULL ; <nl> } <nl> } <nl> - void ServerReflectionRequest : : set_allocated_file_by_filename ( : : std : : string * file_by_filename ) { <nl> + void ServerReflectionRequest : : set_allocated_file_by_filename ( : : std : : string * file_by_filename ) { <nl> if ( ! has_file_by_filename ( ) ) { <nl> message_request_ . file_by_filename_ . UnsafeSetDefault ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> void ServerReflectionRequest : : clear_file_containing_symbol ( ) { <nl> clear_has_message_request ( ) ; <nl> } <nl> } <nl> - const : : std : : string & ServerReflectionRequest : : file_containing_symbol ( ) const { <nl> + const : : std : : string & ServerReflectionRequest : : file_containing_symbol ( ) const { <nl> / / @ @ protoc_insertion_point ( field_get : grpc . reflection . v1alpha . ServerReflectionRequest . file_containing_symbol ) <nl> if ( has_file_containing_symbol ( ) ) { <nl> return message_request_ . file_containing_symbol_ . GetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> return * & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ; <nl> } <nl> - void ServerReflectionRequest : : set_file_containing_symbol ( const : : std : : string & value ) { <nl> + void ServerReflectionRequest : : set_file_containing_symbol ( const : : std : : string & value ) { <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ServerReflectionRequest . file_containing_symbol ) <nl> if ( ! has_file_containing_symbol ( ) ) { <nl> clear_message_request ( ) ; <nl> void ServerReflectionRequest : : clear_file_containing_symbol ( ) { <nl> message_request_ . file_containing_symbol_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , value ) ; <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ServerReflectionRequest . file_containing_symbol ) <nl> } <nl> - void ServerReflectionRequest : : set_file_containing_symbol ( const char * value ) { <nl> + void ServerReflectionRequest : : set_file_containing_symbol ( const char * value ) { <nl> if ( ! has_file_containing_symbol ( ) ) { <nl> clear_message_request ( ) ; <nl> set_has_file_containing_symbol ( ) ; <nl> void ServerReflectionRequest : : clear_file_containing_symbol ( ) { <nl> : : std : : string ( value ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_char : grpc . reflection . v1alpha . ServerReflectionRequest . file_containing_symbol ) <nl> } <nl> - void ServerReflectionRequest : : set_file_containing_symbol ( const char * value , size_t size ) { <nl> + void ServerReflectionRequest : : set_file_containing_symbol ( const char * value , size_t size ) { <nl> if ( ! has_file_containing_symbol ( ) ) { <nl> clear_message_request ( ) ; <nl> set_has_file_containing_symbol ( ) ; <nl> void ServerReflectionRequest : : clear_file_containing_symbol ( ) { <nl> reinterpret_cast < const char * > ( value ) , size ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_pointer : grpc . reflection . v1alpha . ServerReflectionRequest . file_containing_symbol ) <nl> } <nl> - : : std : : string * ServerReflectionRequest : : mutable_file_containing_symbol ( ) { <nl> + : : std : : string * ServerReflectionRequest : : mutable_file_containing_symbol ( ) { <nl> if ( ! has_file_containing_symbol ( ) ) { <nl> clear_message_request ( ) ; <nl> set_has_file_containing_symbol ( ) ; <nl> void ServerReflectionRequest : : clear_file_containing_symbol ( ) { <nl> / / @ @ protoc_insertion_point ( field_mutable : grpc . reflection . v1alpha . ServerReflectionRequest . file_containing_symbol ) <nl> return message_request_ . file_containing_symbol_ . MutableNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - : : std : : string * ServerReflectionRequest : : release_file_containing_symbol ( ) { <nl> + : : std : : string * ServerReflectionRequest : : release_file_containing_symbol ( ) { <nl> / / @ @ protoc_insertion_point ( field_release : grpc . reflection . v1alpha . ServerReflectionRequest . file_containing_symbol ) <nl> if ( has_file_containing_symbol ( ) ) { <nl> clear_has_message_request ( ) ; <nl> void ServerReflectionRequest : : clear_file_containing_symbol ( ) { <nl> return NULL ; <nl> } <nl> } <nl> - void ServerReflectionRequest : : set_allocated_file_containing_symbol ( : : std : : string * file_containing_symbol ) { <nl> + void ServerReflectionRequest : : set_allocated_file_containing_symbol ( : : std : : string * file_containing_symbol ) { <nl> if ( ! has_file_containing_symbol ( ) ) { <nl> message_request_ . file_containing_symbol_ . UnsafeSetDefault ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> void ServerReflectionRequest : : clear_all_extension_numbers_of_type ( ) { <nl> clear_has_message_request ( ) ; <nl> } <nl> } <nl> - const : : std : : string & ServerReflectionRequest : : all_extension_numbers_of_type ( ) const { <nl> + const : : std : : string & ServerReflectionRequest : : all_extension_numbers_of_type ( ) const { <nl> / / @ @ protoc_insertion_point ( field_get : grpc . reflection . v1alpha . ServerReflectionRequest . all_extension_numbers_of_type ) <nl> if ( has_all_extension_numbers_of_type ( ) ) { <nl> return message_request_ . all_extension_numbers_of_type_ . GetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> return * & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ; <nl> } <nl> - void ServerReflectionRequest : : set_all_extension_numbers_of_type ( const : : std : : string & value ) { <nl> + void ServerReflectionRequest : : set_all_extension_numbers_of_type ( const : : std : : string & value ) { <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ServerReflectionRequest . all_extension_numbers_of_type ) <nl> if ( ! has_all_extension_numbers_of_type ( ) ) { <nl> clear_message_request ( ) ; <nl> void ServerReflectionRequest : : clear_all_extension_numbers_of_type ( ) { <nl> message_request_ . all_extension_numbers_of_type_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , value ) ; <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ServerReflectionRequest . all_extension_numbers_of_type ) <nl> } <nl> - void ServerReflectionRequest : : set_all_extension_numbers_of_type ( const char * value ) { <nl> + void ServerReflectionRequest : : set_all_extension_numbers_of_type ( const char * value ) { <nl> if ( ! has_all_extension_numbers_of_type ( ) ) { <nl> clear_message_request ( ) ; <nl> set_has_all_extension_numbers_of_type ( ) ; <nl> void ServerReflectionRequest : : clear_all_extension_numbers_of_type ( ) { <nl> : : std : : string ( value ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_char : grpc . reflection . v1alpha . ServerReflectionRequest . all_extension_numbers_of_type ) <nl> } <nl> - void ServerReflectionRequest : : set_all_extension_numbers_of_type ( const char * value , size_t size ) { <nl> + void ServerReflectionRequest : : set_all_extension_numbers_of_type ( const char * value , size_t size ) { <nl> if ( ! has_all_extension_numbers_of_type ( ) ) { <nl> clear_message_request ( ) ; <nl> set_has_all_extension_numbers_of_type ( ) ; <nl> void ServerReflectionRequest : : clear_all_extension_numbers_of_type ( ) { <nl> reinterpret_cast < const char * > ( value ) , size ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_pointer : grpc . reflection . v1alpha . ServerReflectionRequest . all_extension_numbers_of_type ) <nl> } <nl> - : : std : : string * ServerReflectionRequest : : mutable_all_extension_numbers_of_type ( ) { <nl> + : : std : : string * ServerReflectionRequest : : mutable_all_extension_numbers_of_type ( ) { <nl> if ( ! has_all_extension_numbers_of_type ( ) ) { <nl> clear_message_request ( ) ; <nl> set_has_all_extension_numbers_of_type ( ) ; <nl> void ServerReflectionRequest : : clear_all_extension_numbers_of_type ( ) { <nl> / / @ @ protoc_insertion_point ( field_mutable : grpc . reflection . v1alpha . ServerReflectionRequest . all_extension_numbers_of_type ) <nl> return message_request_ . all_extension_numbers_of_type_ . MutableNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - : : std : : string * ServerReflectionRequest : : release_all_extension_numbers_of_type ( ) { <nl> + : : std : : string * ServerReflectionRequest : : release_all_extension_numbers_of_type ( ) { <nl> / / @ @ protoc_insertion_point ( field_release : grpc . reflection . v1alpha . ServerReflectionRequest . all_extension_numbers_of_type ) <nl> if ( has_all_extension_numbers_of_type ( ) ) { <nl> clear_has_message_request ( ) ; <nl> void ServerReflectionRequest : : clear_all_extension_numbers_of_type ( ) { <nl> return NULL ; <nl> } <nl> } <nl> - void ServerReflectionRequest : : set_allocated_all_extension_numbers_of_type ( : : std : : string * all_extension_numbers_of_type ) { <nl> + void ServerReflectionRequest : : set_allocated_all_extension_numbers_of_type ( : : std : : string * all_extension_numbers_of_type ) { <nl> if ( ! has_all_extension_numbers_of_type ( ) ) { <nl> message_request_ . all_extension_numbers_of_type_ . UnsafeSetDefault ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> void ServerReflectionRequest : : clear_list_services ( ) { <nl> clear_has_message_request ( ) ; <nl> } <nl> } <nl> - const : : std : : string & ServerReflectionRequest : : list_services ( ) const { <nl> + const : : std : : string & ServerReflectionRequest : : list_services ( ) const { <nl> / / @ @ protoc_insertion_point ( field_get : grpc . reflection . v1alpha . ServerReflectionRequest . list_services ) <nl> if ( has_list_services ( ) ) { <nl> return message_request_ . list_services_ . GetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> return * & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ; <nl> } <nl> - void ServerReflectionRequest : : set_list_services ( const : : std : : string & value ) { <nl> + void ServerReflectionRequest : : set_list_services ( const : : std : : string & value ) { <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ServerReflectionRequest . list_services ) <nl> if ( ! has_list_services ( ) ) { <nl> clear_message_request ( ) ; <nl> void ServerReflectionRequest : : clear_list_services ( ) { <nl> message_request_ . list_services_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , value ) ; <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ServerReflectionRequest . list_services ) <nl> } <nl> - void ServerReflectionRequest : : set_list_services ( const char * value ) { <nl> + void ServerReflectionRequest : : set_list_services ( const char * value ) { <nl> if ( ! has_list_services ( ) ) { <nl> clear_message_request ( ) ; <nl> set_has_list_services ( ) ; <nl> void ServerReflectionRequest : : clear_list_services ( ) { <nl> : : std : : string ( value ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_char : grpc . reflection . v1alpha . ServerReflectionRequest . list_services ) <nl> } <nl> - void ServerReflectionRequest : : set_list_services ( const char * value , size_t size ) { <nl> + void ServerReflectionRequest : : set_list_services ( const char * value , size_t size ) { <nl> if ( ! has_list_services ( ) ) { <nl> clear_message_request ( ) ; <nl> set_has_list_services ( ) ; <nl> void ServerReflectionRequest : : clear_list_services ( ) { <nl> reinterpret_cast < const char * > ( value ) , size ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_pointer : grpc . reflection . v1alpha . ServerReflectionRequest . list_services ) <nl> } <nl> - : : std : : string * ServerReflectionRequest : : mutable_list_services ( ) { <nl> + : : std : : string * ServerReflectionRequest : : mutable_list_services ( ) { <nl> if ( ! has_list_services ( ) ) { <nl> clear_message_request ( ) ; <nl> set_has_list_services ( ) ; <nl> void ServerReflectionRequest : : clear_list_services ( ) { <nl> / / @ @ protoc_insertion_point ( field_mutable : grpc . reflection . v1alpha . ServerReflectionRequest . list_services ) <nl> return message_request_ . list_services_ . MutableNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - : : std : : string * ServerReflectionRequest : : release_list_services ( ) { <nl> + : : std : : string * ServerReflectionRequest : : release_list_services ( ) { <nl> / / @ @ protoc_insertion_point ( field_release : grpc . reflection . v1alpha . ServerReflectionRequest . list_services ) <nl> if ( has_list_services ( ) ) { <nl> clear_has_message_request ( ) ; <nl> void ServerReflectionRequest : : clear_list_services ( ) { <nl> return NULL ; <nl> } <nl> } <nl> - void ServerReflectionRequest : : set_allocated_list_services ( : : std : : string * list_services ) { <nl> + void ServerReflectionRequest : : set_allocated_list_services ( : : std : : string * list_services ) { <nl> if ( ! has_list_services ( ) ) { <nl> message_request_ . list_services_ . UnsafeSetDefault ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> void ServerReflectionRequest : : clear_has_message_request ( ) { <nl> ServerReflectionRequest : : MessageRequestCase ServerReflectionRequest : : message_request_case ( ) const { <nl> return ServerReflectionRequest : : MessageRequestCase ( _oneof_case_ [ 0 ] ) ; <nl> } <nl> + inline const ServerReflectionRequest * ServerReflectionRequest : : internal_default_instance ( ) { <nl> + return & ServerReflectionRequest_default_instance_ . get ( ) ; <nl> + } <nl> # endif / / PROTOBUF_INLINE_NOT_IN_HEADERS <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> const int ExtensionRequest : : kExtensionNumberFieldNumber ; <nl> <nl> ExtensionRequest : : ExtensionRequest ( ) <nl> : : : google : : protobuf : : Message ( ) , _internal_metadata_ ( NULL ) { <nl> + if ( this ! = internal_default_instance ( ) ) protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> SharedCtor ( ) ; <nl> / / @ @ protoc_insertion_point ( constructor : grpc . reflection . v1alpha . ExtensionRequest ) <nl> } <nl> <nl> void ExtensionRequest : : InitAsDefaultInstance ( ) { <nl> - _is_default_instance_ = true ; <nl> } <nl> <nl> ExtensionRequest : : ExtensionRequest ( const ExtensionRequest & from ) <nl> : : : google : : protobuf : : Message ( ) , <nl> _internal_metadata_ ( NULL ) { <nl> SharedCtor ( ) ; <nl> - MergeFrom ( from ) ; <nl> + UnsafeMergeFrom ( from ) ; <nl> / / @ @ protoc_insertion_point ( copy_constructor : grpc . reflection . v1alpha . ExtensionRequest ) <nl> } <nl> <nl> void ExtensionRequest : : SharedCtor ( ) { <nl> - _is_default_instance_ = false ; <nl> - : : google : : protobuf : : internal : : GetEmptyString ( ) ; <nl> - _cached_size_ = 0 ; <nl> containing_type_ . UnsafeSetDefault ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> extension_number_ = 0 ; <nl> + _cached_size_ = 0 ; <nl> } <nl> <nl> ExtensionRequest : : ~ ExtensionRequest ( ) { <nl> ExtensionRequest : : ~ ExtensionRequest ( ) { <nl> <nl> void ExtensionRequest : : SharedDtor ( ) { <nl> containing_type_ . DestroyNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> - if ( this ! = default_instance_ ) { <nl> - } <nl> } <nl> <nl> void ExtensionRequest : : SetCachedSize ( int size ) const { <nl> const : : google : : protobuf : : Descriptor * ExtensionRequest : : descriptor ( ) { <nl> } <nl> <nl> const ExtensionRequest & ExtensionRequest : : default_instance ( ) { <nl> - if ( default_instance_ = = NULL ) protobuf_AddDesc_reflection_2eproto ( ) ; <nl> - return * default_instance_ ; <nl> + protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> + return * internal_default_instance ( ) ; <nl> } <nl> <nl> - ExtensionRequest * ExtensionRequest : : default_instance_ = NULL ; <nl> + : : google : : protobuf : : internal : : ExplicitlyConstructed < ExtensionRequest > ExtensionRequest_default_instance_ ; <nl> <nl> ExtensionRequest * ExtensionRequest : : New ( : : google : : protobuf : : Arena * arena ) const { <nl> ExtensionRequest * n = new ExtensionRequest ; <nl> bool ExtensionRequest : : MergePartialFromCodedStream ( <nl> case 2 : { <nl> if ( tag = = 16 ) { <nl> parse_extension_number : <nl> + <nl> DO_ ( ( : : google : : protobuf : : internal : : WireFormatLite : : ReadPrimitive < <nl> : : google : : protobuf : : int32 , : : google : : protobuf : : internal : : WireFormatLite : : TYPE_INT32 > ( <nl> input , & extension_number_ ) ) ) ; <nl> - <nl> } else { <nl> goto handle_unusual ; <nl> } <nl> void ExtensionRequest : : SerializeWithCachedSizes ( <nl> <nl> : : google : : protobuf : : uint8 * ExtensionRequest : : InternalSerializeWithCachedSizesToArray ( <nl> bool deterministic , : : google : : protobuf : : uint8 * target ) const { <nl> + ( void ) deterministic ; / / Unused <nl> / / @ @ protoc_insertion_point ( serialize_to_array_start : grpc . reflection . v1alpha . ExtensionRequest ) <nl> / / optional string containing_type = 1 ; <nl> if ( this - > containing_type ( ) . size ( ) > 0 ) { <nl> : : google : : protobuf : : uint8 * ExtensionRequest : : InternalSerializeWithCachedSizesToA <nl> return target ; <nl> } <nl> <nl> - int ExtensionRequest : : ByteSize ( ) const { <nl> + size_t ExtensionRequest : : ByteSizeLong ( ) const { <nl> / / @ @ protoc_insertion_point ( message_byte_size_start : grpc . reflection . v1alpha . ExtensionRequest ) <nl> - int total_size = 0 ; <nl> + size_t total_size = 0 ; <nl> <nl> / / optional string containing_type = 1 ; <nl> if ( this - > containing_type ( ) . size ( ) > 0 ) { <nl> int ExtensionRequest : : ByteSize ( ) const { <nl> this - > extension_number ( ) ) ; <nl> } <nl> <nl> + int cached_size = : : google : : protobuf : : internal : : ToCachedSize ( total_size ) ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN ( ) ; <nl> - _cached_size_ = total_size ; <nl> + _cached_size_ = cached_size ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_END ( ) ; <nl> return total_size ; <nl> } <nl> <nl> void ExtensionRequest : : MergeFrom ( const : : google : : protobuf : : Message & from ) { <nl> / / @ @ protoc_insertion_point ( generalized_merge_from_start : grpc . reflection . v1alpha . ExtensionRequest ) <nl> - if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) { <nl> - : : google : : protobuf : : internal : : MergeFromFail ( __FILE__ , __LINE__ ) ; <nl> - } <nl> - const ExtensionRequest * source = <nl> + if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) MergeFromFail ( __LINE__ ) ; <nl> + const ExtensionRequest * source = <nl> : : google : : protobuf : : internal : : DynamicCastToGenerated < const ExtensionRequest > ( <nl> & from ) ; <nl> if ( source = = NULL ) { <nl> void ExtensionRequest : : MergeFrom ( const : : google : : protobuf : : Message & from ) { <nl> : : google : : protobuf : : internal : : ReflectionOps : : Merge ( from , this ) ; <nl> } else { <nl> / / @ @ protoc_insertion_point ( generalized_merge_from_cast_success : grpc . reflection . v1alpha . ExtensionRequest ) <nl> - MergeFrom ( * source ) ; <nl> + UnsafeMergeFrom ( * source ) ; <nl> } <nl> } <nl> <nl> void ExtensionRequest : : MergeFrom ( const ExtensionRequest & from ) { <nl> / / @ @ protoc_insertion_point ( class_specific_merge_from_start : grpc . reflection . v1alpha . ExtensionRequest ) <nl> - if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) { <nl> - : : google : : protobuf : : internal : : MergeFromFail ( __FILE__ , __LINE__ ) ; <nl> + if ( GOOGLE_PREDICT_TRUE ( & from ! = this ) ) { <nl> + UnsafeMergeFrom ( from ) ; <nl> + } else { <nl> + MergeFromFail ( __LINE__ ) ; <nl> } <nl> + } <nl> + <nl> + void ExtensionRequest : : UnsafeMergeFrom ( const ExtensionRequest & from ) { <nl> + GOOGLE_DCHECK ( & from ! = this ) ; <nl> if ( from . containing_type ( ) . size ( ) > 0 ) { <nl> <nl> containing_type_ . AssignWithDefault ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , from . containing_type_ ) ; <nl> void ExtensionRequest : : CopyFrom ( const ExtensionRequest & from ) { <nl> / / @ @ protoc_insertion_point ( class_specific_copy_from_start : grpc . reflection . v1alpha . ExtensionRequest ) <nl> if ( & from = = this ) return ; <nl> Clear ( ) ; <nl> - MergeFrom ( from ) ; <nl> + UnsafeMergeFrom ( from ) ; <nl> } <nl> <nl> bool ExtensionRequest : : IsInitialized ( ) const { <nl> : : google : : protobuf : : Metadata ExtensionRequest : : GetMetadata ( ) const { <nl> void ExtensionRequest : : clear_containing_type ( ) { <nl> containing_type_ . ClearToEmptyNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - const : : std : : string & ExtensionRequest : : containing_type ( ) const { <nl> + const : : std : : string & ExtensionRequest : : containing_type ( ) const { <nl> / / @ @ protoc_insertion_point ( field_get : grpc . reflection . v1alpha . ExtensionRequest . containing_type ) <nl> return containing_type_ . GetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - void ExtensionRequest : : set_containing_type ( const : : std : : string & value ) { <nl> + void ExtensionRequest : : set_containing_type ( const : : std : : string & value ) { <nl> <nl> containing_type_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , value ) ; <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ExtensionRequest . containing_type ) <nl> } <nl> - void ExtensionRequest : : set_containing_type ( const char * value ) { <nl> + void ExtensionRequest : : set_containing_type ( const char * value ) { <nl> <nl> containing_type_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , : : std : : string ( value ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_char : grpc . reflection . v1alpha . ExtensionRequest . containing_type ) <nl> } <nl> - void ExtensionRequest : : set_containing_type ( const char * value , size_t size ) { <nl> + void ExtensionRequest : : set_containing_type ( const char * value , size_t size ) { <nl> <nl> containing_type_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , <nl> : : std : : string ( reinterpret_cast < const char * > ( value ) , size ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_pointer : grpc . reflection . v1alpha . ExtensionRequest . containing_type ) <nl> } <nl> - : : std : : string * ExtensionRequest : : mutable_containing_type ( ) { <nl> + : : std : : string * ExtensionRequest : : mutable_containing_type ( ) { <nl> <nl> / / @ @ protoc_insertion_point ( field_mutable : grpc . reflection . v1alpha . ExtensionRequest . containing_type ) <nl> return containing_type_ . MutableNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - : : std : : string * ExtensionRequest : : release_containing_type ( ) { <nl> + : : std : : string * ExtensionRequest : : release_containing_type ( ) { <nl> / / @ @ protoc_insertion_point ( field_release : grpc . reflection . v1alpha . ExtensionRequest . containing_type ) <nl> <nl> return containing_type_ . ReleaseNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - void ExtensionRequest : : set_allocated_containing_type ( : : std : : string * containing_type ) { <nl> + void ExtensionRequest : : set_allocated_containing_type ( : : std : : string * containing_type ) { <nl> if ( containing_type ! = NULL ) { <nl> <nl> } else { <nl> void ExtensionRequest : : clear_containing_type ( ) { <nl> void ExtensionRequest : : clear_extension_number ( ) { <nl> extension_number_ = 0 ; <nl> } <nl> - : : google : : protobuf : : int32 ExtensionRequest : : extension_number ( ) const { <nl> + : : google : : protobuf : : int32 ExtensionRequest : : extension_number ( ) const { <nl> / / @ @ protoc_insertion_point ( field_get : grpc . reflection . v1alpha . ExtensionRequest . extension_number ) <nl> return extension_number_ ; <nl> } <nl> - void ExtensionRequest : : set_extension_number ( : : google : : protobuf : : int32 value ) { <nl> + void ExtensionRequest : : set_extension_number ( : : google : : protobuf : : int32 value ) { <nl> <nl> extension_number_ = value ; <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ExtensionRequest . extension_number ) <nl> } <nl> <nl> + inline const ExtensionRequest * ExtensionRequest : : internal_default_instance ( ) { <nl> + return & ExtensionRequest_default_instance_ . get ( ) ; <nl> + } <nl> # endif / / PROTOBUF_INLINE_NOT_IN_HEADERS <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> const int ServerReflectionResponse : : kErrorResponseFieldNumber ; <nl> <nl> ServerReflectionResponse : : ServerReflectionResponse ( ) <nl> : : : google : : protobuf : : Message ( ) , _internal_metadata_ ( NULL ) { <nl> + if ( this ! = internal_default_instance ( ) ) protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> SharedCtor ( ) ; <nl> / / @ @ protoc_insertion_point ( constructor : grpc . reflection . v1alpha . ServerReflectionResponse ) <nl> } <nl> <nl> void ServerReflectionResponse : : InitAsDefaultInstance ( ) { <nl> - _is_default_instance_ = true ; <nl> - original_request_ = const_cast < : : grpc : : reflection : : v1alpha : : ServerReflectionRequest * > ( & : : grpc : : reflection : : v1alpha : : ServerReflectionRequest : : default_instance ( ) ) ; <nl> - ServerReflectionResponse_default_oneof_instance_ - > file_descriptor_response_ = const_cast < : : grpc : : reflection : : v1alpha : : FileDescriptorResponse * > ( & : : grpc : : reflection : : v1alpha : : FileDescriptorResponse : : default_instance ( ) ) ; <nl> - ServerReflectionResponse_default_oneof_instance_ - > all_extension_numbers_response_ = const_cast < : : grpc : : reflection : : v1alpha : : ExtensionNumberResponse * > ( & : : grpc : : reflection : : v1alpha : : ExtensionNumberResponse : : default_instance ( ) ) ; <nl> - ServerReflectionResponse_default_oneof_instance_ - > list_services_response_ = const_cast < : : grpc : : reflection : : v1alpha : : ListServiceResponse * > ( & : : grpc : : reflection : : v1alpha : : ListServiceResponse : : default_instance ( ) ) ; <nl> - ServerReflectionResponse_default_oneof_instance_ - > error_response_ = const_cast < : : grpc : : reflection : : v1alpha : : ErrorResponse * > ( & : : grpc : : reflection : : v1alpha : : ErrorResponse : : default_instance ( ) ) ; <nl> + original_request_ = const_cast < : : grpc : : reflection : : v1alpha : : ServerReflectionRequest * > ( <nl> + : : grpc : : reflection : : v1alpha : : ServerReflectionRequest : : internal_default_instance ( ) ) ; <nl> + ServerReflectionResponse_default_oneof_instance_ - > file_descriptor_response_ = const_cast < : : grpc : : reflection : : v1alpha : : FileDescriptorResponse * > ( <nl> + : : grpc : : reflection : : v1alpha : : FileDescriptorResponse : : internal_default_instance ( ) ) ; <nl> + ServerReflectionResponse_default_oneof_instance_ - > all_extension_numbers_response_ = const_cast < : : grpc : : reflection : : v1alpha : : ExtensionNumberResponse * > ( <nl> + : : grpc : : reflection : : v1alpha : : ExtensionNumberResponse : : internal_default_instance ( ) ) ; <nl> + ServerReflectionResponse_default_oneof_instance_ - > list_services_response_ = const_cast < : : grpc : : reflection : : v1alpha : : ListServiceResponse * > ( <nl> + : : grpc : : reflection : : v1alpha : : ListServiceResponse : : internal_default_instance ( ) ) ; <nl> + ServerReflectionResponse_default_oneof_instance_ - > error_response_ = const_cast < : : grpc : : reflection : : v1alpha : : ErrorResponse * > ( <nl> + : : grpc : : reflection : : v1alpha : : ErrorResponse : : internal_default_instance ( ) ) ; <nl> } <nl> <nl> ServerReflectionResponse : : ServerReflectionResponse ( const ServerReflectionResponse & from ) <nl> : : : google : : protobuf : : Message ( ) , <nl> _internal_metadata_ ( NULL ) { <nl> SharedCtor ( ) ; <nl> - MergeFrom ( from ) ; <nl> + UnsafeMergeFrom ( from ) ; <nl> / / @ @ protoc_insertion_point ( copy_constructor : grpc . reflection . v1alpha . ServerReflectionResponse ) <nl> } <nl> <nl> void ServerReflectionResponse : : SharedCtor ( ) { <nl> - _is_default_instance_ = false ; <nl> - : : google : : protobuf : : internal : : GetEmptyString ( ) ; <nl> - _cached_size_ = 0 ; <nl> valid_host_ . UnsafeSetDefault ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> original_request_ = NULL ; <nl> clear_has_message_response ( ) ; <nl> + _cached_size_ = 0 ; <nl> } <nl> <nl> ServerReflectionResponse : : ~ ServerReflectionResponse ( ) { <nl> void ServerReflectionResponse : : SharedDtor ( ) { <nl> if ( has_message_response ( ) ) { <nl> clear_message_response ( ) ; <nl> } <nl> - if ( this ! = default_instance_ ) { <nl> + if ( this ! = & ServerReflectionResponse_default_instance_ . get ( ) ) { <nl> delete original_request_ ; <nl> } <nl> } <nl> const : : google : : protobuf : : Descriptor * ServerReflectionResponse : : descriptor ( ) { <nl> } <nl> <nl> const ServerReflectionResponse & ServerReflectionResponse : : default_instance ( ) { <nl> - if ( default_instance_ = = NULL ) protobuf_AddDesc_reflection_2eproto ( ) ; <nl> - return * default_instance_ ; <nl> + protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> + return * internal_default_instance ( ) ; <nl> } <nl> <nl> - ServerReflectionResponse * ServerReflectionResponse : : default_instance_ = NULL ; <nl> + : : google : : protobuf : : internal : : ExplicitlyConstructed < ServerReflectionResponse > ServerReflectionResponse_default_instance_ ; <nl> <nl> ServerReflectionResponse * ServerReflectionResponse : : New ( : : google : : protobuf : : Arena * arena ) const { <nl> ServerReflectionResponse * n = new ServerReflectionResponse ; <nl> ServerReflectionResponse * ServerReflectionResponse : : New ( : : google : : protobuf : : Aren <nl> <nl> void ServerReflectionResponse : : clear_message_response ( ) { <nl> / / @ @ protoc_insertion_point ( one_of_clear_start : grpc . reflection . v1alpha . ServerReflectionResponse ) <nl> - switch ( message_response_case ( ) ) { <nl> + switch ( message_response_case ( ) ) { <nl> case kFileDescriptorResponse : { <nl> delete message_response_ . file_descriptor_response_ ; <nl> break ; <nl> bool ServerReflectionResponse : : MergePartialFromCodedStream ( <nl> } else { <nl> goto handle_unusual ; <nl> } <nl> - if ( input - > ExpectTag ( 42 ) ) goto parse_all_extension_numbers_response ; <nl> + goto after_error_response ; <nl> break ; <nl> } <nl> <nl> / / optional . grpc . reflection . v1alpha . ExtensionNumberResponse all_extension_numbers_response = 5 ; <nl> case 5 : { <nl> if ( tag = = 42 ) { <nl> - parse_all_extension_numbers_response : <nl> DO_ ( : : google : : protobuf : : internal : : WireFormatLite : : ReadMessageNoVirtual ( <nl> input , mutable_all_extension_numbers_response ( ) ) ) ; <nl> } else { <nl> goto handle_unusual ; <nl> } <nl> - if ( input - > ExpectTag ( 50 ) ) goto parse_list_services_response ; <nl> + goto after_error_response ; <nl> break ; <nl> } <nl> <nl> / / optional . grpc . reflection . v1alpha . ListServiceResponse list_services_response = 6 ; <nl> case 6 : { <nl> if ( tag = = 50 ) { <nl> - parse_list_services_response : <nl> DO_ ( : : google : : protobuf : : internal : : WireFormatLite : : ReadMessageNoVirtual ( <nl> input , mutable_list_services_response ( ) ) ) ; <nl> } else { <nl> bool ServerReflectionResponse : : MergePartialFromCodedStream ( <nl> } else { <nl> goto handle_unusual ; <nl> } <nl> + after_error_response : <nl> if ( input - > ExpectAtEnd ( ) ) goto success ; <nl> break ; <nl> } <nl> void ServerReflectionResponse : : SerializeWithCachedSizes ( <nl> <nl> : : google : : protobuf : : uint8 * ServerReflectionResponse : : InternalSerializeWithCachedSizesToArray ( <nl> bool deterministic , : : google : : protobuf : : uint8 * target ) const { <nl> + ( void ) deterministic ; / / Unused <nl> / / @ @ protoc_insertion_point ( serialize_to_array_start : grpc . reflection . v1alpha . ServerReflectionResponse ) <nl> / / optional string valid_host = 1 ; <nl> if ( this - > valid_host ( ) . size ( ) > 0 ) { <nl> : : google : : protobuf : : uint8 * ServerReflectionResponse : : InternalSerializeWithCached <nl> return target ; <nl> } <nl> <nl> - int ServerReflectionResponse : : ByteSize ( ) const { <nl> + size_t ServerReflectionResponse : : ByteSizeLong ( ) const { <nl> / / @ @ protoc_insertion_point ( message_byte_size_start : grpc . reflection . v1alpha . ServerReflectionResponse ) <nl> - int total_size = 0 ; <nl> + size_t total_size = 0 ; <nl> <nl> / / optional string valid_host = 1 ; <nl> if ( this - > valid_host ( ) . size ( ) > 0 ) { <nl> int ServerReflectionResponse : : ByteSize ( ) const { <nl> break ; <nl> } <nl> } <nl> + int cached_size = : : google : : protobuf : : internal : : ToCachedSize ( total_size ) ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN ( ) ; <nl> - _cached_size_ = total_size ; <nl> + _cached_size_ = cached_size ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_END ( ) ; <nl> return total_size ; <nl> } <nl> <nl> void ServerReflectionResponse : : MergeFrom ( const : : google : : protobuf : : Message & from ) { <nl> / / @ @ protoc_insertion_point ( generalized_merge_from_start : grpc . reflection . v1alpha . ServerReflectionResponse ) <nl> - if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) { <nl> - : : google : : protobuf : : internal : : MergeFromFail ( __FILE__ , __LINE__ ) ; <nl> - } <nl> - const ServerReflectionResponse * source = <nl> + if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) MergeFromFail ( __LINE__ ) ; <nl> + const ServerReflectionResponse * source = <nl> : : google : : protobuf : : internal : : DynamicCastToGenerated < const ServerReflectionResponse > ( <nl> & from ) ; <nl> if ( source = = NULL ) { <nl> void ServerReflectionResponse : : MergeFrom ( const : : google : : protobuf : : Message & from <nl> : : google : : protobuf : : internal : : ReflectionOps : : Merge ( from , this ) ; <nl> } else { <nl> / / @ @ protoc_insertion_point ( generalized_merge_from_cast_success : grpc . reflection . v1alpha . ServerReflectionResponse ) <nl> - MergeFrom ( * source ) ; <nl> + UnsafeMergeFrom ( * source ) ; <nl> } <nl> } <nl> <nl> void ServerReflectionResponse : : MergeFrom ( const ServerReflectionResponse & from ) { <nl> / / @ @ protoc_insertion_point ( class_specific_merge_from_start : grpc . reflection . v1alpha . ServerReflectionResponse ) <nl> - if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) { <nl> - : : google : : protobuf : : internal : : MergeFromFail ( __FILE__ , __LINE__ ) ; <nl> + if ( GOOGLE_PREDICT_TRUE ( & from ! = this ) ) { <nl> + UnsafeMergeFrom ( from ) ; <nl> + } else { <nl> + MergeFromFail ( __LINE__ ) ; <nl> } <nl> + } <nl> + <nl> + void ServerReflectionResponse : : UnsafeMergeFrom ( const ServerReflectionResponse & from ) { <nl> + GOOGLE_DCHECK ( & from ! = this ) ; <nl> switch ( from . message_response_case ( ) ) { <nl> case kFileDescriptorResponse : { <nl> mutable_file_descriptor_response ( ) - > : : grpc : : reflection : : v1alpha : : FileDescriptorResponse : : MergeFrom ( from . file_descriptor_response ( ) ) ; <nl> void ServerReflectionResponse : : CopyFrom ( const ServerReflectionResponse & from ) { <nl> / / @ @ protoc_insertion_point ( class_specific_copy_from_start : grpc . reflection . v1alpha . ServerReflectionResponse ) <nl> if ( & from = = this ) return ; <nl> Clear ( ) ; <nl> - MergeFrom ( from ) ; <nl> + UnsafeMergeFrom ( from ) ; <nl> } <nl> <nl> bool ServerReflectionResponse : : IsInitialized ( ) const { <nl> : : google : : protobuf : : Metadata ServerReflectionResponse : : GetMetadata ( ) const { <nl> void ServerReflectionResponse : : clear_valid_host ( ) { <nl> valid_host_ . ClearToEmptyNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - const : : std : : string & ServerReflectionResponse : : valid_host ( ) const { <nl> + const : : std : : string & ServerReflectionResponse : : valid_host ( ) const { <nl> / / @ @ protoc_insertion_point ( field_get : grpc . reflection . v1alpha . ServerReflectionResponse . valid_host ) <nl> return valid_host_ . GetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - void ServerReflectionResponse : : set_valid_host ( const : : std : : string & value ) { <nl> + void ServerReflectionResponse : : set_valid_host ( const : : std : : string & value ) { <nl> <nl> valid_host_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , value ) ; <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ServerReflectionResponse . valid_host ) <nl> } <nl> - void ServerReflectionResponse : : set_valid_host ( const char * value ) { <nl> + void ServerReflectionResponse : : set_valid_host ( const char * value ) { <nl> <nl> valid_host_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , : : std : : string ( value ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_char : grpc . reflection . v1alpha . ServerReflectionResponse . valid_host ) <nl> } <nl> - void ServerReflectionResponse : : set_valid_host ( const char * value , size_t size ) { <nl> + void ServerReflectionResponse : : set_valid_host ( const char * value , size_t size ) { <nl> <nl> valid_host_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , <nl> : : std : : string ( reinterpret_cast < const char * > ( value ) , size ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_pointer : grpc . reflection . v1alpha . ServerReflectionResponse . valid_host ) <nl> } <nl> - : : std : : string * ServerReflectionResponse : : mutable_valid_host ( ) { <nl> + : : std : : string * ServerReflectionResponse : : mutable_valid_host ( ) { <nl> <nl> / / @ @ protoc_insertion_point ( field_mutable : grpc . reflection . v1alpha . ServerReflectionResponse . valid_host ) <nl> return valid_host_ . MutableNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - : : std : : string * ServerReflectionResponse : : release_valid_host ( ) { <nl> + : : std : : string * ServerReflectionResponse : : release_valid_host ( ) { <nl> / / @ @ protoc_insertion_point ( field_release : grpc . reflection . v1alpha . ServerReflectionResponse . valid_host ) <nl> <nl> return valid_host_ . ReleaseNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - void ServerReflectionResponse : : set_allocated_valid_host ( : : std : : string * valid_host ) { <nl> + void ServerReflectionResponse : : set_allocated_valid_host ( : : std : : string * valid_host ) { <nl> if ( valid_host ! = NULL ) { <nl> <nl> } else { <nl> void ServerReflectionResponse : : clear_valid_host ( ) { <nl> <nl> / / optional . grpc . reflection . v1alpha . ServerReflectionRequest original_request = 2 ; <nl> bool ServerReflectionResponse : : has_original_request ( ) const { <nl> - return ! _is_default_instance_ & & original_request_ ! = NULL ; <nl> + return this ! = internal_default_instance ( ) & & original_request_ ! = NULL ; <nl> } <nl> void ServerReflectionResponse : : clear_original_request ( ) { <nl> if ( GetArenaNoVirtual ( ) = = NULL & & original_request_ ! = NULL ) delete original_request_ ; <nl> void ServerReflectionResponse : : clear_original_request ( ) { <nl> } <nl> const : : grpc : : reflection : : v1alpha : : ServerReflectionRequest & ServerReflectionResponse : : original_request ( ) const { <nl> / / @ @ protoc_insertion_point ( field_get : grpc . reflection . v1alpha . ServerReflectionResponse . original_request ) <nl> - return original_request_ ! = NULL ? * original_request_ : * default_instance_ - > original_request_ ; <nl> + return original_request_ ! = NULL ? * original_request_ <nl> + : * : : grpc : : reflection : : v1alpha : : ServerReflectionRequest : : internal_default_instance ( ) ; <nl> } <nl> : : grpc : : reflection : : v1alpha : : ServerReflectionRequest * ServerReflectionResponse : : mutable_original_request ( ) { <nl> <nl> void ServerReflectionResponse : : clear_has_message_response ( ) { <nl> ServerReflectionResponse : : MessageResponseCase ServerReflectionResponse : : message_response_case ( ) const { <nl> return ServerReflectionResponse : : MessageResponseCase ( _oneof_case_ [ 0 ] ) ; <nl> } <nl> + inline const ServerReflectionResponse * ServerReflectionResponse : : internal_default_instance ( ) { <nl> + return & ServerReflectionResponse_default_instance_ . get ( ) ; <nl> + } <nl> # endif / / PROTOBUF_INLINE_NOT_IN_HEADERS <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> const int FileDescriptorResponse : : kFileDescriptorProtoFieldNumber ; <nl> <nl> FileDescriptorResponse : : FileDescriptorResponse ( ) <nl> : : : google : : protobuf : : Message ( ) , _internal_metadata_ ( NULL ) { <nl> + if ( this ! = internal_default_instance ( ) ) protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> SharedCtor ( ) ; <nl> / / @ @ protoc_insertion_point ( constructor : grpc . reflection . v1alpha . FileDescriptorResponse ) <nl> } <nl> <nl> void FileDescriptorResponse : : InitAsDefaultInstance ( ) { <nl> - _is_default_instance_ = true ; <nl> } <nl> <nl> FileDescriptorResponse : : FileDescriptorResponse ( const FileDescriptorResponse & from ) <nl> : : : google : : protobuf : : Message ( ) , <nl> _internal_metadata_ ( NULL ) { <nl> SharedCtor ( ) ; <nl> - MergeFrom ( from ) ; <nl> + UnsafeMergeFrom ( from ) ; <nl> / / @ @ protoc_insertion_point ( copy_constructor : grpc . reflection . v1alpha . FileDescriptorResponse ) <nl> } <nl> <nl> void FileDescriptorResponse : : SharedCtor ( ) { <nl> - _is_default_instance_ = false ; <nl> - : : google : : protobuf : : internal : : GetEmptyString ( ) ; <nl> _cached_size_ = 0 ; <nl> } <nl> <nl> FileDescriptorResponse : : ~ FileDescriptorResponse ( ) { <nl> } <nl> <nl> void FileDescriptorResponse : : SharedDtor ( ) { <nl> - if ( this ! = default_instance_ ) { <nl> - } <nl> } <nl> <nl> void FileDescriptorResponse : : SetCachedSize ( int size ) const { <nl> const : : google : : protobuf : : Descriptor * FileDescriptorResponse : : descriptor ( ) { <nl> } <nl> <nl> const FileDescriptorResponse & FileDescriptorResponse : : default_instance ( ) { <nl> - if ( default_instance_ = = NULL ) protobuf_AddDesc_reflection_2eproto ( ) ; <nl> - return * default_instance_ ; <nl> + protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> + return * internal_default_instance ( ) ; <nl> } <nl> <nl> - FileDescriptorResponse * FileDescriptorResponse : : default_instance_ = NULL ; <nl> + : : google : : protobuf : : internal : : ExplicitlyConstructed < FileDescriptorResponse > FileDescriptorResponse_default_instance_ ; <nl> <nl> FileDescriptorResponse * FileDescriptorResponse : : New ( : : google : : protobuf : : Arena * arena ) const { <nl> FileDescriptorResponse * n = new FileDescriptorResponse ; <nl> void FileDescriptorResponse : : SerializeWithCachedSizes ( <nl> <nl> : : google : : protobuf : : uint8 * FileDescriptorResponse : : InternalSerializeWithCachedSizesToArray ( <nl> bool deterministic , : : google : : protobuf : : uint8 * target ) const { <nl> + ( void ) deterministic ; / / Unused <nl> / / @ @ protoc_insertion_point ( serialize_to_array_start : grpc . reflection . v1alpha . FileDescriptorResponse ) <nl> / / repeated bytes file_descriptor_proto = 1 ; <nl> for ( int i = 0 ; i < this - > file_descriptor_proto_size ( ) ; i + + ) { <nl> : : google : : protobuf : : uint8 * FileDescriptorResponse : : InternalSerializeWithCachedSi <nl> return target ; <nl> } <nl> <nl> - int FileDescriptorResponse : : ByteSize ( ) const { <nl> + size_t FileDescriptorResponse : : ByteSizeLong ( ) const { <nl> / / @ @ protoc_insertion_point ( message_byte_size_start : grpc . reflection . v1alpha . FileDescriptorResponse ) <nl> - int total_size = 0 ; <nl> + size_t total_size = 0 ; <nl> <nl> / / repeated bytes file_descriptor_proto = 1 ; <nl> - total_size + = 1 * this - > file_descriptor_proto_size ( ) ; <nl> + total_size + = 1 * <nl> + : : google : : protobuf : : internal : : FromIntSize ( this - > file_descriptor_proto_size ( ) ) ; <nl> for ( int i = 0 ; i < this - > file_descriptor_proto_size ( ) ; i + + ) { <nl> total_size + = : : google : : protobuf : : internal : : WireFormatLite : : BytesSize ( <nl> this - > file_descriptor_proto ( i ) ) ; <nl> } <nl> <nl> + int cached_size = : : google : : protobuf : : internal : : ToCachedSize ( total_size ) ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN ( ) ; <nl> - _cached_size_ = total_size ; <nl> + _cached_size_ = cached_size ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_END ( ) ; <nl> return total_size ; <nl> } <nl> <nl> void FileDescriptorResponse : : MergeFrom ( const : : google : : protobuf : : Message & from ) { <nl> / / @ @ protoc_insertion_point ( generalized_merge_from_start : grpc . reflection . v1alpha . FileDescriptorResponse ) <nl> - if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) { <nl> - : : google : : protobuf : : internal : : MergeFromFail ( __FILE__ , __LINE__ ) ; <nl> - } <nl> - const FileDescriptorResponse * source = <nl> + if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) MergeFromFail ( __LINE__ ) ; <nl> + const FileDescriptorResponse * source = <nl> : : google : : protobuf : : internal : : DynamicCastToGenerated < const FileDescriptorResponse > ( <nl> & from ) ; <nl> if ( source = = NULL ) { <nl> void FileDescriptorResponse : : MergeFrom ( const : : google : : protobuf : : Message & from ) <nl> : : google : : protobuf : : internal : : ReflectionOps : : Merge ( from , this ) ; <nl> } else { <nl> / / @ @ protoc_insertion_point ( generalized_merge_from_cast_success : grpc . reflection . v1alpha . FileDescriptorResponse ) <nl> - MergeFrom ( * source ) ; <nl> + UnsafeMergeFrom ( * source ) ; <nl> } <nl> } <nl> <nl> void FileDescriptorResponse : : MergeFrom ( const FileDescriptorResponse & from ) { <nl> / / @ @ protoc_insertion_point ( class_specific_merge_from_start : grpc . reflection . v1alpha . FileDescriptorResponse ) <nl> - if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) { <nl> - : : google : : protobuf : : internal : : MergeFromFail ( __FILE__ , __LINE__ ) ; <nl> + if ( GOOGLE_PREDICT_TRUE ( & from ! = this ) ) { <nl> + UnsafeMergeFrom ( from ) ; <nl> + } else { <nl> + MergeFromFail ( __LINE__ ) ; <nl> } <nl> - file_descriptor_proto_ . MergeFrom ( from . file_descriptor_proto_ ) ; <nl> + } <nl> + <nl> + void FileDescriptorResponse : : UnsafeMergeFrom ( const FileDescriptorResponse & from ) { <nl> + GOOGLE_DCHECK ( & from ! = this ) ; <nl> + file_descriptor_proto_ . UnsafeMergeFrom ( from . file_descriptor_proto_ ) ; <nl> } <nl> <nl> void FileDescriptorResponse : : CopyFrom ( const : : google : : protobuf : : Message & from ) { <nl> void FileDescriptorResponse : : CopyFrom ( const FileDescriptorResponse & from ) { <nl> / / @ @ protoc_insertion_point ( class_specific_copy_from_start : grpc . reflection . v1alpha . FileDescriptorResponse ) <nl> if ( & from = = this ) return ; <nl> Clear ( ) ; <nl> - MergeFrom ( from ) ; <nl> + UnsafeMergeFrom ( from ) ; <nl> } <nl> <nl> bool FileDescriptorResponse : : IsInitialized ( ) const { <nl> int FileDescriptorResponse : : file_descriptor_proto_size ( ) const { <nl> void FileDescriptorResponse : : clear_file_descriptor_proto ( ) { <nl> file_descriptor_proto_ . Clear ( ) ; <nl> } <nl> - const : : std : : string & FileDescriptorResponse : : file_descriptor_proto ( int index ) const { <nl> + const : : std : : string & FileDescriptorResponse : : file_descriptor_proto ( int index ) const { <nl> / / @ @ protoc_insertion_point ( field_get : grpc . reflection . v1alpha . FileDescriptorResponse . file_descriptor_proto ) <nl> return file_descriptor_proto_ . Get ( index ) ; <nl> } <nl> - : : std : : string * FileDescriptorResponse : : mutable_file_descriptor_proto ( int index ) { <nl> + : : std : : string * FileDescriptorResponse : : mutable_file_descriptor_proto ( int index ) { <nl> / / @ @ protoc_insertion_point ( field_mutable : grpc . reflection . v1alpha . FileDescriptorResponse . file_descriptor_proto ) <nl> return file_descriptor_proto_ . Mutable ( index ) ; <nl> } <nl> - void FileDescriptorResponse : : set_file_descriptor_proto ( int index , const : : std : : string & value ) { <nl> + void FileDescriptorResponse : : set_file_descriptor_proto ( int index , const : : std : : string & value ) { <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . FileDescriptorResponse . file_descriptor_proto ) <nl> file_descriptor_proto_ . Mutable ( index ) - > assign ( value ) ; <nl> } <nl> - void FileDescriptorResponse : : set_file_descriptor_proto ( int index , const char * value ) { <nl> + void FileDescriptorResponse : : set_file_descriptor_proto ( int index , const char * value ) { <nl> file_descriptor_proto_ . Mutable ( index ) - > assign ( value ) ; <nl> / / @ @ protoc_insertion_point ( field_set_char : grpc . reflection . v1alpha . FileDescriptorResponse . file_descriptor_proto ) <nl> } <nl> - void FileDescriptorResponse : : set_file_descriptor_proto ( int index , const void * value , size_t size ) { <nl> + void FileDescriptorResponse : : set_file_descriptor_proto ( int index , const void * value , size_t size ) { <nl> file_descriptor_proto_ . Mutable ( index ) - > assign ( <nl> reinterpret_cast < const char * > ( value ) , size ) ; <nl> / / @ @ protoc_insertion_point ( field_set_pointer : grpc . reflection . v1alpha . FileDescriptorResponse . file_descriptor_proto ) <nl> } <nl> - : : std : : string * FileDescriptorResponse : : add_file_descriptor_proto ( ) { <nl> + : : std : : string * FileDescriptorResponse : : add_file_descriptor_proto ( ) { <nl> / / @ @ protoc_insertion_point ( field_add_mutable : grpc . reflection . v1alpha . FileDescriptorResponse . file_descriptor_proto ) <nl> return file_descriptor_proto_ . Add ( ) ; <nl> } <nl> - void FileDescriptorResponse : : add_file_descriptor_proto ( const : : std : : string & value ) { <nl> + void FileDescriptorResponse : : add_file_descriptor_proto ( const : : std : : string & value ) { <nl> file_descriptor_proto_ . Add ( ) - > assign ( value ) ; <nl> / / @ @ protoc_insertion_point ( field_add : grpc . reflection . v1alpha . FileDescriptorResponse . file_descriptor_proto ) <nl> } <nl> - void FileDescriptorResponse : : add_file_descriptor_proto ( const char * value ) { <nl> + void FileDescriptorResponse : : add_file_descriptor_proto ( const char * value ) { <nl> file_descriptor_proto_ . Add ( ) - > assign ( value ) ; <nl> / / @ @ protoc_insertion_point ( field_add_char : grpc . reflection . v1alpha . FileDescriptorResponse . file_descriptor_proto ) <nl> } <nl> - void FileDescriptorResponse : : add_file_descriptor_proto ( const void * value , size_t size ) { <nl> + void FileDescriptorResponse : : add_file_descriptor_proto ( const void * value , size_t size ) { <nl> file_descriptor_proto_ . Add ( ) - > assign ( reinterpret_cast < const char * > ( value ) , size ) ; <nl> / / @ @ protoc_insertion_point ( field_add_pointer : grpc . reflection . v1alpha . FileDescriptorResponse . file_descriptor_proto ) <nl> } <nl> - const : : google : : protobuf : : RepeatedPtrField < : : std : : string > & <nl> + const : : google : : protobuf : : RepeatedPtrField < : : std : : string > & <nl> FileDescriptorResponse : : file_descriptor_proto ( ) const { <nl> / / @ @ protoc_insertion_point ( field_list : grpc . reflection . v1alpha . FileDescriptorResponse . file_descriptor_proto ) <nl> return file_descriptor_proto_ ; <nl> } <nl> - : : google : : protobuf : : RepeatedPtrField < : : std : : string > * <nl> + : : google : : protobuf : : RepeatedPtrField < : : std : : string > * <nl> FileDescriptorResponse : : mutable_file_descriptor_proto ( ) { <nl> / / @ @ protoc_insertion_point ( field_mutable_list : grpc . reflection . v1alpha . FileDescriptorResponse . file_descriptor_proto ) <nl> return & file_descriptor_proto_ ; <nl> } <nl> <nl> + inline const FileDescriptorResponse * FileDescriptorResponse : : internal_default_instance ( ) { <nl> + return & FileDescriptorResponse_default_instance_ . get ( ) ; <nl> + } <nl> # endif / / PROTOBUF_INLINE_NOT_IN_HEADERS <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> const int ExtensionNumberResponse : : kExtensionNumberFieldNumber ; <nl> <nl> ExtensionNumberResponse : : ExtensionNumberResponse ( ) <nl> : : : google : : protobuf : : Message ( ) , _internal_metadata_ ( NULL ) { <nl> + if ( this ! = internal_default_instance ( ) ) protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> SharedCtor ( ) ; <nl> / / @ @ protoc_insertion_point ( constructor : grpc . reflection . v1alpha . ExtensionNumberResponse ) <nl> } <nl> <nl> void ExtensionNumberResponse : : InitAsDefaultInstance ( ) { <nl> - _is_default_instance_ = true ; <nl> } <nl> <nl> ExtensionNumberResponse : : ExtensionNumberResponse ( const ExtensionNumberResponse & from ) <nl> : : : google : : protobuf : : Message ( ) , <nl> _internal_metadata_ ( NULL ) { <nl> SharedCtor ( ) ; <nl> - MergeFrom ( from ) ; <nl> + UnsafeMergeFrom ( from ) ; <nl> / / @ @ protoc_insertion_point ( copy_constructor : grpc . reflection . v1alpha . ExtensionNumberResponse ) <nl> } <nl> <nl> void ExtensionNumberResponse : : SharedCtor ( ) { <nl> - _is_default_instance_ = false ; <nl> - : : google : : protobuf : : internal : : GetEmptyString ( ) ; <nl> - _cached_size_ = 0 ; <nl> base_type_name_ . UnsafeSetDefault ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> + _cached_size_ = 0 ; <nl> } <nl> <nl> ExtensionNumberResponse : : ~ ExtensionNumberResponse ( ) { <nl> ExtensionNumberResponse : : ~ ExtensionNumberResponse ( ) { <nl> <nl> void ExtensionNumberResponse : : SharedDtor ( ) { <nl> base_type_name_ . DestroyNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> - if ( this ! = default_instance_ ) { <nl> - } <nl> } <nl> <nl> void ExtensionNumberResponse : : SetCachedSize ( int size ) const { <nl> const : : google : : protobuf : : Descriptor * ExtensionNumberResponse : : descriptor ( ) { <nl> } <nl> <nl> const ExtensionNumberResponse & ExtensionNumberResponse : : default_instance ( ) { <nl> - if ( default_instance_ = = NULL ) protobuf_AddDesc_reflection_2eproto ( ) ; <nl> - return * default_instance_ ; <nl> + protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> + return * internal_default_instance ( ) ; <nl> } <nl> <nl> - ExtensionNumberResponse * ExtensionNumberResponse : : default_instance_ = NULL ; <nl> + : : google : : protobuf : : internal : : ExplicitlyConstructed < ExtensionNumberResponse > ExtensionNumberResponse_default_instance_ ; <nl> <nl> ExtensionNumberResponse * ExtensionNumberResponse : : New ( : : google : : protobuf : : Arena * arena ) const { <nl> ExtensionNumberResponse * n = new ExtensionNumberResponse ; <nl> void ExtensionNumberResponse : : SerializeWithCachedSizes ( <nl> <nl> : : google : : protobuf : : uint8 * ExtensionNumberResponse : : InternalSerializeWithCachedSizesToArray ( <nl> bool deterministic , : : google : : protobuf : : uint8 * target ) const { <nl> + ( void ) deterministic ; / / Unused <nl> / / @ @ protoc_insertion_point ( serialize_to_array_start : grpc . reflection . v1alpha . ExtensionNumberResponse ) <nl> / / optional string base_type_name = 1 ; <nl> if ( this - > base_type_name ( ) . size ( ) > 0 ) { <nl> : : google : : protobuf : : uint8 * ExtensionNumberResponse : : InternalSerializeWithCachedS <nl> return target ; <nl> } <nl> <nl> - int ExtensionNumberResponse : : ByteSize ( ) const { <nl> + size_t ExtensionNumberResponse : : ByteSizeLong ( ) const { <nl> / / @ @ protoc_insertion_point ( message_byte_size_start : grpc . reflection . v1alpha . ExtensionNumberResponse ) <nl> - int total_size = 0 ; <nl> + size_t total_size = 0 ; <nl> <nl> / / optional string base_type_name = 1 ; <nl> if ( this - > base_type_name ( ) . size ( ) > 0 ) { <nl> int ExtensionNumberResponse : : ByteSize ( ) const { <nl> <nl> / / repeated int32 extension_number = 2 ; <nl> { <nl> - int data_size = 0 ; <nl> - for ( int i = 0 ; i < this - > extension_number_size ( ) ; i + + ) { <nl> + size_t data_size = 0 ; <nl> + unsigned int count = this - > extension_number_size ( ) ; <nl> + for ( unsigned int i = 0 ; i < count ; i + + ) { <nl> data_size + = : : google : : protobuf : : internal : : WireFormatLite : : <nl> Int32Size ( this - > extension_number ( i ) ) ; <nl> } <nl> int ExtensionNumberResponse : : ByteSize ( ) const { <nl> total_size + = 1 + <nl> : : google : : protobuf : : internal : : WireFormatLite : : Int32Size ( data_size ) ; <nl> } <nl> + int cached_size = : : google : : protobuf : : internal : : ToCachedSize ( data_size ) ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN ( ) ; <nl> - _extension_number_cached_byte_size_ = data_size ; <nl> + _extension_number_cached_byte_size_ = cached_size ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_END ( ) ; <nl> total_size + = data_size ; <nl> } <nl> <nl> + int cached_size = : : google : : protobuf : : internal : : ToCachedSize ( total_size ) ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN ( ) ; <nl> - _cached_size_ = total_size ; <nl> + _cached_size_ = cached_size ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_END ( ) ; <nl> return total_size ; <nl> } <nl> <nl> void ExtensionNumberResponse : : MergeFrom ( const : : google : : protobuf : : Message & from ) { <nl> / / @ @ protoc_insertion_point ( generalized_merge_from_start : grpc . reflection . v1alpha . ExtensionNumberResponse ) <nl> - if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) { <nl> - : : google : : protobuf : : internal : : MergeFromFail ( __FILE__ , __LINE__ ) ; <nl> - } <nl> - const ExtensionNumberResponse * source = <nl> + if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) MergeFromFail ( __LINE__ ) ; <nl> + const ExtensionNumberResponse * source = <nl> : : google : : protobuf : : internal : : DynamicCastToGenerated < const ExtensionNumberResponse > ( <nl> & from ) ; <nl> if ( source = = NULL ) { <nl> void ExtensionNumberResponse : : MergeFrom ( const : : google : : protobuf : : Message & from ) <nl> : : google : : protobuf : : internal : : ReflectionOps : : Merge ( from , this ) ; <nl> } else { <nl> / / @ @ protoc_insertion_point ( generalized_merge_from_cast_success : grpc . reflection . v1alpha . ExtensionNumberResponse ) <nl> - MergeFrom ( * source ) ; <nl> + UnsafeMergeFrom ( * source ) ; <nl> } <nl> } <nl> <nl> void ExtensionNumberResponse : : MergeFrom ( const ExtensionNumberResponse & from ) { <nl> / / @ @ protoc_insertion_point ( class_specific_merge_from_start : grpc . reflection . v1alpha . ExtensionNumberResponse ) <nl> - if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) { <nl> - : : google : : protobuf : : internal : : MergeFromFail ( __FILE__ , __LINE__ ) ; <nl> + if ( GOOGLE_PREDICT_TRUE ( & from ! = this ) ) { <nl> + UnsafeMergeFrom ( from ) ; <nl> + } else { <nl> + MergeFromFail ( __LINE__ ) ; <nl> } <nl> - extension_number_ . MergeFrom ( from . extension_number_ ) ; <nl> + } <nl> + <nl> + void ExtensionNumberResponse : : UnsafeMergeFrom ( const ExtensionNumberResponse & from ) { <nl> + GOOGLE_DCHECK ( & from ! = this ) ; <nl> + extension_number_ . UnsafeMergeFrom ( from . extension_number_ ) ; <nl> if ( from . base_type_name ( ) . size ( ) > 0 ) { <nl> <nl> base_type_name_ . AssignWithDefault ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , from . base_type_name_ ) ; <nl> void ExtensionNumberResponse : : CopyFrom ( const ExtensionNumberResponse & from ) { <nl> / / @ @ protoc_insertion_point ( class_specific_copy_from_start : grpc . reflection . v1alpha . ExtensionNumberResponse ) <nl> if ( & from = = this ) return ; <nl> Clear ( ) ; <nl> - MergeFrom ( from ) ; <nl> + UnsafeMergeFrom ( from ) ; <nl> } <nl> <nl> bool ExtensionNumberResponse : : IsInitialized ( ) const { <nl> : : google : : protobuf : : Metadata ExtensionNumberResponse : : GetMetadata ( ) const { <nl> void ExtensionNumberResponse : : clear_base_type_name ( ) { <nl> base_type_name_ . ClearToEmptyNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - const : : std : : string & ExtensionNumberResponse : : base_type_name ( ) const { <nl> + const : : std : : string & ExtensionNumberResponse : : base_type_name ( ) const { <nl> / / @ @ protoc_insertion_point ( field_get : grpc . reflection . v1alpha . ExtensionNumberResponse . base_type_name ) <nl> return base_type_name_ . GetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - void ExtensionNumberResponse : : set_base_type_name ( const : : std : : string & value ) { <nl> + void ExtensionNumberResponse : : set_base_type_name ( const : : std : : string & value ) { <nl> <nl> base_type_name_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , value ) ; <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ExtensionNumberResponse . base_type_name ) <nl> } <nl> - void ExtensionNumberResponse : : set_base_type_name ( const char * value ) { <nl> + void ExtensionNumberResponse : : set_base_type_name ( const char * value ) { <nl> <nl> base_type_name_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , : : std : : string ( value ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_char : grpc . reflection . v1alpha . ExtensionNumberResponse . base_type_name ) <nl> } <nl> - void ExtensionNumberResponse : : set_base_type_name ( const char * value , size_t size ) { <nl> + void ExtensionNumberResponse : : set_base_type_name ( const char * value , size_t size ) { <nl> <nl> base_type_name_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , <nl> : : std : : string ( reinterpret_cast < const char * > ( value ) , size ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_pointer : grpc . reflection . v1alpha . ExtensionNumberResponse . base_type_name ) <nl> } <nl> - : : std : : string * ExtensionNumberResponse : : mutable_base_type_name ( ) { <nl> + : : std : : string * ExtensionNumberResponse : : mutable_base_type_name ( ) { <nl> <nl> / / @ @ protoc_insertion_point ( field_mutable : grpc . reflection . v1alpha . ExtensionNumberResponse . base_type_name ) <nl> return base_type_name_ . MutableNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - : : std : : string * ExtensionNumberResponse : : release_base_type_name ( ) { <nl> + : : std : : string * ExtensionNumberResponse : : release_base_type_name ( ) { <nl> / / @ @ protoc_insertion_point ( field_release : grpc . reflection . v1alpha . ExtensionNumberResponse . base_type_name ) <nl> <nl> return base_type_name_ . ReleaseNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - void ExtensionNumberResponse : : set_allocated_base_type_name ( : : std : : string * base_type_name ) { <nl> + void ExtensionNumberResponse : : set_allocated_base_type_name ( : : std : : string * base_type_name ) { <nl> if ( base_type_name ! = NULL ) { <nl> <nl> } else { <nl> int ExtensionNumberResponse : : extension_number_size ( ) const { <nl> void ExtensionNumberResponse : : clear_extension_number ( ) { <nl> extension_number_ . Clear ( ) ; <nl> } <nl> - : : google : : protobuf : : int32 ExtensionNumberResponse : : extension_number ( int index ) const { <nl> + : : google : : protobuf : : int32 ExtensionNumberResponse : : extension_number ( int index ) const { <nl> / / @ @ protoc_insertion_point ( field_get : grpc . reflection . v1alpha . ExtensionNumberResponse . extension_number ) <nl> return extension_number_ . Get ( index ) ; <nl> } <nl> - void ExtensionNumberResponse : : set_extension_number ( int index , : : google : : protobuf : : int32 value ) { <nl> + void ExtensionNumberResponse : : set_extension_number ( int index , : : google : : protobuf : : int32 value ) { <nl> extension_number_ . Set ( index , value ) ; <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ExtensionNumberResponse . extension_number ) <nl> } <nl> - void ExtensionNumberResponse : : add_extension_number ( : : google : : protobuf : : int32 value ) { <nl> + void ExtensionNumberResponse : : add_extension_number ( : : google : : protobuf : : int32 value ) { <nl> extension_number_ . Add ( value ) ; <nl> / / @ @ protoc_insertion_point ( field_add : grpc . reflection . v1alpha . ExtensionNumberResponse . extension_number ) <nl> } <nl> - const : : google : : protobuf : : RepeatedField < : : google : : protobuf : : int32 > & <nl> + const : : google : : protobuf : : RepeatedField < : : google : : protobuf : : int32 > & <nl> ExtensionNumberResponse : : extension_number ( ) const { <nl> / / @ @ protoc_insertion_point ( field_list : grpc . reflection . v1alpha . ExtensionNumberResponse . extension_number ) <nl> return extension_number_ ; <nl> } <nl> - : : google : : protobuf : : RepeatedField < : : google : : protobuf : : int32 > * <nl> + : : google : : protobuf : : RepeatedField < : : google : : protobuf : : int32 > * <nl> ExtensionNumberResponse : : mutable_extension_number ( ) { <nl> / / @ @ protoc_insertion_point ( field_mutable_list : grpc . reflection . v1alpha . ExtensionNumberResponse . extension_number ) <nl> return & extension_number_ ; <nl> } <nl> <nl> + inline const ExtensionNumberResponse * ExtensionNumberResponse : : internal_default_instance ( ) { <nl> + return & ExtensionNumberResponse_default_instance_ . get ( ) ; <nl> + } <nl> # endif / / PROTOBUF_INLINE_NOT_IN_HEADERS <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> const int ListServiceResponse : : kServiceFieldNumber ; <nl> <nl> ListServiceResponse : : ListServiceResponse ( ) <nl> : : : google : : protobuf : : Message ( ) , _internal_metadata_ ( NULL ) { <nl> + if ( this ! = internal_default_instance ( ) ) protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> SharedCtor ( ) ; <nl> / / @ @ protoc_insertion_point ( constructor : grpc . reflection . v1alpha . ListServiceResponse ) <nl> } <nl> <nl> void ListServiceResponse : : InitAsDefaultInstance ( ) { <nl> - _is_default_instance_ = true ; <nl> } <nl> <nl> ListServiceResponse : : ListServiceResponse ( const ListServiceResponse & from ) <nl> : : : google : : protobuf : : Message ( ) , <nl> _internal_metadata_ ( NULL ) { <nl> SharedCtor ( ) ; <nl> - MergeFrom ( from ) ; <nl> + UnsafeMergeFrom ( from ) ; <nl> / / @ @ protoc_insertion_point ( copy_constructor : grpc . reflection . v1alpha . ListServiceResponse ) <nl> } <nl> <nl> void ListServiceResponse : : SharedCtor ( ) { <nl> - _is_default_instance_ = false ; <nl> _cached_size_ = 0 ; <nl> } <nl> <nl> ListServiceResponse : : ~ ListServiceResponse ( ) { <nl> } <nl> <nl> void ListServiceResponse : : SharedDtor ( ) { <nl> - if ( this ! = default_instance_ ) { <nl> - } <nl> } <nl> <nl> void ListServiceResponse : : SetCachedSize ( int size ) const { <nl> const : : google : : protobuf : : Descriptor * ListServiceResponse : : descriptor ( ) { <nl> } <nl> <nl> const ListServiceResponse & ListServiceResponse : : default_instance ( ) { <nl> - if ( default_instance_ = = NULL ) protobuf_AddDesc_reflection_2eproto ( ) ; <nl> - return * default_instance_ ; <nl> + protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> + return * internal_default_instance ( ) ; <nl> } <nl> <nl> - ListServiceResponse * ListServiceResponse : : default_instance_ = NULL ; <nl> + : : google : : protobuf : : internal : : ExplicitlyConstructed < ListServiceResponse > ListServiceResponse_default_instance_ ; <nl> <nl> ListServiceResponse * ListServiceResponse : : New ( : : google : : protobuf : : Arena * arena ) const { <nl> ListServiceResponse * n = new ListServiceResponse ; <nl> void ListServiceResponse : : SerializeWithCachedSizes ( <nl> <nl> : : google : : protobuf : : uint8 * ListServiceResponse : : InternalSerializeWithCachedSizesToArray ( <nl> bool deterministic , : : google : : protobuf : : uint8 * target ) const { <nl> + ( void ) deterministic ; / / Unused <nl> / / @ @ protoc_insertion_point ( serialize_to_array_start : grpc . reflection . v1alpha . ListServiceResponse ) <nl> / / repeated . grpc . reflection . v1alpha . ServiceResponse service = 1 ; <nl> for ( unsigned int i = 0 , n = this - > service_size ( ) ; i < n ; i + + ) { <nl> : : google : : protobuf : : uint8 * ListServiceResponse : : InternalSerializeWithCachedSizes <nl> return target ; <nl> } <nl> <nl> - int ListServiceResponse : : ByteSize ( ) const { <nl> + size_t ListServiceResponse : : ByteSizeLong ( ) const { <nl> / / @ @ protoc_insertion_point ( message_byte_size_start : grpc . reflection . v1alpha . ListServiceResponse ) <nl> - int total_size = 0 ; <nl> + size_t total_size = 0 ; <nl> <nl> / / repeated . grpc . reflection . v1alpha . ServiceResponse service = 1 ; <nl> - total_size + = 1 * this - > service_size ( ) ; <nl> - for ( int i = 0 ; i < this - > service_size ( ) ; i + + ) { <nl> - total_size + = <nl> - : : google : : protobuf : : internal : : WireFormatLite : : MessageSizeNoVirtual ( <nl> - this - > service ( i ) ) ; <nl> + { <nl> + unsigned int count = this - > service_size ( ) ; <nl> + total_size + = 1UL * count ; <nl> + for ( unsigned int i = 0 ; i < count ; i + + ) { <nl> + total_size + = <nl> + : : google : : protobuf : : internal : : WireFormatLite : : MessageSizeNoVirtual ( <nl> + this - > service ( i ) ) ; <nl> + } <nl> } <nl> <nl> + int cached_size = : : google : : protobuf : : internal : : ToCachedSize ( total_size ) ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN ( ) ; <nl> - _cached_size_ = total_size ; <nl> + _cached_size_ = cached_size ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_END ( ) ; <nl> return total_size ; <nl> } <nl> <nl> void ListServiceResponse : : MergeFrom ( const : : google : : protobuf : : Message & from ) { <nl> / / @ @ protoc_insertion_point ( generalized_merge_from_start : grpc . reflection . v1alpha . ListServiceResponse ) <nl> - if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) { <nl> - : : google : : protobuf : : internal : : MergeFromFail ( __FILE__ , __LINE__ ) ; <nl> - } <nl> - const ListServiceResponse * source = <nl> + if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) MergeFromFail ( __LINE__ ) ; <nl> + const ListServiceResponse * source = <nl> : : google : : protobuf : : internal : : DynamicCastToGenerated < const ListServiceResponse > ( <nl> & from ) ; <nl> if ( source = = NULL ) { <nl> void ListServiceResponse : : MergeFrom ( const : : google : : protobuf : : Message & from ) { <nl> : : google : : protobuf : : internal : : ReflectionOps : : Merge ( from , this ) ; <nl> } else { <nl> / / @ @ protoc_insertion_point ( generalized_merge_from_cast_success : grpc . reflection . v1alpha . ListServiceResponse ) <nl> - MergeFrom ( * source ) ; <nl> + UnsafeMergeFrom ( * source ) ; <nl> } <nl> } <nl> <nl> void ListServiceResponse : : MergeFrom ( const ListServiceResponse & from ) { <nl> / / @ @ protoc_insertion_point ( class_specific_merge_from_start : grpc . reflection . v1alpha . ListServiceResponse ) <nl> - if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) { <nl> - : : google : : protobuf : : internal : : MergeFromFail ( __FILE__ , __LINE__ ) ; <nl> + if ( GOOGLE_PREDICT_TRUE ( & from ! = this ) ) { <nl> + UnsafeMergeFrom ( from ) ; <nl> + } else { <nl> + MergeFromFail ( __LINE__ ) ; <nl> } <nl> + } <nl> + <nl> + void ListServiceResponse : : UnsafeMergeFrom ( const ListServiceResponse & from ) { <nl> + GOOGLE_DCHECK ( & from ! = this ) ; <nl> service_ . MergeFrom ( from . service_ ) ; <nl> } <nl> <nl> void ListServiceResponse : : CopyFrom ( const ListServiceResponse & from ) { <nl> / / @ @ protoc_insertion_point ( class_specific_copy_from_start : grpc . reflection . v1alpha . ListServiceResponse ) <nl> if ( & from = = this ) return ; <nl> Clear ( ) ; <nl> - MergeFrom ( from ) ; <nl> + UnsafeMergeFrom ( from ) ; <nl> } <nl> <nl> bool ListServiceResponse : : IsInitialized ( ) const { <nl> ListServiceResponse : : service ( ) const { <nl> return service_ ; <nl> } <nl> <nl> + inline const ListServiceResponse * ListServiceResponse : : internal_default_instance ( ) { <nl> + return & ListServiceResponse_default_instance_ . get ( ) ; <nl> + } <nl> # endif / / PROTOBUF_INLINE_NOT_IN_HEADERS <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> const int ServiceResponse : : kNameFieldNumber ; <nl> <nl> ServiceResponse : : ServiceResponse ( ) <nl> : : : google : : protobuf : : Message ( ) , _internal_metadata_ ( NULL ) { <nl> + if ( this ! = internal_default_instance ( ) ) protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> SharedCtor ( ) ; <nl> / / @ @ protoc_insertion_point ( constructor : grpc . reflection . v1alpha . ServiceResponse ) <nl> } <nl> <nl> void ServiceResponse : : InitAsDefaultInstance ( ) { <nl> - _is_default_instance_ = true ; <nl> } <nl> <nl> ServiceResponse : : ServiceResponse ( const ServiceResponse & from ) <nl> : : : google : : protobuf : : Message ( ) , <nl> _internal_metadata_ ( NULL ) { <nl> SharedCtor ( ) ; <nl> - MergeFrom ( from ) ; <nl> + UnsafeMergeFrom ( from ) ; <nl> / / @ @ protoc_insertion_point ( copy_constructor : grpc . reflection . v1alpha . ServiceResponse ) <nl> } <nl> <nl> void ServiceResponse : : SharedCtor ( ) { <nl> - _is_default_instance_ = false ; <nl> - : : google : : protobuf : : internal : : GetEmptyString ( ) ; <nl> - _cached_size_ = 0 ; <nl> name_ . UnsafeSetDefault ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> + _cached_size_ = 0 ; <nl> } <nl> <nl> ServiceResponse : : ~ ServiceResponse ( ) { <nl> ServiceResponse : : ~ ServiceResponse ( ) { <nl> <nl> void ServiceResponse : : SharedDtor ( ) { <nl> name_ . DestroyNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> - if ( this ! = default_instance_ ) { <nl> - } <nl> } <nl> <nl> void ServiceResponse : : SetCachedSize ( int size ) const { <nl> const : : google : : protobuf : : Descriptor * ServiceResponse : : descriptor ( ) { <nl> } <nl> <nl> const ServiceResponse & ServiceResponse : : default_instance ( ) { <nl> - if ( default_instance_ = = NULL ) protobuf_AddDesc_reflection_2eproto ( ) ; <nl> - return * default_instance_ ; <nl> + protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> + return * internal_default_instance ( ) ; <nl> } <nl> <nl> - ServiceResponse * ServiceResponse : : default_instance_ = NULL ; <nl> + : : google : : protobuf : : internal : : ExplicitlyConstructed < ServiceResponse > ServiceResponse_default_instance_ ; <nl> <nl> ServiceResponse * ServiceResponse : : New ( : : google : : protobuf : : Arena * arena ) const { <nl> ServiceResponse * n = new ServiceResponse ; <nl> void ServiceResponse : : SerializeWithCachedSizes ( <nl> <nl> : : google : : protobuf : : uint8 * ServiceResponse : : InternalSerializeWithCachedSizesToArray ( <nl> bool deterministic , : : google : : protobuf : : uint8 * target ) const { <nl> + ( void ) deterministic ; / / Unused <nl> / / @ @ protoc_insertion_point ( serialize_to_array_start : grpc . reflection . v1alpha . ServiceResponse ) <nl> / / optional string name = 1 ; <nl> if ( this - > name ( ) . size ( ) > 0 ) { <nl> : : google : : protobuf : : uint8 * ServiceResponse : : InternalSerializeWithCachedSizesToAr <nl> return target ; <nl> } <nl> <nl> - int ServiceResponse : : ByteSize ( ) const { <nl> + size_t ServiceResponse : : ByteSizeLong ( ) const { <nl> / / @ @ protoc_insertion_point ( message_byte_size_start : grpc . reflection . v1alpha . ServiceResponse ) <nl> - int total_size = 0 ; <nl> + size_t total_size = 0 ; <nl> <nl> / / optional string name = 1 ; <nl> if ( this - > name ( ) . size ( ) > 0 ) { <nl> int ServiceResponse : : ByteSize ( ) const { <nl> this - > name ( ) ) ; <nl> } <nl> <nl> + int cached_size = : : google : : protobuf : : internal : : ToCachedSize ( total_size ) ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN ( ) ; <nl> - _cached_size_ = total_size ; <nl> + _cached_size_ = cached_size ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_END ( ) ; <nl> return total_size ; <nl> } <nl> <nl> void ServiceResponse : : MergeFrom ( const : : google : : protobuf : : Message & from ) { <nl> / / @ @ protoc_insertion_point ( generalized_merge_from_start : grpc . reflection . v1alpha . ServiceResponse ) <nl> - if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) { <nl> - : : google : : protobuf : : internal : : MergeFromFail ( __FILE__ , __LINE__ ) ; <nl> - } <nl> - const ServiceResponse * source = <nl> + if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) MergeFromFail ( __LINE__ ) ; <nl> + const ServiceResponse * source = <nl> : : google : : protobuf : : internal : : DynamicCastToGenerated < const ServiceResponse > ( <nl> & from ) ; <nl> if ( source = = NULL ) { <nl> void ServiceResponse : : MergeFrom ( const : : google : : protobuf : : Message & from ) { <nl> : : google : : protobuf : : internal : : ReflectionOps : : Merge ( from , this ) ; <nl> } else { <nl> / / @ @ protoc_insertion_point ( generalized_merge_from_cast_success : grpc . reflection . v1alpha . ServiceResponse ) <nl> - MergeFrom ( * source ) ; <nl> + UnsafeMergeFrom ( * source ) ; <nl> } <nl> } <nl> <nl> void ServiceResponse : : MergeFrom ( const ServiceResponse & from ) { <nl> / / @ @ protoc_insertion_point ( class_specific_merge_from_start : grpc . reflection . v1alpha . ServiceResponse ) <nl> - if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) { <nl> - : : google : : protobuf : : internal : : MergeFromFail ( __FILE__ , __LINE__ ) ; <nl> + if ( GOOGLE_PREDICT_TRUE ( & from ! = this ) ) { <nl> + UnsafeMergeFrom ( from ) ; <nl> + } else { <nl> + MergeFromFail ( __LINE__ ) ; <nl> } <nl> + } <nl> + <nl> + void ServiceResponse : : UnsafeMergeFrom ( const ServiceResponse & from ) { <nl> + GOOGLE_DCHECK ( & from ! = this ) ; <nl> if ( from . name ( ) . size ( ) > 0 ) { <nl> <nl> name_ . AssignWithDefault ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , from . name_ ) ; <nl> void ServiceResponse : : CopyFrom ( const ServiceResponse & from ) { <nl> / / @ @ protoc_insertion_point ( class_specific_copy_from_start : grpc . reflection . v1alpha . ServiceResponse ) <nl> if ( & from = = this ) return ; <nl> Clear ( ) ; <nl> - MergeFrom ( from ) ; <nl> + UnsafeMergeFrom ( from ) ; <nl> } <nl> <nl> bool ServiceResponse : : IsInitialized ( ) const { <nl> : : google : : protobuf : : Metadata ServiceResponse : : GetMetadata ( ) const { <nl> void ServiceResponse : : clear_name ( ) { <nl> name_ . ClearToEmptyNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - const : : std : : string & ServiceResponse : : name ( ) const { <nl> + const : : std : : string & ServiceResponse : : name ( ) const { <nl> / / @ @ protoc_insertion_point ( field_get : grpc . reflection . v1alpha . ServiceResponse . name ) <nl> return name_ . GetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - void ServiceResponse : : set_name ( const : : std : : string & value ) { <nl> + void ServiceResponse : : set_name ( const : : std : : string & value ) { <nl> <nl> name_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , value ) ; <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ServiceResponse . name ) <nl> } <nl> - void ServiceResponse : : set_name ( const char * value ) { <nl> + void ServiceResponse : : set_name ( const char * value ) { <nl> <nl> name_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , : : std : : string ( value ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_char : grpc . reflection . v1alpha . ServiceResponse . name ) <nl> } <nl> - void ServiceResponse : : set_name ( const char * value , size_t size ) { <nl> + void ServiceResponse : : set_name ( const char * value , size_t size ) { <nl> <nl> name_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , <nl> : : std : : string ( reinterpret_cast < const char * > ( value ) , size ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_pointer : grpc . reflection . v1alpha . ServiceResponse . name ) <nl> } <nl> - : : std : : string * ServiceResponse : : mutable_name ( ) { <nl> + : : std : : string * ServiceResponse : : mutable_name ( ) { <nl> <nl> / / @ @ protoc_insertion_point ( field_mutable : grpc . reflection . v1alpha . ServiceResponse . name ) <nl> return name_ . MutableNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - : : std : : string * ServiceResponse : : release_name ( ) { <nl> + : : std : : string * ServiceResponse : : release_name ( ) { <nl> / / @ @ protoc_insertion_point ( field_release : grpc . reflection . v1alpha . ServiceResponse . name ) <nl> <nl> return name_ . ReleaseNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - void ServiceResponse : : set_allocated_name ( : : std : : string * name ) { <nl> + void ServiceResponse : : set_allocated_name ( : : std : : string * name ) { <nl> if ( name ! = NULL ) { <nl> <nl> } else { <nl> void ServiceResponse : : clear_name ( ) { <nl> / / @ @ protoc_insertion_point ( field_set_allocated : grpc . reflection . v1alpha . ServiceResponse . name ) <nl> } <nl> <nl> + inline const ServiceResponse * ServiceResponse : : internal_default_instance ( ) { <nl> + return & ServiceResponse_default_instance_ . get ( ) ; <nl> + } <nl> # endif / / PROTOBUF_INLINE_NOT_IN_HEADERS <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> const int ErrorResponse : : kErrorMessageFieldNumber ; <nl> <nl> ErrorResponse : : ErrorResponse ( ) <nl> : : : google : : protobuf : : Message ( ) , _internal_metadata_ ( NULL ) { <nl> + if ( this ! = internal_default_instance ( ) ) protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> SharedCtor ( ) ; <nl> / / @ @ protoc_insertion_point ( constructor : grpc . reflection . v1alpha . ErrorResponse ) <nl> } <nl> <nl> void ErrorResponse : : InitAsDefaultInstance ( ) { <nl> - _is_default_instance_ = true ; <nl> } <nl> <nl> ErrorResponse : : ErrorResponse ( const ErrorResponse & from ) <nl> : : : google : : protobuf : : Message ( ) , <nl> _internal_metadata_ ( NULL ) { <nl> SharedCtor ( ) ; <nl> - MergeFrom ( from ) ; <nl> + UnsafeMergeFrom ( from ) ; <nl> / / @ @ protoc_insertion_point ( copy_constructor : grpc . reflection . v1alpha . ErrorResponse ) <nl> } <nl> <nl> void ErrorResponse : : SharedCtor ( ) { <nl> - _is_default_instance_ = false ; <nl> - : : google : : protobuf : : internal : : GetEmptyString ( ) ; <nl> - _cached_size_ = 0 ; <nl> - error_code_ = 0 ; <nl> error_message_ . UnsafeSetDefault ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> + error_code_ = 0 ; <nl> + _cached_size_ = 0 ; <nl> } <nl> <nl> ErrorResponse : : ~ ErrorResponse ( ) { <nl> ErrorResponse : : ~ ErrorResponse ( ) { <nl> <nl> void ErrorResponse : : SharedDtor ( ) { <nl> error_message_ . DestroyNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> - if ( this ! = default_instance_ ) { <nl> - } <nl> } <nl> <nl> void ErrorResponse : : SetCachedSize ( int size ) const { <nl> const : : google : : protobuf : : Descriptor * ErrorResponse : : descriptor ( ) { <nl> } <nl> <nl> const ErrorResponse & ErrorResponse : : default_instance ( ) { <nl> - if ( default_instance_ = = NULL ) protobuf_AddDesc_reflection_2eproto ( ) ; <nl> - return * default_instance_ ; <nl> + protobuf_InitDefaults_reflection_2eproto ( ) ; <nl> + return * internal_default_instance ( ) ; <nl> } <nl> <nl> - ErrorResponse * ErrorResponse : : default_instance_ = NULL ; <nl> + : : google : : protobuf : : internal : : ExplicitlyConstructed < ErrorResponse > ErrorResponse_default_instance_ ; <nl> <nl> ErrorResponse * ErrorResponse : : New ( : : google : : protobuf : : Arena * arena ) const { <nl> ErrorResponse * n = new ErrorResponse ; <nl> bool ErrorResponse : : MergePartialFromCodedStream ( <nl> / / optional int32 error_code = 1 ; <nl> case 1 : { <nl> if ( tag = = 8 ) { <nl> + <nl> DO_ ( ( : : google : : protobuf : : internal : : WireFormatLite : : ReadPrimitive < <nl> : : google : : protobuf : : int32 , : : google : : protobuf : : internal : : WireFormatLite : : TYPE_INT32 > ( <nl> input , & error_code_ ) ) ) ; <nl> - <nl> } else { <nl> goto handle_unusual ; <nl> } <nl> void ErrorResponse : : SerializeWithCachedSizes ( <nl> <nl> : : google : : protobuf : : uint8 * ErrorResponse : : InternalSerializeWithCachedSizesToArray ( <nl> bool deterministic , : : google : : protobuf : : uint8 * target ) const { <nl> + ( void ) deterministic ; / / Unused <nl> / / @ @ protoc_insertion_point ( serialize_to_array_start : grpc . reflection . v1alpha . ErrorResponse ) <nl> / / optional int32 error_code = 1 ; <nl> if ( this - > error_code ( ) ! = 0 ) { <nl> : : google : : protobuf : : uint8 * ErrorResponse : : InternalSerializeWithCachedSizesToArra <nl> return target ; <nl> } <nl> <nl> - int ErrorResponse : : ByteSize ( ) const { <nl> + size_t ErrorResponse : : ByteSizeLong ( ) const { <nl> / / @ @ protoc_insertion_point ( message_byte_size_start : grpc . reflection . v1alpha . ErrorResponse ) <nl> - int total_size = 0 ; <nl> + size_t total_size = 0 ; <nl> <nl> / / optional int32 error_code = 1 ; <nl> if ( this - > error_code ( ) ! = 0 ) { <nl> int ErrorResponse : : ByteSize ( ) const { <nl> this - > error_message ( ) ) ; <nl> } <nl> <nl> + int cached_size = : : google : : protobuf : : internal : : ToCachedSize ( total_size ) ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN ( ) ; <nl> - _cached_size_ = total_size ; <nl> + _cached_size_ = cached_size ; <nl> GOOGLE_SAFE_CONCURRENT_WRITES_END ( ) ; <nl> return total_size ; <nl> } <nl> <nl> void ErrorResponse : : MergeFrom ( const : : google : : protobuf : : Message & from ) { <nl> / / @ @ protoc_insertion_point ( generalized_merge_from_start : grpc . reflection . v1alpha . ErrorResponse ) <nl> - if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) { <nl> - : : google : : protobuf : : internal : : MergeFromFail ( __FILE__ , __LINE__ ) ; <nl> - } <nl> - const ErrorResponse * source = <nl> + if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) MergeFromFail ( __LINE__ ) ; <nl> + const ErrorResponse * source = <nl> : : google : : protobuf : : internal : : DynamicCastToGenerated < const ErrorResponse > ( <nl> & from ) ; <nl> if ( source = = NULL ) { <nl> void ErrorResponse : : MergeFrom ( const : : google : : protobuf : : Message & from ) { <nl> : : google : : protobuf : : internal : : ReflectionOps : : Merge ( from , this ) ; <nl> } else { <nl> / / @ @ protoc_insertion_point ( generalized_merge_from_cast_success : grpc . reflection . v1alpha . ErrorResponse ) <nl> - MergeFrom ( * source ) ; <nl> + UnsafeMergeFrom ( * source ) ; <nl> } <nl> } <nl> <nl> void ErrorResponse : : MergeFrom ( const ErrorResponse & from ) { <nl> / / @ @ protoc_insertion_point ( class_specific_merge_from_start : grpc . reflection . v1alpha . ErrorResponse ) <nl> - if ( GOOGLE_PREDICT_FALSE ( & from = = this ) ) { <nl> - : : google : : protobuf : : internal : : MergeFromFail ( __FILE__ , __LINE__ ) ; <nl> + if ( GOOGLE_PREDICT_TRUE ( & from ! = this ) ) { <nl> + UnsafeMergeFrom ( from ) ; <nl> + } else { <nl> + MergeFromFail ( __LINE__ ) ; <nl> } <nl> + } <nl> + <nl> + void ErrorResponse : : UnsafeMergeFrom ( const ErrorResponse & from ) { <nl> + GOOGLE_DCHECK ( & from ! = this ) ; <nl> if ( from . error_code ( ) ! = 0 ) { <nl> set_error_code ( from . error_code ( ) ) ; <nl> } <nl> void ErrorResponse : : CopyFrom ( const ErrorResponse & from ) { <nl> / / @ @ protoc_insertion_point ( class_specific_copy_from_start : grpc . reflection . v1alpha . ErrorResponse ) <nl> if ( & from = = this ) return ; <nl> Clear ( ) ; <nl> - MergeFrom ( from ) ; <nl> + UnsafeMergeFrom ( from ) ; <nl> } <nl> <nl> bool ErrorResponse : : IsInitialized ( ) const { <nl> : : google : : protobuf : : Metadata ErrorResponse : : GetMetadata ( ) const { <nl> void ErrorResponse : : clear_error_code ( ) { <nl> error_code_ = 0 ; <nl> } <nl> - : : google : : protobuf : : int32 ErrorResponse : : error_code ( ) const { <nl> + : : google : : protobuf : : int32 ErrorResponse : : error_code ( ) const { <nl> / / @ @ protoc_insertion_point ( field_get : grpc . reflection . v1alpha . ErrorResponse . error_code ) <nl> return error_code_ ; <nl> } <nl> - void ErrorResponse : : set_error_code ( : : google : : protobuf : : int32 value ) { <nl> + void ErrorResponse : : set_error_code ( : : google : : protobuf : : int32 value ) { <nl> <nl> error_code_ = value ; <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ErrorResponse . error_code ) <nl> void ErrorResponse : : clear_error_code ( ) { <nl> void ErrorResponse : : clear_error_message ( ) { <nl> error_message_ . ClearToEmptyNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - const : : std : : string & ErrorResponse : : error_message ( ) const { <nl> + const : : std : : string & ErrorResponse : : error_message ( ) const { <nl> / / @ @ protoc_insertion_point ( field_get : grpc . reflection . v1alpha . ErrorResponse . error_message ) <nl> return error_message_ . GetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - void ErrorResponse : : set_error_message ( const : : std : : string & value ) { <nl> + void ErrorResponse : : set_error_message ( const : : std : : string & value ) { <nl> <nl> error_message_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , value ) ; <nl> / / @ @ protoc_insertion_point ( field_set : grpc . reflection . v1alpha . ErrorResponse . error_message ) <nl> } <nl> - void ErrorResponse : : set_error_message ( const char * value ) { <nl> + void ErrorResponse : : set_error_message ( const char * value ) { <nl> <nl> error_message_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , : : std : : string ( value ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_char : grpc . reflection . v1alpha . ErrorResponse . error_message ) <nl> } <nl> - void ErrorResponse : : set_error_message ( const char * value , size_t size ) { <nl> + void ErrorResponse : : set_error_message ( const char * value , size_t size ) { <nl> <nl> error_message_ . SetNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) , <nl> : : std : : string ( reinterpret_cast < const char * > ( value ) , size ) ) ; <nl> / / @ @ protoc_insertion_point ( field_set_pointer : grpc . reflection . v1alpha . ErrorResponse . error_message ) <nl> } <nl> - : : std : : string * ErrorResponse : : mutable_error_message ( ) { <nl> + : : std : : string * ErrorResponse : : mutable_error_message ( ) { <nl> <nl> / / @ @ protoc_insertion_point ( field_mutable : grpc . reflection . v1alpha . ErrorResponse . error_message ) <nl> return error_message_ . MutableNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - : : std : : string * ErrorResponse : : release_error_message ( ) { <nl> + : : std : : string * ErrorResponse : : release_error_message ( ) { <nl> / / @ @ protoc_insertion_point ( field_release : grpc . reflection . v1alpha . ErrorResponse . error_message ) <nl> <nl> return error_message_ . ReleaseNoArena ( & : : google : : protobuf : : internal : : GetEmptyStringAlreadyInited ( ) ) ; <nl> } <nl> - void ErrorResponse : : set_allocated_error_message ( : : std : : string * error_message ) { <nl> + void ErrorResponse : : set_allocated_error_message ( : : std : : string * error_message ) { <nl> if ( error_message ! = NULL ) { <nl> <nl> } else { <nl> void ErrorResponse : : clear_error_message ( ) { <nl> / / @ @ protoc_insertion_point ( field_set_allocated : grpc . reflection . v1alpha . ErrorResponse . error_message ) <nl> } <nl> <nl> + inline const ErrorResponse * ErrorResponse : : internal_default_instance ( ) { <nl> + return & ErrorResponse_default_instance_ . get ( ) ; <nl> + } <nl> # endif / / PROTOBUF_INLINE_NOT_IN_HEADERS <nl> <nl> / / @ @ protoc_insertion_point ( namespace_scope ) <nl> mmm a / src / objective - c / GRPCClient / GRPCCall . h <nl> ppp b / src / objective - c / GRPCClient / GRPCCall . h <nl> typedef NS_ENUM ( NSUInteger , GRPCErrorCode ) { <nl> GRPCErrorCodeDataLoss = 15 , <nl> } ; <nl> <nl> + / * * <nl> + * Safety remark of a gRPC method as defined in RFC 2616 Section 9 . 1 <nl> + * / <nl> + typedef NS_ENUM ( NSUInteger , GRPCCallSafety ) { <nl> + / * * Signal that there is no guarantees on how the call affects the server state . * / <nl> + GRPCCallSafetyDefault = 0 , <nl> + / * * Signal that the call is idempotent . gRPC is free to use PUT verb . * / <nl> + GRPCCallSafetyIdempotentRequest = 1 , <nl> + / * * Signal that the call is cacheable and will not affect server state . gRPC is free to use GET verb . * / <nl> + GRPCCallSafetyCacheableRequest = 2 , <nl> + } ; <nl> + <nl> / * * <nl> * Keys used in | NSError | ' s | userInfo | dictionary to store the response headers and trailers sent by <nl> * the server . <nl> extern id const kGRPCTrailersKey ; <nl> * / <nl> - ( void ) cancel ; <nl> <nl> + / * * <nl> + * Set the call flag for a specific host path . <nl> + * <nl> + * Host parameter should not contain the scheme ( http : / / or https : / / ) , only the name or IP addr <nl> + * and the port number , for example @ " localhost : 5050 " . <nl> + * / <nl> + + ( void ) setCallSafety : ( GRPCCallSafety ) callSafety host : ( NSString * ) host path : ( NSString * ) path ; <nl> + <nl> / / TODO ( jcanizales ) : Let specify a deadline . As a category of GRXWriter ? <nl> @ end <nl> <nl> mmm a / src / objective - c / GRPCClient / GRPCCall . m <nl> ppp b / src / objective - c / GRPCClient / GRPCCall . m <nl> <nl> <nl> NSString * const kGRPCHeadersKey = @ " io . grpc . HeadersKey " ; <nl> NSString * const kGRPCTrailersKey = @ " io . grpc . TrailersKey " ; <nl> + static NSMutableDictionary * callFlags ; <nl> <nl> @ interface GRPCCall ( ) < GRXWriteable > <nl> / / Make them read - write . <nl> @ implementation GRPCCall { <nl> / / TODO ( jcanizales ) : If grpc_init is idempotent , this should be changed from load to initialize . <nl> + ( void ) load { <nl> grpc_init ( ) ; <nl> + callFlags = [ NSMutableDictionary dictionary ] ; <nl> + } <nl> + <nl> + + ( void ) setCallSafety : ( GRPCCallSafety ) callSafety host : ( NSString * ) host path : ( NSString * ) path { <nl> + NSString * hostAndPath = [ NSString stringWithFormat : @ " % @ / % @ " , host , path ] ; <nl> + switch ( callSafety ) { <nl> + case GRPCCallSafetyDefault : <nl> + callFlags [ hostAndPath ] = @ 0 ; <nl> + break ; <nl> + case GRPCCallSafetyIdempotentRequest : <nl> + callFlags [ hostAndPath ] = @ GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST ; <nl> + break ; <nl> + case GRPCCallSafetyCacheableRequest : <nl> + callFlags [ hostAndPath ] = @ GRPC_INITIAL_METADATA_CACHEABLE_REQUEST ; <nl> + break ; <nl> + default : <nl> + break ; <nl> + } <nl> + } <nl> + <nl> + + ( uint32_t ) callFlagsForHost : ( NSString * ) host path : ( NSString * ) path { <nl> + NSString * hostAndPath = [ NSString stringWithFormat : @ " % @ / % @ " , host , path ] ; <nl> + return [ callFlags [ hostAndPath ] intValue ] ; <nl> } <nl> <nl> - ( instancetype ) init { <nl> - ( void ) startNextRead { <nl> - ( void ) sendHeaders : ( NSDictionary * ) headers { <nl> / / TODO ( jcanizales ) : Add error handlers for async failures <nl> [ _wrappedCall startBatchWithOperations : @ [ [ [ GRPCOpSendMetadata alloc ] initWithMetadata : headers <nl> + flags : [ GRPCCall callFlagsForHost : _host path : _path ] <nl> handler : nil ] ] ] ; <nl> } <nl> <nl> mmm a / src / objective - c / GRPCClient / private / GRPCWrappedCall . h <nl> ppp b / src / objective - c / GRPCClient / private / GRPCWrappedCall . h <nl> <nl> @ interface GRPCOpSendMetadata : GRPCOperation <nl> <nl> - ( instancetype ) initWithMetadata : ( NSDictionary * ) metadata <nl> + handler : ( void ( ^ ) ( ) ) handler ; <nl> + <nl> + - ( instancetype ) initWithMetadata : ( NSDictionary * ) metadata <nl> + flags : ( uint32_t ) flags <nl> handler : ( void ( ^ ) ( ) ) handler NS_DESIGNATED_INITIALIZER ; <nl> <nl> @ end <nl> mmm a / src / objective - c / GRPCClient / private / GRPCWrappedCall . m <nl> ppp b / src / objective - c / GRPCClient / private / GRPCWrappedCall . m <nl> - ( void ) finish { <nl> @ implementation GRPCOpSendMetadata <nl> <nl> - ( instancetype ) init { <nl> - return [ self initWithMetadata : nil handler : nil ] ; <nl> + return [ self initWithMetadata : nil flags : 0 handler : nil ] ; <nl> } <nl> <nl> - - ( instancetype ) initWithMetadata : ( NSDictionary * ) metadata handler : ( void ( ^ ) ( ) ) handler { <nl> + - ( instancetype ) initWithMetadata : ( NSDictionary * ) metadata <nl> + handler : ( void ( ^ ) ( ) ) handler { <nl> + return [ self initWithMetadata : metadata flags : 0 handler : handler ] ; <nl> + } <nl> + <nl> + - ( instancetype ) initWithMetadata : ( NSDictionary * ) metadata <nl> + flags : ( uint32_t ) flags <nl> + handler : ( void ( ^ ) ( ) ) handler { <nl> if ( self = [ super init ] ) { <nl> _op . op = GRPC_OP_SEND_INITIAL_METADATA ; <nl> _op . data . send_initial_metadata . count = metadata . count ; <nl> _op . data . send_initial_metadata . metadata = metadata . grpc_metadataArray ; <nl> _op . data . send_initial_metadata . maybe_compression_level . is_set = false ; <nl> _op . data . send_initial_metadata . maybe_compression_level . level = 0 ; <nl> + _op . flags = flags ; <nl> _handler = handler ; <nl> } <nl> return self ; <nl> mmm a / src / objective - c / tests / GRPCClientTests . m <nl> ppp b / src / objective - c / tests / GRPCClientTests . m <nl> - ( void ) testExceptions { <nl> <nl> } <nl> <nl> + - ( void ) testIdempotentProtoRPC { <nl> + __weak XCTestExpectation * response = [ self expectationWithDescription : @ " Expected response . " ] ; <nl> + __weak XCTestExpectation * completion = [ self expectationWithDescription : @ " RPC completed . " ] ; <nl> + <nl> + RMTSimpleRequest * request = [ RMTSimpleRequest message ] ; <nl> + request . responseSize = 100 ; <nl> + request . fillUsername = YES ; <nl> + request . fillOauthScope = YES ; <nl> + GRXWriter * requestsWriter = [ GRXWriter writerWithValue : [ request data ] ] ; <nl> + <nl> + GRPCCall * call = [ [ GRPCCall alloc ] initWithHost : kHostAddress <nl> + path : kUnaryCallMethod . HTTPPath <nl> + requestsWriter : requestsWriter ] ; <nl> + [ GRPCCall setCallSafety : GRPCCallSafetyIdempotentRequest host : kHostAddress path : kUnaryCallMethod . HTTPPath ] ; <nl> + <nl> + id < GRXWriteable > responsesWriteable = [ [ GRXWriteable alloc ] initWithValueHandler : ^ ( NSData * value ) { <nl> + XCTAssertNotNil ( value , @ " nil value received as response . " ) ; <nl> + XCTAssertGreaterThan ( value . length , 0 , @ " Empty response received . " ) ; <nl> + RMTSimpleResponse * responseProto = [ RMTSimpleResponse parseFromData : value error : NULL ] ; <nl> + / / We expect empty strings , not nil : <nl> + XCTAssertNotNil ( responseProto . username , @ " Response ' s username is nil . " ) ; <nl> + XCTAssertNotNil ( responseProto . oauthScope , @ " Response ' s OAuth scope is nil . " ) ; <nl> + [ response fulfill ] ; <nl> + } completionHandler : ^ ( NSError * errorOrNil ) { <nl> + XCTAssertNil ( errorOrNil , @ " Finished with unexpected error : % @ " , errorOrNil ) ; <nl> + [ completion fulfill ] ; <nl> + } ] ; <nl> + <nl> + [ call startWithWriteable : responsesWriteable ] ; <nl> + <nl> + [ self waitForExpectationsWithTimeout : 8 handler : nil ] ; <nl> + } <nl> + <nl> @ end <nl> mmm a / src / php / . gitignore <nl> ppp b / src / php / . gitignore <nl> mkinstalldirs <nl> ext / grpc / ltmain . sh <nl> composer . lock <nl> vendor / <nl> + <nl> + * . pb . php <nl> + * _grpc_pb . php <nl> mmm a / src / php / README . md <nl> ppp b / src / php / README . md <nl> <nl> <nl> # Overview <nl> <nl> - This directory contains source code for PHP implementation of gRPC layered on shared C library . <nl> + This directory contains source code for PHP implementation of gRPC layered on <nl> + shared C library . <nl> <nl> # Status <nl> <nl> GA <nl> <nl> # # Environment <nl> <nl> - Prerequisite : <nl> + * * Prerequisite : * * <nl> * ` php ` 5 . 5 or above , 7 . 0 or above <nl> - * ` pear ` and ` pecl ` <nl> - * ` phpunit ` <nl> + * ` pecl ` <nl> + * ` composer ` <nl> + * ` phpunit ` ( optional ) <nl> <nl> - * * PEAR : * * <nl> + * * Ubuntu / Debian : * * <nl> + ` ` ` sh <nl> + $ sudo apt - get install php5 php5 - dev <nl> + ` ` ` <nl> + <nl> + * * PEAR / PECL : * * <nl> ` ` ` sh <nl> $ curl - O http : / / pear . php . net / go - pear . phar <nl> $ sudo php - d detect_unicode = 0 go - pear . phar <nl> ` ` ` <nl> <nl> + * * Composer : * * <nl> + ` ` ` sh <nl> + $ curl - sS https : / / getcomposer . org / installer | php <nl> + $ sudo mv composer . phar / usr / local / bin / composer <nl> + ` ` ` <nl> + <nl> * * PHPUnit : * * <nl> ` ` ` sh <nl> $ wget https : / / phar . phpunit . de / phpunit - old . phar <nl> $ sudo mv phpunit - old . phar / usr / bin / phpunit <nl> <nl> # # Quick Install <nl> <nl> - Install the gRPC PHP extension <nl> + * * Install the gRPC PHP extension * * <nl> <nl> ` ` ` sh <nl> sudo pecl install grpc <nl> ` ` ` <nl> <nl> - This will compile and install the gRPC PHP extension into the standard PHP extension directory . You should be able to run the [ unit tests ] ( # unit - tests ) , with the PHP extension installed . <nl> + This will compile and install the gRPC PHP extension into the standard PHP <nl> + extension directory . You should be able to run the [ unit tests ] ( # unit - tests ) , <nl> + with the PHP extension installed . <nl> + <nl> + <nl> + * * Add the gRPC PHP library as a Composer dependency * * <nl> + <nl> + You need to add this to your project ' s ` composer . json ` file . <nl> + <nl> + ` ` ` <nl> + " require " : { <nl> + " grpc / grpc " : " v1 . 0 . 0 " <nl> + } <nl> + ` ` ` <nl> + <nl> + To run tests with generated stub code from ` . proto ` files , you will also need <nl> + the ` composer ` and ` protoc ` binaries . You can find out how to get these <nl> + [ below ] ( # generated - code - tests ) . <nl> <nl> - To run tests with generated stub code from ` . proto ` files , you will also need the ` composer ` , ` protoc ` and ` protoc - gen - php ` binaries . You can find out how to get these [ below ] ( # generated - code - tests ) . <nl> <nl> # # Build from Source <nl> <nl> $ . / bin / run_tests . sh <nl> <nl> # # Generated Code Tests <nl> <nl> - This section specifies the prerequisites for running the generated code tests , as well as how to run the tests themselves . <nl> + This section specifies the prerequisites for running the generated code tests , <nl> + as well as how to run the tests themselves . <nl> <nl> # # # Composer <nl> <nl> - If you don ' t have it already , install ` composer ` to pull in some runtime dependencies based on the ` composer . json ` file . <nl> + Install the runtime dependencies via ` composer install ` . <nl> <nl> ` ` ` sh <nl> - $ curl - sS https : / / getcomposer . org / installer | php <nl> - $ sudo mv composer . phar / usr / local / bin / composer <nl> - <nl> $ cd grpc / src / php <nl> $ composer install <nl> ` ` ` <nl> <nl> # # # Protobuf compiler <nl> <nl> - Again if you don ' t have it already , you need to install the protobuf compiler ` protoc ` , version 3 . 0 . 0 + . <nl> + Again if you don ' t have it already , you need to install the protobuf compiler <nl> + ` protoc ` , version 3 . 1 . 0 + . <nl> + <nl> + If ` protoc ` hasn ' t been installed , you can download the ` protoc ` binaries from <nl> + [ the protocol buffers Github repository ] ( https : / / github . com / google / protobuf / releases ) . <nl> <nl> - If you compiled the gRPC C core library from source above , the ` protoc ` binary should have been installed as well . If it hasn ' t been installed , you can run the following commands to install it . <nl> + If you really must compile ` protoc ` from source , you can run the following <nl> + commands , but this is risky because there is no easy way to uninstall / <nl> + upgrade to a newer release . <nl> <nl> ` ` ` sh <nl> $ cd grpc / third_party / protobuf <nl> - $ sudo make install # ' make ' should have been run by core grpc <nl> + $ . / autogen . sh & & . / configure & & make <nl> + $ sudo make install <nl> ` ` ` <nl> <nl> - Alternatively , you can download ` protoc ` binaries from [ the protocol buffers Github repository ] ( https : / / github . com / google / protobuf / releases ) . <nl> <nl> + # # # PHP Protoc Plugin <nl> <nl> - # # # PHP protobuf compiler <nl> + You need the gRPC PHP protoc plugin to generate the client stub classes . <nl> <nl> - You need to install ` protoc - gen - php ` to generate stub class ` . php ` files from service definition ` . proto ` files . <nl> + It should already been compiled when you run ` make ` from the root directory <nl> + of this repo . The plugin can be found in the ` bins / opt ` directory . We are <nl> + planning to provide a better way to download and install the plugin <nl> + in the future . <nl> <nl> - ` ` ` sh <nl> - $ git clone https : / / github . com / stanley - cheung / Protobuf - PHP <nl> - $ cd Protobuf - PHP <nl> - $ gem install rake ronn <nl> - $ rake pear : package version = 1 . 0 <nl> - $ sudo pear install Protobuf - 1 . 0 . tgz <nl> - ` ` ` <nl> <nl> # # # Client Stub <nl> <nl> $ . / bin / generate_proto_php . sh <nl> <nl> # # # Run test server <nl> <nl> - Run a local server serving the math services . Please see [ Node ] [ ] for how to run an example server . <nl> + Run a local server serving the math services . Please see [ Node ] [ ] for how to <nl> + run an example server . <nl> <nl> ` ` ` sh <nl> $ cd grpc <nl> mmm a / src / php / bin / determine_extension_dir . sh <nl> ppp b / src / php / bin / determine_extension_dir . sh <nl> default_extension_dir = $ ( php - config - - extension - dir ) <nl> if [ ! - e $ default_extension_dir / grpc . so ] ; then <nl> # the grpc extension is not found in the default PHP extension dir <nl> # try the source modules directory <nl> - module_dir = . . / ext / grpc / modules <nl> + module_dir = $ ( pwd ) / . . / ext / grpc / modules <nl> if [ ! - e $ module_dir / grpc . so ] ; then <nl> echo " Please run ' phpize & & . / configure & & make ' from ext / grpc first " <nl> exit 1 <nl> mmm a / src / php / bin / generate_proto_php . sh <nl> ppp b / src / php / bin / generate_proto_php . sh <nl> <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> - <nl> set + e <nl> - cd $ ( dirname $ 0 ) <nl> + cd $ ( dirname $ 0 ) / . . / . . / . . <nl> + <nl> + protoc - - proto_path = src / proto / math \ <nl> + - - php_out = src / php / tests / generated_code \ <nl> + - - grpc_out = src / php / tests / generated_code \ <nl> + - - plugin = protoc - gen - grpc = bins / opt / grpc_php_plugin \ <nl> + src / proto / math / math . proto <nl> <nl> - gen_code = ' . . / tests / generated_code ' <nl> - interop = ' . . / tests / interop ' <nl> + # replace the Empty message with EmptyMessage <nl> + # because Empty is a PHP reserved word <nl> + sed - i ' s / message Empty / message EmptyMessage / g ' \ <nl> + src / proto / grpc / testing / empty . proto <nl> + sed - i ' s / grpc \ . testing \ . Empty / grpc \ . testing \ . EmptyMessage / g ' \ <nl> + src / proto / grpc / testing / test . proto <nl> <nl> - protoc - gen - php - i $ gen_code - o $ gen_code $ gen_code / math . proto <nl> + protoc - - proto_path = . \ <nl> + - - php_out = src / php / tests / interop \ <nl> + - - grpc_out = src / php / tests / interop \ <nl> + - - plugin = protoc - gen - grpc = bins / opt / grpc_php_plugin \ <nl> + src / proto / grpc / testing / messages . proto \ <nl> + src / proto / grpc / testing / empty . proto \ <nl> + src / proto / grpc / testing / test . proto <nl> <nl> - protoc - gen - php - i $ interop - o $ interop $ interop / test . proto <nl> + # change it back <nl> + sed - i ' s / message EmptyMessage / message Empty / g ' \ <nl> + src / proto / grpc / testing / empty . proto <nl> + sed - i ' s / grpc \ . testing \ . EmptyMessage / grpc \ . testing \ . Empty / g ' \ <nl> + src / proto / grpc / testing / test . proto <nl> mmm a / src / php / bin / interop_client . sh <nl> ppp b / src / php / bin / interop_client . sh <nl> <nl> set - e <nl> cd $ ( dirname $ 0 ) <nl> source . / determine_extension_dir . sh <nl> + cd . . / tests / interop <nl> php $ extension_dir - d max_execution_time = 300 \ <nl> - . . / tests / interop / interop_client . php $ @ 1 > & 2 <nl> + interop_client . php $ @ 1 > & 2 <nl> mmm a / src / php / composer . json <nl> ppp b / src / php / composer . json <nl> <nl> " version " : " 1 . 1 . 0 " , <nl> " require " : { <nl> " php " : " > = 5 . 5 . 0 " , <nl> - " stanley - cheung / protobuf - php " : " v0 . 6 " <nl> + " google / protobuf " : " v3 . 1 . 0 - alpha - 1 " <nl> } , <nl> " require - dev " : { <nl> " google / auth " : " v0 . 9 " <nl> mmm a / src / php / lib / Grpc / AbstractCall . php <nl> ppp b / src / php / lib / Grpc / AbstractCall . php <nl> public function cancel ( ) <nl> $ this - > call - > cancel ( ) ; <nl> } <nl> <nl> + / * * <nl> + * Serialize a message to the protobuf binary format <nl> + * <nl> + * @ param mixed $ data The Protobuf message <nl> + * <nl> + * @ return string The protobuf binary format <nl> + * / <nl> + protected function serializeMessage ( $ data ) { <nl> + / / Proto3 implementation <nl> + if ( method_exists ( $ data , ' encode ' ) ) { <nl> + return $ data - > encode ( ) ; <nl> + } <nl> + <nl> + / / Protobuf - PHP implementation <nl> + return $ data - > serialize ( ) ; <nl> + } <nl> + <nl> / * * <nl> * Deserialize a response value to an object . <nl> * <nl> protected function deserializeResponse ( $ value ) <nl> return ; <nl> } <nl> <nl> + / / Proto3 implementation <nl> + if ( is_array ( $ this - > deserialize ) ) { <nl> + list ( $ className , $ deserializeFunc ) = $ this - > deserialize ; <nl> + $ obj = new $ className ( ) ; <nl> + $ obj - > $ deserializeFunc ( $ value ) ; <nl> + return $ obj ; <nl> + } <nl> + <nl> + / / Protobuf - PHP implementation <nl> return call_user_func ( $ this - > deserialize , $ value ) ; <nl> } <nl> <nl> mmm a / src / php / lib / Grpc / BidiStreamingCall . php <nl> ppp b / src / php / lib / Grpc / BidiStreamingCall . php <nl> public function read ( ) <nl> * / <nl> public function write ( $ data , $ options = [ ] ) <nl> { <nl> - $ message_array = [ ' message ' = > $ data - > serialize ( ) ] ; <nl> + $ message_array = [ ' message ' = > $ this - > serializeMessage ( $ data ) ] ; <nl> if ( array_key_exists ( ' flags ' , $ options ) ) { <nl> $ message_array [ ' flags ' ] = $ options [ ' flags ' ] ; <nl> } <nl> mmm a / src / php / lib / Grpc / ClientStreamingCall . php <nl> ppp b / src / php / lib / Grpc / ClientStreamingCall . php <nl> public function start ( $ metadata = [ ] ) <nl> * / <nl> public function write ( $ data , array $ options = [ ] ) <nl> { <nl> - $ message_array = [ ' message ' = > $ data - > serialize ( ) ] ; <nl> + $ message_array = [ ' message ' = > $ this - > serializeMessage ( $ data ) ] ; <nl> if ( array_key_exists ( ' flags ' , $ options ) ) { <nl> $ message_array [ ' flags ' ] = $ options [ ' flags ' ] ; <nl> } <nl> mmm a / src / php / lib / Grpc / ServerStreamingCall . php <nl> ppp b / src / php / lib / Grpc / ServerStreamingCall . php <nl> class ServerStreamingCall extends AbstractCall <nl> * / <nl> public function start ( $ data , $ metadata = [ ] , $ options = [ ] ) <nl> { <nl> - $ message_array = [ ' message ' = > $ data - > serialize ( ) ] ; <nl> + $ message_array = [ ' message ' = > $ this - > serializeMessage ( $ data ) ] ; <nl> if ( array_key_exists ( ' flags ' , $ options ) ) { <nl> $ message_array [ ' flags ' ] = $ options [ ' flags ' ] ; <nl> } <nl> mmm a / src / php / lib / Grpc / UnaryCall . php <nl> ppp b / src / php / lib / Grpc / UnaryCall . php <nl> class UnaryCall extends AbstractCall <nl> * / <nl> public function start ( $ data , $ metadata = [ ] , $ options = [ ] ) <nl> { <nl> - $ message_array = [ ' message ' = > $ data - > serialize ( ) ] ; <nl> + $ message_array = [ ' message ' = > $ this - > serializeMessage ( $ data ) ] ; <nl> if ( isset ( $ options [ ' flags ' ] ) ) { <nl> $ message_array [ ' flags ' ] = $ options [ ' flags ' ] ; <nl> } <nl> mmm a / src / php / tests / generated_code / AbstractGeneratedCodeTest . php <nl> ppp b / src / php / tests / generated_code / AbstractGeneratedCodeTest . php <nl> <nl> * <nl> * / <nl> require_once realpath ( dirname ( __FILE__ ) . ' / . . / . . / vendor / autoload . php ' ) ; <nl> - require_once dirname ( __FILE__ ) . ' / math . php ' ; <nl> + require_once dirname ( __FILE__ ) . ' / math . pb . php ' ; <nl> + require_once dirname ( __FILE__ ) . ' / math_grpc_pb . php ' ; <nl> <nl> abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase <nl> { <nl> public function testGetCallMetadata ( ) <nl> public function testTimeout ( ) <nl> { <nl> $ div_arg = new math \ DivArgs ( ) ; <nl> - $ call = self : : $ client - > Div ( $ div_arg , [ ] , [ ' timeout ' = > 100 ] ) ; <nl> + $ call = self : : $ client - > Div ( $ div_arg , [ ] , [ ' timeout ' = > 1 ] ) ; <nl> list ( $ response , $ status ) = $ call - > wait ( ) ; <nl> $ this - > assertSame ( \ Grpc \ STATUS_DEADLINE_EXCEEDED , $ status - > code ) ; <nl> } <nl> deleted file mode 100644 <nl> index c872ee6e0b2 . . 00000000000 <nl> mmm a / src / php / tests / generated_code / math . proto <nl> ppp / dev / null <nl> <nl> - <nl> - / / Copyright 2015 , Google Inc . <nl> - / / All rights reserved . <nl> - / / <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 disclaimer <nl> - / / in the documentation and / or other materials provided with the <nl> - / / distribution . <nl> - / / * Neither the name of Google Inc . nor the names of its <nl> - / / contributors may be used to endorse or promote products derived from <nl> - / / 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> - / / TODO : start using src / proto / math / math . proto and remove this file once <nl> - / / PHP supports proto3 . <nl> - <nl> - syntax = " proto2 " ; <nl> - <nl> - package math ; <nl> - <nl> - message DivArgs { <nl> - optional int64 dividend = 1 [ default = 0 ] ; <nl> - optional int64 divisor = 2 [ default = 0 ] ; <nl> - } <nl> - <nl> - message DivReply { <nl> - optional int64 quotient = 1 [ default = 0 ] ; <nl> - optional int64 remainder = 2 [ default = 0 ] ; <nl> - } <nl> - <nl> - message FibArgs { <nl> - optional int64 limit = 1 [ default = 0 ] ; <nl> - } <nl> - <nl> - message Num { <nl> - optional int64 num = 1 [ default = 0 ] ; <nl> - } <nl> - <nl> - message FibReply { <nl> - optional int64 count = 1 [ default = 0 ] ; <nl> - } <nl> - <nl> - service Math { <nl> - / / Div divides args . dividend by args . divisor and returns the quotient and <nl> - / / remainder . <nl> - rpc Div ( DivArgs ) returns ( DivReply ) { <nl> - } <nl> - <nl> - / / DivMany accepts an arbitrary number of division args from the client stream <nl> - / / and sends back the results in the reply stream . The stream continues until <nl> - / / the client closes its end ; the server does the same after sending all the <nl> - / / replies . The stream ends immediately if either end aborts . <nl> - rpc DivMany ( stream DivArgs ) returns ( stream DivReply ) { <nl> - } <nl> - <nl> - / / Fib generates numbers in the Fibonacci sequence . If args . limit > 0 , Fib <nl> - / / generates up to limit numbers ; otherwise it continues until the call is <nl> - / / canceled . Unlike Fib above , Fib has no final FibReply . <nl> - rpc Fib ( FibArgs ) returns ( stream Num ) { <nl> - } <nl> - <nl> - / / Sum sums a stream of numbers , returning the final result once the stream <nl> - / / is closed . <nl> - rpc Sum ( stream Num ) returns ( Num ) { <nl> - } <nl> - } <nl> mmm a / src / php / tests / interop / interop_client . php <nl> ppp b / src / php / tests / interop / interop_client . php <nl> <nl> * <nl> * / <nl> require_once realpath ( dirname ( __FILE__ ) . ' / . . / . . / vendor / autoload . php ' ) ; <nl> - require ' empty . php ' ; <nl> - require ' messages . php ' ; <nl> - require ' test . php ' ; <nl> + require ' src / proto / grpc / testing / test . pb . php ' ; <nl> + require ' src / proto / grpc / testing / test_grpc_pb . php ' ; <nl> use Google \ Auth \ CredentialsLoader ; <nl> use Google \ Auth \ ApplicationDefaultCredentials ; <nl> use GuzzleHttp \ ClientInterface ; <nl> function serverStreaming ( $ stub ) <nl> foreach ( $ sizes as $ size ) { <nl> $ response_parameters = new grpc \ testing \ ResponseParameters ( ) ; <nl> $ response_parameters - > setSize ( $ size ) ; <nl> - $ request - > addResponseParameters ( $ response_parameters ) ; <nl> + $ request - > getResponseParameters ( ) [ ] = $ response_parameters ; <nl> } <nl> <nl> $ call = $ stub - > StreamingOutputCall ( $ request ) ; <nl> function pingPong ( $ stub ) <nl> $ request - > setResponseType ( grpc \ testing \ PayloadType : : COMPRESSABLE ) ; <nl> $ response_parameters = new grpc \ testing \ ResponseParameters ( ) ; <nl> $ response_parameters - > setSize ( $ response_lengths [ $ i ] ) ; <nl> - $ request - > addResponseParameters ( $ response_parameters ) ; <nl> + $ request - > getResponseParameters ( ) [ ] = $ response_parameters ; <nl> $ payload = new grpc \ testing \ Payload ( ) ; <nl> $ payload - > setBody ( str_repeat ( " \ 0 " , $ request_lengths [ $ i ] ) ) ; <nl> $ request - > setPayload ( $ payload ) ; <nl> function cancelAfterFirstResponse ( $ stub ) <nl> $ request - > setResponseType ( grpc \ testing \ PayloadType : : COMPRESSABLE ) ; <nl> $ response_parameters = new grpc \ testing \ ResponseParameters ( ) ; <nl> $ response_parameters - > setSize ( 31415 ) ; <nl> - $ request - > addResponseParameters ( $ response_parameters ) ; <nl> + $ request - > getResponseParameters ( ) [ ] = $ response_parameters ; <nl> $ payload = new grpc \ testing \ Payload ( ) ; <nl> $ payload - > setBody ( str_repeat ( " \ 0 " , 27182 ) ) ; <nl> $ request - > setPayload ( $ payload ) ; <nl> function timeoutOnSleepingServer ( $ stub ) <nl> $ request - > setResponseType ( grpc \ testing \ PayloadType : : COMPRESSABLE ) ; <nl> $ response_parameters = new grpc \ testing \ ResponseParameters ( ) ; <nl> $ response_parameters - > setSize ( 8 ) ; <nl> - $ request - > addResponseParameters ( $ response_parameters ) ; <nl> + $ request - > getResponseParameters ( ) [ ] = $ response_parameters ; <nl> $ payload = new grpc \ testing \ Payload ( ) ; <nl> $ payload - > setBody ( str_repeat ( " \ 0 " , 9 ) ) ; <nl> $ request - > setPayload ( $ payload ) ; <nl> deleted file mode 100644 <nl> index 44e3c3b8f97 . . 00000000000 <nl> mmm a / src / php / tests / interop / messages . proto <nl> ppp / dev / null <nl> <nl> - <nl> - / / Copyright 2015 - 2016 , Google Inc . <nl> - / / All rights reserved . <nl> - / / <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 disclaimer <nl> - / / in the documentation and / or other materials provided with the <nl> - / / distribution . <nl> - / / * Neither the name of Google Inc . nor the names of its <nl> - / / contributors may be used to endorse or promote products derived from <nl> - / / 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> - / / Message definitions to be used by integration test service definitions . <nl> - <nl> - syntax = " proto2 " ; <nl> - <nl> - package grpc . testing ; <nl> - <nl> - / / The type of payload that should be returned . <nl> - enum PayloadType { <nl> - / / Compressable text format . <nl> - COMPRESSABLE = 0 ; <nl> - <nl> - / / Uncompressable binary format . <nl> - UNCOMPRESSABLE = 1 ; <nl> - } <nl> - <nl> - / / A block of data , to simply increase gRPC message size . <nl> - message Payload { <nl> - / / The type of data in body . <nl> - optional PayloadType type = 1 [ default = COMPRESSABLE ] ; <nl> - / / Primary contents of payload . <nl> - optional bytes body = 2 ; <nl> - } <nl> - <nl> - / / A protobuf representation for grpc status . This is used by test <nl> - / / clients to specify a status that the server should attempt to return . <nl> - message EchoStatus { <nl> - optional int32 code = 1 ; <nl> - optional string message = 2 ; <nl> - } <nl> - <nl> - / / Unary request . <nl> - message SimpleRequest { <nl> - / / Desired payload type in the response from the server . <nl> - / / If response_type is RANDOM , server randomly chooses one from other formats . <nl> - optional PayloadType response_type = 1 [ default = COMPRESSABLE ] ; <nl> - <nl> - / / Desired payload size in the response from the server . <nl> - / / If response_type is COMPRESSABLE , this denotes the size before compression . <nl> - optional int32 response_size = 2 ; <nl> - <nl> - / / Optional input payload sent along with the request . <nl> - optional Payload payload = 3 ; <nl> - <nl> - / / Whether SimpleResponse should include username . <nl> - optional bool fill_username = 4 ; <nl> - <nl> - / / Whether SimpleResponse should include OAuth scope . <nl> - optional bool fill_oauth_scope = 5 ; <nl> - <nl> - / / Whether to request the server to compress the response . <nl> - optional bool request_compressed_response = 6 ; <nl> - <nl> - / / Whether server should return a given status <nl> - optional EchoStatus response_status = 7 ; <nl> - } <nl> - <nl> - / / Unary response , as configured by the request . <nl> - message SimpleResponse { <nl> - / / Payload to increase message size . <nl> - optional Payload payload = 1 ; <nl> - / / The user the request came from , for verifying authentication was <nl> - / / successful when the client expected it . <nl> - optional string username = 2 ; <nl> - / / OAuth scope . <nl> - optional string oauth_scope = 3 ; <nl> - } <nl> - <nl> - / / Client - streaming request . <nl> - message StreamingInputCallRequest { <nl> - / / Optional input payload sent along with the request . <nl> - optional Payload payload = 1 ; <nl> - <nl> - / / Not expecting any payload from the response . <nl> - } <nl> - <nl> - / / Client - streaming response . <nl> - message StreamingInputCallResponse { <nl> - / / Aggregated size of payloads received from the client . <nl> - optional int32 aggregated_payload_size = 1 ; <nl> - } <nl> - <nl> - / / Configuration for a particular response . <nl> - message ResponseParameters { <nl> - / / Desired payload sizes in responses from the server . <nl> - / / If response_type is COMPRESSABLE , this denotes the size before compression . <nl> - optional int32 size = 1 ; <nl> - <nl> - / / Desired interval between consecutive responses in the response stream in <nl> - / / microseconds . <nl> - optional int32 interval_us = 2 ; <nl> - } <nl> - <nl> - / / Server - streaming request . <nl> - message StreamingOutputCallRequest { <nl> - / / Desired payload type in the response from the server . <nl> - / / If response_type is RANDOM , the payload from each response in the stream <nl> - / / might be of different types . This is to simulate a mixed type of payload <nl> - / / stream . <nl> - optional PayloadType response_type = 1 [ default = COMPRESSABLE ] ; <nl> - <nl> - / / Configuration for each expected response message . <nl> - repeated ResponseParameters response_parameters = 2 ; <nl> - <nl> - / / Optional input payload sent along with the request . <nl> - optional Payload payload = 3 ; <nl> - <nl> - / / Whether to request the server to compress the response . <nl> - optional bool request_compressed_response = 6 ; <nl> - <nl> - / / Whether server should return a given status <nl> - optional EchoStatus response_status = 7 ; <nl> - } <nl> - <nl> - / / Server - streaming response , as configured by the request and parameters . <nl> - message StreamingOutputCallResponse { <nl> - / / Payload to increase response size . <nl> - optional Payload payload = 1 ; <nl> - } <nl> - <nl> - / / For reconnect interop test only . <nl> - / / Client tells server what reconnection parameters it used . <nl> - message ReconnectParams { <nl> - optional int32 max_reconnect_backoff_ms = 1 ; <nl> - } <nl> - <nl> - / / For reconnect interop test only . <nl> - / / Server tells client whether its reconnects are following the spec and the <nl> - / / reconnect backoffs it saw . <nl> - message ReconnectInfo { <nl> - optional bool passed = 1 ; <nl> - repeated int32 backoff_ms = 2 ; <nl> - } <nl> deleted file mode 100644 <nl> index 57ef30ee1c1 . . 00000000000 <nl> mmm a / src / php / tests / interop / test . proto <nl> ppp / dev / null <nl> <nl> - <nl> - / / Copyright 2015 - 2016 , Google Inc . <nl> - / / All rights reserved . <nl> - / / <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 disclaimer <nl> - / / in the documentation and / or other materials provided with the <nl> - / / distribution . <nl> - / / * Neither the name of Google Inc . nor the names of its <nl> - / / contributors may be used to endorse or promote products derived from <nl> - / / 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> - / / An integration test service that covers all the method signature permutations <nl> - / / of unary / streaming requests / responses . <nl> - syntax = " proto2 " ; <nl> - <nl> - import " empty . proto " ; <nl> - import " messages . proto " ; <nl> - <nl> - package grpc . testing ; <nl> - <nl> - / / A simple service to test the various types of RPCs and experiment with <nl> - / / performance with various types of payload . <nl> - service TestService { <nl> - / / One empty request followed by one empty response . <nl> - rpc EmptyCall ( grpc . testing . EmptyMessage ) returns ( grpc . testing . EmptyMessage ) ; <nl> - <nl> - / / One request followed by one response . <nl> - rpc UnaryCall ( SimpleRequest ) returns ( SimpleResponse ) ; <nl> - <nl> - / / One request followed by a sequence of responses ( streamed download ) . <nl> - / / The server returns the payload with client desired type and sizes . <nl> - rpc StreamingOutputCall ( StreamingOutputCallRequest ) <nl> - returns ( stream StreamingOutputCallResponse ) ; <nl> - <nl> - / / A sequence of requests followed by one response ( streamed upload ) . <nl> - / / The server returns the aggregated size of client payload as the result . <nl> - rpc StreamingInputCall ( stream StreamingInputCallRequest ) <nl> - returns ( StreamingInputCallResponse ) ; <nl> - <nl> - / / A sequence of requests with each request served by the server immediately . <nl> - / / As one request could lead to multiple responses , this interface <nl> - / / demonstrates the idea of full duplexing . <nl> - rpc FullDuplexCall ( stream StreamingOutputCallRequest ) <nl> - returns ( stream StreamingOutputCallResponse ) ; <nl> - <nl> - / / A sequence of requests followed by a sequence of responses . <nl> - / / The server buffers all the client requests and then serves them in order . A <nl> - / / stream of responses are returned to the client when the server starts with <nl> - / / first request . <nl> - rpc HalfDuplexCall ( stream StreamingOutputCallRequest ) <nl> - returns ( stream StreamingOutputCallResponse ) ; <nl> - } <nl> - <nl> - / / A simple service NOT implemented at servers so clients can test for <nl> - / / that case . <nl> - service UnimplementedService { <nl> - / / A call that no server should implement <nl> - rpc UnimplementedCall ( grpc . testing . EmptyMessage ) returns ( grpc . testing . EmptyMessage ) ; <nl> - } <nl> mmm a / src / ruby / README . md <nl> ppp b / src / ruby / README . md <nl> Directory structure is the layout for [ ruby extensions ] [ ] <nl> <nl> [ ruby extensions ] : http : / / guides . rubygems . org / gems - with - extensions / <nl> [ rubydoc ] : http : / / www . rubydoc . info / gems / grpc <nl> - [ grpc . io ] : http : / / www . grpc . io / docs / installation / ruby . html <nl> + [ grpc . io ] : http : / / www . grpc . io / docs / quickstart / ruby . html <nl> [ Debian jessie - backports ] : http : / / backports . debian . org / Instructions / <nl> mmm a / templates / composer . json . template <nl> ppp b / templates / composer . json . template <nl> <nl> " license " : " BSD - 3 - Clause " , <nl> " require " : { <nl> " php " : " > = 5 . 5 . 0 " , <nl> - " stanley - cheung / protobuf - php " : " v0 . 6 " <nl> + " google / protobuf " : " v3 . 1 . 0 - alpha - 1 " <nl> } , <nl> " require - dev " : { <nl> " google / auth " : " v0 . 9 " <nl> mmm a / templates / src / php / composer . json . template <nl> ppp b / templates / src / php / composer . json . template <nl> <nl> " version " : " $ { settings . php_version . php_composer ( ) } " , <nl> " require " : { <nl> " php " : " > = 5 . 5 . 0 " , <nl> - " stanley - cheung / protobuf - php " : " v0 . 6 " <nl> + " google / protobuf " : " v3 . 1 . 0 - alpha - 1 " <nl> } , <nl> " require - dev " : { <nl> " google / auth " : " v0 . 9 " <nl> mmm a / templates / tools / dockerfile / interoptest / grpc_interop_php / Dockerfile . template <nl> ppp b / templates / tools / dockerfile / interoptest / grpc_interop_php / Dockerfile . template <nl> <nl> FROM debian : jessie <nl> <nl> < % include file = " . . / . . / apt_get_basic . include " / > <nl> - < % include file = " . . / . . / ruby_deps . include " / > <nl> < % include file = " . . / . . / php_deps . include " / > <nl> < % include file = " . . / . . / run_tests_addons . include " / > <nl> < % include file = " . . / . . / php_common_deps . include " / > <nl> mmm a / templates / tools / dockerfile / interoptest / grpc_interop_php7 / Dockerfile . template <nl> ppp b / templates / tools / dockerfile / interoptest / grpc_interop_php7 / Dockerfile . template <nl> <nl> FROM debian : jessie <nl> <nl> < % include file = " . . / . . / php7_deps . include " / > <nl> - < % include file = " . . / . . / ruby_deps . include " / > <nl> < % include file = " . . / . . / run_tests_addons . include " / > <nl> < % include file = " . . / . . / php_common_deps . include " / > <nl> mmm a / templates / tools / dockerfile / php_common_deps . include <nl> ppp b / templates / tools / dockerfile / php_common_deps . include <nl> <nl> - # ronn : a ruby tool used to convert markdown to man pages , used during the <nl> - # install of Protobuf extensions <nl> - # <nl> - # rake : a ruby version of make used to build the PHP Protobuf extension <nl> - RUN / bin / bash - l - c " rvm all do gem install ronn rake " <nl> - <nl> # Install composer <nl> RUN curl - sS https : / / getcomposer . org / installer | php <nl> RUN mv composer . phar / usr / local / bin / composer <nl> <nl> - # Download the patched PHP protobuf so that PHP gRPC clients can be generated <nl> - # from proto3 schemas . <nl> - RUN git clone https : / / github . com / stanley - cheung / Protobuf - PHP . git / var / local / git / protobuf - php <nl> - <nl> - RUN / bin / bash - l - c " rvm use ruby - 2 . 1 $ { ' \ \ ' } <nl> - & & cd / var / local / git / protobuf - php $ { ' \ \ ' } <nl> - & & rvm all do rake pear : package version = 1 . 0 $ { ' \ \ ' } <nl> - & & pear install Protobuf - 1 . 0 . tgz " <nl> - <nl> # Define the default command . <nl> CMD [ " bash " ] <nl> mmm a / templates / tools / dockerfile / stress_test / grpc_interop_stress_php / Dockerfile . template <nl> ppp b / templates / tools / dockerfile / stress_test / grpc_interop_stress_php / Dockerfile . template <nl> <nl> < % include file = " . . / . . / gcp_api_libraries . include " / > <nl> < % include file = " . . / . . / php_deps . include " / > <nl> < % include file = " . . / . . / run_tests_addons . include " / > <nl> - # ronn : a ruby tool used to convert markdown to man pages , used during the <nl> - # install of Protobuf extensions <nl> - # <nl> - # rake : a ruby version of make used to build the PHP Protobuf extension <nl> - RUN / bin / bash - l - c " rvm all do gem install ronn rake " <nl> - <nl> # Install composer <nl> RUN curl - sS https : / / getcomposer . org / installer | php <nl> RUN mv composer . phar / usr / local / bin / composer <nl> <nl> - # Download the patched PHP protobuf so that PHP gRPC clients can be generated <nl> - # from proto3 schemas . <nl> - RUN git clone https : / / github . com / stanley - cheung / Protobuf - PHP . git / var / local / git / protobuf - php <nl> - <nl> - RUN / bin / bash - l - c " rvm use ruby - 2 . 1 $ { ' \ \ ' } <nl> - & & cd / var / local / git / protobuf - php $ { ' \ \ ' } <nl> - & & rvm all do rake pear : package version = 1 . 0 $ { ' \ \ ' } <nl> - & & pear install Protobuf - 1 . 0 . tgz " <nl> - <nl> # Define the default command . <nl> CMD [ " bash " ] <nl> <nl> mmm a / test / core / client_config / lb_policies_test . c <nl> ppp b / test / core / client_config / lb_policies_test . c <nl> <nl> # include " src / core / lib / surface / channel . h " <nl> # include " src / core / lib / surface / server . h " <nl> # include " test / core / end2end / cq_verifier . h " <nl> + # include " test / core / end2end / fake_resolver . h " <nl> # include " test / core / util / port . h " <nl> # include " test / core / util / test_config . h " <nl> <nl> void run_spec ( const test_spec * spec ) { <nl> / * Create client . * / <nl> servers_hostports_str = gpr_strjoin_sep ( ( const char * * ) f - > servers_hostports , <nl> f - > num_servers , " , " , NULL ) ; <nl> - gpr_asprintf ( & client_hostport , " ipv4 : % s ? lb_policy = round_robin " , <nl> + gpr_asprintf ( & client_hostport , " test : % s ? lb_policy = round_robin " , <nl> servers_hostports_str ) ; <nl> <nl> arg . type = GRPC_ARG_INTEGER ; <nl> static grpc_channel * create_client ( const servers_fixture * f ) { <nl> <nl> servers_hostports_str = gpr_strjoin_sep ( ( const char * * ) f - > servers_hostports , <nl> f - > num_servers , " , " , NULL ) ; <nl> - gpr_asprintf ( & client_hostport , " ipv4 : % s ? lb_policy = round_robin " , <nl> + gpr_asprintf ( & client_hostport , " test : % s ? lb_policy = round_robin " , <nl> servers_hostports_str ) ; <nl> <nl> arg . type = GRPC_ARG_INTEGER ; <nl> int main ( int argc , char * * argv ) { <nl> const size_t NUM_SERVERS = 4 ; <nl> <nl> grpc_test_init ( argc , argv ) ; <nl> + grpc_fake_resolver_init ( ) ; <nl> grpc_init ( ) ; <nl> grpc_tracer_set_enabled ( " round_robin " , 1 ) ; <nl> <nl> mmm a / test / core / client_config / resolvers / sockaddr_resolver_test . c <nl> ppp b / test / core / client_config / resolvers / sockaddr_resolver_test . c <nl> <nl> <nl> # include < string . h > <nl> <nl> + # include < grpc / support / alloc . h > <nl> # include < grpc / support / log . h > <nl> + # include < grpc / support / string_util . h > <nl> <nl> # include " src / core / ext / client_config / resolver_registry . h " <nl> + # include " src / core / ext / client_config / resolver_result . h " <nl> + <nl> # include " test / core / util / test_config . h " <nl> <nl> + typedef struct on_resolution_arg { <nl> + char * expected_server_name ; <nl> + grpc_resolver_result * resolver_result ; <nl> + } on_resolution_arg ; <nl> + <nl> + void on_resolution_cb ( grpc_exec_ctx * exec_ctx , void * arg , grpc_error * error ) { <nl> + on_resolution_arg * res = arg ; <nl> + const char * server_name = <nl> + grpc_resolver_result_get_server_name ( res - > resolver_result ) ; <nl> + GPR_ASSERT ( strcmp ( res - > expected_server_name , server_name ) = = 0 ) ; <nl> + grpc_resolver_result_unref ( exec_ctx , res - > resolver_result ) ; <nl> + } <nl> + <nl> static void test_succeeds ( grpc_resolver_factory * factory , const char * string ) { <nl> grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT ; <nl> grpc_uri * uri = grpc_uri_parse ( string , 0 ) ; <nl> static void test_succeeds ( grpc_resolver_factory * factory , const char * string ) { <nl> args . uri = uri ; <nl> resolver = grpc_resolver_factory_create_resolver ( factory , & args ) ; <nl> GPR_ASSERT ( resolver ! = NULL ) ; <nl> + <nl> + on_resolution_arg on_res_arg ; <nl> + memset ( & on_res_arg , 0 , sizeof ( on_res_arg ) ) ; <nl> + on_res_arg . expected_server_name = uri - > path ; <nl> + grpc_closure * on_resolution = <nl> + grpc_closure_create ( on_resolution_cb , & on_res_arg ) ; <nl> + <nl> + grpc_resolver_next ( & exec_ctx , resolver , & on_res_arg . resolver_result , <nl> + on_resolution ) ; <nl> GRPC_RESOLVER_UNREF ( & exec_ctx , resolver , " test_succeeds " ) ; <nl> - grpc_uri_destroy ( uri ) ; <nl> grpc_exec_ctx_finish ( & exec_ctx ) ; <nl> + grpc_uri_destroy ( uri ) ; <nl> } <nl> <nl> static void test_fails ( grpc_resolver_factory * factory , const char * string ) { <nl> new file mode 100644 <nl> index 00000000000 . . 4149159a378 <nl> mmm / dev / null <nl> ppp b / test / core / end2end / connection_refused_test . c <nl> <nl> + / * <nl> + * <nl> + * Copyright 2016 , Google Inc . <nl> + * All rights reserved . <nl> + * <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 disclaimer <nl> + * in the documentation and / or other materials provided with the <nl> + * distribution . <nl> + * * Neither the name of Google Inc . nor the names of its <nl> + * contributors may be used to endorse or promote products derived from <nl> + * 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> + * / <nl> + <nl> + # include < string . h > <nl> + <nl> + # include < grpc / grpc . h > <nl> + # include < grpc / support / alloc . h > <nl> + # include < grpc / support / host_port . h > <nl> + # include < grpc / support / log . h > <nl> + <nl> + # include " test / core / end2end / cq_verifier . h " <nl> + # include " test / core / util / port . h " <nl> + # include " test / core / util / test_config . h " <nl> + <nl> + static void * tag ( intptr_t i ) { return ( void * ) i ; } <nl> + <nl> + static void run_test ( bool fail_fast ) { <nl> + grpc_channel * chan ; <nl> + grpc_call * call ; <nl> + gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE ( 2 ) ; <nl> + grpc_completion_queue * cq ; <nl> + cq_verifier * cqv ; <nl> + grpc_op ops [ 6 ] ; <nl> + grpc_op * op ; <nl> + grpc_metadata_array trailing_metadata_recv ; <nl> + grpc_status_code status ; <nl> + char * details = NULL ; <nl> + size_t details_capacity = 0 ; <nl> + <nl> + gpr_log ( GPR_INFO , " TEST : fail_fast = % d " , fail_fast ) ; <nl> + <nl> + grpc_init ( ) ; <nl> + <nl> + grpc_metadata_array_init ( & trailing_metadata_recv ) ; <nl> + <nl> + cq = grpc_completion_queue_create ( NULL ) ; <nl> + cqv = cq_verifier_create ( cq ) ; <nl> + <nl> + / * create a call , channel to a port which will refuse connection * / <nl> + int port = grpc_pick_unused_port_or_die ( ) ; <nl> + char * addr ; <nl> + gpr_join_host_port ( & addr , " localhost " , port ) ; <nl> + <nl> + chan = grpc_insecure_channel_create ( addr , NULL , NULL ) ; <nl> + call = grpc_channel_create_call ( chan , NULL , GRPC_PROPAGATE_DEFAULTS , cq , <nl> + " / Foo " , " nonexistant " , deadline , NULL ) ; <nl> + <nl> + gpr_free ( addr ) ; <nl> + <nl> + memset ( ops , 0 , sizeof ( ops ) ) ; <nl> + op = ops ; <nl> + op - > op = GRPC_OP_SEND_INITIAL_METADATA ; <nl> + op - > data . send_initial_metadata . count = 0 ; <nl> + op - > flags = fail_fast ? 0 : GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY ; <nl> + op - > reserved = NULL ; <nl> + op + + ; <nl> + op - > op = GRPC_OP_RECV_STATUS_ON_CLIENT ; <nl> + op - > data . recv_status_on_client . trailing_metadata = & trailing_metadata_recv ; <nl> + op - > data . recv_status_on_client . status = & status ; <nl> + op - > data . recv_status_on_client . status_details = & details ; <nl> + op - > data . recv_status_on_client . status_details_capacity = & details_capacity ; <nl> + op - > flags = 0 ; <nl> + op - > reserved = NULL ; <nl> + op + + ; <nl> + GPR_ASSERT ( GRPC_CALL_OK = = grpc_call_start_batch ( <nl> + call , ops , ( size_t ) ( op - ops ) , tag ( 1 ) , NULL ) ) ; <nl> + / * verify that all tags get completed * / <nl> + CQ_EXPECT_COMPLETION ( cqv , tag ( 1 ) , 1 ) ; <nl> + cq_verify ( cqv ) ; <nl> + <nl> + if ( fail_fast ) { <nl> + GPR_ASSERT ( status = = GRPC_STATUS_UNAVAILABLE ) ; <nl> + } else { <nl> + GPR_ASSERT ( status = = GRPC_STATUS_DEADLINE_EXCEEDED ) ; <nl> + } <nl> + <nl> + grpc_completion_queue_shutdown ( cq ) ; <nl> + while ( <nl> + grpc_completion_queue_next ( cq , gpr_inf_future ( GPR_CLOCK_REALTIME ) , NULL ) <nl> + . type ! = GRPC_QUEUE_SHUTDOWN ) <nl> + ; <nl> + grpc_completion_queue_destroy ( cq ) ; <nl> + grpc_call_destroy ( call ) ; <nl> + grpc_channel_destroy ( chan ) ; <nl> + cq_verifier_destroy ( cqv ) ; <nl> + <nl> + gpr_free ( details ) ; <nl> + grpc_metadata_array_destroy ( & trailing_metadata_recv ) ; <nl> + <nl> + grpc_shutdown ( ) ; <nl> + } <nl> + <nl> + int main ( int argc , char * * argv ) { <nl> + grpc_test_init ( argc , argv ) ; <nl> + run_test ( true ) ; <nl> + run_test ( false ) ; <nl> + return 0 ; <nl> + } <nl> new file mode 100644 <nl> index 00000000000 . . 8a6624a49ab <nl> mmm / dev / null <nl> ppp b / test / core / end2end / fake_resolver . c <nl> <nl> + / / <nl> + / / Copyright 2016 , Google Inc . <nl> + / / All rights reserved . <nl> + / / <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 disclaimer <nl> + / / in the documentation and / or other materials provided with the <nl> + / / distribution . <nl> + / / * Neither the name of Google Inc . nor the names of its <nl> + / / contributors may be used to endorse or promote products derived from <nl> + / / 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> + <nl> + / / This is similar to the sockaddr resolver , except that it supports a <nl> + / / bunch of query args that are useful for dependency injection in tests . <nl> + <nl> + # include < stdbool . h > <nl> + # include < stdio . h > <nl> + # include < stdlib . h > <nl> + # include < string . h > <nl> + <nl> + # include < grpc / support / alloc . h > <nl> + # include < grpc / support / host_port . h > <nl> + # include < grpc / support / port_platform . h > <nl> + # include < grpc / support / string_util . h > <nl> + <nl> + # include " src / core / ext / client_config / parse_address . h " <nl> + # include " src / core / ext / client_config / resolver_registry . h " <nl> + # include " src / core / lib / channel / channel_args . h " <nl> + # include " src / core / lib / iomgr / resolve_address . h " <nl> + # include " src / core / lib / iomgr / unix_sockets_posix . h " <nl> + # include " src / core / lib / support / string . h " <nl> + <nl> + / / <nl> + / / fake_resolver <nl> + / / <nl> + <nl> + typedef struct { <nl> + / / base class - - must be first <nl> + grpc_resolver base ; <nl> + <nl> + / / passed - in parameters <nl> + char * target_name ; / / the path component of the uri passed in <nl> + grpc_lb_addresses * addresses ; <nl> + char * lb_policy_name ; <nl> + <nl> + / / mutex guarding the rest of the state <nl> + gpr_mu mu ; <nl> + / / have we published ? <nl> + bool published ; <nl> + / / pending next completion , or NULL <nl> + grpc_closure * next_completion ; <nl> + / / target result address for next completion <nl> + grpc_resolver_result * * target_result ; <nl> + } fake_resolver ; <nl> + <nl> + static void fake_resolver_destroy ( grpc_exec_ctx * exec_ctx , grpc_resolver * gr ) { <nl> + fake_resolver * r = ( fake_resolver * ) gr ; <nl> + gpr_mu_destroy ( & r - > mu ) ; <nl> + gpr_free ( r - > target_name ) ; <nl> + grpc_lb_addresses_destroy ( r - > addresses , NULL / * user_data_destroy * / ) ; <nl> + gpr_free ( r - > lb_policy_name ) ; <nl> + gpr_free ( r ) ; <nl> + } <nl> + <nl> + static void fake_resolver_shutdown ( grpc_exec_ctx * exec_ctx , <nl> + grpc_resolver * resolver ) { <nl> + fake_resolver * r = ( fake_resolver * ) resolver ; <nl> + gpr_mu_lock ( & r - > mu ) ; <nl> + if ( r - > next_completion ! = NULL ) { <nl> + * r - > target_result = NULL ; <nl> + grpc_exec_ctx_sched ( exec_ctx , r - > next_completion , GRPC_ERROR_NONE , NULL ) ; <nl> + r - > next_completion = NULL ; <nl> + } <nl> + gpr_mu_unlock ( & r - > mu ) ; <nl> + } <nl> + <nl> + static void fake_resolver_maybe_finish_next_locked ( grpc_exec_ctx * exec_ctx , <nl> + fake_resolver * r ) { <nl> + if ( r - > next_completion ! = NULL & & ! r - > published ) { <nl> + r - > published = true ; <nl> + * r - > target_result = grpc_resolver_result_create ( <nl> + r - > target_name , <nl> + grpc_lb_addresses_copy ( r - > addresses , NULL / * user_data_copy * / ) , <nl> + r - > lb_policy_name , NULL / * lb_policy_args * / ) ; <nl> + grpc_exec_ctx_sched ( exec_ctx , r - > next_completion , GRPC_ERROR_NONE , NULL ) ; <nl> + r - > next_completion = NULL ; <nl> + } <nl> + } <nl> + <nl> + static void fake_resolver_channel_saw_error ( grpc_exec_ctx * exec_ctx , <nl> + grpc_resolver * resolver ) { <nl> + fake_resolver * r = ( fake_resolver * ) resolver ; <nl> + gpr_mu_lock ( & r - > mu ) ; <nl> + r - > published = false ; <nl> + fake_resolver_maybe_finish_next_locked ( exec_ctx , r ) ; <nl> + gpr_mu_unlock ( & r - > mu ) ; <nl> + } <nl> + <nl> + static void fake_resolver_next ( grpc_exec_ctx * exec_ctx , grpc_resolver * resolver , <nl> + grpc_resolver_result * * target_result , <nl> + grpc_closure * on_complete ) { <nl> + fake_resolver * r = ( fake_resolver * ) resolver ; <nl> + gpr_mu_lock ( & r - > mu ) ; <nl> + GPR_ASSERT ( ! r - > next_completion ) ; <nl> + r - > next_completion = on_complete ; <nl> + r - > target_result = target_result ; <nl> + fake_resolver_maybe_finish_next_locked ( exec_ctx , r ) ; <nl> + gpr_mu_unlock ( & r - > mu ) ; <nl> + } <nl> + <nl> + static const grpc_resolver_vtable fake_resolver_vtable = { <nl> + fake_resolver_destroy , fake_resolver_shutdown , <nl> + fake_resolver_channel_saw_error , fake_resolver_next } ; <nl> + <nl> + / / <nl> + / / fake_resolver_factory <nl> + / / <nl> + <nl> + static void fake_resolver_factory_ref ( grpc_resolver_factory * factory ) { } <nl> + <nl> + static void fake_resolver_factory_unref ( grpc_resolver_factory * factory ) { } <nl> + <nl> + static void do_nothing ( void * ignored ) { } <nl> + <nl> + static grpc_resolver * fake_resolver_create ( grpc_resolver_factory * factory , <nl> + grpc_resolver_args * args ) { <nl> + if ( 0 ! = strcmp ( args - > uri - > authority , " " ) ) { <nl> + gpr_log ( GPR_ERROR , " authority based uri ' s not supported by the % s scheme " , <nl> + args - > uri - > scheme ) ; <nl> + return NULL ; <nl> + } <nl> + / / Get lb_enabled arg . Anything other than " 0 " is interpreted as true . <nl> + const char * lb_enabled_qpart = <nl> + grpc_uri_get_query_arg ( args - > uri , " lb_enabled " ) ; <nl> + const bool lb_enabled = <nl> + lb_enabled_qpart ! = NULL & & strcmp ( " 0 " , lb_enabled_qpart ) ! = 0 ; <nl> + / / Construct addresses . <nl> + gpr_slice path_slice = <nl> + gpr_slice_new ( args - > uri - > path , strlen ( args - > uri - > path ) , do_nothing ) ; <nl> + gpr_slice_buffer path_parts ; <nl> + gpr_slice_buffer_init ( & path_parts ) ; <nl> + gpr_slice_split ( path_slice , " , " , & path_parts ) ; <nl> + grpc_lb_addresses * addresses = grpc_lb_addresses_create ( path_parts . count ) ; <nl> + bool errors_found = false ; <nl> + for ( size_t i = 0 ; i < addresses - > num_addresses ; i + + ) { <nl> + grpc_uri ith_uri = * args - > uri ; <nl> + char * part_str = gpr_dump_slice ( path_parts . slices [ i ] , GPR_DUMP_ASCII ) ; <nl> + ith_uri . path = part_str ; <nl> + if ( ! parse_ipv4 ( <nl> + & ith_uri , <nl> + ( struct sockaddr_storage * ) ( & addresses - > addresses [ i ] . address . addr ) , <nl> + & addresses - > addresses [ i ] . address . len ) ) { <nl> + errors_found = true ; <nl> + } <nl> + gpr_free ( part_str ) ; <nl> + addresses - > addresses [ i ] . is_balancer = lb_enabled ; <nl> + if ( errors_found ) break ; <nl> + } <nl> + gpr_slice_buffer_destroy ( & path_parts ) ; <nl> + gpr_slice_unref ( path_slice ) ; <nl> + if ( errors_found ) { <nl> + grpc_lb_addresses_destroy ( addresses , NULL / * user_data_destroy * / ) ; <nl> + return NULL ; <nl> + } <nl> + / / Instantiate resolver . <nl> + fake_resolver * r = gpr_malloc ( sizeof ( fake_resolver ) ) ; <nl> + memset ( r , 0 , sizeof ( * r ) ) ; <nl> + r - > target_name = gpr_strdup ( args - > uri - > path ) ; <nl> + r - > addresses = addresses ; <nl> + r - > lb_policy_name = <nl> + gpr_strdup ( grpc_uri_get_query_arg ( args - > uri , " lb_policy " ) ) ; <nl> + gpr_mu_init ( & r - > mu ) ; <nl> + grpc_resolver_init ( & r - > base , & fake_resolver_vtable ) ; <nl> + return & r - > base ; <nl> + } <nl> + <nl> + static char * fake_resolver_get_default_authority ( grpc_resolver_factory * factory , <nl> + grpc_uri * uri ) { <nl> + const char * path = uri - > path ; <nl> + if ( path [ 0 ] = = ' / ' ) + + path ; <nl> + return gpr_strdup ( path ) ; <nl> + } <nl> + <nl> + static const grpc_resolver_factory_vtable fake_resolver_factory_vtable = { <nl> + fake_resolver_factory_ref , fake_resolver_factory_unref , <nl> + fake_resolver_create , fake_resolver_get_default_authority , " test " } ; <nl> + <nl> + static grpc_resolver_factory fake_resolver_factory = { <nl> + & fake_resolver_factory_vtable } ; <nl> + <nl> + void grpc_fake_resolver_init ( void ) { <nl> + grpc_register_resolver_type ( & fake_resolver_factory ) ; <nl> + } <nl> similarity index 78 % <nl> rename from src / php / tests / interop / empty . proto <nl> rename to test / core / end2end / fake_resolver . h <nl> mmm a / src / php / tests / interop / empty . proto <nl> ppp b / test / core / end2end / fake_resolver . h <nl> <nl> - <nl> - / / Copyright 2015 , Google Inc . <nl> + / / <nl> + / / Copyright 2016 , Google Inc . <nl> / / All rights reserved . <nl> / / <nl> / / Redistribution and use in source and binary forms , with or without <nl> <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> <nl> - syntax = " proto2 " ; <nl> + # ifndef GRPC_TEST_CORE_END2END_FAKE_RESOLVER_H <nl> + # define GRPC_TEST_CORE_END2END_FAKE_RESOLVER_H <nl> <nl> - package grpc . testing ; <nl> + # include " test / core / util / test_config . h " <nl> <nl> - / / An empty message that you can re - use to avoid defining duplicated empty <nl> - / / messages in your project . A typical example is to use it as argument or the <nl> - / / return value of a service API . For instance : <nl> - / / <nl> - / / service Foo { <nl> - / / rpc Bar ( grpc . testing . EmptyMessage ) returns ( grpc . testing . EmptyMessage ) { } ; <nl> - / / } ; <nl> - / / <nl> - message EmptyMessage { } <nl> + void grpc_fake_resolver_init ( ) ; <nl> + <nl> + # endif / * GRPC_TEST_CORE_END2END_FAKE_RESOLVER_H * / <nl> mmm a / test / core / end2end / tests / max_message_length . c <nl> ppp b / test / core / end2end / tests / max_message_length . c <nl> static void end_test ( grpc_end2end_test_fixture * f ) { <nl> grpc_completion_queue_destroy ( f - > cq ) ; <nl> } <nl> <nl> - static void test_max_message_length ( grpc_end2end_test_config config , <nl> - bool send_limit ) { <nl> - gpr_log ( GPR_INFO , " testing with send_limit = % d " , send_limit ) ; <nl> + / / Test with request larger than the limit . <nl> + / / If send_limit is true , applies send limit on client ; otherwise , applies <nl> + / / recv limit on server . <nl> + static void test_max_message_length_on_request ( grpc_end2end_test_config config , <nl> + bool send_limit ) { <nl> + gpr_log ( GPR_INFO , " testing request with send_limit = % d " , send_limit ) ; <nl> <nl> grpc_end2end_test_fixture f ; <nl> grpc_arg channel_arg ; <nl> static void test_max_message_length ( grpc_end2end_test_config config , <nl> config . tear_down_data ( & f ) ; <nl> } <nl> <nl> + / / Test with response larger than the limit . <nl> + / / If send_limit is true , applies send limit on server ; otherwise , applies <nl> + / / recv limit on client . <nl> + static void test_max_message_length_on_response ( grpc_end2end_test_config config , <nl> + bool send_limit ) { <nl> + gpr_log ( GPR_INFO , " testing response with send_limit = % d " , send_limit ) ; <nl> + <nl> + grpc_end2end_test_fixture f ; <nl> + grpc_arg channel_arg ; <nl> + grpc_channel_args channel_args ; <nl> + grpc_call * c = NULL ; <nl> + grpc_call * s = NULL ; <nl> + cq_verifier * cqv ; <nl> + grpc_op ops [ 6 ] ; <nl> + grpc_op * op ; <nl> + gpr_slice response_payload_slice = <nl> + gpr_slice_from_copied_string ( " hello world " ) ; <nl> + grpc_byte_buffer * response_payload = <nl> + grpc_raw_byte_buffer_create ( & response_payload_slice , 1 ) ; <nl> + grpc_byte_buffer * recv_payload = NULL ; <nl> + grpc_metadata_array initial_metadata_recv ; <nl> + grpc_metadata_array trailing_metadata_recv ; <nl> + grpc_metadata_array request_metadata_recv ; <nl> + grpc_call_details call_details ; <nl> + grpc_status_code status ; <nl> + grpc_call_error error ; <nl> + char * details = NULL ; <nl> + size_t details_capacity = 0 ; <nl> + int was_cancelled = 2 ; <nl> + <nl> + channel_arg . key = send_limit ? GRPC_ARG_MAX_SEND_MESSAGE_LENGTH <nl> + : GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH ; <nl> + channel_arg . type = GRPC_ARG_INTEGER ; <nl> + channel_arg . value . integer = 5 ; <nl> + <nl> + channel_args . num_args = 1 ; <nl> + channel_args . args = & channel_arg ; <nl> + <nl> + f = begin_test ( config , " test_max_message_length " , <nl> + send_limit ? NULL : & channel_args , <nl> + send_limit ? & channel_args : NULL ) ; <nl> + cqv = cq_verifier_create ( f . cq ) ; <nl> + <nl> + c = grpc_channel_create_call ( f . client , NULL , GRPC_PROPAGATE_DEFAULTS , f . cq , <nl> + " / foo " , " foo . test . google . fr : 1234 " , <nl> + gpr_inf_future ( GPR_CLOCK_REALTIME ) , NULL ) ; <nl> + GPR_ASSERT ( c ) ; <nl> + <nl> + grpc_metadata_array_init ( & initial_metadata_recv ) ; <nl> + grpc_metadata_array_init ( & trailing_metadata_recv ) ; <nl> + grpc_metadata_array_init ( & request_metadata_recv ) ; <nl> + grpc_call_details_init ( & call_details ) ; <nl> + <nl> + memset ( ops , 0 , sizeof ( ops ) ) ; <nl> + op = ops ; <nl> + op - > op = GRPC_OP_SEND_INITIAL_METADATA ; <nl> + op - > data . send_initial_metadata . count = 0 ; <nl> + op - > flags = 0 ; <nl> + op - > reserved = NULL ; <nl> + op + + ; <nl> + op - > op = GRPC_OP_SEND_CLOSE_FROM_CLIENT ; <nl> + op - > flags = 0 ; <nl> + op - > reserved = NULL ; <nl> + op + + ; <nl> + op - > op = GRPC_OP_RECV_INITIAL_METADATA ; <nl> + op - > data . recv_initial_metadata = & initial_metadata_recv ; <nl> + op - > flags = 0 ; <nl> + op - > reserved = NULL ; <nl> + op + + ; <nl> + op - > op = GRPC_OP_RECV_MESSAGE ; <nl> + op - > data . recv_message = & recv_payload ; <nl> + op - > flags = 0 ; <nl> + op - > reserved = NULL ; <nl> + op + + ; <nl> + op - > op = GRPC_OP_RECV_STATUS_ON_CLIENT ; <nl> + op - > data . recv_status_on_client . trailing_metadata = & trailing_metadata_recv ; <nl> + op - > data . recv_status_on_client . status = & status ; <nl> + op - > data . recv_status_on_client . status_details = & details ; <nl> + op - > data . recv_status_on_client . status_details_capacity = & details_capacity ; <nl> + op - > flags = 0 ; <nl> + op - > reserved = NULL ; <nl> + op + + ; <nl> + error = grpc_call_start_batch ( c , ops , ( size_t ) ( op - ops ) , tag ( 1 ) , NULL ) ; <nl> + GPR_ASSERT ( GRPC_CALL_OK = = error ) ; <nl> + <nl> + error = <nl> + grpc_server_request_call ( f . server , & s , & call_details , <nl> + & request_metadata_recv , f . cq , f . cq , tag ( 101 ) ) ; <nl> + GPR_ASSERT ( GRPC_CALL_OK = = error ) ; <nl> + CQ_EXPECT_COMPLETION ( cqv , tag ( 101 ) , 1 ) ; <nl> + cq_verify ( cqv ) ; <nl> + <nl> + memset ( ops , 0 , sizeof ( ops ) ) ; <nl> + op = ops ; <nl> + op - > op = GRPC_OP_SEND_INITIAL_METADATA ; <nl> + op - > data . send_initial_metadata . count = 0 ; <nl> + op - > flags = 0 ; <nl> + op - > reserved = NULL ; <nl> + op + + ; <nl> + op - > op = GRPC_OP_RECV_CLOSE_ON_SERVER ; <nl> + op - > data . recv_close_on_server . cancelled = & was_cancelled ; <nl> + op - > flags = 0 ; <nl> + op - > reserved = NULL ; <nl> + op + + ; <nl> + op - > op = GRPC_OP_SEND_MESSAGE ; <nl> + op - > data . send_message = response_payload ; <nl> + op - > flags = 0 ; <nl> + op - > reserved = NULL ; <nl> + op + + ; <nl> + op - > op = GRPC_OP_SEND_STATUS_FROM_SERVER ; <nl> + op - > data . send_status_from_server . trailing_metadata_count = 0 ; <nl> + op - > data . send_status_from_server . status = GRPC_STATUS_OK ; <nl> + op - > data . send_status_from_server . status_details = " xyz " ; <nl> + op - > flags = 0 ; <nl> + op - > reserved = NULL ; <nl> + op + + ; <nl> + error = grpc_call_start_batch ( s , ops , ( size_t ) ( op - ops ) , tag ( 102 ) , NULL ) ; <nl> + GPR_ASSERT ( GRPC_CALL_OK = = error ) ; <nl> + <nl> + CQ_EXPECT_COMPLETION ( cqv , tag ( 102 ) , 1 ) ; <nl> + CQ_EXPECT_COMPLETION ( cqv , tag ( 1 ) , 1 ) ; <nl> + cq_verify ( cqv ) ; <nl> + <nl> + GPR_ASSERT ( 0 = = strcmp ( call_details . method , " / foo " ) ) ; <nl> + GPR_ASSERT ( 0 = = strcmp ( call_details . host , " foo . test . google . fr : 1234 " ) ) ; <nl> + GPR_ASSERT ( was_cancelled = = 0 ) ; <nl> + <nl> + GPR_ASSERT ( status = = GRPC_STATUS_INVALID_ARGUMENT ) ; <nl> + GPR_ASSERT ( strcmp ( details , <nl> + send_limit <nl> + ? " Sent message larger than max ( 11 vs . 5 ) " <nl> + : " Received message larger than max ( 11 vs . 5 ) " ) = = 0 ) ; <nl> + <nl> + gpr_free ( details ) ; <nl> + grpc_metadata_array_destroy ( & initial_metadata_recv ) ; <nl> + grpc_metadata_array_destroy ( & trailing_metadata_recv ) ; <nl> + grpc_metadata_array_destroy ( & request_metadata_recv ) ; <nl> + grpc_call_details_destroy ( & call_details ) ; <nl> + grpc_byte_buffer_destroy ( response_payload ) ; <nl> + grpc_byte_buffer_destroy ( recv_payload ) ; <nl> + <nl> + grpc_call_destroy ( c ) ; <nl> + if ( s ! = NULL ) grpc_call_destroy ( s ) ; <nl> + <nl> + cq_verifier_destroy ( cqv ) ; <nl> + <nl> + end_test ( & f ) ; <nl> + config . tear_down_data ( & f ) ; <nl> + } <nl> + <nl> void max_message_length ( grpc_end2end_test_config config ) { <nl> - test_max_message_length ( config , true ) ; <nl> - test_max_message_length ( config , false ) ; <nl> + test_max_message_length_on_request ( config , false / * send_limit * / ) ; <nl> + test_max_message_length_on_request ( config , true / * send_limit * / ) ; <nl> + test_max_message_length_on_response ( config , false / * send_limit * / ) ; <nl> + test_max_message_length_on_response ( config , true / * send_limit * / ) ; <nl> } <nl> <nl> void max_message_length_pre_init ( void ) { } <nl> mmm a / test / core / iomgr / udp_server_test . c <nl> ppp b / test / core / iomgr / udp_server_test . c <nl> <nl> # include " src / core / lib / iomgr / iomgr . h " <nl> # include " test / core / util / test_config . h " <nl> <nl> - # ifdef GRPC_NEED_UDP <nl> - <nl> # define LOG_TEST ( x ) gpr_log ( GPR_INFO , " % s " , # x ) <nl> <nl> static grpc_pollset * g_pollset ; <nl> int main ( int argc , char * * argv ) { <nl> grpc_iomgr_shutdown ( ) ; <nl> return 0 ; <nl> } <nl> - <nl> - # else <nl> - <nl> - int main ( int argc , char * * argv ) { return 0 ; } <nl> - <nl> - # endif <nl> mmm a / test / cpp / end2end / proto_server_reflection_test . cc <nl> ppp b / test / cpp / end2end / proto_server_reflection_test . cc <nl> class ProtoServerReflectionTest : public : : testing : : Test { <nl> TEST_F ( ProtoServerReflectionTest , CheckResponseWithLocalDescriptorPool ) { <nl> ResetStub ( ) ; <nl> <nl> - std : : vector < std : : string > services ; <nl> + std : : vector < grpc : : string > services ; <nl> desc_db_ - > GetServices ( & services ) ; <nl> / / The service list has at least one service ( reflection servcie ) . <nl> EXPECT_TRUE ( services . size ( ) > 0 ) ; <nl> mmm a / test / cpp / grpclb / grpclb_test . cc <nl> ppp b / test / cpp / grpclb / grpclb_test . cc <nl> extern " C " { <nl> # include " src / core / lib / surface / channel . h " <nl> # include " src / core / lib / surface / server . h " <nl> # include " test / core / end2end / cq_verifier . h " <nl> + # include " test / core / end2end / fake_resolver . h " <nl> # include " test / core / util / port . h " <nl> # include " test / core / util / test_config . h " <nl> } <nl> static void start_lb_server ( server_fixture * sf , int * ports , size_t nports , <nl> request . ParseFromArray ( GPR_SLICE_START_PTR ( request_payload_slice ) , <nl> GPR_SLICE_LENGTH ( request_payload_slice ) ) ; <nl> GPR_ASSERT ( request . has_initial_request ( ) ) ; <nl> - GPR_ASSERT ( request . initial_request ( ) . name ( ) = = " load . balanced . service . name " ) ; <nl> + GPR_ASSERT ( request . initial_request ( ) . name ( ) = = sf - > servers_hostport ) ; <nl> gpr_slice_unref ( request_payload_slice ) ; <nl> grpc_byte_buffer_reader_destroy ( & bbr ) ; <nl> grpc_byte_buffer_destroy ( request_payload_recv ) ; <nl> static void perform_request ( client_fixture * cf ) { <nl> <nl> c = grpc_channel_create_call ( cf - > client , NULL , GRPC_PROPAGATE_DEFAULTS , <nl> cf - > cq , " / foo " , " foo . test . google . fr : 1234 " , <nl> - GRPC_TIMEOUT_SECONDS_TO_DEADLINE ( 1000 ) , NULL ) ; <nl> + GRPC_TIMEOUT_SECONDS_TO_DEADLINE ( 5 ) , NULL ) ; <nl> gpr_log ( GPR_INFO , " Call 0x % " PRIxPTR " created " , ( intptr_t ) c ) ; <nl> GPR_ASSERT ( c ) ; <nl> char * peer ; <nl> static test_fixture setup_test_fixture ( int lb_server_update_delay_ms ) { <nl> gpr_thd_new ( & tf . lb_server . tid , fork_lb_server , & tf . lb_server , & options ) ; <nl> <nl> char * server_uri ; <nl> - gpr_asprintf ( & server_uri , " ipv4 : % s ? lb_policy = grpclb & lb_enabled = 1 " , <nl> + gpr_asprintf ( & server_uri , " test : % s ? lb_policy = grpclb & lb_enabled = 1 " , <nl> tf . lb_server . servers_hostport ) ; <nl> setup_client ( server_uri , & tf . client ) ; <nl> gpr_free ( server_uri ) ; <nl> TEST ( GrpclbTest , InvalidAddressInServerlist ) { } <nl> int main ( int argc , char * * argv ) { <nl> : : testing : : InitGoogleTest ( & argc , argv ) ; <nl> grpc_test_init ( argc , argv ) ; <nl> + grpc_fake_resolver_init ( ) ; <nl> grpc_init ( ) ; <nl> const auto result = RUN_ALL_TESTS ( ) ; <nl> grpc_shutdown ( ) ; <nl> mmm a / test / cpp / util / grpc_tool . cc <nl> ppp b / test / cpp / util / grpc_tool . cc <nl> <nl> # include " test / cpp / util / proto_file_parser . h " <nl> # include " test / cpp / util / proto_reflection_descriptor_database . h " <nl> # include " test / cpp / util / service_describer . h " <nl> - # include " test / cpp / util / test_config . h " <nl> <nl> namespace grpc { <nl> namespace testing { <nl> mmm a / test / cpp / util / proto_file_parser . cc <nl> ppp b / test / cpp / util / proto_file_parser . cc <nl> <nl> # include < algorithm > <nl> # include < iostream > <nl> # include < sstream > <nl> + # include < unordered_set > <nl> <nl> # include < grpc + + / support / config . h > <nl> <nl> ProtoFileParser : : ProtoFileParser ( std : : shared_ptr < grpc : : Channel > channel , <nl> const grpc : : string & proto_path , <nl> const grpc : : string & protofiles ) <nl> : has_error_ ( false ) { <nl> - std : : vector < std : : string > service_list ; <nl> + std : : vector < grpc : : string > service_list ; <nl> if ( channel ) { <nl> reflection_db_ . reset ( new grpc : : ProtoReflectionDescriptorDatabase ( channel ) ) ; <nl> reflection_db_ - > GetServices ( & service_list ) ; <nl> } <nl> <nl> + std : : unordered_set < grpc : : string > known_services ; <nl> if ( ! protofiles . empty ( ) ) { <nl> source_tree_ . MapPath ( " " , proto_path ) ; <nl> error_printer_ . reset ( new ErrorPrinter ( this ) ) ; <nl> ProtoFileParser : : ProtoFileParser ( std : : shared_ptr < grpc : : Channel > channel , <nl> if ( file_desc ) { <nl> for ( int i = 0 ; i < file_desc - > service_count ( ) ; i + + ) { <nl> service_desc_list_ . push_back ( file_desc - > service ( i ) ) ; <nl> + known_services . insert ( file_desc - > service ( i ) - > full_name ( ) ) ; <nl> } <nl> } else { <nl> std : : cerr < < file_name < < " not found " < < std : : endl ; <nl> ProtoFileParser : : ProtoFileParser ( std : : shared_ptr < grpc : : Channel > channel , <nl> dynamic_factory_ . reset ( new protobuf : : DynamicMessageFactory ( desc_pool_ . get ( ) ) ) ; <nl> <nl> for ( auto it = service_list . begin ( ) ; it ! = service_list . end ( ) ; it + + ) { <nl> - if ( const protobuf : : ServiceDescriptor * service_desc = <nl> - desc_pool_ - > FindServiceByName ( * it ) ) { <nl> - service_desc_list_ . push_back ( service_desc ) ; <nl> + if ( known_services . find ( * it ) = = known_services . end ( ) ) { <nl> + if ( const protobuf : : ServiceDescriptor * service_desc = <nl> + desc_pool_ - > FindServiceByName ( * it ) ) { <nl> + service_desc_list_ . push_back ( service_desc ) ; <nl> + known_services . insert ( * it ) ; <nl> + } <nl> } <nl> } <nl> } <nl> grpc : : string ProtoFileParser : : GetFullMethodName ( const grpc : : string & method ) { <nl> const auto * method_desc = service_desc - > method ( j ) ; <nl> if ( MethodNameMatch ( method_desc - > full_name ( ) , method ) ) { <nl> if ( method_descriptor ) { <nl> - std : : ostringstream error_stream ( " Ambiguous method names : " ) ; <nl> + std : : ostringstream error_stream ; <nl> + error_stream < < " Ambiguous method names : " ; <nl> error_stream < < method_descriptor - > full_name ( ) < < " " ; <nl> error_stream < < method_desc - > full_name ( ) ; <nl> LogError ( error_stream . str ( ) ) ; <nl> mmm a / test / cpp / util / proto_reflection_descriptor_database . cc <nl> ppp b / test / cpp / util / proto_reflection_descriptor_database . cc <nl> bool ProtoReflectionDescriptorDatabase : : FindAllExtensionNumbers ( <nl> } <nl> <nl> bool ProtoReflectionDescriptorDatabase : : GetServices ( <nl> - std : : vector < std : : string > * output ) { <nl> + std : : vector < grpc : : string > * output ) { <nl> ServerReflectionRequest request ; <nl> request . set_list_services ( " " ) ; <nl> ServerReflectionResponse response ; <nl> bool ProtoReflectionDescriptorDatabase : : GetServices ( <nl> <nl> const protobuf : : FileDescriptorProto <nl> ProtoReflectionDescriptorDatabase : : ParseFileDescriptorProtoResponse ( <nl> - const std : : string & byte_fd_proto ) { <nl> + const grpc : : string & byte_fd_proto ) { <nl> protobuf : : FileDescriptorProto file_desc_proto ; <nl> file_desc_proto . ParseFromString ( byte_fd_proto ) ; <nl> return file_desc_proto ; <nl> ProtoReflectionDescriptorDatabase : : GetStream ( ) { <nl> return stream_ ; <nl> } <nl> <nl> - void ProtoReflectionDescriptorDatabase : : DoOneRequest ( <nl> + bool ProtoReflectionDescriptorDatabase : : DoOneRequest ( <nl> const ServerReflectionRequest & request , <nl> ServerReflectionResponse & response ) { <nl> + bool success = false ; <nl> stream_mutex_ . lock ( ) ; <nl> - GetStream ( ) - > Write ( request ) ; <nl> - GetStream ( ) - > Read ( & response ) ; <nl> + if ( GetStream ( ) - > Write ( request ) & & GetStream ( ) - > Read ( & response ) ) { <nl> + success = true ; <nl> + } <nl> stream_mutex_ . unlock ( ) ; <nl> + return success ; <nl> } <nl> <nl> } / / namespace grpc <nl> mmm a / test / cpp / util / proto_reflection_descriptor_database . h <nl> ppp b / test / cpp / util / proto_reflection_descriptor_database . h <nl> class ProtoReflectionDescriptorDatabase : public protobuf : : DescriptorDatabase { <nl> std : : vector < int > * output ) GRPC_OVERRIDE ; <nl> <nl> / / Provide a list of full names of registered services <nl> - bool GetServices ( std : : vector < std : : string > * output ) ; <nl> + bool GetServices ( std : : vector < grpc : : string > * output ) ; <nl> <nl> private : <nl> typedef ClientReaderWriter < <nl> class ProtoReflectionDescriptorDatabase : public protobuf : : DescriptorDatabase { <nl> ClientStream ; <nl> <nl> const protobuf : : FileDescriptorProto ParseFileDescriptorProtoResponse ( <nl> - const std : : string & byte_fd_proto ) ; <nl> + const grpc : : string & byte_fd_proto ) ; <nl> <nl> void AddFileFromResponse ( <nl> const grpc : : reflection : : v1alpha : : FileDescriptorResponse & response ) ; <nl> <nl> const std : : shared_ptr < ClientStream > GetStream ( ) ; <nl> <nl> - void DoOneRequest ( <nl> + bool DoOneRequest ( <nl> const grpc : : reflection : : v1alpha : : ServerReflectionRequest & request , <nl> grpc : : reflection : : v1alpha : : ServerReflectionResponse & response ) ; <nl> <nl> mmm a / third_party / protobuf <nl> ppp b / third_party / protobuf <nl> @ @ - 1 + 1 @ @ <nl> - Subproject commit 1a586735085e817b1f52e53feec92ce418049f69 <nl> + Subproject commit a428e42072765993ff674fda72863c9f1aa2d268 <nl> mmm a / tools / distrib / python / grpcio_tools / protoc_lib_deps . py <nl> ppp b / tools / distrib / python / grpcio_tools / protoc_lib_deps . py <nl> <nl> # OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . <nl> <nl> # AUTO - GENERATED BY make_grpcio_tools . py ! <nl> - CC_FILES = [ ' google / protobuf / compiler / zip_writer . cc ' , ' google / protobuf / compiler / subprocess . cc ' , ' google / protobuf / compiler / ruby / ruby_generator . cc ' , ' google / protobuf / compiler / python / python_generator . cc ' , ' google / protobuf / compiler / plugin . pb . cc ' , ' google / protobuf / compiler / plugin . cc ' , ' google / protobuf / compiler / objectivec / objectivec_primitive_field . cc ' , ' google / protobuf / compiler / objectivec / objectivec_oneof . cc ' , ' google / protobuf / compiler / objectivec / objectivec_message_field . cc ' , ' google / protobuf / compiler / objectivec / objectivec_message . cc ' , ' google / protobuf / compiler / objectivec / objectivec_map_field . cc ' , ' google / protobuf / compiler / objectivec / objectivec_helpers . cc ' , ' google / protobuf / compiler / objectivec / objectivec_generator . cc ' , ' google / protobuf / compiler / objectivec / objectivec_file . cc ' , ' google / protobuf / compiler / objectivec / objectivec_field . cc ' , ' google / protobuf / compiler / objectivec / objectivec_extension . cc ' , ' google / protobuf / compiler / objectivec / objectivec_enum_field . cc ' , ' google / protobuf / compiler / objectivec / objectivec_enum . cc ' , ' google / protobuf / compiler / js / js_generator . cc ' , ' google / protobuf / compiler / javanano / javanano_primitive_field . cc ' , ' google / protobuf / compiler / javanano / javanano_message_field . cc ' , ' google / protobuf / compiler / javanano / javanano_message . cc ' , ' google / protobuf / compiler / javanano / javanano_map_field . cc ' , ' google / protobuf / compiler / javanano / javanano_helpers . cc ' , ' google / protobuf / compiler / javanano / javanano_generator . cc ' , ' google / protobuf / compiler / javanano / javanano_file . cc ' , ' google / protobuf / compiler / javanano / javanano_field . cc ' , ' google / protobuf / compiler / javanano / javanano_extension . cc ' , ' google / protobuf / compiler / javanano / javanano_enum_field . cc ' , ' google / protobuf / compiler / javanano / javanano_enum . cc ' , ' google / protobuf / compiler / java / java_string_field_lite . cc ' , ' google / protobuf / compiler / java / java_string_field . cc ' , ' google / protobuf / compiler / java / java_shared_code_generator . cc ' , ' google / protobuf / compiler / java / java_service . cc ' , ' google / protobuf / compiler / java / java_primitive_field_lite . cc ' , ' google / protobuf / compiler / java / java_primitive_field . cc ' , ' google / protobuf / compiler / java / java_name_resolver . cc ' , ' google / protobuf / compiler / java / java_message_lite . cc ' , ' google / protobuf / compiler / java / java_message_field_lite . cc ' , ' google / protobuf / compiler / java / java_message_field . cc ' , ' google / protobuf / compiler / java / java_message_builder_lite . cc ' , ' google / protobuf / compiler / java / java_message_builder . cc ' , ' google / protobuf / compiler / java / java_message . cc ' , ' google / protobuf / compiler / java / java_map_field_lite . cc ' , ' google / protobuf / compiler / java / java_map_field . cc ' , ' google / protobuf / compiler / java / java_lazy_message_field_lite . cc ' , ' google / protobuf / compiler / java / java_lazy_message_field . cc ' , ' google / protobuf / compiler / java / java_helpers . cc ' , ' google / protobuf / compiler / java / java_generator_factory . cc ' , ' google / protobuf / compiler / java / java_generator . cc ' , ' google / protobuf / compiler / java / java_file . cc ' , ' google / protobuf / compiler / java / java_field . cc ' , ' google / protobuf / compiler / java / java_extension_lite . cc ' , ' google / protobuf / compiler / java / java_extension . cc ' , ' google / protobuf / compiler / java / java_enum_lite . cc ' , ' google / protobuf / compiler / java / java_enum_field_lite . cc ' , ' google / protobuf / compiler / java / java_enum_field . cc ' , ' google / protobuf / compiler / java / java_enum . cc ' , ' google / protobuf / compiler / java / java_doc_comment . cc ' , ' google / protobuf / compiler / java / java_context . cc ' , ' google / protobuf / compiler / csharp / csharp_wrapper_field . cc ' , ' google / protobuf / compiler / csharp / csharp_source_generator_base . cc ' , ' google / protobuf / compiler / csharp / csharp_repeated_primitive_field . cc ' , ' google / protobuf / compiler / csharp / csharp_repeated_message_field . cc ' , ' google / protobuf / compiler / csharp / csharp_repeated_enum_field . cc ' , ' google / protobuf / compiler / csharp / csharp_reflection_class . cc ' , ' google / protobuf / compiler / csharp / csharp_primitive_field . cc ' , ' google / protobuf / compiler / csharp / csharp_message_field . cc ' , ' google / protobuf / compiler / csharp / csharp_message . cc ' , ' google / protobuf / compiler / csharp / csharp_map_field . cc ' , ' google / protobuf / compiler / csharp / csharp_helpers . cc ' , ' google / protobuf / compiler / csharp / csharp_generator . cc ' , ' google / protobuf / compiler / csharp / csharp_field_base . cc ' , ' google / protobuf / compiler / csharp / csharp_enum_field . cc ' , ' google / protobuf / compiler / csharp / csharp_enum . cc ' , ' google / protobuf / compiler / csharp / csharp_doc_comment . cc ' , ' google / protobuf / compiler / cpp / cpp_string_field . cc ' , ' google / protobuf / compiler / cpp / cpp_service . cc ' , ' google / protobuf / compiler / cpp / cpp_primitive_field . cc ' , ' google / protobuf / compiler / cpp / cpp_message_field . cc ' , ' google / protobuf / compiler / cpp / cpp_message . cc ' , ' google / protobuf / compiler / cpp / cpp_map_field . cc ' , ' google / protobuf / compiler / cpp / cpp_helpers . cc ' , ' google / protobuf / compiler / cpp / cpp_generator . cc ' , ' google / protobuf / compiler / cpp / cpp_file . cc ' , ' google / protobuf / compiler / cpp / cpp_field . cc ' , ' google / protobuf / compiler / cpp / cpp_extension . cc ' , ' google / protobuf / compiler / cpp / cpp_enum_field . cc ' , ' google / protobuf / compiler / cpp / cpp_enum . cc ' , ' google / protobuf / compiler / command_line_interface . cc ' , ' google / protobuf / compiler / code_generator . cc ' , ' google / protobuf / wrappers . pb . cc ' , ' google / protobuf / wire_format . cc ' , ' google / protobuf / util / type_resolver_util . cc ' , ' google / protobuf / util / time_util . cc ' , ' google / protobuf / util / message_differencer . cc ' , ' google / protobuf / util / json_util . cc ' , ' google / protobuf / util / internal / utility . cc ' , ' google / protobuf / util / internal / type_info_test_helper . cc ' , ' google / protobuf / util / internal / type_info . cc ' , ' google / protobuf / util / internal / protostream_objectwriter . cc ' , ' google / protobuf / util / internal / protostream_objectsource . cc ' , ' google / protobuf / util / internal / proto_writer . cc ' , ' google / protobuf / util / internal / object_writer . cc ' , ' google / protobuf / util / internal / json_stream_parser . cc ' , ' google / protobuf / util / internal / json_objectwriter . cc ' , ' google / protobuf / util / internal / json_escaping . cc ' , ' google / protobuf / util / internal / field_mask_utility . cc ' , ' google / protobuf / util / internal / error_listener . cc ' , ' google / protobuf / util / internal / default_value_objectwriter . cc ' , ' google / protobuf / util / internal / datapiece . cc ' , ' google / protobuf / util / field_mask_util . cc ' , ' google / protobuf / util / field_comparator . cc ' , ' google / protobuf / unknown_field_set . cc ' , ' google / protobuf / type . pb . cc ' , ' google / protobuf / timestamp . pb . cc ' , ' google / protobuf / text_format . cc ' , ' google / protobuf / stubs / substitute . cc ' , ' google / protobuf / stubs / mathlimits . cc ' , ' google / protobuf / struct . pb . cc ' , ' google / protobuf / source_context . pb . cc ' , ' google / protobuf / service . cc ' , ' google / protobuf / reflection_ops . cc ' , ' google / protobuf / message . cc ' , ' google / protobuf / map_field . cc ' , ' google / protobuf / io / zero_copy_stream_impl . cc ' , ' google / protobuf / io / tokenizer . cc ' , ' google / protobuf / io / strtod . cc ' , ' google / protobuf / io / printer . cc ' , ' google / protobuf / io / gzip_stream . cc ' , ' google / protobuf / generated_message_reflection . cc ' , ' google / protobuf / field_mask . pb . cc ' , ' google / protobuf / extension_set_heavy . cc ' , ' google / protobuf / empty . pb . cc ' , ' google / protobuf / dynamic_message . cc ' , ' google / protobuf / duration . pb . cc ' , ' google / protobuf / descriptor_database . cc ' , ' google / protobuf / descriptor . pb . cc ' , ' google / protobuf / descriptor . cc ' , ' google / protobuf / compiler / parser . cc ' , ' google / protobuf / compiler / importer . cc ' , ' google / protobuf / api . pb . cc ' , ' google / protobuf / any . pb . cc ' , ' google / protobuf / any . cc ' , ' google / protobuf / wire_format_lite . cc ' , ' google / protobuf / stubs / time . cc ' , ' google / protobuf / stubs / strutil . cc ' , ' google / protobuf / stubs / structurally_valid . cc ' , ' google / protobuf / stubs / stringprintf . cc ' , ' google / protobuf / stubs / stringpiece . cc ' , ' google / protobuf / stubs / statusor . cc ' , ' google / protobuf / stubs / status . cc ' , ' google / protobuf / stubs / once . cc ' , ' google / protobuf / stubs / int128 . cc ' , ' google / protobuf / stubs / common . cc ' , ' google / protobuf / stubs / bytestream . cc ' , ' google / protobuf / stubs / atomicops_internals_x86_msvc . cc ' , ' google / protobuf / stubs / atomicops_internals_x86_gcc . cc ' , ' google / protobuf / repeated_field . cc ' , ' google / protobuf / message_lite . cc ' , ' google / protobuf / io / zero_copy_stream_impl_lite . cc ' , ' google / protobuf / io / zero_copy_stream . cc ' , ' google / protobuf / io / coded_stream . cc ' , ' google / protobuf / generated_message_util . cc ' , ' google / protobuf / extension_set . cc ' , ' google / protobuf / arenastring . cc ' , ' google / protobuf / arena . cc ' ] <nl> + CC_FILES = [ ' google / protobuf / compiler / zip_writer . cc ' , ' google / protobuf / compiler / subprocess . cc ' , ' google / protobuf / compiler / ruby / ruby_generator . cc ' , ' google / protobuf / compiler / python / python_generator . cc ' , ' google / protobuf / compiler / plugin . pb . cc ' , ' google / protobuf / compiler / plugin . cc ' , ' google / protobuf / compiler / php / php_generator . cc ' , ' google / protobuf / compiler / objectivec / objectivec_primitive_field . cc ' , ' google / protobuf / compiler / objectivec / objectivec_oneof . cc ' , ' google / protobuf / compiler / objectivec / objectivec_message_field . cc ' , ' google / protobuf / compiler / objectivec / objectivec_message . cc ' , ' google / protobuf / compiler / objectivec / objectivec_map_field . cc ' , ' google / protobuf / compiler / objectivec / objectivec_helpers . cc ' , ' google / protobuf / compiler / objectivec / objectivec_generator . cc ' , ' google / protobuf / compiler / objectivec / objectivec_file . cc ' , ' google / protobuf / compiler / objectivec / objectivec_field . cc ' , ' google / protobuf / compiler / objectivec / objectivec_extension . cc ' , ' google / protobuf / compiler / objectivec / objectivec_enum_field . cc ' , ' google / protobuf / compiler / objectivec / objectivec_enum . cc ' , ' google / protobuf / compiler / js / js_generator . cc ' , ' google / protobuf / compiler / javanano / javanano_primitive_field . cc ' , ' google / protobuf / compiler / javanano / javanano_message_field . cc ' , ' google / protobuf / compiler / javanano / javanano_message . cc ' , ' google / protobuf / compiler / javanano / javanano_map_field . cc ' , ' google / protobuf / compiler / javanano / javanano_helpers . cc ' , ' google / protobuf / compiler / javanano / javanano_generator . cc ' , ' google / protobuf / compiler / javanano / javanano_file . cc ' , ' google / protobuf / compiler / javanano / javanano_field . cc ' , ' google / protobuf / compiler / javanano / javanano_extension . cc ' , ' google / protobuf / compiler / javanano / javanano_enum_field . cc ' , ' google / protobuf / compiler / javanano / javanano_enum . cc ' , ' google / protobuf / compiler / java / java_string_field_lite . cc ' , ' google / protobuf / compiler / java / java_string_field . cc ' , ' google / protobuf / compiler / java / java_shared_code_generator . cc ' , ' google / protobuf / compiler / java / java_service . cc ' , ' google / protobuf / compiler / java / java_primitive_field_lite . cc ' , ' google / protobuf / compiler / java / java_primitive_field . cc ' , ' google / protobuf / compiler / java / java_name_resolver . cc ' , ' google / protobuf / compiler / java / java_message_lite . cc ' , ' google / protobuf / compiler / java / java_message_field_lite . cc ' , ' google / protobuf / compiler / java / java_message_field . cc ' , ' google / protobuf / compiler / java / java_message_builder_lite . cc ' , ' google / protobuf / compiler / java / java_message_builder . cc ' , ' google / protobuf / compiler / java / java_message . cc ' , ' google / protobuf / compiler / java / java_map_field_lite . cc ' , ' google / protobuf / compiler / java / java_map_field . cc ' , ' google / protobuf / compiler / java / java_lazy_message_field_lite . cc ' , ' google / protobuf / compiler / java / java_lazy_message_field . cc ' , ' google / protobuf / compiler / java / java_helpers . cc ' , ' google / protobuf / compiler / java / java_generator_factory . cc ' , ' google / protobuf / compiler / java / java_generator . cc ' , ' google / protobuf / compiler / java / java_file . cc ' , ' google / protobuf / compiler / java / java_field . cc ' , ' google / protobuf / compiler / java / java_extension_lite . cc ' , ' google / protobuf / compiler / java / java_extension . cc ' , ' google / protobuf / compiler / java / java_enum_lite . cc ' , ' google / protobuf / compiler / java / java_enum_field_lite . cc ' , ' google / protobuf / compiler / java / java_enum_field . cc ' , ' google / protobuf / compiler / java / java_enum . cc ' , ' google / protobuf / compiler / java / java_doc_comment . cc ' , ' google / protobuf / compiler / java / java_context . cc ' , ' google / protobuf / compiler / csharp / csharp_wrapper_field . cc ' , ' google / protobuf / compiler / csharp / csharp_source_generator_base . cc ' , ' google / protobuf / compiler / csharp / csharp_repeated_primitive_field . cc ' , ' google / protobuf / compiler / csharp / csharp_repeated_message_field . cc ' , ' google / protobuf / compiler / csharp / csharp_repeated_enum_field . cc ' , ' google / protobuf / compiler / csharp / csharp_reflection_class . cc ' , ' google / protobuf / compiler / csharp / csharp_primitive_field . cc ' , ' google / protobuf / compiler / csharp / csharp_message_field . cc ' , ' google / protobuf / compiler / csharp / csharp_message . cc ' , ' google / protobuf / compiler / csharp / csharp_map_field . cc ' , ' google / protobuf / compiler / csharp / csharp_helpers . cc ' , ' google / protobuf / compiler / csharp / csharp_generator . cc ' , ' google / protobuf / compiler / csharp / csharp_field_base . cc ' , ' google / protobuf / compiler / csharp / csharp_enum_field . cc ' , ' google / protobuf / compiler / csharp / csharp_enum . cc ' , ' google / protobuf / compiler / csharp / csharp_doc_comment . cc ' , ' google / protobuf / compiler / cpp / cpp_string_field . cc ' , ' google / protobuf / compiler / cpp / cpp_service . cc ' , ' google / protobuf / compiler / cpp / cpp_primitive_field . cc ' , ' google / protobuf / compiler / cpp / cpp_message_field . cc ' , ' google / protobuf / compiler / cpp / cpp_message . cc ' , ' google / protobuf / compiler / cpp / cpp_map_field . cc ' , ' google / protobuf / compiler / cpp / cpp_helpers . cc ' , ' google / protobuf / compiler / cpp / cpp_generator . cc ' , ' google / protobuf / compiler / cpp / cpp_file . cc ' , ' google / protobuf / compiler / cpp / cpp_field . cc ' , ' google / protobuf / compiler / cpp / cpp_extension . cc ' , ' google / protobuf / compiler / cpp / cpp_enum_field . cc ' , ' google / protobuf / compiler / cpp / cpp_enum . cc ' , ' google / protobuf / compiler / command_line_interface . cc ' , ' google / protobuf / compiler / code_generator . cc ' , ' google / protobuf / wrappers . pb . cc ' , ' google / protobuf / wire_format . cc ' , ' google / protobuf / util / type_resolver_util . cc ' , ' google / protobuf / util / time_util . cc ' , ' google / protobuf / util / message_differencer . cc ' , ' google / protobuf / util / json_util . cc ' , ' google / protobuf / util / internal / utility . cc ' , ' google / protobuf / util / internal / type_info_test_helper . cc ' , ' google / protobuf / util / internal / type_info . cc ' , ' google / protobuf / util / internal / protostream_objectwriter . cc ' , ' google / protobuf / util / internal / protostream_objectsource . cc ' , ' google / protobuf / util / internal / proto_writer . cc ' , ' google / protobuf / util / internal / object_writer . cc ' , ' google / protobuf / util / internal / json_stream_parser . cc ' , ' google / protobuf / util / internal / json_objectwriter . cc ' , ' google / protobuf / util / internal / json_escaping . cc ' , ' google / protobuf / util / internal / field_mask_utility . cc ' , ' google / protobuf / util / internal / error_listener . cc ' , ' google / protobuf / util / internal / default_value_objectwriter . cc ' , ' google / protobuf / util / internal / datapiece . cc ' , ' google / protobuf / util / field_mask_util . cc ' , ' google / protobuf / util / field_comparator . cc ' , ' google / protobuf / unknown_field_set . cc ' , ' google / protobuf / type . pb . cc ' , ' google / protobuf / timestamp . pb . cc ' , ' google / protobuf / text_format . cc ' , ' google / protobuf / stubs / substitute . cc ' , ' google / protobuf / stubs / mathlimits . cc ' , ' google / protobuf / struct . pb . cc ' , ' google / protobuf / source_context . pb . cc ' , ' google / protobuf / service . cc ' , ' google / protobuf / reflection_ops . cc ' , ' google / protobuf / message . cc ' , ' google / protobuf / map_field . cc ' , ' google / protobuf / io / zero_copy_stream_impl . cc ' , ' google / protobuf / io / tokenizer . cc ' , ' google / protobuf / io / strtod . cc ' , ' google / protobuf / io / printer . cc ' , ' google / protobuf / io / gzip_stream . cc ' , ' google / protobuf / generated_message_reflection . cc ' , ' google / protobuf / field_mask . pb . cc ' , ' google / protobuf / extension_set_heavy . cc ' , ' google / protobuf / empty . pb . cc ' , ' google / protobuf / dynamic_message . cc ' , ' google / protobuf / duration . pb . cc ' , ' google / protobuf / descriptor_database . cc ' , ' google / protobuf / descriptor . pb . cc ' , ' google / protobuf / descriptor . cc ' , ' google / protobuf / compiler / parser . cc ' , ' google / protobuf / compiler / importer . cc ' , ' google / protobuf / api . pb . cc ' , ' google / protobuf / any . pb . cc ' , ' google / protobuf / any . cc ' , ' google / protobuf / wire_format_lite . cc ' , ' google / protobuf / stubs / time . cc ' , ' google / protobuf / stubs / strutil . cc ' , ' google / protobuf / stubs / structurally_valid . cc ' , ' google / protobuf / stubs / stringprintf . cc ' , ' google / protobuf / stubs / stringpiece . cc ' , ' google / protobuf / stubs / statusor . cc ' , ' google / protobuf / stubs / status . cc ' , ' google / protobuf / stubs / once . cc ' , ' google / protobuf / stubs / int128 . cc ' , ' google / protobuf / stubs / common . cc ' , ' google / protobuf / stubs / bytestream . cc ' , ' google / protobuf / stubs / atomicops_internals_x86_msvc . cc ' , ' google / protobuf / stubs / atomicops_internals_x86_gcc . cc ' , ' google / protobuf / repeated_field . cc ' , ' google / protobuf / message_lite . cc ' , ' google / protobuf / io / zero_copy_stream_impl_lite . cc ' , ' google / protobuf / io / zero_copy_stream . cc ' , ' google / protobuf / io / coded_stream . cc ' , ' google / protobuf / generated_message_util . cc ' , ' google / protobuf / extension_set . cc ' , ' google / protobuf / arenastring . cc ' , ' google / protobuf / arena . cc ' ] <nl> PROTO_FILES = [ ' google / protobuf / wrappers . proto ' , ' google / protobuf / type . proto ' , ' google / protobuf / timestamp . proto ' , ' google / protobuf / struct . proto ' , ' google / protobuf / source_context . proto ' , ' google / protobuf / field_mask . proto ' , ' google / protobuf / empty . proto ' , ' google / protobuf / duration . proto ' , ' google / protobuf / descriptor . proto ' , ' google / protobuf / compiler / plugin . proto ' , ' google / protobuf / api . proto ' , ' google / protobuf / any . proto ' ] <nl> <nl> CC_INCLUDE = ' third_party / protobuf / src ' <nl> mmm a / tools / dockerfile / interoptest / grpc_interop_go / build_interop . sh <nl> ppp b / tools / dockerfile / interoptest / grpc_interop_go / build_interop . sh <nl> set - e <nl> # to test instead of using " go get " to download from Github directly . <nl> git clone - - recursive / var / local / jenkins / grpc - go src / google . golang . org / grpc <nl> <nl> + # Get all gRPC Go dependencies <nl> + ( cd src / google . golang . org / grpc & & go get - t . ) <nl> + <nl> # copy service account keys if available <nl> cp - r / var / local / jenkins / service_account $ HOME | | true <nl> <nl> - # Get dependencies from GitHub <nl> - # NOTE : once grpc - go dependencies change , this needs to be updated manually <nl> - # but we don ' t expect this to happen any time soon . <nl> - go get github . com / golang / protobuf / proto <nl> - go get golang . org / x / net / context <nl> - go get golang . org / x / net / trace <nl> - go get golang . org / x / oauth2 <nl> - go get golang . org / x / oauth2 / google <nl> - go get google . golang . org / cloud <nl> - <nl> # Build the interop client and server <nl> ( cd src / google . golang . org / grpc / interop / client & & go install ) <nl> ( cd src / google . golang . org / grpc / interop / server & & go install ) <nl> mmm a / tools / dockerfile / interoptest / grpc_interop_php / Dockerfile <nl> ppp b / tools / dockerfile / interoptest / grpc_interop_php / 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> - # = = = = = = = = = = = = = = = = = = <nl> - # Ruby dependencies <nl> - <nl> - # Install rvm <nl> - RUN gpg - - keyserver hkp : / / keys . gnupg . net - - recv - keys 409B6B1796C275462A1703113804BB82D39DC0E3 <nl> - RUN \ curl - sSL https : / / get . rvm . io | bash - s stable <nl> - <nl> - # Install Ruby 2 . 1 <nl> - RUN / bin / bash - l - c " rvm install ruby - 2 . 1 " <nl> - RUN / bin / bash - l - c " rvm use - - default ruby - 2 . 1 " <nl> - RUN / bin / bash - l - c " echo ' gem : - - no - ri - - no - rdoc ' > ~ / . gemrc " <nl> - RUN / bin / bash - l - c " echo ' export PATH = / usr / local / rvm / bin : $ PATH ' > > ~ / . bashrc " <nl> - RUN / bin / bash - l - c " echo ' rvm - - default use ruby - 2 . 1 ' > > ~ / . bashrc " <nl> - RUN / bin / bash - l - c " gem install bundler - - no - ri - - no - rdoc " <nl> - <nl> # = = = = = = = = = = = = = = = = = <nl> # PHP dependencies <nl> <nl> RUN ln - s / usr / bin / ccache / usr / local / bin / clang + + <nl> <nl> RUN mkdir / var / local / jenkins <nl> <nl> - # ronn : a ruby tool used to convert markdown to man pages , used during the <nl> - # install of Protobuf extensions <nl> - # <nl> - # rake : a ruby version of make used to build the PHP Protobuf extension <nl> - RUN / bin / bash - l - c " rvm all do gem install ronn rake " <nl> - <nl> # Install composer <nl> RUN curl - sS https : / / getcomposer . org / installer | php <nl> RUN mv composer . phar / usr / local / bin / composer <nl> <nl> - # Download the patched PHP protobuf so that PHP gRPC clients can be generated <nl> - # from proto3 schemas . <nl> - RUN git clone https : / / github . com / stanley - cheung / Protobuf - PHP . git / var / local / git / protobuf - php <nl> - <nl> - RUN / bin / bash - l - c " rvm use ruby - 2 . 1 \ <nl> - & & cd / var / local / git / protobuf - php \ <nl> - & & rvm all do rake pear : package version = 1 . 0 \ <nl> - & & pear install Protobuf - 1 . 0 . tgz " <nl> - <nl> # Define the default command . <nl> CMD [ " bash " ] <nl> <nl> mmm a / tools / dockerfile / interoptest / grpc_interop_php / build_interop . sh <nl> ppp b / tools / dockerfile / interoptest / grpc_interop_php / build_interop . sh <nl> git clone - - recursive / var / local / jenkins / grpc / var / local / git / grpc <nl> cp - r / var / local / jenkins / service_account $ HOME | | true <nl> <nl> cd / var / local / git / grpc <nl> - rvm - - default use ruby - 2 . 1 <nl> <nl> # gRPC core and protobuf need to be installed <nl> make install <nl> make install <nl> <nl> ( cd src / php & & composer install ) <nl> <nl> - ( cd src / php & & protoc - gen - php - i tests / interop / - o tests / interop / tests / interop / test . proto ) <nl> + ( cd src / php & & . / bin / generate_proto_php . sh ) <nl> mmm a / tools / dockerfile / interoptest / grpc_interop_php7 / Dockerfile <nl> ppp b / tools / dockerfile / interoptest / grpc_interop_php7 / Dockerfile <nl> RUN cd / var / local / git / php - src \ <nl> & & make \ <nl> & & make install <nl> <nl> - # = = = = = = = = = = = = = = = = = = <nl> - # Ruby dependencies <nl> - <nl> - # Install rvm <nl> - RUN gpg - - keyserver hkp : / / keys . gnupg . net - - recv - keys 409B6B1796C275462A1703113804BB82D39DC0E3 <nl> - RUN \ curl - sSL https : / / get . rvm . io | bash - s stable <nl> - <nl> - # Install Ruby 2 . 1 <nl> - RUN / bin / bash - l - c " rvm install ruby - 2 . 1 " <nl> - RUN / bin / bash - l - c " rvm use - - default ruby - 2 . 1 " <nl> - RUN / bin / bash - l - c " echo ' gem : - - no - ri - - no - rdoc ' > ~ / . gemrc " <nl> - RUN / bin / bash - l - c " echo ' export PATH = / usr / local / rvm / bin : $ PATH ' > > ~ / . bashrc " <nl> - RUN / bin / bash - l - c " echo ' rvm - - default use ruby - 2 . 1 ' > > ~ / . bashrc " <nl> - RUN / bin / bash - l - c " gem install bundler - - no - ri - - no - rdoc " <nl> - <nl> # Prepare ccache <nl> RUN ln - s / usr / bin / ccache / usr / local / bin / gcc <nl> RUN ln - s / usr / bin / ccache / usr / local / bin / g + + <nl> RUN ln - s / usr / bin / ccache / usr / local / bin / clang + + <nl> <nl> RUN mkdir / var / local / jenkins <nl> <nl> - # ronn : a ruby tool used to convert markdown to man pages , used during the <nl> - # install of Protobuf extensions <nl> - # <nl> - # rake : a ruby version of make used to build the PHP Protobuf extension <nl> - RUN / bin / bash - l - c " rvm all do gem install ronn rake " <nl> - <nl> # Install composer <nl> RUN curl - sS https : / / getcomposer . org / installer | php <nl> RUN mv composer . phar / usr / local / bin / composer <nl> <nl> - # Download the patched PHP protobuf so that PHP gRPC clients can be generated <nl> - # from proto3 schemas . <nl> - RUN git clone https : / / github . com / stanley - cheung / Protobuf - PHP . git / var / local / git / protobuf - php <nl> - <nl> - RUN / bin / bash - l - c " rvm use ruby - 2 . 1 \ <nl> - & & cd / var / local / git / protobuf - php \ <nl> - & & rvm all do rake pear : package version = 1 . 0 \ <nl> - & & pear install Protobuf - 1 . 0 . tgz " <nl> - <nl> # Define the default command . <nl> CMD [ " bash " ] <nl> <nl> mmm a / tools / dockerfile / interoptest / grpc_interop_php7 / build_interop . sh <nl> ppp b / tools / dockerfile / interoptest / grpc_interop_php7 / build_interop . sh <nl> git clone - - recursive / var / local / jenkins / grpc / var / local / git / grpc <nl> cp - r / var / local / jenkins / service_account $ HOME | | true <nl> <nl> cd / var / local / git / grpc <nl> - rvm - - default use ruby - 2 . 1 <nl> <nl> # gRPC core and protobuf need to be installed <nl> make install <nl> make install <nl> <nl> ( cd src / php & & composer install ) <nl> <nl> - ( cd src / php & & protoc - gen - php - i tests / interop / - o tests / interop / tests / interop / test . proto ) <nl> + ( cd src / php & & . / bin / generate_proto_php . sh ) <nl> mmm a / tools / dockerfile / stress_test / grpc_interop_stress_php / Dockerfile <nl> ppp b / tools / dockerfile / stress_test / grpc_interop_stress_php / Dockerfile <nl> RUN ln - s / usr / bin / ccache / usr / local / bin / clang + + <nl> <nl> RUN mkdir / var / local / jenkins <nl> <nl> - # ronn : a ruby tool used to convert markdown to man pages , used during the <nl> - # install of Protobuf extensions <nl> - # <nl> - # rake : a ruby version of make used to build the PHP Protobuf extension <nl> - RUN / bin / bash - l - c " rvm all do gem install ronn rake " <nl> - <nl> # Install composer <nl> RUN curl - sS https : / / getcomposer . org / installer | php <nl> RUN mv composer . phar / usr / local / bin / composer <nl> <nl> - # Download the patched PHP protobuf so that PHP gRPC clients can be generated <nl> - # from proto3 schemas . <nl> - RUN git clone https : / / github . com / stanley - cheung / Protobuf - PHP . git / var / local / git / protobuf - php <nl> - <nl> - RUN / bin / bash - l - c " rvm use ruby - 2 . 1 \ <nl> - & & cd / var / local / git / protobuf - php \ <nl> - & & rvm all do rake pear : package version = 1 . 0 \ <nl> - & & pear install Protobuf - 1 . 0 . tgz " <nl> - <nl> # Define the default command . <nl> CMD [ " bash " ] <nl> mmm a / tools / dockerfile / stress_test / grpc_interop_stress_php / build_interop_stress . sh <nl> ppp b / tools / dockerfile / stress_test / grpc_interop_stress_php / build_interop_stress . sh <nl> git clone - - recursive / var / local / jenkins / grpc / var / local / git / grpc <nl> cp - r / var / local / jenkins / service_account $ HOME | | true <nl> <nl> cd / var / local / git / grpc <nl> - rvm - - default use ruby - 2 . 1 <nl> <nl> make install - certs <nl> <nl> make install <nl> <nl> ( cd src / php & & composer install ) <nl> <nl> - ( cd src / php & & protoc - gen - php - i tests / interop / - o tests / interop / tests / interop / test . proto ) <nl> + ( cd src / php & & . / bin / generate_proto_php . sh ) <nl> mmm a / tools / gce / create_linux_worker . sh <nl> ppp b / tools / gce / create_linux_worker . sh <nl> INSTANCE_NAME = " $ { 1 : - grpc - jenkins - worker1 } " <nl> gcloud compute instances create $ INSTANCE_NAME \ <nl> - - project = " $ CLOUD_PROJECT " \ <nl> - - zone " $ ZONE " \ <nl> - - - machine - type n1 - standard - 8 \ <nl> + - - machine - type n1 - highmem - 8 \ <nl> - - image = ubuntu - 1510 \ <nl> - - image - project = grpc - testing \ <nl> - - boot - disk - size 1000 <nl> mmm a / tools / gce / linux_worker_init . sh <nl> ppp b / tools / gce / linux_worker_init . sh <nl> <nl> <nl> set - ex <nl> <nl> + # Create some swap space <nl> + sudo dd if = / dev / zero of = / swap bs = 1024 count = 10485760 <nl> + sudo chmod 600 / swap <nl> + sudo mkswap / swap <nl> + sudo sed - i ' $ a \ / swap none swap sw 0 0 ' / etc / fstab <nl> + sudo swapon - a <nl> + <nl> + # Typical apt - get maintenance <nl> sudo apt - get update <nl> <nl> # Install JRE <nl> new file mode 100755 <nl> index 00000000000 . . 285e699b9b9 <nl> mmm / dev / null <nl> ppp b / tools / jenkins / reboot_worker . sh <nl> <nl> + # ! / usr / bin / env bash <nl> + # Copyright 2016 , Google Inc . <nl> + # All rights reserved . <nl> + # <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 disclaimer <nl> + # in the documentation and / or other materials provided with the <nl> + # distribution . <nl> + # * Neither the name of Google Inc . nor the names of its <nl> + # contributors may be used to endorse or promote products derived from <nl> + # 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> + # Reboots Jenkins worker <nl> + # <nl> + # NOTE : No empty lines should appear in this file before igncr is set ! <nl> + set - ex - o igncr | | set - ex <nl> + <nl> + # Give 5 seconds to finish the current job , then kill the jenkins slave process <nl> + # to avoid running any other jobs on the worker and restart the worker . <nl> + nohup sh - c ' sleep 5 ; killall java ; sudo reboot ' & <nl> mmm a / tools / jenkins / run_full_performance . sh <nl> ppp b / tools / jenkins / run_full_performance . sh <nl> cd $ ( dirname $ 0 ) / . . / . . <nl> tools / run_tests / run_performance_tests . py \ <nl> - l c + + csharp node ruby java python go \ <nl> - - netperf \ <nl> - - - category all \ <nl> + - - category scalable \ <nl> - - bq_result_table performance_test . performance_experiment \ <nl> - - remote_worker_host grpc - performance - server - 8core grpc - performance - client - 8core grpc - performance - client2 - 8core \ <nl> | | EXIT_CODE = 1 <nl> tools / run_tests / run_performance_tests . py \ <nl> | | EXIT_CODE = 1 <nl> <nl> exit $ EXIT_CODE <nl> - <nl> new file mode 100755 <nl> index 00000000000 . . b3783e69584 <nl> mmm / dev / null <nl> ppp b / tools / jenkins / run_jenkins_matrix . sh <nl> <nl> + # ! / usr / bin / env bash <nl> + # Copyright 2015 , Google Inc . <nl> + # All rights reserved . <nl> + # <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 disclaimer <nl> + # in the documentation and / or other materials provided with the <nl> + # distribution . <nl> + # * Neither the name of Google Inc . nor the names of its <nl> + # contributors may be used to endorse or promote products derived from <nl> + # 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> + # This script is invoked by Jenkins and triggers a test run , bypassing <nl> + # all args to the test script . <nl> + # <nl> + # Setting up rvm environment BEFORE we set - ex . <nl> + [ [ - s / etc / profile . d / rvm . sh ] ] & & . / etc / profile . d / rvm . sh <nl> + # To prevent cygwin bash complaining about empty lines ending with \ r <nl> + # we set the igncr option . The option doesn ' t exist on Linux , so we fallback <nl> + # to just ' set - ex ' there . <nl> + # NOTE : No empty lines should appear in this file before igncr is set ! <nl> + set - ex - o igncr | | set - ex <nl> + <nl> + python tools / run_tests / run_tests_matrix . py $ @ <nl> mmm a / tools / run_tests / dockerize / build_docker_and_run_tests . sh <nl> ppp b / tools / run_tests / dockerize / build_docker_and_run_tests . sh <nl> mkdir - p / tmp / ccache <nl> # its cache location now that - - download - cache is deprecated ) . <nl> mkdir - p / tmp / xdg - cache - home <nl> <nl> - # Create a local branch so the child Docker script won ' t complain <nl> - git branch - f jenkins - docker <nl> - <nl> # Inputs <nl> # DOCKERFILE_DIR - Directory in which Dockerfile file is located . <nl> # DOCKER_RUN_SCRIPT - Script to run under docker ( relative to grpc repo root ) <nl> docker run \ <nl> $ DOCKER_IMAGE_NAME \ <nl> bash - l " / var / local / jenkins / grpc / $ DOCKER_RUN_SCRIPT " | | DOCKER_FAILED = " true " <nl> <nl> - docker cp " $ CONTAINER_NAME : / var / local / git / grpc / reports . zip " $ git_root | | true <nl> - unzip - o $ git_root / reports . zip - d $ git_root | | true <nl> - rm - f reports . zip <nl> + # use unique name for reports . zip to prevent clash between concurrent <nl> + # run_tests . py runs <nl> + TEMP_REPORTS_ZIP = ` mktemp ` <nl> + docker cp " $ CONTAINER_NAME : / var / local / git / grpc / reports . zip " $ { TEMP_REPORTS_ZIP } | | true <nl> + unzip - o $ { TEMP_REPORTS_ZIP } - d $ git_root | | true <nl> + rm - f $ { TEMP_REPORTS_ZIP } <nl> <nl> # remove the container , possibly killing it first <nl> docker rm - f $ CONTAINER_NAME | | true <nl> mmm a / tools / run_tests / dockerize / docker_run_tests . sh <nl> ppp b / tools / run_tests / dockerize / docker_run_tests . sh <nl> echo ' < / body > < / html > ' > > index . html <nl> cd . . <nl> <nl> zip - r reports . zip reports <nl> - find . - name report . xml | xargs zip reports . zip <nl> + find . - name report . xml | xargs - r zip reports . zip <nl> + find . - name ' report_ * . xml ' | xargs - r zip reports . zip <nl> <nl> exit $ exit_code <nl> mmm a / tools / run_tests / performance / scenario_config . py <nl> ppp b / tools / run_tests / performance / scenario_config . py <nl> def scenarios ( self ) : <nl> # TODO ( ctiller ) : add 70 % load latency test <nl> for secure in [ True , False ] : <nl> secstr = ' secure ' if secure else ' insecure ' <nl> - smoketest_categories = [ SMOKETEST ] if secure else [ ] <nl> + smoketest_categories = ( [ SMOKETEST ] if secure else [ ] ) + [ SCALABLE ] <nl> <nl> yield _ping_pong_scenario ( <nl> ' cpp_generic_async_streaming_ping_pong_ % s ' % secstr , <nl> def scenarios ( self ) : <nl> ' csharp_generic_async_streaming_ping_pong ' , rpc_type = ' STREAMING ' , <nl> client_type = ' ASYNC_CLIENT ' , server_type = ' ASYNC_GENERIC_SERVER ' , <nl> use_generic_payload = True , <nl> - categories = [ SMOKETEST ] ) <nl> + categories = [ SMOKETEST , SCALABLE ] ) <nl> <nl> yield _ping_pong_scenario ( <nl> ' csharp_protobuf_async_streaming_ping_pong ' , rpc_type = ' STREAMING ' , <nl> def scenarios ( self ) : <nl> yield _ping_pong_scenario ( <nl> ' csharp_protobuf_async_unary_ping_pong ' , rpc_type = ' UNARY ' , <nl> client_type = ' ASYNC_CLIENT ' , server_type = ' ASYNC_SERVER ' , <nl> - categories = [ SMOKETEST ] ) <nl> + categories = [ SMOKETEST , SCALABLE ] ) <nl> <nl> yield _ping_pong_scenario ( <nl> ' csharp_protobuf_sync_to_async_unary_ping_pong ' , rpc_type = ' UNARY ' , <nl> def scenarios ( self ) : <nl> ' csharp_to_cpp_protobuf_sync_unary_ping_pong ' , rpc_type = ' UNARY ' , <nl> client_type = ' SYNC_CLIENT ' , server_type = ' SYNC_SERVER ' , <nl> server_language = ' c + + ' , server_core_limit = 1 , async_server_threads = 1 , <nl> - categories = [ SMOKETEST ] ) <nl> + categories = [ SMOKETEST , SCALABLE ] ) <nl> <nl> yield _ping_pong_scenario ( <nl> ' csharp_to_cpp_protobuf_async_streaming_ping_pong ' , rpc_type = ' STREAMING ' , <nl> def scenarios ( self ) : <nl> yield _ping_pong_scenario ( <nl> ' node_protobuf_unary_ping_pong ' , rpc_type = ' UNARY ' , <nl> client_type = ' ASYNC_CLIENT ' , server_type = ' ASYNC_SERVER ' , <nl> - categories = [ SMOKETEST ] ) <nl> + categories = [ SCALABLE , SMOKETEST ] ) <nl> <nl> yield _ping_pong_scenario ( <nl> ' node_protobuf_async_unary_qps_unconstrained ' , rpc_type = ' UNARY ' , <nl> client_type = ' ASYNC_CLIENT ' , server_type = ' ASYNC_SERVER ' , <nl> unconstrained_client = ' async ' , <nl> - categories = [ SMOKETEST ] ) <nl> + categories = [ SCALABLE , SMOKETEST ] ) <nl> <nl> # TODO ( jtattermusch ) : make this scenario work <nl> # yield _ping_pong_scenario ( <nl> def scenarios ( self ) : <nl> ' python_generic_sync_streaming_ping_pong ' , rpc_type = ' STREAMING ' , <nl> client_type = ' SYNC_CLIENT ' , server_type = ' ASYNC_GENERIC_SERVER ' , <nl> use_generic_payload = True , <nl> - categories = [ SMOKETEST ] ) <nl> + categories = [ SMOKETEST , SCALABLE ] ) <nl> <nl> yield _ping_pong_scenario ( <nl> ' python_protobuf_sync_streaming_ping_pong ' , rpc_type = ' STREAMING ' , <nl> def scenarios ( self ) : <nl> yield _ping_pong_scenario ( <nl> ' python_protobuf_sync_unary_ping_pong ' , rpc_type = ' UNARY ' , <nl> client_type = ' SYNC_CLIENT ' , server_type = ' ASYNC_SERVER ' , <nl> - categories = [ SMOKETEST ] ) <nl> + categories = [ SMOKETEST , SCALABLE ] ) <nl> <nl> yield _ping_pong_scenario ( <nl> ' python_protobuf_sync_unary_qps_unconstrained ' , rpc_type = ' UNARY ' , <nl> def scenarios ( self ) : <nl> ' python_to_cpp_protobuf_sync_unary_ping_pong ' , rpc_type = ' UNARY ' , <nl> client_type = ' SYNC_CLIENT ' , server_type = ' ASYNC_SERVER ' , <nl> server_language = ' c + + ' , server_core_limit = 1 , async_server_threads = 1 , <nl> - categories = [ SMOKETEST ] ) <nl> + categories = [ SMOKETEST , SCALABLE ] ) <nl> <nl> yield _ping_pong_scenario ( <nl> ' python_to_cpp_protobuf_sync_streaming_ping_pong ' , rpc_type = ' STREAMING ' , <nl> def scenarios ( self ) : <nl> yield _ping_pong_scenario ( <nl> ' ruby_protobuf_sync_streaming_ping_pong ' , rpc_type = ' STREAMING ' , <nl> client_type = ' SYNC_CLIENT ' , server_type = ' SYNC_SERVER ' , <nl> - categories = [ SMOKETEST ] ) <nl> + categories = [ SMOKETEST , SCALABLE ] ) <nl> <nl> yield _ping_pong_scenario ( <nl> ' ruby_protobuf_unary_ping_pong ' , rpc_type = ' UNARY ' , <nl> client_type = ' SYNC_CLIENT ' , server_type = ' SYNC_SERVER ' , <nl> - categories = [ SMOKETEST ] ) <nl> + categories = [ SMOKETEST , SCALABLE ] ) <nl> <nl> yield _ping_pong_scenario ( <nl> ' ruby_protobuf_sync_unary_qps_unconstrained ' , rpc_type = ' UNARY ' , <nl> def worker_port_offset ( self ) : <nl> def scenarios ( self ) : <nl> for secure in [ True , False ] : <nl> secstr = ' secure ' if secure else ' insecure ' <nl> - smoketest_categories = [ SMOKETEST ] if secure else [ ] <nl> + smoketest_categories = ( [ SMOKETEST ] if secure else [ ] ) + [ SCALABLE ] <nl> <nl> yield _ping_pong_scenario ( <nl> ' java_generic_async_streaming_ping_pong_ % s ' % secstr , rpc_type = ' STREAMING ' , <nl> def worker_port_offset ( self ) : <nl> def scenarios ( self ) : <nl> for secure in [ True , False ] : <nl> secstr = ' secure ' if secure else ' insecure ' <nl> - smoketest_categories = [ SMOKETEST ] if secure else [ ] <nl> + smoketest_categories = ( [ SMOKETEST ] if secure else [ ] ) + [ SCALABLE ] <nl> <nl> # ASYNC_GENERIC_SERVER for Go actually uses a sync streaming server , <nl> # but that ' s mostly because of lack of better name of the enum value . <nl> mmm a / tools / run_tests / run_performance_tests . py <nl> ppp b / tools / run_tests / run_performance_tests . py <nl> def create_qpsworkers ( languages , worker_hosts ) : <nl> for worker_idx , worker in enumerate ( workers ) ] <nl> <nl> <nl> - Scenario = collections . namedtuple ( ' Scenario ' , ' jobspec workers ' ) <nl> + Scenario = collections . namedtuple ( ' Scenario ' , ' jobspec workers name ' ) <nl> <nl> <nl> def create_scenarios ( languages , workers_by_lang , remote_host = None , regex = ' . * ' , <nl> def create_scenarios ( languages , workers_by_lang , remote_host = None , regex = ' . * ' , <nl> create_netperf_jobspec ( server_host = netperf_server , <nl> client_host = netperf_client , <nl> bq_result_table = bq_result_table ) , <nl> - _NO_WORKERS ) ) <nl> + _NO_WORKERS , ' netperf ' ) ) <nl> <nl> for language in languages : <nl> for scenario_json in language . scenarios ( ) : <nl> def create_scenarios ( languages , workers_by_lang , remote_host = None , regex = ' . * ' , <nl> [ w . host_and_port for w in workers ] , <nl> remote_host = remote_host , <nl> bq_result_table = bq_result_table ) , <nl> - workers ) <nl> + workers , <nl> + scenario_json [ ' name ' ] ) <nl> scenarios . append ( scenario ) <nl> <nl> return scenarios <nl> def finish_qps_workers ( jobs ) : <nl> nargs = ' + ' , <nl> default = [ ] , <nl> help = ' Worker hosts where to start QPS workers . ' ) <nl> + argp . add_argument ( ' - - dry_run ' , <nl> + default = False , <nl> + action = ' store_const ' , <nl> + const = True , <nl> + help = ' Just list scenarios to be run , but don \ ' t run them . ' ) <nl> argp . add_argument ( ' - r ' , ' - - regex ' , default = ' . * ' , type = str , <nl> help = ' Regex to select scenarios to run . ' ) <nl> argp . add_argument ( ' - - bq_result_table ' , default = None , type = str , <nl> def finish_qps_workers ( jobs ) : <nl> if args . remote_driver_host : <nl> remote_hosts . add ( args . remote_driver_host ) <nl> <nl> - if remote_hosts : <nl> - archive_repo ( languages = [ str ( l ) for l in languages ] ) <nl> - prepare_remote_hosts ( remote_hosts , prepare_local = True ) <nl> - else : <nl> - prepare_remote_hosts ( [ ] , prepare_local = True ) <nl> + if not args . dry_run : <nl> + if remote_hosts : <nl> + archive_repo ( languages = [ str ( l ) for l in languages ] ) <nl> + prepare_remote_hosts ( remote_hosts , prepare_local = True ) <nl> + else : <nl> + prepare_remote_hosts ( [ ] , prepare_local = True ) <nl> <nl> build_local = False <nl> if not args . remote_driver_host : <nl> build_local = True <nl> - build_on_remote_hosts ( remote_hosts , languages = [ str ( l ) for l in languages ] , build_local = build_local ) <nl> + if not args . dry_run : <nl> + build_on_remote_hosts ( remote_hosts , languages = [ str ( l ) for l in languages ] , build_local = build_local ) <nl> <nl> qpsworker_jobs = create_qpsworkers ( languages , args . remote_worker_host ) <nl> <nl> def finish_qps_workers ( jobs ) : <nl> raise Exception ( ' No scenarios to run ' ) <nl> <nl> for scenario in scenarios : <nl> - try : <nl> - for worker in scenario . workers : <nl> - worker . start ( ) <nl> - jobset . run ( [ scenario . jobspec , <nl> - create_quit_jobspec ( scenario . workers , remote_host = args . remote_driver_host ) ] , <nl> - newline_on_success = True , maxjobs = 1 ) <nl> - finally : <nl> - finish_qps_workers ( scenario . workers ) <nl> + if args . dry_run : <nl> + print ( scenario . name ) <nl> + else : <nl> + try : <nl> + for worker in scenario . workers : <nl> + worker . start ( ) <nl> + jobset . run ( [ scenario . jobspec , <nl> + create_quit_jobspec ( scenario . workers , remote_host = args . remote_driver_host ) ] , <nl> + newline_on_success = True , maxjobs = 1 ) <nl> + finally : <nl> + finish_qps_workers ( scenario . workers ) <nl> new file mode 100755 <nl> index 00000000000 . . 98ef3566db1 <nl> mmm / dev / null <nl> ppp b / tools / run_tests / run_tests_in_workspace . sh <nl> <nl> + # ! / bin / bash <nl> + # Copyright 2015 , Google Inc . <nl> + # All rights reserved . <nl> + # <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 disclaimer <nl> + # in the documentation and / or other materials provided with the <nl> + # distribution . <nl> + # * Neither the name of Google Inc . nor the names of its <nl> + # contributors may be used to endorse or promote products derived from <nl> + # 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> + # Create a workspace in a subdirectory to allow running multiple builds in isolation . <nl> + # WORKSPACE_NAME env variable needs to contain name of the workspace to create . <nl> + # All cmdline args will be passed to run_tests . py script ( executed in the <nl> + # newly created workspace ) <nl> + set - ex <nl> + <nl> + cd $ ( dirname $ 0 ) / . . / . . <nl> + <nl> + rm - rf " $ { WORKSPACE_NAME } " <nl> + # TODO ( jtattermusch ) : clone - - recursive fetches the submodules from github . <nl> + # Try avoiding that to save time and network capacity . <nl> + git clone - - recursive . " $ { WORKSPACE_NAME } " <nl> + <nl> + echo " Running run_tests . py in workspace $ { WORKSPACE_NAME } " <nl> + python " $ { WORKSPACE_NAME } / tools / run_tests / run_tests . py " $ @ <nl> + <nl> new file mode 100755 <nl> index 00000000000 . . a94f9cfef5e <nl> mmm / dev / null <nl> ppp b / tools / run_tests / run_tests_matrix . py <nl> <nl> + # ! / usr / bin / env python2 . 7 <nl> + # Copyright 2015 , Google Inc . <nl> + # All rights reserved . <nl> + # <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 disclaimer <nl> + # in the documentation and / or other materials provided with the <nl> + # distribution . <nl> + # * Neither the name of Google Inc . nor the names of its <nl> + # contributors may be used to endorse or promote products derived from <nl> + # 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> + " " " Run test matrix . " " " <nl> + <nl> + import argparse <nl> + import jobset <nl> + import multiprocessing <nl> + import os <nl> + import report_utils <nl> + import sys <nl> + <nl> + _ROOT = os . path . abspath ( os . path . join ( os . path . dirname ( sys . argv [ 0 ] ) , ' . . / . . ' ) ) <nl> + os . chdir ( _ROOT ) <nl> + <nl> + # Set the timeout high to allow enough time for sanitizers and pre - building <nl> + # clang docker . <nl> + _RUNTESTS_TIMEOUT = 2 * 60 * 60 <nl> + <nl> + # Number of jobs assigned to each run_tests . py instance <nl> + _INNER_JOBS = 2 <nl> + <nl> + <nl> + def _docker_jobspec ( name , runtests_args = [ ] ) : <nl> + " " " Run a single instance of run_tests . py in a docker container " " " <nl> + test_job = jobset . JobSpec ( <nl> + cmdline = [ ' python ' , ' tools / run_tests / run_tests . py ' , <nl> + ' - - use_docker ' , <nl> + ' - t ' , <nl> + ' - j ' , str ( _INNER_JOBS ) , <nl> + ' - x ' , ' report_ % s . xml ' % name ] + runtests_args , <nl> + shortname = ' run_tests_ % s ' % name , <nl> + timeout_seconds = _RUNTESTS_TIMEOUT ) <nl> + return test_job <nl> + <nl> + <nl> + def _workspace_jobspec ( name , runtests_args = [ ] , workspace_name = None ) : <nl> + " " " Run a single instance of run_tests . py in a separate workspace " " " <nl> + if not workspace_name : <nl> + workspace_name = ' workspace_ % s ' % name <nl> + env = { ' WORKSPACE_NAME ' : workspace_name } <nl> + test_job = jobset . JobSpec ( <nl> + cmdline = [ ' tools / run_tests / run_tests_in_workspace . sh ' , <nl> + ' - t ' , <nl> + ' - j ' , str ( _INNER_JOBS ) , <nl> + ' - x ' , ' . . / report_ % s . xml ' % name ] + runtests_args , <nl> + environ = env , <nl> + shortname = ' run_tests_ % s ' % name , <nl> + timeout_seconds = _RUNTESTS_TIMEOUT ) <nl> + return test_job <nl> + <nl> + <nl> + def _generate_jobs ( languages , configs , platforms , <nl> + arch = None , compiler = None , <nl> + labels = [ ] , extra_args = [ ] ) : <nl> + result = [ ] <nl> + for language in languages : <nl> + for platform in platforms : <nl> + for config in configs : <nl> + name = ' % s_ % s_ % s ' % ( language , platform , config ) <nl> + runtests_args = [ ' - l ' , language , <nl> + ' - c ' , config ] <nl> + if arch or compiler : <nl> + name + = ' _ % s_ % s ' % ( arch , compiler ) <nl> + runtests_args + = [ ' - - arch ' , arch , <nl> + ' - - compiler ' , compiler ] <nl> + <nl> + runtests_args + = extra_args <nl> + if platform = = ' linux ' : <nl> + job = _docker_jobspec ( name = name , runtests_args = runtests_args ) <nl> + else : <nl> + job = _workspace_jobspec ( name = name , runtests_args = runtests_args ) <nl> + <nl> + job . labels = [ platform , config , language ] + labels <nl> + result . append ( job ) <nl> + return result <nl> + <nl> + <nl> + def _create_test_jobs ( extra_args = [ ] ) : <nl> + test_jobs = [ ] <nl> + # supported on linux only <nl> + test_jobs + = _generate_jobs ( languages = [ ' sanity ' , ' php7 ' ] , <nl> + configs = [ ' dbg ' , ' opt ' ] , <nl> + platforms = [ ' linux ' ] , <nl> + labels = [ ' basictests ' ] , <nl> + extra_args = extra_args ) <nl> + <nl> + # supported on all platforms . <nl> + test_jobs + = _generate_jobs ( languages = [ ' c ' , ' csharp ' , ' node ' , ' python ' ] , <nl> + configs = [ ' dbg ' , ' opt ' ] , <nl> + platforms = [ ' linux ' , ' macos ' , ' windows ' ] , <nl> + labels = [ ' basictests ' ] , <nl> + extra_args = extra_args ) <nl> + <nl> + # supported on linux and mac . <nl> + test_jobs + = _generate_jobs ( languages = [ ' c + + ' , ' ruby ' , ' php ' ] , <nl> + configs = [ ' dbg ' , ' opt ' ] , <nl> + platforms = [ ' linux ' , ' macos ' ] , <nl> + labels = [ ' basictests ' ] , <nl> + extra_args = extra_args ) <nl> + <nl> + # supported on mac only . <nl> + test_jobs + = _generate_jobs ( languages = [ ' objc ' ] , <nl> + configs = [ ' dbg ' , ' opt ' ] , <nl> + platforms = [ ' macos ' ] , <nl> + labels = [ ' basictests ' ] , <nl> + extra_args = extra_args ) <nl> + <nl> + # sanitizers <nl> + test_jobs + = _generate_jobs ( languages = [ ' c ' ] , <nl> + configs = [ ' msan ' , ' asan ' , ' tsan ' ] , <nl> + platforms = [ ' linux ' ] , <nl> + labels = [ ' sanitizers ' ] , <nl> + extra_args = extra_args ) <nl> + test_jobs + = _generate_jobs ( languages = [ ' c + + ' ] , <nl> + configs = [ ' asan ' , ' tsan ' ] , <nl> + platforms = [ ' linux ' ] , <nl> + labels = [ ' sanitizers ' ] , <nl> + extra_args = extra_args ) <nl> + return test_jobs <nl> + <nl> + <nl> + def _create_portability_test_jobs ( extra_args = [ ] ) : <nl> + test_jobs = [ ] <nl> + # portability C x86 <nl> + test_jobs + = _generate_jobs ( languages = [ ' c ' ] , <nl> + configs = [ ' dbg ' ] , <nl> + platforms = [ ' linux ' ] , <nl> + arch = ' x86 ' , <nl> + compiler = ' default ' , <nl> + labels = [ ' portability ' ] , <nl> + extra_args = extra_args ) <nl> + <nl> + # portability C and C + + on x64 <nl> + for compiler in [ ' gcc4 . 4 ' , ' gcc4 . 6 ' , ' gcc5 . 3 ' , <nl> + ' clang3 . 5 ' , ' clang3 . 6 ' , ' clang3 . 7 ' ] : <nl> + test_jobs + = _generate_jobs ( languages = [ ' c ' , ' c + + ' ] , <nl> + configs = [ ' dbg ' ] , <nl> + platforms = [ ' linux ' ] , <nl> + arch = ' x64 ' , <nl> + compiler = compiler , <nl> + labels = [ ' portability ' ] , <nl> + extra_args = extra_args ) <nl> + <nl> + # portability C on Windows <nl> + for arch in [ ' x86 ' , ' x64 ' ] : <nl> + for compiler in [ ' vs2013 ' , ' vs2015 ' ] : <nl> + test_jobs + = _generate_jobs ( languages = [ ' c ' ] , <nl> + configs = [ ' dbg ' ] , <nl> + platforms = [ ' windows ' ] , <nl> + arch = arch , <nl> + compiler = compiler , <nl> + labels = [ ' portability ' ] , <nl> + extra_args = extra_args ) <nl> + <nl> + test_jobs + = _generate_jobs ( languages = [ ' python ' ] , <nl> + configs = [ ' dbg ' ] , <nl> + platforms = [ ' linux ' ] , <nl> + arch = ' default ' , <nl> + compiler = ' python3 . 4 ' , <nl> + labels = [ ' portability ' ] , <nl> + extra_args = extra_args ) <nl> + <nl> + test_jobs + = _generate_jobs ( languages = [ ' csharp ' ] , <nl> + configs = [ ' dbg ' ] , <nl> + platforms = [ ' linux ' ] , <nl> + arch = ' default ' , <nl> + compiler = ' coreclr ' , <nl> + labels = [ ' portability ' ] , <nl> + extra_args = extra_args ) <nl> + return test_jobs <nl> + <nl> + <nl> + def _allowed_labels ( ) : <nl> + " " " Returns a list of existing job labels . " " " <nl> + all_labels = set ( ) <nl> + for job in _create_test_jobs ( ) + _create_portability_test_jobs ( ) : <nl> + for label in job . labels : <nl> + all_labels . add ( label ) <nl> + return sorted ( all_labels ) <nl> + <nl> + <nl> + argp = argparse . ArgumentParser ( description = ' Run a matrix of run_tests . py tests . ' ) <nl> + argp . add_argument ( ' - j ' , ' - - jobs ' , <nl> + default = multiprocessing . cpu_count ( ) / _INNER_JOBS , <nl> + type = int , <nl> + help = ' Number of concurrent run_tests . py instances . ' ) <nl> + argp . add_argument ( ' - f ' , ' - - filter ' , <nl> + choices = _allowed_labels ( ) , <nl> + nargs = ' + ' , <nl> + default = [ ] , <nl> + help = ' Filter targets to run by label with AND semantics . ' ) <nl> + argp . add_argument ( ' - - build_only ' , <nl> + default = False , <nl> + action = ' store_const ' , <nl> + const = True , <nl> + help = ' Pass - - build_only flag to run_tests . py instances . ' ) <nl> + argp . add_argument ( ' - - force_default_poller ' , default = False , action = ' store_const ' , const = True , <nl> + help = ' Pass - - force_default_poller to run_tests . py instances . ' ) <nl> + argp . add_argument ( ' - - dry_run ' , <nl> + default = False , <nl> + action = ' store_const ' , <nl> + const = True , <nl> + help = ' Only print what would be run . ' ) <nl> + args = argp . parse_args ( ) <nl> + <nl> + extra_args = [ ] <nl> + if args . build_only : <nl> + extra_args . append ( ' - - build_only ' ) <nl> + if args . force_default_poller : <nl> + extra_args . append ( ' - - force_default_poller ' ) <nl> + <nl> + all_jobs = _create_test_jobs ( extra_args = extra_args ) + _create_portability_test_jobs ( extra_args = extra_args ) <nl> + <nl> + jobs = [ ] <nl> + for job in all_jobs : <nl> + if not args . filter or all ( filter in job . labels for filter in args . filter ) : <nl> + jobs . append ( job ) <nl> + <nl> + if not jobs : <nl> + jobset . message ( ' FAILED ' , ' No test suites match given criteria . ' , <nl> + do_newline = True ) <nl> + sys . exit ( 1 ) <nl> + <nl> + print ( ' IMPORTANT : The changes you are testing need to be locally committed ' ) <nl> + print ( ' because only the committed changes in the current branch will be ' ) <nl> + print ( ' copied to the docker environment or into subworkspaces . ' ) <nl> + <nl> + print <nl> + print ' Will run these tests : ' <nl> + for job in jobs : <nl> + if args . dry_run : <nl> + print ' % s : " % s " ' % ( job . shortname , ' ' . join ( job . cmdline ) ) <nl> + else : <nl> + print ' % s ' % job . shortname <nl> + print <nl> + <nl> + if args . dry_run : <nl> + print ' - - dry_run was used , exiting ' <nl> + sys . exit ( 1 ) <nl> + <nl> + jobset . message ( ' START ' , ' Running test matrix . ' , do_newline = True ) <nl> + num_failures , resultset = jobset . run ( jobs , <nl> + newline_on_success = True , <nl> + travis = True , <nl> + maxjobs = args . jobs ) <nl> + report_utils . render_junit_xml_report ( resultset , ' report . xml ' ) <nl> + <nl> + if num_failures = = 0 : <nl> + jobset . message ( ' SUCCESS ' , ' All run_tests . py instance finished successfully . ' , <nl> + do_newline = True ) <nl> + else : <nl> + jobset . message ( ' FAILED ' , ' Some run_tests . py instance have failed . ' , <nl> + do_newline = True ) <nl> + sys . exit ( 1 ) <nl> mmm a / tools / run_tests / sanity / check_submodules . sh <nl> ppp b / tools / run_tests / sanity / check_submodules . sh <nl> cat < < EOF | awk ' { print $ 1 } ' | sort > $ want_submodules <nl> c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9 third_party / boringssl ( version_for_cocoapods_2 . 0 - 100 - gc880e42 ) <nl> 05b155ff59114735ec8cd089f669c4c3d8f59029 third_party / gflags ( v2 . 1 . 0 - 45 - g05b155f ) <nl> c99458533a9b4c743ed51537e25989ea55944908 third_party / googletest ( release - 1 . 7 . 0 ) <nl> - 1a586735085e817b1f52e53feec92ce418049f69 third_party / protobuf ( v3 . 0 . 2 ) <nl> + a428e42072765993ff674fda72863c9f1aa2d268 third_party / protobuf ( v3 . 1 . 0 ) <nl> 50893291621658f355bc5b4d450a8d06a563053d third_party / zlib ( v1 . 2 . 8 ) <nl> bcad91771b7f0bff28a1cac1981d7ef2b9bcef3c third_party / thrift <nl> EOF <nl> mmm a / tools / run_tests / sources_and_headers . json <nl> ppp b / tools / run_tests / sources_and_headers . json <nl> <nl> " third_party " : false , <nl> " type " : " target " <nl> } , <nl> + { <nl> + " deps " : [ <nl> + " gpr " , <nl> + " gpr_test_util " , <nl> + " grpc " , <nl> + " grpc_test_util " <nl> + ] , <nl> + " headers " : [ ] , <nl> + " is_filegroup " : false , <nl> + " language " : " c " , <nl> + " name " : " connection_refused_test " , <nl> + " src " : [ <nl> + " test / core / end2end / connection_refused_test . c " <nl> + ] , <nl> + " third_party " : false , <nl> + " type " : " target " <nl> + } , <nl> { <nl> " deps " : [ <nl> " gpr " , <nl> <nl> " third_party " : false , <nl> " type " : " target " <nl> } , <nl> + { <nl> + " deps " : [ <nl> + " grpc_plugin_support " <nl> + ] , <nl> + " headers " : [ ] , <nl> + " is_filegroup " : false , <nl> + " language " : " c + + " , <nl> + " name " : " grpc_php_plugin " , <nl> + " src " : [ <nl> + " src / compiler / php_plugin . cc " <nl> + ] , <nl> + " third_party " : false , <nl> + " type " : " target " <nl> + } , <nl> { <nl> " deps " : [ <nl> " grpc_plugin_support " <nl> <nl> { <nl> " deps " : [ <nl> " grpc + + " , <nl> - " grpc + + _reflection " , <nl> - " grpc + + _test_config " <nl> + " grpc + + _reflection " <nl> ] , <nl> " headers " : [ <nl> " test / cpp / util / cli_call . h " , <nl> <nl> " src / compiler / node_generator_helpers . h " , <nl> " src / compiler / objective_c_generator . h " , <nl> " src / compiler / objective_c_generator_helpers . h " , <nl> + " src / compiler / php_generator . h " , <nl> + " src / compiler / php_generator_helpers . h " , <nl> " src / compiler / python_generator . h " , <nl> " src / compiler / ruby_generator . h " , <nl> " src / compiler / ruby_generator_helpers - inl . h " , <nl> <nl> " src / compiler / objective_c_generator . cc " , <nl> " src / compiler / objective_c_generator . h " , <nl> " src / compiler / objective_c_generator_helpers . h " , <nl> + " src / compiler / php_generator . cc " , <nl> + " src / compiler / php_generator . h " , <nl> + " src / compiler / php_generator_helpers . h " , <nl> " src / compiler / python_generator . cc " , <nl> " src / compiler / python_generator . h " , <nl> " src / compiler / ruby_generator . cc " , <nl> <nl> ] , <nl> " headers " : [ <nl> " test / core / end2end / cq_verifier . h " , <nl> + " test / core / end2end / fake_resolver . h " , <nl> " test / core / end2end / fixtures / http_proxy . h " , <nl> " test / core / end2end / fixtures / proxy . h " , <nl> " test / core / iomgr / endpoint_tests . h " , <nl> <nl> " src " : [ <nl> " test / core / end2end / cq_verifier . c " , <nl> " test / core / end2end / cq_verifier . h " , <nl> + " test / core / end2end / fake_resolver . c " , <nl> + " test / core / end2end / fake_resolver . h " , <nl> " test / core / end2end / fixtures / http_proxy . c " , <nl> " test / core / end2end / fixtures / http_proxy . h " , <nl> " test / core / end2end / fixtures / proxy . c " , <nl> mmm a / tools / run_tests / tests . json <nl> ppp b / tools / run_tests / tests . json <nl> <nl> " windows " <nl> ] <nl> } , <nl> + { <nl> + " args " : [ ] , <nl> + " ci_platforms " : [ <nl> + " linux " , <nl> + " mac " , <nl> + " posix " , <nl> + " windows " <nl> + ] , <nl> + " cpu_cost " : 0 . 1 , <nl> + " exclude_configs " : [ ] , <nl> + " flaky " : false , <nl> + " gtest " : false , <nl> + " language " : " c " , <nl> + " name " : " connection_refused_test " , <nl> + " platforms " : [ <nl> + " linux " , <nl> + " mac " , <nl> + " posix " , <nl> + " windows " <nl> + ] <nl> + } , <nl> { <nl> " args " : [ ] , <nl> " ci_platforms " : [ <nl> <nl> " posix " <nl> ] <nl> } , <nl> + { <nl> + " args " : [ <nl> + " - - scenarios_json " , <nl> + " { \ " scenarios \ " : [ { \ " name \ " : \ " cpp_generic_async_streaming_ping_pong_secure \ " , \ " warmup_seconds \ " : 0 , \ " benchmark_seconds \ " : 1 , \ " num_servers \ " : 1 , \ " server_config \ " : { \ " async_server_threads \ " : 1 , \ " core_limit \ " : 1 , \ " security_params \ " : { \ " use_test_ca \ " : true , \ " server_host_override \ " : \ " foo . test . google . fr \ " } , \ " payload_config \ " : { \ " bytebuf_params \ " : { \ " resp_size \ " : 0 , \ " req_size \ " : 0 } } , \ " server_type \ " : \ " ASYNC_GENERIC_SERVER \ " } , \ " client_config \ " : { \ " client_type \ " : \ " ASYNC_CLIENT \ " , \ " security_params \ " : { \ " use_test_ca \ " : true , \ " server_host_override \ " : \ " foo . test . google . fr \ " } , \ " payload_config \ " : { \ " bytebuf_params \ " : { \ " resp_size \ " : 0 , \ " req_size \ " : 0 } } , \ " client_channels \ " : 1 , \ " async_client_threads \ " : 1 , \ " outstanding_rpcs_per_channel \ " : 1 , \ " rpc_type \ " : \ " STREAMING \ " , \ " load_params \ " : { \ " closed_loop \ " : { } } , \ " histogram_params \ " : { \ " max_possible \ " : 60000000000 . 0 , \ " resolution \ " : 0 . 01 } } , \ " num_clients \ " : 1 } ] } " <nl> + ] , <nl> + " boringssl " : true , <nl> + " ci_platforms " : [ <nl> + " linux " <nl> + ] , <nl> + " cpu_cost " : 2 , <nl> + " defaults " : " boringssl " , <nl> + " exclude_configs " : [ ] , <nl> + " flaky " : false , <nl> + " language " : " c + + " , <nl> + " name " : " json_run_localhost " , <nl> + " platforms " : [ <nl> + " linux " <nl> + ] , <nl> + " shortname " : " json_run_localhost : cpp_generic_async_streaming_ping_pong_secure " , <nl> + " timeout_seconds " : 180 <nl> + } , <nl> { <nl> " args " : [ <nl> " - - scenarios_json " , <nl> <nl> " shortname " : " json_run_localhost : cpp_protobuf_async_streaming_qps_unconstrained_secure " , <nl> " timeout_seconds " : 180 <nl> } , <nl> + { <nl> + " args " : [ <nl> + " - - scenarios_json " , <nl> + " { \ " scenarios \ " : [ { \ " name \ " : \ " cpp_generic_async_streaming_ping_pong_insecure \ " , \ " warmup_seconds \ " : 0 , \ " benchmark_seconds \ " : 1 , \ " num_servers \ " : 1 , \ " server_config \ " : { \ " async_server_threads \ " : 1 , \ " core_limit \ " : 1 , \ " security_params \ " : null , \ " payload_config \ " : { \ " bytebuf_params \ " : { \ " resp_size \ " : 0 , \ " req_size \ " : 0 } } , \ " server_type \ " : \ " ASYNC_GENERIC_SERVER \ " } , \ " client_config \ " : { \ " client_type \ " : \ " ASYNC_CLIENT \ " , \ " security_params \ " : null , \ " payload_config \ " : { \ " bytebuf_params \ " : { \ " resp_size \ " : 0 , \ " req_size \ " : 0 } } , \ " client_channels \ " : 1 , \ " async_client_threads \ " : 1 , \ " outstanding_rpcs_per_channel \ " : 1 , \ " rpc_type \ " : \ " STREAMING \ " , \ " load_params \ " : { \ " closed_loop \ " : { } } , \ " histogram_params \ " : { \ " max_possible \ " : 60000000000 . 0 , \ " resolution \ " : 0 . 01 } } , \ " num_clients \ " : 1 } ] } " <nl> + ] , <nl> + " boringssl " : true , <nl> + " ci_platforms " : [ <nl> + " linux " <nl> + ] , <nl> + " cpu_cost " : 2 , <nl> + " defaults " : " boringssl " , <nl> + " exclude_configs " : [ ] , <nl> + " flaky " : false , <nl> + " language " : " c + + " , <nl> + " name " : " json_run_localhost " , <nl> + " platforms " : [ <nl> + " linux " <nl> + ] , <nl> + " shortname " : " json_run_localhost : cpp_generic_async_streaming_ping_pong_insecure " , <nl> + " timeout_seconds " : 180 <nl> + } , <nl> { <nl> " args " : [ <nl> " - - scenarios_json " , <nl> mmm a / tools / tsan_suppressions . txt <nl> ppp b / tools / tsan_suppressions . txt <nl> race : cleanse_ctr <nl> race : ssleay_rand_add <nl> race : ssleay_rand_bytes <nl> race : __sleep_for <nl> + # protobuf has an idempotent write race in ByteSize <nl> + # https : / / github . com / google / protobuf / issues / 2169 <nl> + race : ByteSize <nl> mmm a / vsprojects / buildtests_c . sln <nl> ppp b / vsprojects / buildtests_c . sln <nl> Project ( " { 8BC9CEB8 - 8B4A - 11D0 - 8D11 - 00A0C91BC942 } " ) = " connection_prefix_bad_clien <nl> { B23D3D1A - 9438 - 4EDA - BEB6 - 9A0A03D17792 } = { B23D3D1A - 9438 - 4EDA - BEB6 - 9A0A03D17792 } <nl> EndProjectSection <nl> EndProject <nl> + Project ( " { 8BC9CEB8 - 8B4A - 11D0 - 8D11 - 00A0C91BC942 } " ) = " connection_refused_test " , " vcxproj \ test \ connection_refused_test \ connection_refused_test . vcxproj " , " { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } " <nl> + ProjectSection ( myProperties ) = preProject <nl> + lib = " False " <nl> + EndProjectSection <nl> + ProjectSection ( ProjectDependencies ) = postProject <nl> + { 17BCAFC0 - 5FDC - 4C94 - AEB9 - 95F3E220614B } = { 17BCAFC0 - 5FDC - 4C94 - AEB9 - 95F3E220614B } <nl> + { 29D16885 - 7228 - 4C31 - 81ED - 5F9187C7F2A9 } = { 29D16885 - 7228 - 4C31 - 81ED - 5F9187C7F2A9 } <nl> + { EAB0A629 - 17A9 - 44DB - B5FF - E91A721FE037 } = { EAB0A629 - 17A9 - 44DB - B5FF - E91A721FE037 } <nl> + { B23D3D1A - 9438 - 4EDA - BEB6 - 9A0A03D17792 } = { B23D3D1A - 9438 - 4EDA - BEB6 - 9A0A03D17792 } <nl> + EndProjectSection <nl> + EndProject <nl> Project ( " { 8BC9CEB8 - 8B4A - 11D0 - 8D11 - 00A0C91BC942 } " ) = " dns_resolver_connectivity_test " , " vcxproj \ test \ dns_resolver_connectivity_test \ dns_resolver_connectivity_test . vcxproj " , " { F7B6FE68 - E847 - D7CA - 4062 - E737E542BCC3 } " <nl> ProjectSection ( myProperties ) = preProject <nl> lib = " False " <nl> Global <nl> { AF9D0EB2 - 2A53 - B815 - 3A63 - E82C7F91DB29 } . Release - DLL | Win32 . Build . 0 = Release | Win32 <nl> { AF9D0EB2 - 2A53 - B815 - 3A63 - E82C7F91DB29 } . Release - DLL | x64 . ActiveCfg = Release | x64 <nl> { AF9D0EB2 - 2A53 - B815 - 3A63 - E82C7F91DB29 } . Release - DLL | x64 . Build . 0 = Release | x64 <nl> + { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } . Debug | Win32 . ActiveCfg = Debug | Win32 <nl> + { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } . Debug | x64 . ActiveCfg = Debug | x64 <nl> + { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } . Release | Win32 . ActiveCfg = Release | Win32 <nl> + { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } . Release | x64 . ActiveCfg = Release | x64 <nl> + { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } . Debug | Win32 . Build . 0 = Debug | Win32 <nl> + { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } . Debug | x64 . Build . 0 = Debug | x64 <nl> + { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } . Release | Win32 . Build . 0 = Release | Win32 <nl> + { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } . Release | x64 . Build . 0 = Release | x64 <nl> + { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } . Debug - DLL | Win32 . ActiveCfg = Debug | Win32 <nl> + { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } . Debug - DLL | Win32 . Build . 0 = Debug | Win32 <nl> + { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } . Debug - DLL | x64 . ActiveCfg = Debug | x64 <nl> + { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } . Debug - DLL | x64 . Build . 0 = Debug | x64 <nl> + { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } . Release - DLL | Win32 . ActiveCfg = Release | Win32 <nl> + { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } . Release - DLL | Win32 . Build . 0 = Release | Win32 <nl> + { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } . Release - DLL | x64 . ActiveCfg = Release | x64 <nl> + { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } . Release - DLL | x64 . Build . 0 = Release | x64 <nl> { F7B6FE68 - E847 - D7CA - 4062 - E737E542BCC3 } . Debug | Win32 . ActiveCfg = Debug | Win32 <nl> { F7B6FE68 - E847 - D7CA - 4062 - E737E542BCC3 } . Debug | x64 . ActiveCfg = Debug | x64 <nl> { F7B6FE68 - E847 - D7CA - 4062 - E737E542BCC3 } . Release | Win32 . ActiveCfg = Release | Win32 <nl> mmm a / vsprojects / grpc_protoc_plugins . sln <nl> ppp b / vsprojects / grpc_protoc_plugins . sln <nl> Project ( " { 8BC9CEB8 - 8B4A - 11D0 - 8D11 - 00A0C91BC942 } " ) = " grpc_objective_c_plugin " , " <nl> { B6E81D84 - 2ACB - 41B8 - 8781 - 493A944C7817 } = { B6E81D84 - 2ACB - 41B8 - 8781 - 493A944C7817 } <nl> EndProjectSection <nl> EndProject <nl> + Project ( " { 8BC9CEB8 - 8B4A - 11D0 - 8D11 - 00A0C91BC942 } " ) = " grpc_php_plugin " , " vcxproj \ . \ grpc_php_plugin \ grpc_php_plugin . vcxproj " , " { 2C5F74B5 - 2F1E - A7A7 - 45EA - 250AF73A1CEC } " <nl> + ProjectSection ( myProperties ) = preProject <nl> + lib = " False " <nl> + EndProjectSection <nl> + ProjectSection ( ProjectDependencies ) = postProject <nl> + { B6E81D84 - 2ACB - 41B8 - 8781 - 493A944C7817 } = { B6E81D84 - 2ACB - 41B8 - 8781 - 493A944C7817 } <nl> + EndProjectSection <nl> + EndProject <nl> Project ( " { 8BC9CEB8 - 8B4A - 11D0 - 8D11 - 00A0C91BC942 } " ) = " grpc_plugin_support " , " vcxproj \ . \ grpc_plugin_support \ grpc_plugin_support . vcxproj " , " { B6E81D84 - 2ACB - 41B8 - 8781 - 493A944C7817 } " <nl> ProjectSection ( myProperties ) = preProject <nl> lib = " True " <nl> Global <nl> { 19564640 - CEE6 - 4921 - ABA5 - 676ED79A36F6 } . Debug | x64 . Build . 0 = Debug | x64 <nl> { 19564640 - CEE6 - 4921 - ABA5 - 676ED79A36F6 } . Release | Win32 . Build . 0 = Release | Win32 <nl> { 19564640 - CEE6 - 4921 - ABA5 - 676ED79A36F6 } . Release | x64 . Build . 0 = Release | x64 <nl> + { 2C5F74B5 - 2F1E - A7A7 - 45EA - 250AF73A1CEC } . Debug | Win32 . ActiveCfg = Debug | Win32 <nl> + { 2C5F74B5 - 2F1E - A7A7 - 45EA - 250AF73A1CEC } . Debug | x64 . ActiveCfg = Debug | x64 <nl> + { 2C5F74B5 - 2F1E - A7A7 - 45EA - 250AF73A1CEC } . Release | Win32 . ActiveCfg = Release | Win32 <nl> + { 2C5F74B5 - 2F1E - A7A7 - 45EA - 250AF73A1CEC } . Release | x64 . ActiveCfg = Release | x64 <nl> + { 2C5F74B5 - 2F1E - A7A7 - 45EA - 250AF73A1CEC } . Debug | Win32 . Build . 0 = Debug | Win32 <nl> + { 2C5F74B5 - 2F1E - A7A7 - 45EA - 250AF73A1CEC } . Debug | x64 . Build . 0 = Debug | x64 <nl> + { 2C5F74B5 - 2F1E - A7A7 - 45EA - 250AF73A1CEC } . Release | Win32 . Build . 0 = Release | Win32 <nl> + { 2C5F74B5 - 2F1E - A7A7 - 45EA - 250AF73A1CEC } . Release | x64 . Build . 0 = Release | x64 <nl> { B6E81D84 - 2ACB - 41B8 - 8781 - 493A944C7817 } . Debug | Win32 . ActiveCfg = Debug | Win32 <nl> { B6E81D84 - 2ACB - 41B8 - 8781 - 493A944C7817 } . Debug | x64 . ActiveCfg = Debug | x64 <nl> { B6E81D84 - 2ACB - 41B8 - 8781 - 493A944C7817 } . Release | Win32 . ActiveCfg = Release | Win32 <nl> mmm a / vsprojects / vcxproj / grpc_cli_libs / grpc_cli_libs . vcxproj <nl> ppp b / vsprojects / vcxproj / grpc_cli_libs / grpc_cli_libs . vcxproj <nl> <nl> < ProjectReference Include = " $ ( SolutionDir ) \ . . \ vsprojects \ vcxproj \ . \ grpc + + \ grpc + + . vcxproj " > <nl> < Project > { C187A093 - A0FE - 489D - A40A - 6E33DE0F9FEB } < / Project > <nl> < / ProjectReference > <nl> - < ProjectReference Include = " $ ( SolutionDir ) \ . . \ vsprojects \ vcxproj \ . \ grpc + + _test_config \ grpc + + _test_config . vcxproj " > <nl> - < Project > { 3F7D093D - 11F9 - C4BC - BEB7 - 18EB28E3F290 } < / Project > <nl> - < / ProjectReference > <nl> < / ItemGroup > <nl> < Import Project = " $ ( VCTargetsPath ) \ Microsoft . Cpp . targets " / > <nl> < ImportGroup Label = " ExtensionTargets " > <nl> new file mode 100644 <nl> index 00000000000 . . 1648ba9010f <nl> mmm / dev / null <nl> ppp b / vsprojects / vcxproj / grpc_php_plugin / grpc_php_plugin . vcxproj <nl> <nl> + < ? xml version = " 1 . 0 " encoding = " utf - 8 " ? > <nl> + < Project DefaultTargets = " Build " ToolsVersion = " 12 . 0 " xmlns = " http : / / schemas . microsoft . com / developer / msbuild / 2003 " > <nl> + < ItemGroup Label = " ProjectConfigurations " > <nl> + < ProjectConfiguration Include = " Debug | Win32 " > <nl> + < Configuration > Debug < / Configuration > <nl> + < Platform > Win32 < / Platform > <nl> + < / ProjectConfiguration > <nl> + < ProjectConfiguration Include = " Debug | x64 " > <nl> + < Configuration > Debug < / Configuration > <nl> + < Platform > x64 < / Platform > <nl> + < / ProjectConfiguration > <nl> + < ProjectConfiguration Include = " Release | Win32 " > <nl> + < Configuration > Release < / Configuration > <nl> + < Platform > Win32 < / Platform > <nl> + < / ProjectConfiguration > <nl> + < ProjectConfiguration Include = " Release | x64 " > <nl> + < Configuration > Release < / Configuration > <nl> + < Platform > x64 < / Platform > <nl> + < / ProjectConfiguration > <nl> + < / ItemGroup > <nl> + < PropertyGroup Label = " Globals " > <nl> + < ProjectGuid > { 2C5F74B5 - 2F1E - A7A7 - 45EA - 250AF73A1CEC } < / ProjectGuid > <nl> + < IgnoreWarnIntDirInTempDetected > true < / IgnoreWarnIntDirInTempDetected > <nl> + < IntDir > $ ( SolutionDir ) IntDir \ $ ( MSBuildProjectName ) \ < / IntDir > <nl> + < / PropertyGroup > <nl> + < Import Project = " $ ( VCTargetsPath ) \ Microsoft . Cpp . Default . props " / > <nl> + < PropertyGroup Condition = " ' $ ( VisualStudioVersion ) ' = = ' 10 . 0 ' " Label = " Configuration " > <nl> + < PlatformToolset > v100 < / PlatformToolset > <nl> + < / PropertyGroup > <nl> + < PropertyGroup Condition = " ' $ ( VisualStudioVersion ) ' = = ' 11 . 0 ' " Label = " Configuration " > <nl> + < PlatformToolset > v110 < / PlatformToolset > <nl> + < / PropertyGroup > <nl> + < PropertyGroup Condition = " ' $ ( VisualStudioVersion ) ' = = ' 12 . 0 ' " Label = " Configuration " > <nl> + < PlatformToolset > v120 < / PlatformToolset > <nl> + < / PropertyGroup > <nl> + < PropertyGroup Condition = " ' $ ( VisualStudioVersion ) ' = = ' 14 . 0 ' " Label = " Configuration " > <nl> + < PlatformToolset > v140 < / PlatformToolset > <nl> + < / PropertyGroup > <nl> + < PropertyGroup Condition = " ' $ ( Configuration ) ' = = ' Debug ' " Label = " Configuration " > <nl> + < ConfigurationType > Application < / ConfigurationType > <nl> + < UseDebugLibraries > true < / UseDebugLibraries > <nl> + < CharacterSet > Unicode < / CharacterSet > <nl> + < / PropertyGroup > <nl> + < PropertyGroup Condition = " ' $ ( Configuration ) ' = = ' Release ' " Label = " Configuration " > <nl> + < ConfigurationType > Application < / ConfigurationType > <nl> + < UseDebugLibraries > false < / UseDebugLibraries > <nl> + < WholeProgramOptimization > true < / WholeProgramOptimization > <nl> + < CharacterSet > Unicode < / CharacterSet > <nl> + < / PropertyGroup > <nl> + < Import Project = " $ ( VCTargetsPath ) \ Microsoft . Cpp . props " / > <nl> + < ImportGroup Label = " ExtensionSettings " > <nl> + < / ImportGroup > <nl> + < ImportGroup Label = " PropertySheets " > <nl> + < Import Project = " $ ( UserRootDir ) \ Microsoft . Cpp . $ ( Platform ) . user . props " Condition = " exists ( ' $ ( UserRootDir ) \ Microsoft . Cpp . $ ( Platform ) . user . props ' ) " Label = " LocalAppDataPlatform " / > <nl> + < Import Project = " $ ( SolutionDir ) \ . . \ vsprojects \ global . props " / > <nl> + < Import Project = " $ ( SolutionDir ) \ . . \ vsprojects \ protobuf . props " / > <nl> + < Import Project = " $ ( SolutionDir ) \ . . \ vsprojects \ protoc . props " / > <nl> + < / ImportGroup > <nl> + < PropertyGroup Label = " UserMacros " / > <nl> + < PropertyGroup Condition = " ' $ ( Configuration ) ' = = ' Debug ' " > <nl> + < TargetName > grpc_php_plugin < / TargetName > <nl> + < / PropertyGroup > <nl> + < PropertyGroup Condition = " ' $ ( Configuration ) ' = = ' Release ' " > <nl> + < TargetName > grpc_php_plugin < / TargetName > <nl> + < / PropertyGroup > <nl> + < ItemDefinitionGroup Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Debug | Win32 ' " > <nl> + < ClCompile > <nl> + < PrecompiledHeader > NotUsing < / PrecompiledHeader > <nl> + < WarningLevel > Level3 < / WarningLevel > <nl> + < Optimization > Disabled < / Optimization > <nl> + < PreprocessorDefinitions > WIN32 ; _DEBUG ; _LIB ; % ( PreprocessorDefinitions ) < / PreprocessorDefinitions > <nl> + < SDLCheck > true < / SDLCheck > <nl> + < RuntimeLibrary > MultiThreadedDebug < / RuntimeLibrary > <nl> + < TreatWarningAsError > true < / TreatWarningAsError > <nl> + < DebugInformationFormat Condition = " $ ( Jenkins ) " > None < / DebugInformationFormat > <nl> + < MinimalRebuild Condition = " $ ( Jenkins ) " > false < / MinimalRebuild > <nl> + < / ClCompile > <nl> + < Link > <nl> + < SubSystem > Console < / SubSystem > <nl> + < GenerateDebugInformation Condition = " ! $ ( Jenkins ) " > true < / GenerateDebugInformation > <nl> + < GenerateDebugInformation Condition = " $ ( Jenkins ) " > false < / GenerateDebugInformation > <nl> + < / Link > <nl> + < / ItemDefinitionGroup > <nl> + <nl> + < ItemDefinitionGroup Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Debug | x64 ' " > <nl> + < ClCompile > <nl> + < PrecompiledHeader > NotUsing < / PrecompiledHeader > <nl> + < WarningLevel > Level3 < / WarningLevel > <nl> + < Optimization > Disabled < / Optimization > <nl> + < PreprocessorDefinitions > WIN32 ; _DEBUG ; _LIB ; % ( PreprocessorDefinitions ) < / PreprocessorDefinitions > <nl> + < SDLCheck > true < / SDLCheck > <nl> + < RuntimeLibrary > MultiThreadedDebug < / RuntimeLibrary > <nl> + < TreatWarningAsError > true < / TreatWarningAsError > <nl> + < DebugInformationFormat Condition = " $ ( Jenkins ) " > None < / DebugInformationFormat > <nl> + < MinimalRebuild Condition = " $ ( Jenkins ) " > false < / MinimalRebuild > <nl> + < / ClCompile > <nl> + < Link > <nl> + < SubSystem > Console < / SubSystem > <nl> + < GenerateDebugInformation Condition = " ! $ ( Jenkins ) " > true < / GenerateDebugInformation > <nl> + < GenerateDebugInformation Condition = " $ ( Jenkins ) " > false < / GenerateDebugInformation > <nl> + < / Link > <nl> + < / ItemDefinitionGroup > <nl> + <nl> + < ItemDefinitionGroup Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Release | Win32 ' " > <nl> + < ClCompile > <nl> + < PrecompiledHeader > NotUsing < / PrecompiledHeader > <nl> + < WarningLevel > Level3 < / WarningLevel > <nl> + < Optimization > MaxSpeed < / Optimization > <nl> + < PreprocessorDefinitions > WIN32 ; NDEBUG ; _LIB ; % ( PreprocessorDefinitions ) < / PreprocessorDefinitions > <nl> + < FunctionLevelLinking > true < / FunctionLevelLinking > <nl> + < IntrinsicFunctions > true < / IntrinsicFunctions > <nl> + < SDLCheck > true < / SDLCheck > <nl> + < RuntimeLibrary > MultiThreaded < / RuntimeLibrary > <nl> + < TreatWarningAsError > true < / TreatWarningAsError > <nl> + < DebugInformationFormat Condition = " $ ( Jenkins ) " > None < / DebugInformationFormat > <nl> + < MinimalRebuild Condition = " $ ( Jenkins ) " > false < / MinimalRebuild > <nl> + < / ClCompile > <nl> + < Link > <nl> + < SubSystem > Console < / SubSystem > <nl> + < GenerateDebugInformation Condition = " ! $ ( Jenkins ) " > true < / GenerateDebugInformation > <nl> + < GenerateDebugInformation Condition = " $ ( Jenkins ) " > false < / GenerateDebugInformation > <nl> + < EnableCOMDATFolding > true < / EnableCOMDATFolding > <nl> + < OptimizeReferences > true < / OptimizeReferences > <nl> + < / Link > <nl> + < / ItemDefinitionGroup > <nl> + <nl> + < ItemDefinitionGroup Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Release | x64 ' " > <nl> + < ClCompile > <nl> + < PrecompiledHeader > NotUsing < / PrecompiledHeader > <nl> + < WarningLevel > Level3 < / WarningLevel > <nl> + < Optimization > MaxSpeed < / Optimization > <nl> + < PreprocessorDefinitions > WIN32 ; NDEBUG ; _LIB ; % ( PreprocessorDefinitions ) < / PreprocessorDefinitions > <nl> + < FunctionLevelLinking > true < / FunctionLevelLinking > <nl> + < IntrinsicFunctions > true < / IntrinsicFunctions > <nl> + < SDLCheck > true < / SDLCheck > <nl> + < RuntimeLibrary > MultiThreaded < / RuntimeLibrary > <nl> + < TreatWarningAsError > true < / TreatWarningAsError > <nl> + < DebugInformationFormat Condition = " $ ( Jenkins ) " > None < / DebugInformationFormat > <nl> + < MinimalRebuild Condition = " $ ( Jenkins ) " > false < / MinimalRebuild > <nl> + < / ClCompile > <nl> + < Link > <nl> + < SubSystem > Console < / SubSystem > <nl> + < GenerateDebugInformation Condition = " ! $ ( Jenkins ) " > true < / GenerateDebugInformation > <nl> + < GenerateDebugInformation Condition = " $ ( Jenkins ) " > false < / GenerateDebugInformation > <nl> + < EnableCOMDATFolding > true < / EnableCOMDATFolding > <nl> + < OptimizeReferences > true < / OptimizeReferences > <nl> + < / Link > <nl> + < / ItemDefinitionGroup > <nl> + <nl> + < ItemGroup > <nl> + < ClCompile Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ php_plugin . cc " > <nl> + < / ClCompile > <nl> + < / ItemGroup > <nl> + < ItemGroup > <nl> + < ProjectReference Include = " $ ( SolutionDir ) \ . . \ vsprojects \ vcxproj \ . \ grpc_plugin_support \ grpc_plugin_support . vcxproj " > <nl> + < Project > { B6E81D84 - 2ACB - 41B8 - 8781 - 493A944C7817 } < / Project > <nl> + < / ProjectReference > <nl> + < / ItemGroup > <nl> + < Import Project = " $ ( VCTargetsPath ) \ Microsoft . Cpp . targets " / > <nl> + < ImportGroup Label = " ExtensionTargets " > <nl> + < / ImportGroup > <nl> + < Target Name = " EnsureNuGetPackageBuildImports " BeforeTargets = " PrepareForBuild " > <nl> + < PropertyGroup > <nl> + < ErrorText > This project references NuGet package ( s ) that are missing on this computer . Enable NuGet Package Restore to download them . For more information , see http : / / go . microsoft . com / fwlink / ? LinkID = 322105 . The missing file is { 0 } . < / ErrorText > <nl> + < / PropertyGroup > <nl> + < / Target > <nl> + < / Project > <nl> + <nl> new file mode 100644 <nl> index 00000000000 . . e131753f8d6 <nl> mmm / dev / null <nl> ppp b / vsprojects / vcxproj / grpc_php_plugin / grpc_php_plugin . vcxproj . filters <nl> <nl> + < ? xml version = " 1 . 0 " encoding = " utf - 8 " ? > <nl> + < Project ToolsVersion = " 4 . 0 " xmlns = " http : / / schemas . microsoft . com / developer / msbuild / 2003 " > <nl> + < ItemGroup > <nl> + < ClCompile Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ php_plugin . cc " > <nl> + < Filter > src \ compiler < / Filter > <nl> + < / ClCompile > <nl> + < / ItemGroup > <nl> + <nl> + < ItemGroup > <nl> + < Filter Include = " src " > <nl> + < UniqueIdentifier > { d7fb4039 - 77f4 - 10f2 - 59fe - bb98fb56950a } < / UniqueIdentifier > <nl> + < / Filter > <nl> + < Filter Include = " src \ compiler " > <nl> + < UniqueIdentifier > { 5560fb58 - 2ae8 - 75cc - fbca - e630a50c15bf } < / UniqueIdentifier > <nl> + < / Filter > <nl> + < / ItemGroup > <nl> + < / Project > <nl> + <nl> mmm a / vsprojects / vcxproj / grpc_plugin_support / grpc_plugin_support . vcxproj <nl> ppp b / vsprojects / vcxproj / grpc_plugin_support / grpc_plugin_support . vcxproj <nl> <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ node_generator_helpers . h " / > <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ objective_c_generator . h " / > <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ objective_c_generator_helpers . h " / > <nl> + < ClInclude Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ php_generator . h " / > <nl> + < ClInclude Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ php_generator_helpers . h " / > <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ python_generator . h " / > <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ ruby_generator . h " / > <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ ruby_generator_helpers - inl . h " / > <nl> <nl> < / ClCompile > <nl> < ClCompile Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ objective_c_generator . cc " > <nl> < / ClCompile > <nl> + < ClCompile Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ php_generator . cc " > <nl> + < / ClCompile > <nl> < ClCompile Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ python_generator . cc " > <nl> < / ClCompile > <nl> < ClCompile Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ ruby_generator . cc " > <nl> mmm a / vsprojects / vcxproj / grpc_plugin_support / grpc_plugin_support . vcxproj . filters <nl> ppp b / vsprojects / vcxproj / grpc_plugin_support / grpc_plugin_support . vcxproj . filters <nl> <nl> < ClCompile Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ objective_c_generator . cc " > <nl> < Filter > src \ compiler < / Filter > <nl> < / ClCompile > <nl> + < ClCompile Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ php_generator . cc " > <nl> + < Filter > src \ compiler < / Filter > <nl> + < / ClCompile > <nl> < ClCompile Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ python_generator . cc " > <nl> < Filter > src \ compiler < / Filter > <nl> < / ClCompile > <nl> <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ objective_c_generator_helpers . h " > <nl> < Filter > src \ compiler < / Filter > <nl> < / ClInclude > <nl> + < ClInclude Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ php_generator . h " > <nl> + < Filter > src \ compiler < / Filter > <nl> + < / ClInclude > <nl> + < ClInclude Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ php_generator_helpers . h " > <nl> + < Filter > src \ compiler < / Filter > <nl> + < / ClInclude > <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ src \ compiler \ python_generator . h " > <nl> < Filter > src \ compiler < / Filter > <nl> < / ClInclude > <nl> mmm a / vsprojects / vcxproj / grpc_test_util / grpc_test_util . vcxproj <nl> ppp b / vsprojects / vcxproj / grpc_test_util / grpc_test_util . vcxproj <nl> <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ data \ ssl_test_data . h " / > <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ security \ oauth2_utils . h " / > <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ cq_verifier . h " / > <nl> + < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fake_resolver . h " / > <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fixtures \ http_proxy . h " / > <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fixtures \ proxy . h " / > <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ iomgr \ endpoint_tests . h " / > <nl> <nl> < / ClCompile > <nl> < ClCompile Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ cq_verifier . c " > <nl> < / ClCompile > <nl> + < ClCompile Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fake_resolver . c " > <nl> + < / ClCompile > <nl> < ClCompile Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fixtures \ http_proxy . c " > <nl> < / ClCompile > <nl> < ClCompile Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fixtures \ proxy . c " > <nl> mmm a / vsprojects / vcxproj / grpc_test_util / grpc_test_util . vcxproj . filters <nl> ppp b / vsprojects / vcxproj / grpc_test_util / grpc_test_util . vcxproj . filters <nl> <nl> < ClCompile Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ cq_verifier . c " > <nl> < Filter > test \ core \ end2end < / Filter > <nl> < / ClCompile > <nl> + < ClCompile Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fake_resolver . c " > <nl> + < Filter > test \ core \ end2end < / Filter > <nl> + < / ClCompile > <nl> < ClCompile Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fixtures \ http_proxy . c " > <nl> < Filter > test \ core \ end2end \ fixtures < / Filter > <nl> < / ClCompile > <nl> <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ cq_verifier . h " > <nl> < Filter > test \ core \ end2end < / Filter > <nl> < / ClInclude > <nl> + < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fake_resolver . h " > <nl> + < Filter > test \ core \ end2end < / Filter > <nl> + < / ClInclude > <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fixtures \ http_proxy . h " > <nl> < Filter > test \ core \ end2end \ fixtures < / Filter > <nl> < / ClInclude > <nl> mmm a / vsprojects / vcxproj / grpc_test_util_unsecure / grpc_test_util_unsecure . vcxproj <nl> ppp b / vsprojects / vcxproj / grpc_test_util_unsecure / grpc_test_util_unsecure . vcxproj <nl> <nl> <nl> < ItemGroup > <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ cq_verifier . h " / > <nl> + < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fake_resolver . h " / > <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fixtures \ http_proxy . h " / > <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fixtures \ proxy . h " / > <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ iomgr \ endpoint_tests . h " / > <nl> <nl> < ItemGroup > <nl> < ClCompile Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ cq_verifier . c " > <nl> < / ClCompile > <nl> + < ClCompile Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fake_resolver . c " > <nl> + < / ClCompile > <nl> < ClCompile Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fixtures \ http_proxy . c " > <nl> < / ClCompile > <nl> < ClCompile Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fixtures \ proxy . c " > <nl> mmm a / vsprojects / vcxproj / grpc_test_util_unsecure / grpc_test_util_unsecure . vcxproj . filters <nl> ppp b / vsprojects / vcxproj / grpc_test_util_unsecure / grpc_test_util_unsecure . vcxproj . filters <nl> <nl> < ClCompile Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ cq_verifier . c " > <nl> < Filter > test \ core \ end2end < / Filter > <nl> < / ClCompile > <nl> + < ClCompile Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fake_resolver . c " > <nl> + < Filter > test \ core \ end2end < / Filter > <nl> + < / ClCompile > <nl> < ClCompile Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fixtures \ http_proxy . c " > <nl> < Filter > test \ core \ end2end \ fixtures < / Filter > <nl> < / ClCompile > <nl> <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ cq_verifier . h " > <nl> < Filter > test \ core \ end2end < / Filter > <nl> < / ClInclude > <nl> + < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fake_resolver . h " > <nl> + < Filter > test \ core \ end2end < / Filter > <nl> + < / ClInclude > <nl> < ClInclude Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ fixtures \ http_proxy . h " > <nl> < Filter > test \ core \ end2end \ fixtures < / Filter > <nl> < / ClInclude > <nl> new file mode 100644 <nl> index 00000000000 . . 2f13d09bdfb <nl> mmm / dev / null <nl> ppp b / vsprojects / vcxproj / test / connection_refused_test / connection_refused_test . vcxproj <nl> <nl> + < ? xml version = " 1 . 0 " encoding = " utf - 8 " ? > <nl> + < Project DefaultTargets = " Build " ToolsVersion = " 12 . 0 " xmlns = " http : / / schemas . microsoft . com / developer / msbuild / 2003 " > <nl> + < Import Project = " $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . openssl . 1 . 0 . 204 . 1 \ build \ native \ grpc . dependencies . openssl . props " Condition = " Exists ( ' $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . openssl . 1 . 0 . 204 . 1 \ build \ native \ 1 . 0 . 204 . 1 . props ' ) " / > <nl> + < ItemGroup Label = " ProjectConfigurations " > <nl> + < ProjectConfiguration Include = " Debug | Win32 " > <nl> + < Configuration > Debug < / Configuration > <nl> + < Platform > Win32 < / Platform > <nl> + < / ProjectConfiguration > <nl> + < ProjectConfiguration Include = " Debug | x64 " > <nl> + < Configuration > Debug < / Configuration > <nl> + < Platform > x64 < / Platform > <nl> + < / ProjectConfiguration > <nl> + < ProjectConfiguration Include = " Release | Win32 " > <nl> + < Configuration > Release < / Configuration > <nl> + < Platform > Win32 < / Platform > <nl> + < / ProjectConfiguration > <nl> + < ProjectConfiguration Include = " Release | x64 " > <nl> + < Configuration > Release < / Configuration > <nl> + < Platform > x64 < / Platform > <nl> + < / ProjectConfiguration > <nl> + < / ItemGroup > <nl> + < PropertyGroup Label = " Globals " > <nl> + < ProjectGuid > { 961DFABF - 18F2 - 7D46 - 4D69 - B82A5E9A78B2 } < / ProjectGuid > <nl> + < IgnoreWarnIntDirInTempDetected > true < / IgnoreWarnIntDirInTempDetected > <nl> + < IntDir > $ ( SolutionDir ) IntDir \ $ ( MSBuildProjectName ) \ < / IntDir > <nl> + < / PropertyGroup > <nl> + < Import Project = " $ ( VCTargetsPath ) \ Microsoft . Cpp . Default . props " / > <nl> + < PropertyGroup Condition = " ' $ ( VisualStudioVersion ) ' = = ' 10 . 0 ' " Label = " Configuration " > <nl> + < PlatformToolset > v100 < / PlatformToolset > <nl> + < / PropertyGroup > <nl> + < PropertyGroup Condition = " ' $ ( VisualStudioVersion ) ' = = ' 11 . 0 ' " Label = " Configuration " > <nl> + < PlatformToolset > v110 < / PlatformToolset > <nl> + < / PropertyGroup > <nl> + < PropertyGroup Condition = " ' $ ( VisualStudioVersion ) ' = = ' 12 . 0 ' " Label = " Configuration " > <nl> + < PlatformToolset > v120 < / PlatformToolset > <nl> + < / PropertyGroup > <nl> + < PropertyGroup Condition = " ' $ ( VisualStudioVersion ) ' = = ' 14 . 0 ' " Label = " Configuration " > <nl> + < PlatformToolset > v140 < / PlatformToolset > <nl> + < / PropertyGroup > <nl> + < PropertyGroup Condition = " ' $ ( Configuration ) ' = = ' Debug ' " Label = " Configuration " > <nl> + < ConfigurationType > Application < / ConfigurationType > <nl> + < UseDebugLibraries > true < / UseDebugLibraries > <nl> + < CharacterSet > Unicode < / CharacterSet > <nl> + < / PropertyGroup > <nl> + < PropertyGroup Condition = " ' $ ( Configuration ) ' = = ' Release ' " Label = " Configuration " > <nl> + < ConfigurationType > Application < / ConfigurationType > <nl> + < UseDebugLibraries > false < / UseDebugLibraries > <nl> + < WholeProgramOptimization > true < / WholeProgramOptimization > <nl> + < CharacterSet > Unicode < / CharacterSet > <nl> + < / PropertyGroup > <nl> + < Import Project = " $ ( VCTargetsPath ) \ Microsoft . Cpp . props " / > <nl> + < ImportGroup Label = " ExtensionSettings " > <nl> + < / ImportGroup > <nl> + < ImportGroup Label = " PropertySheets " > <nl> + < Import Project = " $ ( UserRootDir ) \ Microsoft . Cpp . $ ( Platform ) . user . props " Condition = " exists ( ' $ ( UserRootDir ) \ Microsoft . Cpp . $ ( Platform ) . user . props ' ) " Label = " LocalAppDataPlatform " / > <nl> + < Import Project = " $ ( SolutionDir ) \ . . \ vsprojects \ global . props " / > <nl> + < Import Project = " $ ( SolutionDir ) \ . . \ vsprojects \ openssl . props " / > <nl> + < Import Project = " $ ( SolutionDir ) \ . . \ vsprojects \ winsock . props " / > <nl> + < Import Project = " $ ( SolutionDir ) \ . . \ vsprojects \ zlib . props " / > <nl> + < / ImportGroup > <nl> + < PropertyGroup Label = " UserMacros " / > <nl> + < PropertyGroup Condition = " ' $ ( Configuration ) ' = = ' Debug ' " > <nl> + < TargetName > connection_refused_test < / TargetName > <nl> + < Linkage - grpc_dependencies_zlib > static < / Linkage - grpc_dependencies_zlib > <nl> + < Configuration - grpc_dependencies_zlib > Debug < / Configuration - grpc_dependencies_zlib > <nl> + < Linkage - grpc_dependencies_openssl > static < / Linkage - grpc_dependencies_openssl > <nl> + < Configuration - grpc_dependencies_openssl > Debug < / Configuration - grpc_dependencies_openssl > <nl> + < / PropertyGroup > <nl> + < PropertyGroup Condition = " ' $ ( Configuration ) ' = = ' Release ' " > <nl> + < TargetName > connection_refused_test < / TargetName > <nl> + < Linkage - grpc_dependencies_zlib > static < / Linkage - grpc_dependencies_zlib > <nl> + < Configuration - grpc_dependencies_zlib > Release < / Configuration - grpc_dependencies_zlib > <nl> + < Linkage - grpc_dependencies_openssl > static < / Linkage - grpc_dependencies_openssl > <nl> + < Configuration - grpc_dependencies_openssl > Release < / Configuration - grpc_dependencies_openssl > <nl> + < / PropertyGroup > <nl> + < ItemDefinitionGroup Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Debug | Win32 ' " > <nl> + < ClCompile > <nl> + < PrecompiledHeader > NotUsing < / PrecompiledHeader > <nl> + < WarningLevel > Level3 < / WarningLevel > <nl> + < Optimization > Disabled < / Optimization > <nl> + < PreprocessorDefinitions > WIN32 ; _DEBUG ; _LIB ; % ( PreprocessorDefinitions ) < / PreprocessorDefinitions > <nl> + < SDLCheck > true < / SDLCheck > <nl> + < RuntimeLibrary > MultiThreadedDebug < / RuntimeLibrary > <nl> + < TreatWarningAsError > true < / TreatWarningAsError > <nl> + < DebugInformationFormat Condition = " $ ( Jenkins ) " > None < / DebugInformationFormat > <nl> + < MinimalRebuild Condition = " $ ( Jenkins ) " > false < / MinimalRebuild > <nl> + < / ClCompile > <nl> + < Link > <nl> + < SubSystem > Console < / SubSystem > <nl> + < GenerateDebugInformation Condition = " ! $ ( Jenkins ) " > true < / GenerateDebugInformation > <nl> + < GenerateDebugInformation Condition = " $ ( Jenkins ) " > false < / GenerateDebugInformation > <nl> + < / Link > <nl> + < / ItemDefinitionGroup > <nl> + <nl> + < ItemDefinitionGroup Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Debug | x64 ' " > <nl> + < ClCompile > <nl> + < PrecompiledHeader > NotUsing < / PrecompiledHeader > <nl> + < WarningLevel > Level3 < / WarningLevel > <nl> + < Optimization > Disabled < / Optimization > <nl> + < PreprocessorDefinitions > WIN32 ; _DEBUG ; _LIB ; % ( PreprocessorDefinitions ) < / PreprocessorDefinitions > <nl> + < SDLCheck > true < / SDLCheck > <nl> + < RuntimeLibrary > MultiThreadedDebug < / RuntimeLibrary > <nl> + < TreatWarningAsError > true < / TreatWarningAsError > <nl> + < DebugInformationFormat Condition = " $ ( Jenkins ) " > None < / DebugInformationFormat > <nl> + < MinimalRebuild Condition = " $ ( Jenkins ) " > false < / MinimalRebuild > <nl> + < / ClCompile > <nl> + < Link > <nl> + < SubSystem > Console < / SubSystem > <nl> + < GenerateDebugInformation Condition = " ! $ ( Jenkins ) " > true < / GenerateDebugInformation > <nl> + < GenerateDebugInformation Condition = " $ ( Jenkins ) " > false < / GenerateDebugInformation > <nl> + < / Link > <nl> + < / ItemDefinitionGroup > <nl> + <nl> + < ItemDefinitionGroup Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Release | Win32 ' " > <nl> + < ClCompile > <nl> + < PrecompiledHeader > NotUsing < / PrecompiledHeader > <nl> + < WarningLevel > Level3 < / WarningLevel > <nl> + < Optimization > MaxSpeed < / Optimization > <nl> + < PreprocessorDefinitions > WIN32 ; NDEBUG ; _LIB ; % ( PreprocessorDefinitions ) < / PreprocessorDefinitions > <nl> + < FunctionLevelLinking > true < / FunctionLevelLinking > <nl> + < IntrinsicFunctions > true < / IntrinsicFunctions > <nl> + < SDLCheck > true < / SDLCheck > <nl> + < RuntimeLibrary > MultiThreaded < / RuntimeLibrary > <nl> + < TreatWarningAsError > true < / TreatWarningAsError > <nl> + < DebugInformationFormat Condition = " $ ( Jenkins ) " > None < / DebugInformationFormat > <nl> + < MinimalRebuild Condition = " $ ( Jenkins ) " > false < / MinimalRebuild > <nl> + < / ClCompile > <nl> + < Link > <nl> + < SubSystem > Console < / SubSystem > <nl> + < GenerateDebugInformation Condition = " ! $ ( Jenkins ) " > true < / GenerateDebugInformation > <nl> + < GenerateDebugInformation Condition = " $ ( Jenkins ) " > false < / GenerateDebugInformation > <nl> + < EnableCOMDATFolding > true < / EnableCOMDATFolding > <nl> + < OptimizeReferences > true < / OptimizeReferences > <nl> + < / Link > <nl> + < / ItemDefinitionGroup > <nl> + <nl> + < ItemDefinitionGroup Condition = " ' $ ( Configuration ) | $ ( Platform ) ' = = ' Release | x64 ' " > <nl> + < ClCompile > <nl> + < PrecompiledHeader > NotUsing < / PrecompiledHeader > <nl> + < WarningLevel > Level3 < / WarningLevel > <nl> + < Optimization > MaxSpeed < / Optimization > <nl> + < PreprocessorDefinitions > WIN32 ; NDEBUG ; _LIB ; % ( PreprocessorDefinitions ) < / PreprocessorDefinitions > <nl> + < FunctionLevelLinking > true < / FunctionLevelLinking > <nl> + < IntrinsicFunctions > true < / IntrinsicFunctions > <nl> + < SDLCheck > true < / SDLCheck > <nl> + < RuntimeLibrary > MultiThreaded < / RuntimeLibrary > <nl> + < TreatWarningAsError > true < / TreatWarningAsError > <nl> + < DebugInformationFormat Condition = " $ ( Jenkins ) " > None < / DebugInformationFormat > <nl> + < MinimalRebuild Condition = " $ ( Jenkins ) " > false < / MinimalRebuild > <nl> + < / ClCompile > <nl> + < Link > <nl> + < SubSystem > Console < / SubSystem > <nl> + < GenerateDebugInformation Condition = " ! $ ( Jenkins ) " > true < / GenerateDebugInformation > <nl> + < GenerateDebugInformation Condition = " $ ( Jenkins ) " > false < / GenerateDebugInformation > <nl> + < EnableCOMDATFolding > true < / EnableCOMDATFolding > <nl> + < OptimizeReferences > true < / OptimizeReferences > <nl> + < / Link > <nl> + < / ItemDefinitionGroup > <nl> + <nl> + < ItemGroup > <nl> + < ClCompile Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ connection_refused_test . c " > <nl> + < / ClCompile > <nl> + < / ItemGroup > <nl> + < ItemGroup > <nl> + < ProjectReference Include = " $ ( SolutionDir ) \ . . \ vsprojects \ vcxproj \ . \ grpc_test_util \ grpc_test_util . vcxproj " > <nl> + < Project > { 17BCAFC0 - 5FDC - 4C94 - AEB9 - 95F3E220614B } < / Project > <nl> + < / ProjectReference > <nl> + < ProjectReference Include = " $ ( SolutionDir ) \ . . \ vsprojects \ vcxproj \ . \ grpc \ grpc . vcxproj " > <nl> + < Project > { 29D16885 - 7228 - 4C31 - 81ED - 5F9187C7F2A9 } < / Project > <nl> + < / ProjectReference > <nl> + < ProjectReference Include = " $ ( SolutionDir ) \ . . \ vsprojects \ vcxproj \ . \ gpr_test_util \ gpr_test_util . vcxproj " > <nl> + < Project > { EAB0A629 - 17A9 - 44DB - B5FF - E91A721FE037 } < / Project > <nl> + < / ProjectReference > <nl> + < ProjectReference Include = " $ ( SolutionDir ) \ . . \ vsprojects \ vcxproj \ . \ gpr \ gpr . vcxproj " > <nl> + < Project > { B23D3D1A - 9438 - 4EDA - BEB6 - 9A0A03D17792 } < / Project > <nl> + < / ProjectReference > <nl> + < / ItemGroup > <nl> + < ItemGroup > <nl> + < None Include = " packages . config " / > <nl> + < / ItemGroup > <nl> + < Import Project = " $ ( VCTargetsPath ) \ Microsoft . Cpp . targets " / > <nl> + < ImportGroup Label = " ExtensionTargets " > <nl> + < Import Project = " $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . zlib . redist . 1 . 2 . 8 . 10 \ build \ native \ grpc . dependencies . zlib . redist . targets " Condition = " Exists ( ' $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . zlib . redist . 1 . 2 . 8 . 10 \ build \ native \ grpc . dependencies \ grpc . dependencies . zlib . targets ' ) " / > <nl> + < Import Project = " $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . zlib . 1 . 2 . 8 . 10 \ build \ native \ grpc . dependencies . zlib . targets " Condition = " Exists ( ' $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . zlib . 1 . 2 . 8 . 10 \ build \ native \ grpc . dependencies \ grpc . dependencies . zlib . targets ' ) " / > <nl> + < Import Project = " $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . openssl . redist . 1 . 0 . 204 . 1 \ build \ native \ grpc . dependencies . openssl . redist . targets " Condition = " Exists ( ' $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . openssl . redist . 1 . 0 . 204 . 1 \ build \ native \ grpc . dependencies \ grpc . dependencies . openssl . targets ' ) " / > <nl> + < Import Project = " $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . openssl . 1 . 0 . 204 . 1 \ build \ native \ grpc . dependencies . openssl . targets " Condition = " Exists ( ' $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . openssl . 1 . 0 . 204 . 1 \ build \ native \ grpc . dependencies \ grpc . dependencies . openssl . targets ' ) " / > <nl> + < / ImportGroup > <nl> + < Target Name = " EnsureNuGetPackageBuildImports " BeforeTargets = " PrepareForBuild " > <nl> + < PropertyGroup > <nl> + < ErrorText > This project references NuGet package ( s ) that are missing on this computer . Enable NuGet Package Restore to download them . For more information , see http : / / go . microsoft . com / fwlink / ? LinkID = 322105 . The missing file is { 0 } . < / ErrorText > <nl> + < / PropertyGroup > <nl> + < Error Condition = " ! Exists ( ' $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . zlib . redist . 1 . 2 . 8 . 10 \ build \ native \ grpc . dependencies . zlib . redist . targets ' ) " Text = " $ ( [ System . String ] : : Format ( ' $ ( ErrorText ) ' , ' $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . zlib . redist . 1 . 2 . 8 . 10 \ build \ native \ grpc . dependencies . zlib . redist . targets ' ) " / > <nl> + < Error Condition = " ! Exists ( ' $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . zlib . 1 . 2 . 8 . 10 \ build \ native \ grpc . dependencies . zlib . targets ' ) " Text = " $ ( [ System . String ] : : Format ( ' $ ( ErrorText ) ' , ' $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . zlib . 1 . 2 . 8 . 10 \ build \ native \ grpc . dependencies . zlib . targets ' ) " / > <nl> + < Error Condition = " ! Exists ( ' $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . openssl . redist . 1 . 0 . 204 . 1 \ build \ native \ grpc . dependencies . openssl . redist . targets ' ) " Text = " $ ( [ System . String ] : : Format ( ' $ ( ErrorText ) ' , ' $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . openssl . redist . 1 . 0 . 204 . 1 \ build \ native \ grpc . dependencies . openssl . redist . targets ' ) " / > <nl> + < Error Condition = " ! Exists ( ' $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . openssl . 1 . 0 . 204 . 1 \ build \ native \ grpc . dependencies . openssl . props ' ) " Text = " $ ( [ System . String ] : : Format ( ' $ ( ErrorText ) ' , ' $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . openssl . 1 . 0 . 204 . 1 \ build \ native \ grpc . dependencies . openssl . props ' ) " / > <nl> + < Error Condition = " ! Exists ( ' $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . openssl . 1 . 0 . 204 . 1 \ build \ native \ grpc . dependencies . openssl . targets ' ) " Text = " $ ( [ System . String ] : : Format ( ' $ ( ErrorText ) ' , ' $ ( SolutionDir ) \ . . \ vsprojects \ packages \ grpc . dependencies . openssl . 1 . 0 . 204 . 1 \ build \ native \ grpc . dependencies . openssl . targets ' ) " / > <nl> + < / Target > <nl> + < / Project > <nl> + <nl> new file mode 100644 <nl> index 00000000000 . . 241a2e381c9 <nl> mmm / dev / null <nl> ppp b / vsprojects / vcxproj / test / connection_refused_test / connection_refused_test . vcxproj . filters <nl> <nl> + < ? xml version = " 1 . 0 " encoding = " utf - 8 " ? > <nl> + < Project ToolsVersion = " 4 . 0 " xmlns = " http : / / schemas . microsoft . com / developer / msbuild / 2003 " > <nl> + < ItemGroup > <nl> + < ClCompile Include = " $ ( SolutionDir ) \ . . \ test \ core \ end2end \ connection_refused_test . c " > <nl> + < Filter > test \ core \ end2end < / Filter > <nl> + < / ClCompile > <nl> + < / ItemGroup > <nl> + <nl> + < ItemGroup > <nl> + < Filter Include = " test " > <nl> + < UniqueIdentifier > { 4b0c4345 - e702 - 8911 - ab5a - c8fb187ff62a } < / UniqueIdentifier > <nl> + < / Filter > <nl> + < Filter Include = " test \ core " > <nl> + < UniqueIdentifier > { bf069703 - 6525 - 081f - b965 - b73017288d02 } < / UniqueIdentifier > <nl> + < / Filter > <nl> + < Filter Include = " test \ core \ end2end " > <nl> + < UniqueIdentifier > { 4700e535 - ec1c - 027a - 7d48 - afa5ba66e3d3 } < / UniqueIdentifier > <nl> + < / Filter > <nl> + < / ItemGroup > <nl> + < / Project > <nl> + <nl>
Merge remote - tracking branch ' upstream / master ' into fail_fast
grpc/grpc
4bcdd73df6162ccadc9d54d3df6956bd378475f0
2016-10-06T14:56:05Z
mmm a / stdlib / CMakeLists . txt <nl> ppp b / stdlib / CMakeLists . txt <nl> option ( SWIFT_STDLIB_OS_VERSIONING <nl> " Build stdlib with availability based on OS versions ( Darwin only ) . " <nl> TRUE ) <nl> <nl> - option ( SWIFT_COMPILE_DIFFERENTIATION_WITHOUT_TGMATH <nl> - " Build Differentation without tgmath ( and dependency on platform runtime libraries ) " <nl> - FALSE ) <nl> - <nl> # <nl> # End of user - configurable options . <nl> # <nl> mmm a / stdlib / public / CMakeLists . txt <nl> ppp b / stdlib / public / CMakeLists . txt <nl> if ( SWIFT_BUILD_STDLIB ) <nl> add_subdirectory ( SwiftOnoneSupport ) <nl> <nl> if ( SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING ) <nl> - if ( SWIFT_COMPILE_DIFFERENTIATION_WITHOUT_TGMATH ) <nl> - # Use a different CMakeLists . txt for this configuration <nl> - # while sharing the bulk of the code <nl> - # This way we will reduce any side effect on the main configuration <nl> - # and increase the readability of the CMake code <nl> - add_subdirectory ( Differentiation_NoTgMath ) <nl> - else ( ) <nl> - add_subdirectory ( Differentiation ) <nl> - endif ( ) <nl> + add_subdirectory ( Differentiation ) <nl> endif ( ) <nl> <nl> if ( SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY ) <nl> deleted file mode 100644 <nl> index b27e8a207be9 . . 000000000000 <nl> mmm a / stdlib / public / Differentiation_NoTgMath / CMakeLists . txt <nl> ppp / dev / null <nl> <nl> - set ( SOURCES_FOLDER . . / Differentiation ) <nl> - <nl> - add_swift_target_library ( swift_Differentiation $ { SWIFT_STDLIB_LIBRARY_BUILD_TYPES } IS_STDLIB <nl> - $ { SOURCES_FOLDER } / Differentiable . swift <nl> - $ { SOURCES_FOLDER } / DifferentialOperators . swift <nl> - $ { SOURCES_FOLDER } / DifferentiationUtilities . swift <nl> - $ { SOURCES_FOLDER } / AnyDifferentiable . swift <nl> - $ { SOURCES_FOLDER } / ArrayDifferentiation . swift <nl> - $ { SOURCES_FOLDER } / OptionalDifferentiation . swift <nl> - <nl> - GYB_SOURCES <nl> - $ { SOURCES_FOLDER } / FloatingPointDifferentiation . swift . gyb <nl> - $ { SOURCES_FOLDER } / SIMDDifferentiation . swift . gyb <nl> - <nl> - SWIFT_COMPILE_FLAGS <nl> - $ { SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS } <nl> - - parse - stdlib <nl> - LINK_FLAGS " $ { SWIFT_RUNTIME_SWIFT_LINK_FLAGS } " <nl> - DARWIN_INSTALL_NAME_DIR " @ rpath " <nl> - INSTALL_IN_COMPONENT stdlib ) <nl>
[ Build ] Remove Differentiation without tgmath ( )
apple/swift
303d88ce84d4f5a459880c515326bf3fc615a52d
2020-10-23T19:56:23Z
mmm a / tensorflow / core / common_runtime / replicate_per_replica_nodes . cc <nl> ppp b / tensorflow / core / common_runtime / replicate_per_replica_nodes . cc <nl> class ReplicateHelper { <nl> return Status : : OK ( ) ; <nl> } <nl> <nl> + void RemoveDeadReplicatedArgs ( Graph * graph ) { <nl> + for ( const auto & entry : replicated_nodes_map_ ) { <nl> + for ( Node * replicated_node : entry . second ) { <nl> + if ( replicated_node - > IsArg ( ) & & replicated_node - > out_edges ( ) . empty ( ) ) { <nl> + graph - > RemoveNode ( replicated_node ) ; <nl> + } <nl> + } <nl> + } <nl> + } <nl> + <nl> private : <nl> / / Map from original nodes to corresponding replicated nodes . <nl> absl : : flat_hash_map < const Node * , std : : vector < Node * > > replicated_nodes_map_ ; <nl> Status ReplicatePerReplicaNodesInFunctionGraph ( <nl> for ( auto * n : cluster_nodes ) { <nl> graph - > RemoveNode ( n ) ; <nl> } <nl> + <nl> + helper . RemoveDeadReplicatedArgs ( graph ) ; <nl> } <nl> return Status : : OK ( ) ; <nl> } <nl> mmm a / tensorflow / core / common_runtime / replicate_per_replica_nodes_test . cc <nl> ppp b / tensorflow / core / common_runtime / replicate_per_replica_nodes_test . cc <nl> namespace { <nl> <nl> class GraphHelper { <nl> public : <nl> - explicit GraphHelper ( const Graph & graph ) { <nl> + explicit GraphHelper ( const Graph & graph ) : graph_ ( graph ) { <nl> for ( Node * node : graph . nodes ( ) ) { <nl> nodes_by_name_ [ node - > name ( ) ] = node ; <nl> } <nl> class GraphHelper { <nl> - > set_assigned_device_name ( device_name ) ; <nl> } <nl> <nl> + void CheckArgNum ( const int expected_num ) { <nl> + int arg_num = 0 ; <nl> + for ( Node * node : graph_ . op_nodes ( ) ) { <nl> + if ( node - > IsArg ( ) ) { <nl> + arg_num + + ; <nl> + } <nl> + } <nl> + EXPECT_EQ ( arg_num , expected_num ) ; <nl> + } <nl> + <nl> void CheckAssignedDevice ( const string & node_name , <nl> const string & expected_device_name ) { <nl> EXPECT_EQ ( expected_device_name , <nl> class GraphHelper { <nl> } <nl> <nl> private : <nl> + const Graph & graph_ ; <nl> / / Maps from a node name to a Node * in the graph . <nl> absl : : flat_hash_map < string , Node * > nodes_by_name_ ; <nl> } ; <nl> TEST ( ReplicatePerReplicaNodesTest , SingleCompositeDevice ) { <nl> / / ReadVariableOp ( TPU : 0 ) - > _Retval ( CPU : 0 ) <nl> EXPECT_EQ ( graph . num_op_nodes ( ) , 7 ) ; <nl> GraphHelper helper ( graph ) ; <nl> + helper . CheckArgNum ( 2 ) ; <nl> helper . CheckAssignedDevice ( " arg / R0 " , " TPU : 0 " ) ; <nl> helper . CheckAssignedDevice ( " arg / R1 " , " TPU : 1 " ) ; <nl> helper . CheckAssignedDevice ( " read " , " TPU : 0 " ) ; <nl> TEST ( ReplicatePerReplicaNodesTest , SingleCompositeDeviceToSingleDevice ) { <nl> / / _Arg ( TPU : 0 ) - > ReadVariableOp ( TPU : 0 ) - > _Retval ( CPU : 0 ) <nl> EXPECT_EQ ( graph . num_op_nodes ( ) , 3 ) ; <nl> GraphHelper helper ( graph ) ; <nl> + helper . CheckArgNum ( 1 ) ; <nl> helper . CheckAssignedDevice ( " arg " , " TPU : 0 " ) ; <nl> helper . CheckAssignedDevice ( " read " , " TPU : 0 " ) ; <nl> helper . CheckAssignedDevice ( " ret " , " CPU : 0 " ) ; <nl> TEST ( ReplicatePerReplicaNodesTest , MultipleCompositeDevices ) { <nl> / / TPU : 3 ) - > Identity ( TPU : 1 , TPU : 3 ) - > Add ( TPU : 0 ) - > _Retval ( CPU : 0 ) <nl> EXPECT_EQ ( graph . num_op_nodes ( ) , 12 ) ; <nl> GraphHelper helper ( graph ) ; <nl> + helper . CheckArgNum ( 4 ) ; <nl> helper . CheckAssignedDevice ( " arg0 / R0 " , " TPU : 0 " ) ; <nl> helper . CheckAssignedDevice ( " arg0 / R1 " , " TPU : 1 " ) ; <nl> helper . CheckAssignedDevice ( " arg1 / R0 " , " TPU : 2 " ) ; <nl> TEST ( ReplicatePerReplicaNodesTest , NestedFunctions ) { <nl> / / _Arg ( TPU : 0 ) , _Arg ( TPU : 1 ) - > Pack ( CPU : 0 ) - > Func ( CPU : 0 ) - > _Retval ( CPU : 0 ) <nl> EXPECT_EQ ( graph . num_op_nodes ( ) , 5 ) ; <nl> GraphHelper helper ( graph ) ; <nl> + helper . CheckArgNum ( 2 ) ; <nl> helper . CheckAssignedDevice ( " arg / R0 " , " TPU : 0 " ) ; <nl> helper . CheckAssignedDevice ( " arg / R1 " , " TPU : 1 " ) ; <nl> helper . CheckAssignedDevice ( " arg / Packed " , " CPU : 0 " ) ; <nl> TEST ( ReplicatePerReplicaNodesTest , NestedFunctions ) { <nl> } <nl> } <nl> <nl> + TEST ( ReplicatePerReplicaNodesTest , DeadArgNodes ) { <nl> + tensorflow : : Scope scope = tensorflow : : Scope : : NewRootScope ( ) ; <nl> + Output arg = ops : : _Arg ( scope . WithOpName ( " arg " ) , DT_RESOURCE , 0 ) ; <nl> + auto read = ops : : ReadVariableOp ( scope . WithOpName ( " read " ) , arg , DT_INT32 ) ; <nl> + auto ret = ops : : _Retval ( scope . WithOpName ( " ret " ) , read , 0 ) ; <nl> + <nl> + const std : : vector < string > underlying_devices = { " TPU : 0 " , " TPU : 1 " } ; <nl> + const absl : : flat_hash_map < string , const std : : vector < string > * > <nl> + composite_devices = { { " TPU_COMPOSITE : 0 " , & underlying_devices } } ; <nl> + <nl> + Graph graph ( OpRegistry : : Global ( ) ) ; <nl> + TF_ASSERT_OK ( scope . ToGraph ( & graph ) ) ; <nl> + { <nl> + / / _Arg ( TPU_COMPOSITE : 0 ) - > ReadVariableOp ( TPU : 0 ) - > _Retval ( CPU : 0 ) <nl> + ASSERT_EQ ( graph . num_op_nodes ( ) , 3 ) ; <nl> + GraphHelper helper ( graph ) ; <nl> + helper . SetAssignedDevice ( " arg " , " TPU_COMPOSITE : 0 " ) ; <nl> + helper . SetAssignedDevice ( " read " , " TPU : 0 " ) ; <nl> + helper . SetAssignedDevice ( " ret " , " CPU : 0 " ) ; <nl> + } <nl> + <nl> + TF_EXPECT_OK ( <nl> + ReplicatePerReplicaNodesInFunctionGraph ( composite_devices , & graph ) ) ; <nl> + <nl> + { <nl> + / / _Arg ( TPU : 0 ) - > ReadVariableOp ( TPU : 0 ) - > _Retval ( CPU : 0 ) <nl> + / / " arg / R1 " is a dead node , so gets removed . <nl> + EXPECT_EQ ( graph . num_op_nodes ( ) , 3 ) ; <nl> + GraphHelper helper ( graph ) ; <nl> + helper . CheckArgNum ( 1 ) ; <nl> + helper . CheckAssignedDevice ( " arg / R0 " , " TPU : 0 " ) ; <nl> + helper . CheckAssignedDevice ( " read " , " TPU : 0 " ) ; <nl> + helper . CheckAssignedDevice ( " ret " , " CPU : 0 " ) ; <nl> + } <nl> + } <nl> + <nl> } / / namespace <nl> } / / namespace tensorflow <nl>
Remove dead replicated Arg nodes .
tensorflow/tensorflow
c164998f777f34ab01ac2f074a585e2c97be844f
2020-08-16T23:02:28Z
mmm a / subtree / rabit / include / dmlc / io . h <nl> ppp b / subtree / rabit / include / dmlc / io . h <nl> class ostream : public std : : basic_ostream < char > { <nl> * / <nl> explicit ostream ( Stream * stream , <nl> size_t buffer_size = 1 < < 10 ) <nl> - : basic_ostream < char > ( NULL ) , buf_ ( buffer_size ) { <nl> + : std : : basic_ostream < char > ( NULL ) , buf_ ( buffer_size ) { <nl> this - > set_stream ( stream ) ; <nl> } <nl> / / explictly synchronize the buffer <nl> class istream : public std : : basic_istream < char > { <nl> * / <nl> explicit istream ( Stream * stream , <nl> size_t buffer_size = 1 < < 10 ) <nl> - : basic_istream < char > ( NULL ) , buf_ ( buffer_size ) { <nl> + : std : : basic_istream < char > ( NULL ) , buf_ ( buffer_size ) { <nl> this - > set_stream ( stream ) ; <nl> } <nl> virtual ~ istream ( ) { } <nl>
Merge commit ' 2b7c35870f7bf0ca7e28f53b322829007c91317e '
dmlc/xgboost
6370b38c14585985460fbff54659897346b6f3e9
2015-04-13T20:44:41Z
mmm a / tensorflow / opensource_only . files <nl> ppp b / tensorflow / opensource_only . files <nl> tensorflow / compat_template . __init__ . py <nl> tensorflow / compat_template_v1 . __init__ . py <nl> tensorflow / contrib / mpi / BUILD <nl> tensorflow / python / autograph / core / config . py <nl> + tensorflow / python / distribute / cluster_resolver / tpu_cluster_resolver . py <nl> + tensorflow / python / distribute / cluster_resolver / tpu_cluster_resolver_test . py <nl> tensorflow / python / tpu / profiler / pip_package / BUILD <nl> tensorflow / python / tpu / profiler / pip_package / README <nl> tensorflow / python / tpu / profiler / pip_package / build_pip_package . sh <nl> mmm a / tensorflow / python / distribute / cluster_resolver / tpu_cluster_resolver . py <nl> ppp b / tensorflow / python / distribute / cluster_resolver / tpu_cluster_resolver . py <nl> def __init__ ( self , <nl> self . task_type = job_name <nl> self . task_id = 0 <nl> <nl> + # TODO ( bfontain ) : Remove Google specific code from this class . <nl> if self . _is_google_environment ( ) : <nl> self . _environment = ' google ' <nl> self . rpc_layer = None <nl>
Clean up TPUClusterResolver
tensorflow/tensorflow
0006dc90b6a53ecd77e0dff61ec8070923302b4f
2019-08-27T17:32:49Z
mmm a / scene / audio / sample_player . cpp <nl> ppp b / scene / audio / sample_player . cpp <nl> bool SamplePlayer : : _get ( const StringName & p_name , Variant & r_ret ) const { <nl> r_ret = get_sample_library ( ) ; <nl> } else if ( name . begins_with ( " default / " ) ) { <nl> <nl> - String what = name . get_slicec ( ' / ' , 1 ) ; <nl> + String what = name . right ( 8 ) ; <nl> <nl> if ( what = = " volume_db " ) <nl> r_ret = get_default_volume_db ( ) ; <nl> void SamplePlayer : : _get_property_list ( List < PropertyInfo > * p_list ) const { <nl> p_list - > push_back ( PropertyInfo ( Variant : : REAL , " default / filter / cutoff " , PROPERTY_HINT_RANGE , " 20 , 16384 . 0 , 0 . 01 " ) ) ; <nl> p_list - > push_back ( PropertyInfo ( Variant : : REAL , " default / filter / resonance " , PROPERTY_HINT_RANGE , " 0 , 4 , 0 . 01 " ) ) ; <nl> p_list - > push_back ( PropertyInfo ( Variant : : REAL , " default / filter / gain " , PROPERTY_HINT_RANGE , " 0 , 2 , 0 . 01 " ) ) ; <nl> - p_list - > push_back ( PropertyInfo ( Variant : : INT , " default / reverb_room " , PROPERTY_HINT_ENUM , " Small , Medimum , Large , Hall " ) ) ; <nl> + p_list - > push_back ( PropertyInfo ( Variant : : INT , " default / reverb_room " , PROPERTY_HINT_ENUM , " Small , Medium , Large , Hall " ) ) ; <nl> p_list - > push_back ( PropertyInfo ( Variant : : REAL , " default / reverb_send " , PROPERTY_HINT_RANGE , " 0 , 1 , 0 . 01 " ) ) ; <nl> p_list - > push_back ( PropertyInfo ( Variant : : REAL , " default / chorus_send " , PROPERTY_HINT_RANGE , " 0 , 1 , 0 . 01 " ) ) ; <nl> <nl>
Fix default / filter / * parsing in _get
godotengine/godot
3d7740ba1769debcd4e231a73657d002e9eb5f5e
2015-09-26T19:06:12Z
mmm a / modules / perception / obstacle / fusion / probabilistic_fusion / probabilistic_fusion_test . cc <nl> ppp b / modules / perception / obstacle / fusion / probabilistic_fusion / probabilistic_fusion_test . cc <nl> namespace perception { <nl> TEST ( ProbabilisticFusionTest , probabilistic_fusion_test ) { <nl> FLAGS_work_root = " modules / perception " ; <nl> FLAGS_config_manager_path = " . / conf / config_manager . config " ; <nl> - AERROR < < " start probabilistic_fusion_test \ n " ; <nl> + AINFO < < " start probabilistic_fusion_test \ n " ; <nl> ProbabilisticFusion * probabilistic_fusion = new ProbabilisticFusion ( ) ; <nl> EXPECT_TRUE ( probabilistic_fusion - > Init ( ) ) ; <nl> - AERROR < < " After fusion init " ; <nl> + AINFO < < " After fusion init " ; <nl> std : : vector < SensorObjects > sensor_objects ; <nl> std : : vector < ObjectPtr > fused_objects ; <nl> sensor_objects . resize ( 1 ) ; <nl> TEST ( ProbabilisticFusionTest , probabilistic_fusion_test ) { <nl> ObjectPtr radar_obj ( new Object ( ) ) ; <nl> obj - > clone ( * moc_obj ) ; <nl> for ( int i = 0 ; i < 10 ; i + + ) { <nl> - AERROR < < " test " < < i ; <nl> position = position + velocity * 0 . 05 ; <nl> timestamp + = 0 . 05 ; <nl> radar_obj - > center = position ; <nl>
perception : remove test debug log .
ApolloAuto/apollo
4ff3b65dac8cc9f3a9e06262ce18c0b7e4306b39
2017-12-03T18:59:32Z
mmm a / flow / rte_memcpy . h <nl> ppp b / flow / rte_memcpy . h <nl> <nl> - / * SPDX - License - Identifier : BSD - 3 - Clause <nl> - * Copyright ( c ) 2010 - 2014 Intel Corporation <nl> + / * <nl> + SPDX - License - Identifier : BSD - 3 - Clause <nl> + Copyright ( c ) 2010 - 2014 Intel Corporation <nl> + <nl> + Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : <nl> + <nl> + 1 . Redistributions of source code must retain the above copyright notice , this list of conditions and the following disclaimer . <nl> + <nl> + 2 . Redistributions in binary form must reproduce the above copyright notice , this list of conditions and the following disclaimer in the documentation and / or other materials provided with the distribution . <nl> + <nl> + 3 . Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission . <nl> + <nl> + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . <nl> * / <nl> <nl> # ifndef _RTE_MEMCPY_X86_64_H_ <nl>
copy relevant DPDK license into rte_memcpy . h header
apple/foundationdb
89e6c2f57a12e54a7c7fcb0114dcabe33dadcff1
2020-06-02T21:51:21Z
mmm a / src / core / file_sys / card_image . cpp <nl> ppp b / src / core / file_sys / card_image . cpp <nl> VirtualDir XCI : : GetParentDirectory ( ) const { <nl> return file - > GetContainingDirectory ( ) ; <nl> } <nl> <nl> - bool XCI : : ReplaceFileWithSubdirectory ( VirtualFile file , VirtualDir dir ) { <nl> - return false ; <nl> - } <nl> - <nl> Loader : : ResultStatus XCI : : AddNCAFromPartition ( XCIPartition part ) { <nl> if ( partitions [ static_cast < std : : size_t > ( part ) ] = = nullptr ) { <nl> return Loader : : ResultStatus : : ErrorXCIMissingPartition ; <nl> mmm a / src / core / file_sys / card_image . h <nl> ppp b / src / core / file_sys / card_image . h <nl> class XCI : public ReadOnlyVfsDirectory { <nl> <nl> VirtualDir GetParentDirectory ( ) const override ; <nl> <nl> - protected : <nl> - bool ReplaceFileWithSubdirectory ( VirtualFile file , VirtualDir dir ) override ; <nl> - <nl> private : <nl> Loader : : ResultStatus AddNCAFromPartition ( XCIPartition part ) ; <nl> <nl> mmm a / src / core / file_sys / content_archive . cpp <nl> ppp b / src / core / file_sys / content_archive . cpp <nl> u64 NCA : : GetBaseIVFCOffset ( ) const { <nl> return ivfc_offset ; <nl> } <nl> <nl> - bool NCA : : ReplaceFileWithSubdirectory ( VirtualFile file , VirtualDir dir ) { <nl> - return false ; <nl> - } <nl> } / / namespace FileSys <nl> mmm a / src / core / file_sys / content_archive . h <nl> ppp b / src / core / file_sys / content_archive . h <nl> class NCA : public ReadOnlyVfsDirectory { <nl> / / Returns the base ivfc offset used in BKTR patching . <nl> u64 GetBaseIVFCOffset ( ) const ; <nl> <nl> - protected : <nl> - bool ReplaceFileWithSubdirectory ( VirtualFile file , VirtualDir dir ) override ; <nl> - <nl> private : <nl> bool CheckSupportedNCA ( const NCAHeader & header ) ; <nl> bool HandlePotentialHeaderDecryption ( ) ; <nl> mmm a / src / core / file_sys / partition_filesystem . cpp <nl> ppp b / src / core / file_sys / partition_filesystem . cpp <nl> std : : vector < std : : shared_ptr < VfsFile > > PartitionFilesystem : : GetFiles ( ) const { <nl> } <nl> <nl> std : : vector < std : : shared_ptr < VfsDirectory > > PartitionFilesystem : : GetSubdirectories ( ) const { <nl> - return pfs_dirs ; <nl> + return { } ; <nl> } <nl> <nl> std : : string PartitionFilesystem : : GetName ( ) const { <nl> void PartitionFilesystem : : PrintDebugInfo ( ) const { <nl> pfs_files [ i ] - > GetName ( ) , pfs_files [ i ] - > GetSize ( ) ) ; <nl> } <nl> } <nl> - <nl> - bool PartitionFilesystem : : ReplaceFileWithSubdirectory ( VirtualFile file , VirtualDir dir ) { <nl> - const auto iter = std : : find ( pfs_files . begin ( ) , pfs_files . end ( ) , file ) ; <nl> - if ( iter = = pfs_files . end ( ) ) <nl> - return false ; <nl> - <nl> - const std : : ptrdiff_t offset = std : : distance ( pfs_files . begin ( ) , iter ) ; <nl> - pfs_files [ offset ] = std : : move ( pfs_files . back ( ) ) ; <nl> - pfs_files . pop_back ( ) ; <nl> - <nl> - pfs_dirs . emplace_back ( std : : move ( dir ) ) ; <nl> - <nl> - return true ; <nl> - } <nl> } / / namespace FileSys <nl> mmm a / src / core / file_sys / partition_filesystem . h <nl> ppp b / src / core / file_sys / partition_filesystem . h <nl> class PartitionFilesystem : public ReadOnlyVfsDirectory { <nl> std : : shared_ptr < VfsDirectory > GetParentDirectory ( ) const override ; <nl> void PrintDebugInfo ( ) const ; <nl> <nl> - protected : <nl> - bool ReplaceFileWithSubdirectory ( VirtualFile file , VirtualDir dir ) override ; <nl> - <nl> private : <nl> struct Header { <nl> u32_le magic ; <nl> class PartitionFilesystem : public ReadOnlyVfsDirectory { <nl> std : : size_t content_offset = 0 ; <nl> <nl> std : : vector < VirtualFile > pfs_files ; <nl> - std : : vector < VirtualDir > pfs_dirs ; <nl> } ; <nl> <nl> } / / namespace FileSys <nl> mmm a / src / core / file_sys / submission_package . cpp <nl> ppp b / src / core / file_sys / submission_package . cpp <nl> VirtualDir NSP : : GetParentDirectory ( ) const { <nl> return file - > GetContainingDirectory ( ) ; <nl> } <nl> <nl> - bool NSP : : ReplaceFileWithSubdirectory ( VirtualFile file , VirtualDir dir ) { <nl> - return false ; <nl> - } <nl> - <nl> void NSP : : InitializeExeFSAndRomFS ( const std : : vector < VirtualFile > & files ) { <nl> exefs = pfs ; <nl> <nl> mmm a / src / core / file_sys / submission_package . h <nl> ppp b / src / core / file_sys / submission_package . h <nl> class NSP : public ReadOnlyVfsDirectory { <nl> <nl> VirtualDir GetParentDirectory ( ) const override ; <nl> <nl> - protected : <nl> - bool ReplaceFileWithSubdirectory ( VirtualFile file , VirtualDir dir ) override ; <nl> - <nl> private : <nl> void InitializeExeFSAndRomFS ( const std : : vector < VirtualFile > & files ) ; <nl> void ReadNCAs ( const std : : vector < VirtualFile > & files ) ; <nl> mmm a / src / core / file_sys / vfs . h <nl> ppp b / src / core / file_sys / vfs . h <nl> class VfsDirectory : NonCopyable { <nl> / / item name - > type . <nl> virtual std : : map < std : : string , VfsEntryType , std : : less < > > GetEntries ( ) const ; <nl> <nl> - / / Interprets the file with name file instead as a directory of type directory . <nl> - / / The directory must have a constructor that takes a single argument of type <nl> - / / std : : shared_ptr < VfsFile > . Allows to reinterpret container files ( i . e NCA , zip , XCI , etc ) as a <nl> - / / subdirectory in one call . <nl> - template < typename Directory > <nl> - bool InterpretAsDirectory ( std : : string_view file ) { <nl> - auto file_p = GetFile ( file ) ; <nl> - <nl> - if ( file_p = = nullptr ) { <nl> - return false ; <nl> - } <nl> - <nl> - return ReplaceFileWithSubdirectory ( file_p , std : : make_shared < Directory > ( file_p ) ) ; <nl> - } <nl> - <nl> - bool InterpretAsDirectory ( const std : : function < VirtualDir ( VirtualFile ) > & function , <nl> - const std : : string & file ) { <nl> - auto file_p = GetFile ( file ) ; <nl> - if ( file_p = = nullptr ) <nl> - return false ; <nl> - return ReplaceFileWithSubdirectory ( file_p , function ( file_p ) ) ; <nl> - } <nl> - <nl> / / Returns the full path of this directory as a string , recursively <nl> virtual std : : string GetFullPath ( ) const ; <nl> - <nl> - protected : <nl> - / / Backend for InterpretAsDirectory . <nl> - / / Removes all references to file and adds a reference to dir in the directory ' s implementation . <nl> - virtual bool ReplaceFileWithSubdirectory ( VirtualFile file , VirtualDir dir ) = 0 ; <nl> } ; <nl> <nl> / / A convenience partial - implementation of VfsDirectory that stubs out methods that should only work <nl> mmm a / src / core / file_sys / vfs_layered . cpp <nl> ppp b / src / core / file_sys / vfs_layered . cpp <nl> bool LayeredVfsDirectory : : Rename ( std : : string_view name_ ) { <nl> return true ; <nl> } <nl> <nl> - bool LayeredVfsDirectory : : ReplaceFileWithSubdirectory ( VirtualFile file , VirtualDir dir ) { <nl> - return false ; <nl> - } <nl> } / / namespace FileSys <nl> mmm a / src / core / file_sys / vfs_layered . h <nl> ppp b / src / core / file_sys / vfs_layered . h <nl> class LayeredVfsDirectory : public VfsDirectory { <nl> bool DeleteFile ( std : : string_view name ) override ; <nl> bool Rename ( std : : string_view name ) override ; <nl> <nl> - protected : <nl> - bool ReplaceFileWithSubdirectory ( VirtualFile file , VirtualDir dir ) override ; <nl> - <nl> private : <nl> std : : vector < VirtualDir > dirs ; <nl> std : : string name ; <nl> mmm a / src / core / file_sys / vfs_real . cpp <nl> ppp b / src / core / file_sys / vfs_real . cpp <nl> std : : map < std : : string , VfsEntryType , std : : less < > > RealVfsDirectory : : GetEntries ( ) <nl> return out ; <nl> } <nl> <nl> - bool RealVfsDirectory : : ReplaceFileWithSubdirectory ( VirtualFile file , VirtualDir dir ) { <nl> - return false ; <nl> - } <nl> } / / namespace FileSys <nl> mmm a / src / core / file_sys / vfs_real . h <nl> ppp b / src / core / file_sys / vfs_real . h <nl> class RealVfsDirectory : public VfsDirectory { <nl> std : : string GetFullPath ( ) const override ; <nl> std : : map < std : : string , VfsEntryType , std : : less < > > GetEntries ( ) const override ; <nl> <nl> - protected : <nl> - bool ReplaceFileWithSubdirectory ( VirtualFile file , VirtualDir dir ) override ; <nl> - <nl> private : <nl> RealVfsDirectory ( RealVfsFilesystem & base , const std : : string & path , Mode perms = Mode : : Read ) ; <nl> <nl> mmm a / src / core / file_sys / vfs_vector . cpp <nl> ppp b / src / core / file_sys / vfs_vector . cpp <nl> void VectorVfsDirectory : : AddFile ( VirtualFile file ) { <nl> void VectorVfsDirectory : : AddDirectory ( VirtualDir dir ) { <nl> dirs . push_back ( std : : move ( dir ) ) ; <nl> } <nl> - <nl> - bool VectorVfsDirectory : : ReplaceFileWithSubdirectory ( VirtualFile file , VirtualDir dir ) { <nl> - if ( ! DeleteFile ( file - > GetName ( ) ) ) <nl> - return false ; <nl> - dirs . emplace_back ( std : : move ( dir ) ) ; <nl> - return true ; <nl> - } <nl> } / / namespace FileSys <nl> mmm a / src / core / file_sys / vfs_vector . h <nl> ppp b / src / core / file_sys / vfs_vector . h <nl> class VectorVfsDirectory : public VfsDirectory { <nl> virtual void AddFile ( VirtualFile file ) ; <nl> virtual void AddDirectory ( VirtualDir dir ) ; <nl> <nl> - protected : <nl> - bool ReplaceFileWithSubdirectory ( VirtualFile file , VirtualDir dir ) override ; <nl> - <nl> private : <nl> std : : vector < VirtualFile > files ; <nl> std : : vector < VirtualDir > dirs ; <nl> mmm a / src / core / file_sys / xts_archive . cpp <nl> ppp b / src / core / file_sys / xts_archive . cpp <nl> std : : shared_ptr < VfsDirectory > NAX : : GetParentDirectory ( ) const { <nl> return file - > GetContainingDirectory ( ) ; <nl> } <nl> <nl> - bool NAX : : ReplaceFileWithSubdirectory ( VirtualFile file , VirtualDir dir ) { <nl> - return false ; <nl> - } <nl> } / / namespace FileSys <nl> mmm a / src / core / file_sys / xts_archive . h <nl> ppp b / src / core / file_sys / xts_archive . h <nl> class NAX : public ReadOnlyVfsDirectory { <nl> <nl> std : : shared_ptr < VfsDirectory > GetParentDirectory ( ) const override ; <nl> <nl> - protected : <nl> - bool ReplaceFileWithSubdirectory ( VirtualFile file , VirtualDir dir ) override ; <nl> - <nl> private : <nl> Loader : : ResultStatus Parse ( std : : string_view path ) ; <nl> <nl>
Merge pull request from DarkLordZach / remove - promote - dir
yuzu-emu/yuzu
72e6b31a070bcefc9d03bf75d14bd0808ea403f5
2018-10-26T04:15:34Z
mmm a / examples / cpp_classification / classification . cpp <nl> ppp b / examples / cpp_classification / classification . cpp <nl> void Classifier : : Preprocess ( const cv : : Mat & img , <nl> / * Convert the input image to the input image format of the network . * / <nl> cv : : Mat sample ; <nl> if ( img . channels ( ) = = 3 & & num_channels_ = = 1 ) <nl> - cv : : cvtColor ( img , sample , CV_BGR2GRAY ) ; <nl> + cv : : cvtColor ( img , sample , cv : : COLOR_BGR2GRAY ) ; <nl> else if ( img . channels ( ) = = 4 & & num_channels_ = = 1 ) <nl> - cv : : cvtColor ( img , sample , CV_BGRA2GRAY ) ; <nl> + cv : : cvtColor ( img , sample , cv : : COLOR_BGRA2GRAY ) ; <nl> else if ( img . channels ( ) = = 4 & & num_channels_ = = 3 ) <nl> - cv : : cvtColor ( img , sample , CV_BGRA2BGR ) ; <nl> + cv : : cvtColor ( img , sample , cv : : COLOR_BGRA2BGR ) ; <nl> else if ( img . channels ( ) = = 1 & & num_channels_ = = 3 ) <nl> - cv : : cvtColor ( img , sample , CV_GRAY2BGR ) ; <nl> + cv : : cvtColor ( img , sample , cv : : COLOR_GRAY2BGR ) ; <nl> else <nl> sample = img ; <nl> <nl>
Merge pull request from AdamStelmaszczyk / patch - 1
BVLC/caffe
c9086ca0e5b472773ebfe030858f56806337865b
2015-11-27T19:25:52Z
mmm a / include / osquery / hash . h <nl> ppp b / include / osquery / hash . h <nl> <nl> * All rights reserved . <nl> * <nl> * This source code is licensed under the BSD - style license found in the <nl> - * LICENSE file in the root directory of this source tree . An additional grant <nl> + * LICENSE file in the root directory of this source tree . An additional grant <nl> * of patent rights can be found in the PATENTS file in the same directory . <nl> * <nl> * / <nl> <nl> <nl> namespace osquery { <nl> <nl> - / / osquery - supported hash function types . <nl> + / * * <nl> + * @ brief The supported hashing algorithms in osquery <nl> + * <nl> + * These are usually used as a constructor argument to osquery : : Hash <nl> + * / <nl> enum HashType { <nl> HASH_TYPE_MD5 = 2 , <nl> HASH_TYPE_SHA1 = 4 , <nl> HASH_TYPE_SHA256 = 8 , <nl> } ; <nl> <nl> + / * * <nl> + * @ brief Hash is a general utility class for hashing content <nl> + * <nl> + * @ code { . cpp } <nl> + * Hash my_hash ( HASH_TYPE_SHA256 ) ; <nl> + * my_hash . update ( my_buffer , my_buffer_size ) ; <nl> + * std : : cout < < my_hash . digest ( ) ; <nl> + * @ endcode <nl> + * <nl> + * / <nl> class Hash { <nl> public : <nl> - Hash ( HashType algorithm ) { <nl> - algorithm_ = algorithm ; <nl> - init ( ) ; <nl> - } <nl> + / * * <nl> + * @ brief Hash constructor <nl> + * <nl> + * The hash class should be initialized with one of osquery : : HashType as a <nl> + * constructor argument . <nl> + * <nl> + * @ param algorithm The hashing algorithm which will be used to compute the <nl> + * hash <nl> + * / <nl> + explicit Hash ( HashType algorithm ) ; <nl> <nl> + / * * <nl> + * @ brief Hash destructor <nl> + * / <nl> ~ Hash ( ) ; <nl> <nl> + / * * <nl> + * @ brief Update the internal context buffer with additional content <nl> + * <nl> + * This method allows you to chunk up large content so that it doesn ' t all <nl> + * have to be loaded into memory at the same time <nl> + * <nl> + * @ param buffer The buffer to be hashed <nl> + * @ param size The size of the buffer to be hashed <nl> + * / <nl> void update ( const void * buffer , size_t size ) ; <nl> + <nl> + / * * <nl> + * @ brief Compute the final hash and return it ' s result <nl> + * <nl> + * @ return The final hash value <nl> + * / <nl> std : : string digest ( ) ; <nl> <nl> private : <nl> - void init ( ) ; <nl> + / * * <nl> + * @ brief Private default constructor <nl> + * <nl> + * The osquery : : Hash class should only ever be instantiated with a HashType <nl> + * / <nl> + Hash ( ) { } ; <nl> + <nl> + private : <nl> + / / / The hashing algorithm which is used to compute the hash <nl> HashType algorithm_ ; <nl> + <nl> + / / / The buffer used to maintain the context and state of the hashing <nl> + / / / operations <nl> void * ctx_ ; <nl> + <nl> + / / / The length of the hash to be returned <nl> size_t length_ ; <nl> } ; <nl> <nl> mmm a / osquery / core / hash . cpp <nl> ppp b / osquery / core / hash . cpp <nl> <nl> * All rights reserved . <nl> * <nl> * This source code is licensed under the BSD - style license found in the <nl> - * LICENSE file in the root directory of this source tree . An additional grant <nl> + * LICENSE file in the root directory of this source tree . An additional grant <nl> * of patent rights can be found in the PATENTS file in the same directory . <nl> * <nl> * / <nl> <nl> namespace osquery { <nl> <nl> # ifdef __APPLE__ <nl> - # import < CommonCrypto / CommonDigest . h > <nl> - # define __HASH_API ( name ) CC_ # # name <nl> + # import < CommonCrypto / CommonDigest . h > <nl> + # define __HASH_API ( name ) CC_ # # name <nl> # else <nl> - # include < openssl / sha . h > <nl> - # include < openssl / md5 . h > <nl> - # define __HASH_API ( name ) name <nl> - / / Apple included a 1 . <nl> - # define SHA1_DIGEST_LENGTH SHA_DIGEST_LENGTH <nl> - # define SHA1_CTX SHA_CTX <nl> + # include < openssl / sha . h > <nl> + # include < openssl / md5 . h > <nl> + # define __HASH_API ( name ) name <nl> + <nl> + # define SHA1_DIGEST_LENGTH SHA_DIGEST_LENGTH <nl> + # define SHA1_CTX SHA_CTX <nl> # endif <nl> <nl> # define HASH_CHUNK_SIZE 1024 <nl> Hash : : ~ Hash ( ) { <nl> } <nl> } <nl> <nl> - void Hash : : init ( ) { <nl> + Hash : : Hash ( HashType algorithm ) : algorithm_ ( algorithm ) { <nl> if ( algorithm_ = = HASH_TYPE_MD5 ) { <nl> length_ = __HASH_API ( MD5_DIGEST_LENGTH ) ; <nl> ctx_ = ( __HASH_API ( MD5_CTX ) * ) malloc ( sizeof ( __HASH_API ( MD5_CTX ) ) ) ; <nl>
hash . h documentation
osquery/osquery
ecfe29282bd792ee8fcd5f842647b78d50da5ded
2015-01-20T23:36:53Z
mmm a / src / runtime . cc <nl> ppp b / src / runtime . cc <nl> static RegExpImpl : : IrregexpResult SearchRegExpMultiple ( <nl> if ( start > = 0 ) { <nl> int end = register_vector [ i * 2 + 1 ] ; <nl> ASSERT ( start < = end ) ; <nl> - Handle < String > substring = Factory : : NewSubString ( subject , start , end ) ; <nl> + Handle < String > substring = Factory : : NewSubString ( subject , <nl> + start , <nl> + end ) ; <nl> elements - > set ( i , * substring ) ; <nl> } else { <nl> ASSERT ( register_vector [ i * 2 + 1 ] < 0 ) ; <nl>
Make link happy .
v8/v8
c51c67d9c00322ffbc3ddb13c46aaf267493ce0c
2010-03-30T14:02:40Z
mmm a / CODE_OF_CONDUCT . md <nl> ppp b / CODE_OF_CONDUCT . md <nl> <nl> # TensorFlow Code of Conduct <nl> <nl> - In the interest of fostering an open and welcoming environment , we as contributors and maintainers pledge to making participation in our project and our community a harassment - free experience for everyone , regardless of age , body size , disability , ethnicity , gender identity and expression , level of experience , nationality , personal appearance , race , religion , or sexual identity and orientation . <nl> + In the interest of fostering an open and welcoming environment , we as contributors and maintainers pledge to make participation in our project and our community a harassment - free experience for everyone , regardless of age , body size , disability , ethnicity , gender identity and expression , level of experience , nationality , personal appearance , race , religion , or sexual identity and orientation . <nl> <nl> <nl> # # Our Standards <nl>
Update CODE_OF_CONDUCT . md
tensorflow/tensorflow
3547a0ccd29b2cc9fd00a49a275567c9e32d9ebc
2020-05-31T19:00:50Z
mmm a / tensorflow / core / grappler / costs / BUILD <nl> ppp b / tensorflow / core / grappler / costs / BUILD <nl> tf_proto_library ( <nl> srcs = [ " op_performance_data . proto " ] , <nl> cc_api_version = 2 , <nl> make_default_target_header_only = True , <nl> - protodeps = tf_additional_all_protos ( ) , <nl> + protodeps = [ <nl> + " / / tensorflow / core / framework : attr_value_proto " , <nl> + " / / tensorflow / core / framework : resource_handle_proto " , <nl> + " / / tensorflow / core / framework : tensor_proto " , <nl> + " / / tensorflow / core / framework : tensor_shape_proto " , <nl> + " / / tensorflow / core / protobuf : for_core_protos " , <nl> + ] , <nl> visibility = [ " / / visibility : public " ] , <nl> ) <nl> <nl>
fix grappler / costs : op_performance_data dependency
tensorflow/tensorflow
0b56f9ef6dab451f4f0fc8be78f0020a1df78c8c
2020-10-06T15:01:29Z
mmm a / folly / detail / FunctionalExcept . cpp <nl> ppp b / folly / detail / FunctionalExcept . cpp <nl> <nl> * limitations under the License . <nl> * / <nl> <nl> + # include < folly / Portability . h > <nl> + <nl> + / / If FOLLY_HAVE_BITS_FUNCTEXCEPT_H is set , this file compiles to <nl> + / / nothing . <nl> + <nl> + # if ! FOLLY_HAVE_BITS_FUNCTEXCEPT_H <nl> + <nl> # include < folly / detail / FunctionalExcept . h > <nl> <nl> # include < stdexcept > <nl> void __throw_bad_alloc ( ) { <nl> # endif <nl> <nl> FOLLY_NAMESPACE_STD_END <nl> + <nl> + # endif <nl> mmm a / folly / detail / FunctionalExcept . h <nl> ppp b / folly / detail / FunctionalExcept . h <nl> <nl> <nl> # include < folly / Portability . h > <nl> <nl> + # if ! FOLLY_HAVE_BITS_FUNCTEXCEPT_H <nl> + <nl> FOLLY_NAMESPACE_STD_BEGIN <nl> <nl> FOLLY_NORETURN void __throw_length_error ( const char * msg ) ; <nl> FOLLY_NORETURN void __throw_bad_alloc ( ) ; <nl> <nl> FOLLY_NAMESPACE_STD_END <nl> <nl> + # else <nl> + # error This file should never be included if FOLLY_HAVE_BITS_FUNCTEXCEPT_H is set <nl> + # endif <nl> + <nl> # endif <nl>
make folly / detail / FunctionalExcept . * work if FOLLY_HAVE_BITS_FUNCTEXCEPT_H is set or not
facebook/folly
231b7c5a6bebf2afdc25075f8a0d2158a6893dd8
2015-07-01T23:24:51Z
mmm a / templates / cocos2dx_files . json <nl> ppp b / templates / cocos2dx_files . json <nl> <nl> " cocos / navmesh / CCNavMeshUtils . h " , <nl> " cocos / navmesh / CMakeLists . txt " , <nl> " cocos / network / Android . mk " , <nl> + " cocos / network / CCDownloader - android . cpp " , <nl> + " cocos / network / CCDownloader - android . h " , <nl> + " cocos / network / CCDownloader - apple . h " , <nl> + " cocos / network / CCDownloader - apple . mm " , <nl> + " cocos / network / CCDownloader - curl . cpp " , <nl> + " cocos / network / CCDownloader - curl . h " , <nl> " cocos / network / CCDownloader . cpp " , <nl> " cocos / network / CCDownloader . h " , <nl> - " cocos / network / CCDownloaderImpl . cpp " , <nl> - " cocos / network / CCDownloaderImpl . h " , <nl> " cocos / network / CCIDownloaderImpl . h " , <nl> " cocos / network / CMakeLists . txt " , <nl> " cocos / network / HttpAsynConnection - apple . h " , <nl> <nl> " cocos / platform / android / java / src / org / cocos2dx / lib / Cocos2dxAccelerometer . java " , <nl> " cocos / platform / android / java / src / org / cocos2dx / lib / Cocos2dxActivity . java " , <nl> " cocos / platform / android / java / src / org / cocos2dx / lib / Cocos2dxBitmap . java " , <nl> + " cocos / platform / android / java / src / org / cocos2dx / lib / Cocos2dxDownloader . java " , <nl> " cocos / platform / android / java / src / org / cocos2dx / lib / Cocos2dxEditBox . java " , <nl> " cocos / platform / android / java / src / org / cocos2dx / lib / Cocos2dxEditBoxHelper . java " , <nl> " cocos / platform / android / java / src / org / cocos2dx / lib / Cocos2dxGLSurfaceView . java " , <nl>
[ AUTO ] [ ci skip ] : updating cocos2dx_files . json
cocos2d/cocos2d-x
0f3e43344b9164471545811b4a475242550fa356
2015-09-16T06:03:19Z
mmm a / src / ruby / lib / grpc / generic / rpc_server . rb <nl> ppp b / src / ruby / lib / grpc / generic / rpc_server . rb <nl> def loop_handle_server_calls <nl> an_rpc = @ server . request_call ( @ cq , loop_tag , INFINITE_FUTURE ) <nl> break if ( ! an_rpc . nil ? ) & & an_rpc . call . nil ? <nl> <nl> - c = new_active_server_call ( an_rpc ) <nl> - unless c . nil ? <nl> - mth = an_rpc . method . to_sym <nl> - @ pool . schedule ( c ) do | call | <nl> - rpc_descs [ mth ] . run_server_method ( call , rpc_handlers [ mth ] ) <nl> + active_call = new_active_server_call ( an_rpc ) <nl> + unless active_call . nil ? <nl> + @ pool . schedule ( active_call ) do | ac | <nl> + c , mth = ac <nl> + rpc_descs [ mth ] . run_server_method ( c , rpc_handlers [ mth ] ) <nl> end <nl> end <nl> rescue Core : : CallError , RuntimeError = > e <nl> def new_active_server_call ( an_rpc ) <nl> # allow the metadata to be accessed from the call <nl> handle_call_tag = Object . new <nl> an_rpc . call . metadata = an_rpc . metadata # attaches md to call for handlers <nl> + GRPC . logger . debug ( " call md is # { an_rpc . metadata } " ) <nl> connect_md = nil <nl> unless @ connect_md_proc . nil ? <nl> connect_md = @ connect_md_proc . call ( an_rpc . method , an_rpc . metadata ) <nl> def new_active_server_call ( an_rpc ) <nl> # Create the ActiveCall <nl> GRPC . logger . info ( " deadline is # { an_rpc . deadline } ; ( now = # { Time . now } ) " ) <nl> rpc_desc = rpc_descs [ an_rpc . method . to_sym ] <nl> - ActiveCall . new ( an_rpc . call , @ cq , <nl> - rpc_desc . marshal_proc , rpc_desc . unmarshal_proc ( : input ) , <nl> - an_rpc . deadline ) <nl> + c = ActiveCall . new ( an_rpc . call , @ cq , <nl> + rpc_desc . marshal_proc , rpc_desc . unmarshal_proc ( : input ) , <nl> + an_rpc . deadline ) <nl> + mth = an_rpc . method . to_sym <nl> + [ c , mth ] <nl> end <nl> <nl> protected <nl> mmm a / src / ruby / pb / test / client . rb <nl> ppp b / src / ruby / pb / test / client . rb <nl> <nl> $ LOAD_PATH . unshift ( this_dir ) unless $ LOAD_PATH . include ? ( this_dir ) <nl> <nl> require ' optparse ' <nl> + require ' logger ' <nl> <nl> require ' grpc ' <nl> require ' googleauth ' <nl> <nl> <nl> AUTH_ENV = Google : : Auth : : CredentialsLoader : : ENV_VAR <nl> <nl> + # RubyLogger defines a logger for gRPC based on the standard ruby logger . <nl> + module RubyLogger <nl> + def logger <nl> + LOGGER <nl> + end <nl> + <nl> + LOGGER = Logger . new ( STDOUT ) <nl> + LOGGER . level = Logger : : INFO <nl> + end <nl> + <nl> + # GRPC is the general RPC module <nl> + module GRPC <nl> + # Inject the noop # logger if no module - level logger method has been injected . <nl> + extend RubyLogger <nl> + end <nl> + <nl> # AssertionError is use to indicate interop test failures . <nl> class AssertionError < RuntimeError ; end <nl> <nl> mmm a / src / ruby / pb / test / server . rb <nl> ppp b / src / ruby / pb / test / server . rb <nl> <nl> $ LOAD_PATH . unshift ( this_dir ) unless $ LOAD_PATH . include ? ( this_dir ) <nl> <nl> require ' forwardable ' <nl> + require ' logger ' <nl> require ' optparse ' <nl> <nl> require ' grpc ' <nl> <nl> require ' test / proto / messages ' <nl> require ' test / proto / test_services ' <nl> <nl> + # DebugIsTruncated extends the default Logger to truncate debug messages <nl> + class DebugIsTruncated < Logger <nl> + def debug ( s ) <nl> + super ( truncate ( s , 1024 ) ) <nl> + end <nl> + <nl> + # Truncates a given + text + after a given < tt > length < / tt > if + text + is longer than < tt > length < / tt > : <nl> + # <nl> + # ' Once upon a time in a world far far away ' . truncate ( 27 ) <nl> + # # = > " Once upon a time in a wo . . . " <nl> + # <nl> + # Pass a string or regexp < tt > : separator < / tt > to truncate + text + at a natural break : <nl> + # <nl> + # ' Once upon a time in a world far far away ' . truncate ( 27 , separator : ' ' ) <nl> + # # = > " Once upon a time in a . . . " <nl> + # <nl> + # ' Once upon a time in a world far far away ' . truncate ( 27 , separator : / \ s / ) <nl> + # # = > " Once upon a time in a . . . " <nl> + # <nl> + # The last characters will be replaced with the < tt > : omission < / tt > string ( defaults to " . . . " ) <nl> + # for a total length not exceeding < tt > length < / tt > : <nl> + # <nl> + # ' And they found that many people were sleeping better . ' . truncate ( 25 , omission : ' . . . ( continued ) ' ) <nl> + # # = > " And they f . . . ( continued ) " <nl> + def truncate ( s , truncate_at , options = { } ) <nl> + return s unless s . length > truncate_at <nl> + omission = options [ : omission ] | | ' . . . ' <nl> + with_extra_room = truncate_at - omission . length <nl> + stop = \ <nl> + if options [ : separator ] <nl> + rindex ( options [ : separator ] , with_extra_room ) | | with_extra_room <nl> + else <nl> + with_extra_room <nl> + end <nl> + " # { s [ 0 , stop ] } # { omission } " <nl> + end <nl> + end <nl> + <nl> + # RubyLogger defines a logger for gRPC based on the standard ruby logger . <nl> + module RubyLogger <nl> + def logger <nl> + LOGGER <nl> + end <nl> + <nl> + LOGGER = DebugIsTruncated . new ( STDOUT ) <nl> + LOGGER . level = Logger : : WARN <nl> + end <nl> + <nl> + # GRPC is the general RPC module <nl> + module GRPC <nl> + # Inject the noop # logger if no module - level logger method has been injected . <nl> + extend RubyLogger <nl> + end <nl> + <nl> # loads the certificates by the test server . <nl> def load_test_certs <nl> this_dir = File . expand_path ( File . dirname ( __FILE__ ) ) <nl> def unary_call ( simple_req , _call ) <nl> <nl> def streaming_input_call ( call ) <nl> sizes = call . each_remote_read . map { | x | x . payload . body . length } <nl> - sum = sizes . inject { | s , x | s + x } <nl> + sum = sizes . inject ( 0 ) { | s , x | s + x } <nl> StreamingInputCallResponse . new ( aggregated_payload_size : sum ) <nl> end <nl> <nl>
Merge pull request from tbetbetbe / grpc_ruby_fix_flaky_ruby_interop_test
grpc/grpc
75065d4b1f47ab3bf9e0e4fa3f3f6368db1fc4c7
2015-11-12T22:10:08Z
mmm a / core / bind / core_bind . cpp <nl> ppp b / core / bind / core_bind . cpp <nl> void _OS : : set_window_position ( const Point2 & p_position ) { <nl> OS : : get_singleton ( ) - > set_window_position ( p_position ) ; <nl> } <nl> <nl> + Size2 _OS : : get_max_window_size ( ) const { <nl> + return OS : : get_singleton ( ) - > get_max_window_size ( ) ; <nl> + } <nl> + <nl> + Size2 _OS : : get_min_window_size ( ) const { <nl> + return OS : : get_singleton ( ) - > get_min_window_size ( ) ; <nl> + } <nl> + <nl> Size2 _OS : : get_window_size ( ) const { <nl> return OS : : get_singleton ( ) - > get_window_size ( ) ; <nl> } <nl> Size2 _OS : : get_real_window_size ( ) const { <nl> return OS : : get_singleton ( ) - > get_real_window_size ( ) ; <nl> } <nl> <nl> + void _OS : : set_max_window_size ( const Size2 & p_size ) { <nl> + OS : : get_singleton ( ) - > set_max_window_size ( p_size ) ; <nl> + } <nl> + <nl> + void _OS : : set_min_window_size ( const Size2 & p_size ) { <nl> + OS : : get_singleton ( ) - > set_min_window_size ( p_size ) ; <nl> + } <nl> + <nl> void _OS : : set_window_size ( const Size2 & p_size ) { <nl> OS : : get_singleton ( ) - > set_window_size ( p_size ) ; <nl> } <nl> void _OS : : _bind_methods ( ) { <nl> ClassDB : : bind_method ( D_METHOD ( " get_window_position " ) , & _OS : : get_window_position ) ; <nl> ClassDB : : bind_method ( D_METHOD ( " set_window_position " , " position " ) , & _OS : : set_window_position ) ; <nl> ClassDB : : bind_method ( D_METHOD ( " get_window_size " ) , & _OS : : get_window_size ) ; <nl> + ClassDB : : bind_method ( D_METHOD ( " get_max_window_size " ) , & _OS : : get_max_window_size ) ; <nl> + ClassDB : : bind_method ( D_METHOD ( " get_min_window_size " ) , & _OS : : get_min_window_size ) ; <nl> + ClassDB : : bind_method ( D_METHOD ( " set_max_window_size " , " size " ) , & _OS : : set_max_window_size ) ; <nl> + ClassDB : : bind_method ( D_METHOD ( " set_min_window_size " , " size " ) , & _OS : : set_min_window_size ) ; <nl> ClassDB : : bind_method ( D_METHOD ( " set_window_size " , " size " ) , & _OS : : set_window_size ) ; <nl> ClassDB : : bind_method ( D_METHOD ( " get_window_safe_area " ) , & _OS : : get_window_safe_area ) ; <nl> ClassDB : : bind_method ( D_METHOD ( " set_window_fullscreen " , " enabled " ) , & _OS : : set_window_fullscreen ) ; <nl> void _OS : : _bind_methods ( ) { <nl> ADD_PROPERTY ( PropertyInfo ( Variant : : BOOL , " vsync_enabled " ) , " set_use_vsync " , " is_vsync_enabled " ) ; <nl> ADD_PROPERTY ( PropertyInfo ( Variant : : BOOL , " low_processor_usage_mode " ) , " set_low_processor_usage_mode " , " is_in_low_processor_usage_mode " ) ; <nl> ADD_PROPERTY ( PropertyInfo ( Variant : : BOOL , " keep_screen_on " ) , " set_keep_screen_on " , " is_keep_screen_on " ) ; <nl> + ADD_PROPERTY ( PropertyInfo ( Variant : : VECTOR2 , " min_window_size " ) , " set_min_window_size " , " get_min_window_size " ) ; <nl> + ADD_PROPERTY ( PropertyInfo ( Variant : : VECTOR2 , " max_window_size " ) , " set_max_window_size " , " get_max_window_size " ) ; <nl> ADD_PROPERTY ( PropertyInfo ( Variant : : INT , " screen_orientation " , PROPERTY_HINT_ENUM , " Landscape , Portrait , Reverse Landscape , Reverse Portrait , Sensor Landscape , Sensor Portrait , Sensor " ) , " set_screen_orientation " , " get_screen_orientation " ) ; <nl> ADD_GROUP ( " Window " , " window_ " ) ; <nl> ADD_PROPERTY ( PropertyInfo ( Variant : : BOOL , " window_borderless " ) , " set_borderless_window " , " get_borderless_window " ) ; <nl> mmm a / core / bind / core_bind . h <nl> ppp b / core / bind / core_bind . h <nl> class _OS : public Object { <nl> virtual int get_screen_dpi ( int p_screen = - 1 ) const ; <nl> virtual Point2 get_window_position ( ) const ; <nl> virtual void set_window_position ( const Point2 & p_position ) ; <nl> + virtual Size2 get_max_window_size ( ) const ; <nl> + virtual Size2 get_min_window_size ( ) const ; <nl> virtual Size2 get_window_size ( ) const ; <nl> virtual Size2 get_real_window_size ( ) const ; <nl> virtual Rect2 get_window_safe_area ( ) const ; <nl> + virtual void set_max_window_size ( const Size2 & p_size ) ; <nl> + virtual void set_min_window_size ( const Size2 & p_size ) ; <nl> virtual void set_window_size ( const Size2 & p_size ) ; <nl> virtual void set_window_fullscreen ( bool p_enabled ) ; <nl> virtual bool is_window_fullscreen ( ) const ; <nl> mmm a / core / os / os . h <nl> ppp b / core / os / os . h <nl> class OS { <nl> virtual int get_screen_dpi ( int p_screen = - 1 ) const { return 72 ; } <nl> virtual Point2 get_window_position ( ) const { return Vector2 ( ) ; } <nl> virtual void set_window_position ( const Point2 & p_position ) { } <nl> + virtual Size2 get_max_window_size ( ) const { return Size2 ( ) ; } ; <nl> + virtual Size2 get_min_window_size ( ) const { return Size2 ( ) ; } ; <nl> virtual Size2 get_window_size ( ) const = 0 ; <nl> virtual Size2 get_real_window_size ( ) const { return get_window_size ( ) ; } <nl> + virtual void set_min_window_size ( const Size2 p_size ) { } <nl> + virtual void set_max_window_size ( const Size2 p_size ) { } <nl> virtual void set_window_size ( const Size2 p_size ) { } <nl> virtual void set_window_fullscreen ( bool p_enabled ) { } <nl> virtual bool is_window_fullscreen ( ) const { return true ; } <nl> mmm a / doc / classes / OS . xml <nl> ppp b / doc / classes / OS . xml <nl> <nl> < member name = " low_processor_usage_mode " type = " bool " setter = " set_low_processor_usage_mode " getter = " is_in_low_processor_usage_mode " > <nl> If [ code ] true [ / code ] , the engine optimizes for low processor usage by only refreshing the screen if needed . Can improve battery consumption on mobile . <nl> < / member > <nl> + < member name = " min_window_size " type = " Vector2 " setter = " set_min_window_size " getter = " get_min_window_size " > <nl> + The minimum size of the window ( without counting window manager decorations ) . Does not affect fullscreen mode . Set to [ code ] ( 0 , 0 ) [ / code ] to reset to the system default value . <nl> + < / member > <nl> + < member name = " max_window_size " type = " Vector2 " setter = " set_max_window_size " getter = " get_max_window_size " > <nl> + The maximum size of the window ( without counting window manager decorations ) . Does not affect fullscreen mode . Set to [ code ] ( 0 , 0 ) [ / code ] to reset to the system default value . <nl> + < / member > <nl> < member name = " screen_orientation " type = " int " setter = " set_screen_orientation " getter = " get_screen_orientation " enum = " _OS . ScreenOrientation " > <nl> The current screen orientation . <nl> < / member > <nl> mmm a / platform / osx / os_osx . h <nl> ppp b / platform / osx / os_osx . h <nl> class OS_OSX : public OS_Unix { <nl> String im_text ; <nl> Point2 im_selection ; <nl> <nl> + Size2 min_size ; <nl> + Size2 max_size ; <nl> + <nl> PowerOSX * power_manager ; <nl> <nl> CrashHandler crash_handler ; <nl> class OS_OSX : public OS_Unix { <nl> <nl> virtual Point2 get_window_position ( ) const ; <nl> virtual void set_window_position ( const Point2 & p_position ) ; <nl> + virtual Size2 get_max_window_size ( ) const ; <nl> + virtual Size2 get_min_window_size ( ) const ; <nl> + virtual void set_min_window_size ( const Size2 p_size ) ; <nl> + virtual void set_max_window_size ( const Size2 p_size ) ; <nl> virtual void set_window_size ( const Size2 p_size ) ; <nl> virtual void set_window_fullscreen ( bool p_enabled ) ; <nl> virtual bool is_window_fullscreen ( ) const ; <nl> mmm a / platform / osx / os_osx . mm <nl> ppp b / platform / osx / os_osx . mm <nl> - ( BOOL ) windowShouldClose : ( id ) sender { <nl> <nl> - ( void ) windowDidEnterFullScreen : ( NSNotification * ) notification { <nl> OS_OSX : : singleton - > zoomed = true ; <nl> + <nl> + [ OS_OSX : : singleton - > window_object setContentMinSize : NSMakeSize ( 0 , 0 ) ] ; <nl> + [ OS_OSX : : singleton - > window_object setContentMaxSize : NSMakeSize ( FLT_MAX , FLT_MAX ) ] ; <nl> } <nl> <nl> - ( void ) windowDidExitFullScreen : ( NSNotification * ) notification { <nl> OS_OSX : : singleton - > zoomed = false ; <nl> + <nl> + if ( OS_OSX : : singleton - > min_size ! = Size2 ( ) ) { <nl> + Size2 size = OS_OSX : : singleton - > min_size / OS_OSX : : singleton - > _display_scale ( ) ; <nl> + [ OS_OSX : : singleton - > window_object setContentMinSize : NSMakeSize ( size . x , size . y ) ] ; <nl> + } <nl> + if ( OS_OSX : : singleton - > max_size ! = Size2 ( ) ) { <nl> + Size2 size = OS_OSX : : singleton - > max_size / OS_OSX : : singleton - > _display_scale ( ) ; <nl> + [ OS_OSX : : singleton - > window_object setContentMaxSize : NSMakeSize ( size . x , size . y ) ] ; <nl> + } <nl> + <nl> if ( ! OS_OSX : : singleton - > resizable ) <nl> [ OS_OSX : : singleton - > window_object setStyleMask : [ OS_OSX : : singleton - > window_object styleMask ] & ~ NSWindowStyleMaskResizable ] ; <nl> } <nl> static int get_screen_index ( NSScreen * screen ) { <nl> return Size2 ( frame . size . width , frame . size . height ) * _display_scale ( ) ; <nl> } <nl> <nl> + Size2 OS_OSX : : get_max_window_size ( ) const { <nl> + return max_size ; <nl> + } <nl> + <nl> + Size2 OS_OSX : : get_min_window_size ( ) const { <nl> + return min_size ; <nl> + } <nl> + <nl> + void OS_OSX : : set_min_window_size ( const Size2 p_size ) { <nl> + <nl> + if ( ( p_size ! = Size2 ( ) ) & & ( max_size ! = Size2 ( ) ) & & ( ( p_size . x > max_size . x ) | | ( p_size . y > max_size . y ) ) ) { <nl> + WARN_PRINT ( " Minimum window size can ' t be larger than maximum window size ! " ) ; <nl> + return ; <nl> + } <nl> + min_size = p_size ; <nl> + <nl> + if ( ( min_size ! = Size2 ( ) ) & & ! zoomed ) { <nl> + Size2 size = min_size / _display_scale ( ) ; <nl> + [ window_object setContentMinSize : NSMakeSize ( size . x , size . y ) ] ; <nl> + } else { <nl> + [ window_object setContentMinSize : NSMakeSize ( 0 , 0 ) ] ; <nl> + } <nl> + } <nl> + <nl> + void OS_OSX : : set_max_window_size ( const Size2 p_size ) { <nl> + <nl> + if ( ( p_size ! = Size2 ( ) ) & & ( ( p_size . x < min_size . x ) | | ( p_size . y < min_size . y ) ) ) { <nl> + WARN_PRINT ( " Maximum window size can ' t be smaller than minimum window size ! " ) ; <nl> + return ; <nl> + } <nl> + max_size = p_size ; <nl> + <nl> + if ( ( max_size ! = Size2 ( ) ) & & ! zoomed ) { <nl> + Size2 size = max_size / _display_scale ( ) ; <nl> + [ window_object setContentMaxSize : NSMakeSize ( size . x , size . y ) ] ; <nl> + } else { <nl> + [ window_object setContentMaxSize : NSMakeSize ( FLT_MAX , FLT_MAX ) ] ; <nl> + } <nl> + } <nl> + <nl> void OS_OSX : : set_window_size ( const Size2 p_size ) { <nl> <nl> Size2 size = p_size / _display_scale ( ) ; <nl> static int get_screen_index ( NSScreen * screen ) { <nl> set_window_per_pixel_transparency_enabled ( false ) ; <nl> if ( ! resizable ) <nl> [ window_object setStyleMask : [ window_object styleMask ] | NSWindowStyleMaskResizable ] ; <nl> + if ( p_enabled ) { <nl> + [ window_object setContentMinSize : NSMakeSize ( 0 , 0 ) ] ; <nl> + [ window_object setContentMaxSize : NSMakeSize ( FLT_MAX , FLT_MAX ) ] ; <nl> + } else { <nl> + if ( min_size ! = Size2 ( ) ) { <nl> + Size2 size = min_size / _display_scale ( ) ; <nl> + [ window_object setContentMinSize : NSMakeSize ( size . x , size . y ) ] ; <nl> + } <nl> + if ( max_size ! = Size2 ( ) ) { <nl> + Size2 size = max_size / _display_scale ( ) ; <nl> + [ window_object setContentMaxSize : NSMakeSize ( size . x , size . y ) ] ; <nl> + } <nl> + } <nl> [ window_object toggleFullScreen : nil ] ; <nl> } <nl> zoomed = p_enabled ; <nl> mmm a / platform / windows / os_windows . cpp <nl> ppp b / platform / windows / os_windows . cpp <nl> LRESULT OS_Windows : : WndProc ( HWND hWnd , UINT uMsg , WPARAM wParam , LPARAM lParam ) <nl> <nl> return 0 ; / / Return To The Message Loop <nl> } <nl> - <nl> + case WM_GETMINMAXINFO : { <nl> + if ( video_mode . resizable & & ! video_mode . fullscreen ) { <nl> + Size2 decor = get_real_window_size ( ) - get_window_size ( ) ; / / Size of window decorations <nl> + MINMAXINFO * min_max_info = ( MINMAXINFO * ) lParam ; <nl> + if ( min_size ! = Size2 ( ) ) { <nl> + min_max_info - > ptMinTrackSize . x = min_size . x + decor . x ; <nl> + min_max_info - > ptMinTrackSize . y = min_size . y + decor . y ; <nl> + } <nl> + if ( max_size ! = Size2 ( ) ) { <nl> + min_max_info - > ptMaxTrackSize . x = max_size . x + decor . x ; <nl> + min_max_info - > ptMaxTrackSize . y = max_size . y + decor . y ; <nl> + } <nl> + return 0 ; <nl> + } else { <nl> + break ; <nl> + } <nl> + } <nl> case WM_PAINT : <nl> <nl> Main : : force_redraw ( ) ; <nl> void OS_Windows : : set_window_position ( const Point2 & p_position ) { <nl> last_pos = p_position ; <nl> update_real_mouse_position ( ) ; <nl> } <nl> + <nl> Size2 OS_Windows : : get_window_size ( ) const { <nl> <nl> if ( minimized ) { <nl> Size2 OS_Windows : : get_window_size ( ) const { <nl> } <nl> return Size2 ( ) ; <nl> } <nl> + <nl> + Size2 OS_Windows : : get_max_window_size ( ) const { <nl> + return max_size ; <nl> + } <nl> + <nl> + Size2 OS_Windows : : get_min_window_size ( ) const { <nl> + return min_size ; <nl> + } <nl> + <nl> + void OS_Windows : : set_min_window_size ( const Size2 p_size ) { <nl> + <nl> + if ( ( p_size ! = Size2 ( ) ) & & ( max_size ! = Size2 ( ) ) & & ( ( p_size . x > max_size . x ) | | ( p_size . y > max_size . y ) ) ) { <nl> + WARN_PRINT ( " Minimum window size can ' t be larger than maximum window size ! " ) ; <nl> + return ; <nl> + } <nl> + min_size = p_size ; <nl> + } <nl> + <nl> + void OS_Windows : : set_max_window_size ( const Size2 p_size ) { <nl> + <nl> + if ( ( p_size ! = Size2 ( ) ) & & ( ( p_size . x < min_size . x ) | | ( p_size . y < min_size . y ) ) ) { <nl> + WARN_PRINT ( " Maximum window size can ' t be smaller than minimum window size ! " ) ; <nl> + return ; <nl> + } <nl> + max_size = p_size ; <nl> + } <nl> + <nl> Size2 OS_Windows : : get_real_window_size ( ) const { <nl> <nl> RECT r ; <nl> Size2 OS_Windows : : get_real_window_size ( ) const { <nl> } <nl> return Size2 ( ) ; <nl> } <nl> + <nl> void OS_Windows : : set_window_size ( const Size2 p_size ) { <nl> <nl> int w = p_size . width ; <nl> mmm a / platform / windows / os_windows . h <nl> ppp b / platform / windows / os_windows . h <nl> class OS_Windows : public OS { <nl> <nl> HCURSOR hCursor ; <nl> <nl> + Size2 min_size ; <nl> + Size2 max_size ; <nl> + <nl> Size2 window_rect ; <nl> VideoMode video_mode ; <nl> bool preserve_window_size = false ; <nl> class OS_Windows : public OS { <nl> virtual void set_window_position ( const Point2 & p_position ) ; <nl> virtual Size2 get_window_size ( ) const ; <nl> virtual Size2 get_real_window_size ( ) const ; <nl> + virtual Size2 get_max_window_size ( ) const ; <nl> + virtual Size2 get_min_window_size ( ) const ; <nl> + virtual void set_min_window_size ( const Size2 p_size ) ; <nl> + virtual void set_max_window_size ( const Size2 p_size ) ; <nl> virtual void set_window_size ( const Size2 p_size ) ; <nl> virtual void set_window_fullscreen ( bool p_enabled ) ; <nl> virtual bool is_window_fullscreen ( ) const ; <nl> mmm a / platform / x11 / os_x11 . cpp <nl> ppp b / platform / x11 / os_x11 . cpp <nl> void OS_X11 : : set_wm_fullscreen ( bool p_enabled ) { <nl> <nl> XFlush ( x11_display ) ; <nl> <nl> - if ( ! p_enabled & & ! is_window_resizable ( ) ) { <nl> + if ( ! p_enabled ) { <nl> / / Reset the non - resizable flags if we un - set these before . <nl> Size2 size = get_window_size ( ) ; <nl> XSizeHints * xsh ; <nl> - <nl> xsh = XAllocSizeHints ( ) ; <nl> - xsh - > flags = PMinSize | PMaxSize ; <nl> - xsh - > min_width = size . x ; <nl> - xsh - > max_width = size . x ; <nl> - xsh - > min_height = size . y ; <nl> - xsh - > max_height = size . y ; <nl> - <nl> + if ( ! is_window_resizable ( ) ) { <nl> + xsh - > flags = PMinSize | PMaxSize ; <nl> + xsh - > min_width = size . x ; <nl> + xsh - > max_width = size . x ; <nl> + xsh - > min_height = size . y ; <nl> + xsh - > max_height = size . y ; <nl> + } else { <nl> + xsh - > flags = 0L ; <nl> + if ( min_size ! = Size2 ( ) ) { <nl> + xsh - > flags | = PMinSize ; <nl> + xsh - > min_width = min_size . x ; <nl> + xsh - > min_height = min_size . y ; <nl> + } <nl> + if ( max_size ! = Size2 ( ) ) { <nl> + xsh - > flags | = PMaxSize ; <nl> + xsh - > max_width = max_size . x ; <nl> + xsh - > max_height = max_size . y ; <nl> + } <nl> + } <nl> XSetWMNormalHints ( x11_display , x11_window , xsh ) ; <nl> XFree ( xsh ) ; <nl> } <nl> Size2 OS_X11 : : get_real_window_size ( ) const { <nl> return Size2 ( w , h ) ; <nl> } <nl> <nl> + Size2 OS_X11 : : get_max_window_size ( ) const { <nl> + return max_size ; <nl> + } <nl> + <nl> + Size2 OS_X11 : : get_min_window_size ( ) const { <nl> + return min_size ; <nl> + } <nl> + <nl> + void OS_X11 : : set_min_window_size ( const Size2 p_size ) { <nl> + <nl> + if ( ( p_size ! = Size2 ( ) ) & & ( max_size ! = Size2 ( ) ) & & ( ( p_size . x > max_size . x ) | | ( p_size . y > max_size . y ) ) ) { <nl> + WARN_PRINT ( " Minimum window size can ' t be larger than maximum window size ! " ) ; <nl> + return ; <nl> + } <nl> + min_size = p_size ; <nl> + <nl> + if ( is_window_resizable ( ) ) { <nl> + XSizeHints * xsh ; <nl> + xsh = XAllocSizeHints ( ) ; <nl> + xsh - > flags = 0L ; <nl> + if ( min_size ! = Size2 ( ) ) { <nl> + xsh - > flags | = PMinSize ; <nl> + xsh - > min_width = min_size . x ; <nl> + xsh - > min_height = min_size . y ; <nl> + } <nl> + if ( max_size ! = Size2 ( ) ) { <nl> + xsh - > flags | = PMaxSize ; <nl> + xsh - > max_width = max_size . x ; <nl> + xsh - > max_height = max_size . y ; <nl> + } <nl> + XSetWMNormalHints ( x11_display , x11_window , xsh ) ; <nl> + XFree ( xsh ) ; <nl> + <nl> + XFlush ( x11_display ) ; <nl> + } <nl> + } <nl> + <nl> + void OS_X11 : : set_max_window_size ( const Size2 p_size ) { <nl> + <nl> + if ( ( p_size ! = Size2 ( ) ) & & ( ( p_size . x < min_size . x ) | | ( p_size . y < min_size . y ) ) ) { <nl> + WARN_PRINT ( " Maximum window size can ' t be smaller than minimum window size ! " ) ; <nl> + return ; <nl> + } <nl> + max_size = p_size ; <nl> + <nl> + if ( is_window_resizable ( ) ) { <nl> + XSizeHints * xsh ; <nl> + xsh = XAllocSizeHints ( ) ; <nl> + xsh - > flags = 0L ; <nl> + if ( min_size ! = Size2 ( ) ) { <nl> + xsh - > flags | = PMinSize ; <nl> + xsh - > min_width = min_size . x ; <nl> + xsh - > min_height = min_size . y ; <nl> + } <nl> + if ( max_size ! = Size2 ( ) ) { <nl> + xsh - > flags | = PMaxSize ; <nl> + xsh - > max_width = max_size . x ; <nl> + xsh - > max_height = max_size . y ; <nl> + } <nl> + XSetWMNormalHints ( x11_display , x11_window , xsh ) ; <nl> + XFree ( xsh ) ; <nl> + <nl> + XFlush ( x11_display ) ; <nl> + } <nl> + } <nl> + <nl> void OS_X11 : : set_window_size ( const Size2 p_size ) { <nl> <nl> if ( current_videomode . width = = p_size . width & & current_videomode . height = = p_size . height ) <nl> void OS_X11 : : set_window_size ( const Size2 p_size ) { <nl> int old_h = xwa . height ; <nl> <nl> / / If window resizable is disabled we need to update the attributes first <nl> + XSizeHints * xsh ; <nl> + xsh = XAllocSizeHints ( ) ; <nl> if ( ! is_window_resizable ( ) ) { <nl> - XSizeHints * xsh ; <nl> - xsh = XAllocSizeHints ( ) ; <nl> xsh - > flags = PMinSize | PMaxSize ; <nl> xsh - > min_width = p_size . x ; <nl> xsh - > max_width = p_size . x ; <nl> xsh - > min_height = p_size . y ; <nl> xsh - > max_height = p_size . y ; <nl> - XSetWMNormalHints ( x11_display , x11_window , xsh ) ; <nl> - XFree ( xsh ) ; <nl> + } else { <nl> + xsh - > flags = 0L ; <nl> + if ( min_size ! = Size2 ( ) ) { <nl> + xsh - > flags | = PMinSize ; <nl> + xsh - > min_width = min_size . x ; <nl> + xsh - > min_height = min_size . y ; <nl> + } <nl> + if ( max_size ! = Size2 ( ) ) { <nl> + xsh - > flags | = PMaxSize ; <nl> + xsh - > max_width = max_size . x ; <nl> + xsh - > max_height = max_size . y ; <nl> + } <nl> } <nl> + XSetWMNormalHints ( x11_display , x11_window , xsh ) ; <nl> + XFree ( xsh ) ; <nl> <nl> / / Resize the window <nl> XResizeWindow ( x11_display , x11_window , p_size . x , p_size . y ) ; <nl> bool OS_X11 : : is_window_fullscreen ( ) const { <nl> } <nl> <nl> void OS_X11 : : set_window_resizable ( bool p_enabled ) { <nl> - XSizeHints * xsh ; <nl> - Size2 size = get_window_size ( ) ; <nl> <nl> + XSizeHints * xsh ; <nl> xsh = XAllocSizeHints ( ) ; <nl> - xsh - > flags = p_enabled ? 0L : PMinSize | PMaxSize ; <nl> if ( ! p_enabled ) { <nl> + Size2 size = get_window_size ( ) ; <nl> + <nl> + xsh - > flags = PMinSize | PMaxSize ; <nl> xsh - > min_width = size . x ; <nl> xsh - > max_width = size . x ; <nl> xsh - > min_height = size . y ; <nl> xsh - > max_height = size . y ; <nl> + } else { <nl> + xsh - > flags = 0L ; <nl> + if ( min_size ! = Size2 ( ) ) { <nl> + xsh - > flags | = PMinSize ; <nl> + xsh - > min_width = min_size . x ; <nl> + xsh - > min_height = min_size . y ; <nl> + } <nl> + if ( max_size ! = Size2 ( ) ) { <nl> + xsh - > flags | = PMaxSize ; <nl> + xsh - > max_width = max_size . x ; <nl> + xsh - > max_height = max_size . y ; <nl> + } <nl> } <nl> + <nl> XSetWMNormalHints ( x11_display , x11_window , xsh ) ; <nl> XFree ( xsh ) ; <nl> + <nl> current_videomode . resizable = p_enabled ; <nl> + <nl> + XFlush ( x11_display ) ; <nl> } <nl> <nl> bool OS_X11 : : is_window_resizable ( ) const { <nl> mmm a / platform / x11 / os_x11 . h <nl> ppp b / platform / x11 / os_x11 . h <nl> class OS_X11 : public OS_Unix { <nl> bool im_active ; <nl> Vector2 im_position ; <nl> <nl> + Size2 min_size ; <nl> + Size2 max_size ; <nl> + <nl> Point2 last_mouse_pos ; <nl> bool last_mouse_pos_valid ; <nl> Point2i last_click_pos ; <nl> class OS_X11 : public OS_Unix { <nl> virtual void set_window_position ( const Point2 & p_position ) ; <nl> virtual Size2 get_window_size ( ) const ; <nl> virtual Size2 get_real_window_size ( ) const ; <nl> + virtual Size2 get_max_window_size ( ) const ; <nl> + virtual Size2 get_min_window_size ( ) const ; <nl> + virtual void set_min_window_size ( const Size2 p_size ) ; <nl> + virtual void set_max_window_size ( const Size2 p_size ) ; <nl> virtual void set_window_size ( const Size2 p_size ) ; <nl> virtual void set_window_fullscreen ( bool p_enabled ) ; <nl> virtual bool is_window_fullscreen ( ) const ; <nl>
Add ability to limit maximum / minimum window size .
godotengine/godot
b924fb97d6fddba818b9ad57722eaf777244e826
2019-06-15T06:49:11Z
new file mode 100644 <nl> index 00000000000 . . 69f77e012f3 <nl> mmm / dev / null <nl> ppp b / dbms / src / Interpreters / CancellationCode . h <nl> <nl> + # pragma once <nl> + <nl> + namespace DB <nl> + { <nl> + <nl> + / / / A result code for the KILL QUERY / KILL MUTATION statement . <nl> + enum class CancellationCode <nl> + { <nl> + NotFound = 0 , / / / already cancelled <nl> + QueryIsNotInitializedYet = 1 , <nl> + CancelCannotBeSent = 2 , <nl> + CancelSent = 3 , <nl> + Unknown <nl> + } ; <nl> + <nl> + } <nl> mmm a / dbms / src / Interpreters / InterpreterKillQueryQuery . cpp <nl> ppp b / dbms / src / Interpreters / InterpreterKillQueryQuery . cpp <nl> <nl> # include < Interpreters / DDLWorker . h > <nl> # include < Interpreters / ProcessList . h > <nl> # include < Interpreters / executeQuery . h > <nl> + # include < Interpreters / CancellationCode . h > <nl> # include < Columns / ColumnString . h > <nl> # include < Common / typeid_cast . h > <nl> # include < DataTypes / DataTypeString . h > <nl> # include < Columns / ColumnsNumber . h > <nl> # include < DataTypes / DataTypesNumber . h > <nl> # include < DataStreams / OneBlockInputStream . h > <nl> + # include < Storages / IStorage . h > <nl> # include < thread > <nl> # include < iostream > <nl> # include < cstddef > <nl> namespace ErrorCodes <nl> extern const int CANNOT_KILL ; <nl> } <nl> <nl> + <nl> static const char * cancellationCodeToStatus ( CancellationCode code ) <nl> { <nl> switch ( code ) <nl> static const char * cancellationCodeToStatus ( CancellationCode code ) <nl> case CancellationCode : : QueryIsNotInitializedYet : <nl> return " pending " ; <nl> case CancellationCode : : CancelCannotBeSent : <nl> - return " error " ; <nl> + return " cant_cancel " ; <nl> case CancellationCode : : CancelSent : <nl> return " waiting " ; <nl> default : <nl> struct QueryDescriptor <nl> using QueryDescriptors = std : : vector < QueryDescriptor > ; <nl> <nl> <nl> - static void insertResultRow ( size_t n , CancellationCode code , const Block & source_processes , const Block & sample_block , MutableColumns & columns ) <nl> + static void insertResultRow ( size_t n , CancellationCode code , const Block & source , const Block & header , MutableColumns & columns ) <nl> { <nl> columns [ 0 ] - > insert ( cancellationCodeToStatus ( code ) ) ; <nl> <nl> for ( size_t col_num = 1 , size = columns . size ( ) ; col_num < size ; + + col_num ) <nl> - columns [ col_num ] - > insertFrom ( * source_processes . getByName ( sample_block . getByPosition ( col_num ) . name ) . column , n ) ; <nl> + columns [ col_num ] - > insertFrom ( * source . getByName ( header . getByPosition ( col_num ) . name ) . column , n ) ; <nl> } <nl> <nl> static QueryDescriptors extractQueriesExceptMeAndCheckAccess ( const Block & processes_block , Context & context ) <nl> class SyncKillQueryInputStream : public IBlockInputStream <nl> <nl> auto code = process_list . sendCancelToQuery ( curr_process . query_id , curr_process . user , true ) ; <nl> <nl> - / / / Raise exception if this query is immortal , user have to know <nl> - / / / This could happen only if query generate streams that don ' t implement IBlockInputStream <nl> - if ( code = = CancellationCode : : CancelCannotBeSent ) <nl> - throw Exception ( " Can ' t kill query ' " + curr_process . query_id + " ' it consits of unkillable stages " , ErrorCodes : : CANNOT_KILL ) ; <nl> - else if ( code ! = CancellationCode : : QueryIsNotInitializedYet & & code ! = CancellationCode : : CancelSent ) <nl> + if ( code ! = CancellationCode : : QueryIsNotInitializedYet & & code ! = CancellationCode : : CancelSent ) <nl> { <nl> curr_process . processed = true ; <nl> insertResultRow ( curr_process . source_num , code , processes_block , res_sample_block , columns ) ; <nl> BlockIO InterpreterKillQueryQuery : : execute ( ) <nl> return executeDDLQueryOnCluster ( query_ptr , context , { " system " } ) ; <nl> <nl> BlockIO res_io ; <nl> - Block processes_block = getSelectFromSystemProcessesResult ( ) ; <nl> - if ( ! processes_block ) <nl> - return res_io ; <nl> + switch ( query . type ) <nl> + { <nl> + case ASTKillQueryQuery : : Type : : Query : <nl> + { <nl> + Block processes_block = getSelectResult ( " query_id , user , query " , " system . processes " ) ; <nl> + if ( ! processes_block ) <nl> + return res_io ; <nl> + <nl> + ProcessList & process_list = context . getProcessList ( ) ; <nl> + QueryDescriptors queries_to_stop = extractQueriesExceptMeAndCheckAccess ( processes_block , context ) ; <nl> + <nl> + auto header = processes_block . cloneEmpty ( ) ; <nl> + header . insert ( 0 , { ColumnString : : create ( ) , std : : make_shared < DataTypeString > ( ) , " kill_status " } ) ; <nl> + <nl> + if ( ! query . sync | | query . test ) <nl> + { <nl> + MutableColumns res_columns = header . cloneEmptyColumns ( ) ; <nl> <nl> - ProcessList & process_list = context . getProcessList ( ) ; <nl> - QueryDescriptors queries_to_stop = extractQueriesExceptMeAndCheckAccess ( processes_block , context ) ; <nl> + for ( const auto & query_desc : queries_to_stop ) <nl> + { <nl> + auto code = ( query . test ) ? CancellationCode : : Unknown : process_list . sendCancelToQuery ( query_desc . query_id , query_desc . user , true ) ; <nl> + insertResultRow ( query_desc . source_num , code , processes_block , header , res_columns ) ; <nl> + } <nl> <nl> - auto header = processes_block . cloneEmpty ( ) ; <nl> - header . insert ( 0 , { ColumnString : : create ( ) , std : : make_shared < DataTypeString > ( ) , " kill_status " } ) ; <nl> + res_io . in = std : : make_shared < OneBlockInputStream > ( header . cloneWithColumns ( std : : move ( res_columns ) ) ) ; <nl> + } <nl> + else <nl> + { <nl> + res_io . in = std : : make_shared < SyncKillQueryInputStream > ( <nl> + process_list , std : : move ( queries_to_stop ) , std : : move ( processes_block ) , header ) ; <nl> + } <nl> <nl> - if ( ! query . sync | | query . test ) <nl> + break ; <nl> + } <nl> + case ASTKillQueryQuery : : Type : : Mutation : <nl> { <nl> + if ( context . getSettingsRef ( ) . readonly ) <nl> + throw Exception ( " Cannot execute query in readonly mode " , ErrorCodes : : READONLY ) ; <nl> + <nl> + Block mutations_block = getSelectResult ( " database , table , mutation_id " , " system . mutations " ) ; <nl> + if ( ! mutations_block ) <nl> + return res_io ; <nl> + <nl> + const ColumnString & database_col = typeid_cast < const ColumnString & > ( * mutations_block . getByName ( " database " ) . column ) ; <nl> + const ColumnString & table_col = typeid_cast < const ColumnString & > ( * mutations_block . getByName ( " table " ) . column ) ; <nl> + const ColumnString & mutation_id_col = typeid_cast < const ColumnString & > ( * mutations_block . getByName ( " mutation_id " ) . column ) ; <nl> + <nl> + auto header = mutations_block . cloneEmpty ( ) ; <nl> + header . insert ( 0 , { ColumnString : : create ( ) , std : : make_shared < DataTypeString > ( ) , " kill_status " } ) ; <nl> + <nl> MutableColumns res_columns = header . cloneEmptyColumns ( ) ; <nl> <nl> - for ( const auto & query_desc : queries_to_stop ) <nl> + for ( size_t i = 0 ; i < mutations_block . rows ( ) ; + + i ) <nl> { <nl> - auto code = ( query . test ) ? CancellationCode : : Unknown : process_list . sendCancelToQuery ( query_desc . query_id , query_desc . user , true ) ; <nl> + auto database_name = database_col . getDataAt ( i ) . toString ( ) ; <nl> + auto table_name = table_col . getDataAt ( i ) . toString ( ) ; <nl> + auto mutation_id = mutation_id_col . getDataAt ( i ) . toString ( ) ; <nl> <nl> - / / / Raise exception if this query is immortal , user have to know <nl> - / / / This could happen only if query generate streams that don ' t implement IBlockInputStream <nl> - if ( code = = CancellationCode : : CancelCannotBeSent ) <nl> - throw Exception ( " Can ' t kill query ' " + query_desc . query_id + " ' it consits of unkillable stages " , ErrorCodes : : CANNOT_KILL ) ; <nl> + CancellationCode code = CancellationCode : : Unknown ; <nl> + if ( ! query . test ) <nl> + { <nl> + auto storage = context . tryGetTable ( database_name , table_name ) ; <nl> + if ( ! storage ) <nl> + code = CancellationCode : : NotFound ; <nl> + else <nl> + code = storage - > killMutation ( mutation_id ) ; <nl> + } <nl> <nl> - insertResultRow ( query_desc . source_num , code , processes_block , header , res_columns ) ; <nl> + insertResultRow ( i , code , mutations_block , header , res_columns ) ; <nl> } <nl> <nl> res_io . in = std : : make_shared < OneBlockInputStream > ( header . cloneWithColumns ( std : : move ( res_columns ) ) ) ; <nl> + <nl> + break ; <nl> } <nl> - else <nl> - { <nl> - res_io . in = std : : make_shared < SyncKillQueryInputStream > ( <nl> - process_list , std : : move ( queries_to_stop ) , std : : move ( processes_block ) , header ) ; <nl> } <nl> <nl> return res_io ; <nl> } <nl> <nl> - Block InterpreterKillQueryQuery : : getSelectFromSystemProcessesResult ( ) <nl> + Block InterpreterKillQueryQuery : : getSelectResult ( const String & columns , const String & table ) <nl> { <nl> - String system_processes_query = " SELECT query_id , user , query FROM system . processes " ; <nl> + String select_query = " SELECT " + columns + " FROM " + table ; <nl> auto & where_expression = static_cast < ASTKillQueryQuery & > ( * query_ptr ) . where_expression ; <nl> if ( where_expression ) <nl> - system_processes_query + = " WHERE " + queryToString ( where_expression ) ; <nl> + select_query + = " WHERE " + queryToString ( where_expression ) ; <nl> <nl> + BlockIO block_io = executeQuery ( select_query , context , true ) ; <nl> + Block res = block_io . in - > read ( ) ; <nl> <nl> - BlockIO system_processes_io = executeQuery ( system_processes_query , context , true ) ; <nl> - Block res = system_processes_io . in - > read ( ) ; <nl> - <nl> - if ( res & & system_processes_io . in - > read ( ) ) <nl> + if ( res & & block_io . in - > read ( ) ) <nl> throw Exception ( " Expected one block from input stream " , ErrorCodes : : LOGICAL_ERROR ) ; <nl> <nl> return res ; <nl> } <nl> <nl> - <nl> } <nl> mmm a / dbms / src / Interpreters / InterpreterKillQueryQuery . h <nl> ppp b / dbms / src / Interpreters / InterpreterKillQueryQuery . h <nl> class InterpreterKillQueryQuery : public IInterpreter <nl> BlockIO execute ( ) override ; <nl> <nl> private : <nl> - Block getSelectFromSystemProcessesResult ( ) ; <nl> + Block getSelectResult ( const String & columns , const String & table ) ; <nl> <nl> ASTPtr query_ptr ; <nl> Context & context ; <nl> mmm a / dbms / src / Interpreters / PartLog . cpp <nl> ppp b / dbms / src / Interpreters / PartLog . cpp <nl> bool PartLog : : addNewParts ( Context & current_context , const PartLog : : MutableDataP <nl> <nl> elem . database_name = part - > storage . getDatabaseName ( ) ; <nl> elem . table_name = part - > storage . getTableName ( ) ; <nl> - elem . part_name = part - > name ; <nl> elem . partition_id = part - > info . partition_id ; <nl> + elem . part_name = part - > name ; <nl> <nl> elem . bytes_compressed_on_disk = part - > bytes_on_disk ; <nl> elem . rows = part - > rows_count ; <nl> mmm a / dbms / src / Interpreters / ProcessList . h <nl> ppp b / dbms / src / Interpreters / ProcessList . h <nl> <nl> # include < Common / CurrentThread . h > <nl> # include < Interpreters / QueryPriorities . h > <nl> # include < Interpreters / ClientInfo . h > <nl> + # include < Interpreters / CancellationCode . h > <nl> # include < DataStreams / BlockIO . h > <nl> <nl> <nl> struct QueryStatusInfo <nl> std : : shared_ptr < Settings > query_settings ; <nl> } ; <nl> <nl> - enum class CancellationCode <nl> - { <nl> - NotFound = 0 , / / / already cancelled <nl> - QueryIsNotInitializedYet = 1 , <nl> - CancelCannotBeSent = 2 , <nl> - CancelSent = 3 , <nl> - Unknown <nl> - } ; <nl> - <nl> / / / Query and information about its execution . <nl> class QueryStatus <nl> { <nl> mmm a / dbms / src / Parsers / ASTKillQueryQuery . cpp <nl> ppp b / dbms / src / Parsers / ASTKillQueryQuery . cpp <nl> String ASTKillQueryQuery : : getID ( char delim ) const <nl> <nl> void ASTKillQueryQuery : : formatQueryImpl ( const FormatSettings & settings , FormatState & state , FormatStateStacked frame ) const <nl> { <nl> - settings . ostr < < ( settings . hilite ? hilite_keyword : " " ) < < " KILL QUERY " ; <nl> + settings . ostr < < ( settings . hilite ? hilite_keyword : " " ) < < " KILL " <nl> + < < ( type = = Type : : Query ? " QUERY " : " MUTATION " ) ; <nl> <nl> formatOnCluster ( settings ) ; <nl> <nl> mmm a / dbms / src / Parsers / ASTKillQueryQuery . h <nl> ppp b / dbms / src / Parsers / ASTKillQueryQuery . h <nl> namespace DB <nl> class ASTKillQueryQuery : public ASTQueryWithOutput , public ASTQueryWithOnCluster <nl> { <nl> public : <nl> + enum class Type <nl> + { <nl> + Query , / / / KILL QUERY <nl> + Mutation , / / / KILL MUTATION <nl> + } ; <nl> + <nl> + Type type = Type : : Query ; <nl> ASTPtr where_expression ; / / expression to filter processes from system . processes table <nl> bool sync = false ; / / SYNC or ASYNC mode <nl> bool test = false ; / / does it TEST mode ? ( doesn ' t cancel queries just checks and shows them ) <nl> mmm a / dbms / src / Parsers / ParserKillQueryQuery . cpp <nl> ppp b / dbms / src / Parsers / ParserKillQueryQuery . cpp <nl> bool ParserKillQueryQuery : : parseImpl ( Pos & pos , ASTPtr & node , Expected & expect <nl> String cluster_str ; <nl> auto query = std : : make_shared < ASTKillQueryQuery > ( ) ; <nl> <nl> + ParserKeyword p_kill { " KILL " } ; <nl> + ParserKeyword p_query { " QUERY " } ; <nl> + ParserKeyword p_mutation { " MUTATION " } ; <nl> ParserKeyword p_on { " ON " } ; <nl> ParserKeyword p_test { " TEST " } ; <nl> ParserKeyword p_sync { " SYNC " } ; <nl> ParserKeyword p_async { " ASYNC " } ; <nl> ParserKeyword p_where { " WHERE " } ; <nl> - ParserKeyword p_kill_query { " KILL QUERY " } ; <nl> ParserExpression p_where_expression ; <nl> <nl> - if ( ! p_kill_query . ignore ( pos , expected ) ) <nl> + if ( ! p_kill . ignore ( pos , expected ) ) <nl> + return false ; <nl> + <nl> + if ( p_query . ignore ( pos , expected ) ) <nl> + query - > type = ASTKillQueryQuery : : Type : : Query ; <nl> + else if ( p_mutation . ignore ( pos , expected ) ) <nl> + query - > type = ASTKillQueryQuery : : Type : : Mutation ; <nl> + else <nl> return false ; <nl> <nl> if ( p_on . ignore ( pos , expected ) & & ! ASTQueryWithOnCluster : : parse ( pos , cluster_str , expected ) ) <nl> mmm a / dbms / src / Storages / IStorage . h <nl> ppp b / dbms / src / Storages / IStorage . h <nl> <nl> # include < Databases / IDatabase . h > <nl> # include < Storages / ITableDeclaration . h > <nl> # include < Storages / SelectQueryInfo . h > <nl> + # include < Interpreters / CancellationCode . h > <nl> # include < shared_mutex > <nl> # include < memory > <nl> # include < optional > <nl> class IStorage : public std : : enable_shared_from_this < IStorage > , private boost : : n <nl> throw Exception ( " Mutations are not supported by storage " + getName ( ) , ErrorCodes : : NOT_IMPLEMENTED ) ; <nl> } <nl> <nl> + / / / Cancel a mutation . <nl> + virtual CancellationCode killMutation ( const String & / * mutation_id * / ) <nl> + { <nl> + throw Exception ( " Mutations are not supported by storage " + getName ( ) , ErrorCodes : : NOT_IMPLEMENTED ) ; <nl> + } <nl> + <nl> / * * If the table have to do some complicated work on startup , <nl> * that must be postponed after creation of table object <nl> * ( like launching some background threads ) , <nl> mmm a / dbms / src / Storages / MergeTree / MergeList . cpp <nl> ppp b / dbms / src / Storages / MergeTree / MergeList . cpp <nl> <nl> # include < Storages / MergeTree / MergeList . h > <nl> + # include < Storages / MergeTree / MergeTreeDataMergerMutator . h > <nl> # include < Common / CurrentMetrics . h > <nl> # include < Poco / Ext / ThreadNumber . h > <nl> # include < Common / CurrentThread . h > <nl> namespace CurrentMetrics <nl> namespace DB <nl> { <nl> <nl> - MergeListElement : : MergeListElement ( const std : : string & database , const std : : string & table , const std : : string & result_part_name , <nl> - const MergeTreeData : : DataPartsVector & source_parts ) <nl> - : database { database } , table { table } , result_part_name { result_part_name } , num_parts { source_parts . size ( ) } , <nl> - thread_number { Poco : : ThreadNumber : : get ( ) } <nl> + MergeListElement : : MergeListElement ( const std : : string & database , const std : : string & table , const FutureMergedMutatedPart & future_part ) <nl> + : database { database } , table { table } , partition_id { future_part . part_info . partition_id } <nl> + , result_part_name { future_part . name } <nl> + , result_data_version { future_part . part_info . getDataVersion ( ) } <nl> + , num_parts { future_part . parts . size ( ) } <nl> + , thread_number { Poco : : ThreadNumber : : get ( ) } <nl> { <nl> - for ( const auto & source_part : source_parts ) <nl> + for ( const auto & source_part : future_part . parts ) <nl> + { <nl> source_part_names . emplace_back ( source_part - > name ) ; <nl> <nl> - if ( ! source_parts . empty ( ) ) <nl> - partition_id = source_parts [ 0 ] - > info . partition_id ; <nl> + std : : shared_lock < std : : shared_mutex > part_lock ( source_part - > columns_lock ) ; <nl> + <nl> + total_size_bytes_compressed + = source_part - > bytes_on_disk ; <nl> + total_size_marks + = source_part - > marks_count ; <nl> + } <nl> + <nl> + if ( ! future_part . parts . empty ( ) ) <nl> + { <nl> + source_data_version = future_part . parts [ 0 ] - > info . getDataVersion ( ) ; <nl> + is_mutation = ( result_data_version ! = source_data_version ) ; <nl> + } <nl> <nl> / / / Each merge is executed into separate background processing pool thread <nl> background_thread_memory_tracker = & CurrentThread : : getMemoryTracker ( ) ; <nl> MergeInfo MergeListElement : : getInfo ( ) const <nl> res . table = table ; <nl> res . result_part_name = result_part_name ; <nl> res . partition_id = partition_id ; <nl> + res . is_mutation = is_mutation ; <nl> res . elapsed = watch . elapsedSeconds ( ) ; <nl> res . progress = progress . load ( std : : memory_order_relaxed ) ; <nl> res . num_parts = num_parts ; <nl> mmm a / dbms / src / Storages / MergeTree / MergeList . h <nl> ppp b / dbms / src / Storages / MergeTree / MergeList . h <nl> struct MergeInfo <nl> std : : string result_part_name ; <nl> Array source_part_names ; <nl> std : : string partition_id ; <nl> + bool is_mutation ; <nl> Float64 elapsed ; <nl> Float64 progress ; <nl> UInt64 num_parts ; <nl> struct MergeInfo <nl> UInt64 thread_number ; <nl> } ; <nl> <nl> + struct FutureMergedMutatedPart ; <nl> <nl> struct MergeListElement : boost : : noncopyable <nl> { <nl> const std : : string database ; <nl> const std : : string table ; <nl> - const std : : string result_part_name ; <nl> std : : string partition_id ; <nl> - Stopwatch watch ; <nl> - std : : atomic < Float64 > progress { } ; <nl> + <nl> + const std : : string result_part_name ; <nl> + Int64 result_data_version { } ; <nl> + bool is_mutation { } ; <nl> + <nl> UInt64 num_parts { } ; <nl> Names source_part_names ; <nl> + Int64 source_data_version { } ; <nl> + <nl> + Stopwatch watch ; <nl> + std : : atomic < Float64 > progress { } ; <nl> + std : : atomic < bool > is_cancelled { } ; <nl> + <nl> UInt64 total_size_bytes_compressed { } ; <nl> UInt64 total_size_marks { } ; <nl> std : : atomic < UInt64 > bytes_read_uncompressed { } ; <nl> struct MergeListElement : boost : : noncopyable <nl> UInt32 thread_number ; <nl> <nl> <nl> - MergeListElement ( const std : : string & database , const std : : string & table , const std : : string & result_part_name , <nl> - const MergeTreeData : : DataPartsVector & source_parts ) ; <nl> + MergeListElement ( const std : : string & database , const std : : string & table , const FutureMergedMutatedPart & future_part ) ; <nl> <nl> MergeInfo getInfo ( ) const ; <nl> <nl> class MergeList <nl> res . emplace_back ( merge_element . getInfo ( ) ) ; <nl> return res ; <nl> } <nl> + <nl> + void cancelPartMutations ( const String & partition_id , Int64 mutation_version ) <nl> + { <nl> + std : : lock_guard lock { mutex } ; <nl> + for ( auto & merge_element : merges ) <nl> + { <nl> + if ( ( partition_id . empty ( ) | | merge_element . partition_id = = partition_id ) <nl> + & & merge_element . source_data_version < mutation_version <nl> + & & merge_element . result_data_version > = mutation_version ) <nl> + merge_element . is_cancelled = true ; <nl> + } <nl> + } <nl> } ; <nl> <nl> <nl> mmm a / dbms / src / Storages / MergeTree / MergeTreeData . cpp <nl> ppp b / dbms / src / Storages / MergeTree / MergeTreeData . cpp <nl> void MergeTreeData : : removePartsFinally ( const MergeTreeData : : DataPartsVector & pa <nl> <nl> for ( auto & part : parts ) <nl> { <nl> + part_log_elem . partition_id = part - > info . partition_id ; <nl> part_log_elem . part_name = part - > name ; <nl> part_log_elem . bytes_compressed_on_disk = part - > bytes_on_disk ; <nl> part_log_elem . rows = part - > rows_count ; <nl> mmm a / dbms / src / Storages / MergeTree / MergeTreeDataMergerMutator . cpp <nl> ppp b / dbms / src / Storages / MergeTree / MergeTreeDataMergerMutator . cpp <nl> static const double DISK_USAGE_COEFFICIENT_TO_SELECT = 2 ; <nl> static const double DISK_USAGE_COEFFICIENT_TO_RESERVE = 1 . 1 ; <nl> <nl> <nl> - void MergeTreeDataMergerMutator : : FuturePart : : assign ( MergeTreeData : : DataPartsVector parts_ ) <nl> + void FutureMergedMutatedPart : : assign ( MergeTreeData : : DataPartsVector parts_ ) <nl> { <nl> if ( parts_ . empty ( ) ) <nl> return ; <nl> UInt64 MergeTreeDataMergerMutator : : getMaxSourcePartsSize ( size_t pool_size , size_ <nl> <nl> <nl> bool MergeTreeDataMergerMutator : : selectPartsToMerge ( <nl> - FuturePart & future_part , <nl> + FutureMergedMutatedPart & future_part , <nl> bool aggressive , <nl> size_t max_total_size_to_merge , <nl> const AllowedMergingPredicate & can_merge_callback , <nl> bool MergeTreeDataMergerMutator : : selectPartsToMerge ( <nl> <nl> <nl> bool MergeTreeDataMergerMutator : : selectAllPartsToMergeWithinPartition ( <nl> - FuturePart & future_part , <nl> + FutureMergedMutatedPart & future_part , <nl> UInt64 & available_disk_space , <nl> const AllowedMergingPredicate & can_merge , <nl> const String & partition_id , <nl> class ColumnSizeEstimator <nl> sum_total = std : : max ( static_cast < decltype ( sum_index_columns ) > ( 1 ) , sum_index_columns + sum_ordinary_columns ) ; <nl> } <nl> <nl> - / / / Approximate size of num_rows column elements if column contains num_total_rows elements <nl> - Float64 columnSize ( const String & column , size_t num_rows , size_t num_total_rows ) const <nl> + Float64 columnWeight ( const String & column ) const <nl> { <nl> - return static_cast < Float64 > ( map . at ( column ) ) / num_total_rows * num_rows ; <nl> + return static_cast < Float64 > ( map . at ( column ) ) / sum_total ; <nl> } <nl> <nl> - / / / Relative size of num_rows column elements ( in comparison with overall size of all columns ) if column contains num_total_rows elements <nl> - Float64 columnProgress ( const String & column , size_t num_rows , size_t num_total_rows ) const <nl> + Float64 keyColumnsWeight ( ) const <nl> { <nl> - return columnSize ( column , num_rows , num_total_rows ) / sum_total ; <nl> + return static_cast < Float64 > ( sum_index_columns ) / sum_total ; <nl> } <nl> + } ; <nl> <nl> - / / / Like columnSize , but takes into account only PK columns <nl> - Float64 keyColumnsSize ( size_t num_rows , size_t num_total_rows ) const <nl> + / * * Progress callback . <nl> + * What it should update : <nl> + * - approximate progress <nl> + * - amount of read rows <nl> + * - various metrics <nl> + * - time elapsed for current merge . <nl> + * / <nl> + <nl> + / / / Auxilliary struct that for each merge stage stores its current progress . <nl> + / / / A stage is : the horizontal stage + a stage for each gathered column ( if we are doing a <nl> + / / / Vertical merge ) or a mutation of a single part . During a single stage all rows are read . <nl> + struct MergeStageProgress <nl> + { <nl> + MergeStageProgress ( Float64 weight_ ) <nl> + : is_first ( true ) , weight ( weight_ ) <nl> { <nl> - return static_cast < Float64 > ( sum_index_columns ) / num_total_rows * num_rows ; <nl> } <nl> <nl> - / / / Like columnProgress , but takes into account only PK columns <nl> - Float64 keyColumnsProgress ( size_t num_rows , size_t num_total_rows ) const <nl> + MergeStageProgress ( Float64 initial_progress_ , Float64 weight_ ) <nl> + : initial_progress ( initial_progress_ ) , is_first ( false ) , weight ( weight_ ) <nl> { <nl> - return keyColumnsSize ( num_rows , num_total_rows ) / sum_total ; <nl> } <nl> + <nl> + Float64 initial_progress = 0 . 0 ; <nl> + bool is_first ; <nl> + Float64 weight ; <nl> + <nl> + UInt64 total_rows = 0 ; <nl> + UInt64 rows_read = 0 ; <nl> } ; <nl> <nl> - / * * Progress callback . Is used by Horizontal merger and first step of Vertical merger . <nl> - * What it should update : <nl> - * - approximate progress <nl> - * - amount of merged rows and their size ( PK columns subset is used in case of Vertical merge ) <nl> - * - time elapsed for current merge . <nl> - * / <nl> class MergeProgressCallback <nl> { <nl> public : <nl> - MergeProgressCallback ( MergeList : : Entry & merge_entry_ , UInt64 & watch_prev_elapsed_ ) <nl> - : merge_entry ( merge_entry_ ) , watch_prev_elapsed ( watch_prev_elapsed_ ) { } <nl> - <nl> - MergeProgressCallback ( MergeList : : Entry & merge_entry_ , size_t num_total_rows , const ColumnSizeEstimator & column_sizes , <nl> - UInt64 & watch_prev_elapsed_ , MergeTreeDataMergerMutator : : MergeAlgorithm merge_alg_ = MergeAlgorithm : : Vertical ) <nl> - : merge_entry ( merge_entry_ ) , watch_prev_elapsed ( watch_prev_elapsed_ ) , merge_alg ( merge_alg_ ) <nl> + MergeProgressCallback ( <nl> + MergeList : : Entry & merge_entry_ , UInt64 & watch_prev_elapsed_ , MergeStageProgress & stage_ ) <nl> + : merge_entry ( merge_entry_ ) <nl> + , watch_prev_elapsed ( watch_prev_elapsed_ ) <nl> + , stage ( stage_ ) <nl> { <nl> - if ( num_total_rows ) <nl> - { <nl> - average_elem_progress = ( merge_alg = = MergeAlgorithm : : Horizontal ) <nl> - ? 1 . 0 / num_total_rows <nl> - : column_sizes . keyColumnsProgress ( 1 , num_total_rows ) ; <nl> - } <nl> - <nl> updateWatch ( ) ; <nl> } <nl> <nl> MergeList : : Entry & merge_entry ; <nl> UInt64 & watch_prev_elapsed ; <nl> - Float64 average_elem_progress = 0 ; <nl> - const MergeAlgorithm merge_alg { MergeAlgorithm : : Vertical } ; <nl> + MergeStageProgress & stage ; <nl> <nl> void updateWatch ( ) <nl> { <nl> class MergeProgressCallback <nl> void operator ( ) ( const Progress & value ) <nl> { <nl> ProfileEvents : : increment ( ProfileEvents : : MergedUncompressedBytes , value . bytes ) ; <nl> - ProfileEvents : : increment ( ProfileEvents : : MergedRows , value . rows ) ; <nl> + if ( stage . is_first ) <nl> + ProfileEvents : : increment ( ProfileEvents : : MergedRows , value . rows ) ; <nl> updateWatch ( ) ; <nl> <nl> merge_entry - > bytes_read_uncompressed + = value . bytes ; <nl> - merge_entry - > rows_read + = value . rows ; <nl> - merge_entry - > progress . store ( average_elem_progress * merge_entry - > rows_read , std : : memory_order_relaxed ) ; <nl> - } <nl> - } ; <nl> - <nl> - / * * Progress callback for gathering step of Vertical merge . <nl> - * Updates : approximate progress , amount of merged bytes ( TODO : two column case should be fixed ) , elapsed time . <nl> - * / <nl> - class MergeProgressCallbackVerticalStep : public MergeProgressCallback <nl> - { <nl> - public : <nl> - MergeProgressCallbackVerticalStep ( MergeList : : Entry & merge_entry_ , size_t num_total_rows_exact , <nl> - const ColumnSizeEstimator & column_sizes , const String & column_name , UInt64 & watch_prev_elapsed_ ) <nl> - : MergeProgressCallback ( merge_entry_ , watch_prev_elapsed_ ) , initial_progress ( merge_entry - > progress . load ( std : : memory_order_relaxed ) ) <nl> - { <nl> - average_elem_progress = column_sizes . columnProgress ( column_name , 1 , num_total_rows_exact ) ; <nl> - updateWatch ( ) ; <nl> - } <nl> + if ( stage . is_first ) <nl> + merge_entry - > rows_read + = value . rows ; <nl> <nl> - Float64 initial_progress ; <nl> - size_t rows_read_internal { 0 } ; / / NOTE : not thread safe ( to be copyable ) . It is OK in current single thread use case <nl> - <nl> - void operator ( ) ( const Progress & value ) <nl> - { <nl> - merge_entry - > bytes_read_uncompressed + = value . bytes ; <nl> - ProfileEvents : : increment ( ProfileEvents : : MergedUncompressedBytes , value . bytes ) ; <nl> - updateWatch ( ) ; <nl> - <nl> - rows_read_internal + = value . rows ; <nl> - Float64 local_progress = average_elem_progress * rows_read_internal ; <nl> - <nl> - / / / NOTE : ' progress ' is modified by single thread , but it may be concurrently read from MergeListElement : : getInfo ( ) ( StorageSystemMerges ) . <nl> - merge_entry - > progress . store ( initial_progress + local_progress , std : : memory_order_relaxed ) ; <nl> + stage . total_rows + = value . total_rows ; <nl> + stage . rows_read + = value . rows ; <nl> + if ( stage . total_rows > 0 ) <nl> + { <nl> + merge_entry - > progress . store ( <nl> + stage . initial_progress + stage . weight * stage . rows_read / stage . total_rows , <nl> + std : : memory_order_relaxed ) ; <nl> + } <nl> } <nl> } ; <nl> <nl> - <nl> / / / parts should be sorted . <nl> MergeTreeData : : MutableDataPartPtr MergeTreeDataMergerMutator : : mergePartsToTemporaryPart ( <nl> - const FuturePart & future_part , MergeList : : Entry & merge_entry , <nl> + const FutureMergedMutatedPart & future_part , MergeList : : Entry & merge_entry , <nl> time_t time_of_merge , DiskSpaceMonitor : : Reservation * disk_reservation , bool deduplicate ) <nl> { <nl> static const String TMP_PREFIX = " tmp_merge_ " ; <nl> MergeTreeData : : MutableDataPartPtr MergeTreeDataMergerMutator : : mergePartsToTempor <nl> if ( Poco : : File ( new_part_tmp_path ) . exists ( ) ) <nl> throw Exception ( " Directory " + new_part_tmp_path + " already exists " , ErrorCodes : : DIRECTORY_ALREADY_EXISTS ) ; <nl> <nl> - merge_entry - > num_parts = parts . size ( ) ; <nl> - <nl> - for ( const MergeTreeData : : DataPartPtr & part : parts ) <nl> - { <nl> - std : : shared_lock < std : : shared_mutex > part_lock ( part - > columns_lock ) ; <nl> - <nl> - merge_entry - > total_size_bytes_compressed + = part - > bytes_on_disk ; <nl> - merge_entry - > total_size_marks + = part - > marks_count ; <nl> - } <nl> - <nl> MergeTreeData : : DataPart : : ColumnToSize merged_column_to_size ; <nl> for ( const MergeTreeData : : DataPartPtr & part : parts ) <nl> part - > accumulateColumnSizes ( merged_column_to_size ) ; <nl> MergeTreeData : : MutableDataPartPtr MergeTreeDataMergerMutator : : mergePartsToTempor <nl> } <nl> } <nl> <nl> - <nl> + MergeStageProgress horizontal_stage_progress ( <nl> + merge_alg = = MergeAlgorithm : : Horizontal ? 1 . 0 : column_sizes . keyColumnsWeight ( ) ) ; <nl> for ( const auto & part : parts ) <nl> { <nl> auto input = std : : make_unique < MergeTreeSequentialBlockInputStream > ( <nl> data , part , merging_column_names , read_with_direct_io , true ) ; <nl> <nl> - input - > setProgressCallback ( MergeProgressCallback ( <nl> - merge_entry , sum_input_rows_upper_bound , column_sizes , watch_prev_elapsed , merge_alg ) ) ; <nl> + input - > setProgressCallback ( <nl> + MergeProgressCallback ( merge_entry , watch_prev_elapsed , horizontal_stage_progress ) ) ; <nl> <nl> BlockInputStreamPtr stream = std : : move ( input ) ; <nl> if ( data . hasPrimaryKey ( ) | | data . hasSkipIndices ( ) ) <nl> MergeTreeData : : MutableDataPartPtr MergeTreeDataMergerMutator : : mergePartsToTempor <nl> { <nl> size_t sum_input_rows_exact = merge_entry - > rows_read ; <nl> merge_entry - > columns_written = merging_column_names . size ( ) ; <nl> - merge_entry - > progress . store ( column_sizes . keyColumnsProgress ( sum_input_rows_exact , sum_input_rows_exact ) , std : : memory_order_relaxed ) ; <nl> + merge_entry - > progress . store ( column_sizes . keyColumnsWeight ( ) , std : : memory_order_relaxed ) ; <nl> <nl> BlockInputStreams column_part_streams ( parts . size ( ) ) ; <nl> <nl> MergeTreeData : : MutableDataPartPtr MergeTreeDataMergerMutator : : mergePartsToTempor <nl> Names column_names { column_name } ; <nl> Float64 progress_before = merge_entry - > progress . load ( std : : memory_order_relaxed ) ; <nl> <nl> + MergeStageProgress column_progress ( progress_before , column_sizes . columnWeight ( column_name ) ) ; <nl> for ( size_t part_num = 0 ; part_num < parts . size ( ) ; + + part_num ) <nl> { <nl> auto column_part_stream = std : : make_shared < MergeTreeSequentialBlockInputStream > ( <nl> data , parts [ part_num ] , column_names , read_with_direct_io , true ) ; <nl> <nl> - column_part_stream - > setProgressCallback ( MergeProgressCallbackVerticalStep ( <nl> - merge_entry , sum_input_rows_exact , column_sizes , column_name , watch_prev_elapsed ) ) ; <nl> + column_part_stream - > setProgressCallback ( <nl> + MergeProgressCallback ( merge_entry , watch_prev_elapsed , column_progress ) ) ; <nl> <nl> column_part_streams [ part_num ] = std : : move ( column_part_stream ) ; <nl> } <nl> MergeTreeData : : MutableDataPartPtr MergeTreeDataMergerMutator : : mergePartsToTempor <nl> <nl> / / / NOTE : ' progress ' is modified by single thread , but it may be concurrently read from MergeListElement : : getInfo ( ) ( StorageSystemMerges ) . <nl> <nl> - merge_entry - > columns_written = merging_column_names . size ( ) + column_num ; <nl> + merge_entry - > columns_written + = 1 ; <nl> merge_entry - > bytes_written_uncompressed + = column_gathered_stream . getProfileInfo ( ) . bytes ; <nl> - merge_entry - > progress . store ( progress_before + column_sizes . columnProgress ( column_name , sum_input_rows_exact , sum_input_rows_exact ) , std : : memory_order_relaxed ) ; <nl> + merge_entry - > progress . store ( progress_before + column_sizes . columnWeight ( column_name ) , std : : memory_order_relaxed ) ; <nl> <nl> if ( actions_blocker . isCancelled ( ) ) <nl> throw Exception ( " Cancelled merging parts " , ErrorCodes : : ABORTED ) ; <nl> MergeTreeData : : MutableDataPartPtr MergeTreeDataMergerMutator : : mergePartsToTempor <nl> <nl> <nl> MergeTreeData : : MutableDataPartPtr MergeTreeDataMergerMutator : : mutatePartToTemporaryPart ( <nl> - const FuturePart & future_part , <nl> + const FutureMergedMutatedPart & future_part , <nl> const std : : vector < MutationCommand > & commands , <nl> + MergeListEntry & merge_entry , <nl> const Context & context ) <nl> { <nl> auto check_not_cancelled = [ & ] ( ) <nl> { <nl> - if ( actions_blocker . isCancelled ( ) ) <nl> + if ( actions_blocker . isCancelled ( ) | | merge_entry - > is_cancelled ) <nl> throw Exception ( " Cancelled mutating parts " , ErrorCodes : : ABORTED ) ; <nl> <nl> return true ; <nl> MergeTreeData : : MutableDataPartPtr MergeTreeDataMergerMutator : : mutatePartToTempor <nl> <nl> Block in_header = in - > getHeader ( ) ; <nl> <nl> + UInt64 watch_prev_elapsed = 0 ; <nl> + MergeStageProgress stage_progress ( 1 . 0 ) ; <nl> + in - > setProgressCallback ( MergeProgressCallback ( merge_entry , watch_prev_elapsed , stage_progress ) ) ; <nl> + <nl> if ( in_header . columns ( ) = = all_columns . size ( ) ) <nl> { <nl> / / / All columns are modified , proceed to write a new part from scratch . <nl> MergeTreeData : : MutableDataPartPtr MergeTreeDataMergerMutator : : mutatePartToTempor <nl> { <nl> minmax_idx . update ( block , data . minmax_idx_columns ) ; <nl> out . write ( block ) ; <nl> + <nl> + merge_entry - > rows_written + = block . rows ( ) ; <nl> + merge_entry - > bytes_written_uncompressed + = block . bytes ( ) ; <nl> } <nl> <nl> new_data_part - > partition . assign ( source_part - > partition ) ; <nl> MergeTreeData : : MutableDataPartPtr MergeTreeDataMergerMutator : : mutatePartToTempor <nl> createHardLink ( dir_it . path ( ) . toString ( ) , destination . toString ( ) ) ; <nl> } <nl> <nl> + merge_entry - > columns_written = all_columns . size ( ) - in_header . columns ( ) ; <nl> + <nl> IMergedBlockOutputStream : : WrittenOffsetColumns unused_written_offsets ; <nl> MergedColumnOnlyOutputStream out ( <nl> data , in_header , new_part_tmp_path , / * sync = * / false , compression_codec , / * skip_offsets = * / false , unused_written_offsets ) ; <nl> MergeTreeData : : MutableDataPartPtr MergeTreeDataMergerMutator : : mutatePartToTempor <nl> <nl> Block block ; <nl> while ( check_not_cancelled ( ) & & ( block = in - > read ( ) ) ) <nl> + { <nl> out . write ( block ) ; <nl> <nl> + merge_entry - > rows_written + = block . rows ( ) ; <nl> + merge_entry - > bytes_written_uncompressed + = block . bytes ( ) ; <nl> + } <nl> + <nl> in - > readSuffix ( ) ; <nl> auto changed_checksums = out . writeSuffixAndGetChecksums ( ) ; <nl> <nl> mmm a / dbms / src / Storages / MergeTree / MergeTreeDataMergerMutator . h <nl> ppp b / dbms / src / Storages / MergeTree / MergeTreeDataMergerMutator . h <nl> namespace DB <nl> class MergeListEntry ; <nl> class MergeProgressCallback ; <nl> <nl> + / / / Auxiliary struct holding metainformation for the future merged or mutated part . <nl> + struct FutureMergedMutatedPart <nl> + { <nl> + String name ; <nl> + MergeTreePartInfo part_info ; <nl> + MergeTreeData : : DataPartsVector parts ; <nl> + <nl> + const MergeTreePartition & getPartition ( ) const { return parts . front ( ) - > partition ; } <nl> + <nl> + FutureMergedMutatedPart ( ) = default ; <nl> + explicit FutureMergedMutatedPart ( MergeTreeData : : DataPartsVector parts_ ) <nl> + { <nl> + assign ( std : : move ( parts_ ) ) ; <nl> + } <nl> + <nl> + void assign ( MergeTreeData : : DataPartsVector parts_ ) ; <nl> + } ; <nl> <nl> / * * Can select the parts to merge and merge them . <nl> * / <nl> class MergeTreeDataMergerMutator <nl> public : <nl> using AllowedMergingPredicate = std : : function < bool ( const MergeTreeData : : DataPartPtr & , const MergeTreeData : : DataPartPtr & , String * reason ) > ; <nl> <nl> - struct FuturePart <nl> - { <nl> - String name ; <nl> - MergeTreePartInfo part_info ; <nl> - MergeTreeData : : DataPartsVector parts ; <nl> - <nl> - const MergeTreePartition & getPartition ( ) const { return parts . front ( ) - > partition ; } <nl> - <nl> - FuturePart ( ) = default ; <nl> - explicit FuturePart ( MergeTreeData : : DataPartsVector parts_ ) <nl> - { <nl> - assign ( std : : move ( parts_ ) ) ; <nl> - } <nl> - <nl> - void assign ( MergeTreeData : : DataPartsVector parts_ ) ; <nl> - } ; <nl> - <nl> public : <nl> MergeTreeDataMergerMutator ( MergeTreeData & data_ , const BackgroundProcessingPool & pool_ ) ; <nl> <nl> class MergeTreeDataMergerMutator <nl> * - A part that already merges with something in one place , you can not start to merge into something else in another place . <nl> * / <nl> bool selectPartsToMerge ( <nl> - FuturePart & future_part , <nl> + FutureMergedMutatedPart & future_part , <nl> bool aggressive , <nl> size_t max_total_size_to_merge , <nl> const AllowedMergingPredicate & can_merge , <nl> class MergeTreeDataMergerMutator <nl> * final - choose to merge even a single part - that is , allow to merge one part " with itself " . <nl> * / <nl> bool selectAllPartsToMergeWithinPartition ( <nl> - FuturePart & future_part , <nl> + FutureMergedMutatedPart & future_part , <nl> UInt64 & available_disk_space , <nl> const AllowedMergingPredicate & can_merge , <nl> const String & partition_id , <nl> class MergeTreeDataMergerMutator <nl> * Important when using ReplicatedGraphiteMergeTree to provide the same merge on replicas . <nl> * / <nl> MergeTreeData : : MutableDataPartPtr mergePartsToTemporaryPart ( <nl> - const FuturePart & future_part , <nl> + const FutureMergedMutatedPart & future_part , <nl> MergeListEntry & merge_entry , time_t time_of_merge , <nl> DiskSpaceMonitor : : Reservation * disk_reservation , bool deduplication ) ; <nl> <nl> / / / Mutate a single data part with the specified commands . Will create and return a temporary part . <nl> MergeTreeData : : MutableDataPartPtr mutatePartToTemporaryPart ( <nl> - const FuturePart & future_part , <nl> + const FutureMergedMutatedPart & future_part , <nl> const std : : vector < MutationCommand > & commands , <nl> - const Context & context ) ; <nl> + MergeListEntry & merge_entry , const Context & context ) ; <nl> <nl> MergeTreeData : : DataPartPtr renameMergedTemporaryPart ( <nl> MergeTreeData : : MutableDataPartPtr & new_data_part , <nl> mmm a / dbms / src / Storages / MergeTree / MergeTreeMutationEntry . h <nl> ppp b / dbms / src / Storages / MergeTree / MergeTreeMutationEntry . h <nl> <nl> <nl> # include < Core / Types . h > <nl> # include < Storages / MutationCommands . h > <nl> + # include < Storages / MergeTree / MergeTreePartInfo . h > <nl> <nl> <nl> namespace DB <nl> struct MergeTreeMutationEntry <nl> <nl> Int64 block_number = 0 ; <nl> <nl> + String latest_failed_part ; <nl> + MergeTreePartInfo latest_failed_part_info ; <nl> + time_t latest_fail_time = 0 ; <nl> + String latest_fail_reason ; <nl> + <nl> / / / Create a new entry and write it to a temporary file . <nl> MergeTreeMutationEntry ( MutationCommands commands_ , const String & path_prefix_ , Int64 tmp_number ) ; <nl> MergeTreeMutationEntry ( const MergeTreeMutationEntry & ) = delete ; <nl> mmm a / dbms / src / Storages / MergeTree / MergeTreeMutationStatus . h <nl> ppp b / dbms / src / Storages / MergeTree / MergeTreeMutationStatus . h <nl> struct MergeTreeMutationStatus <nl> <nl> / / / If the mutation is done . Note that in case of ReplicatedMergeTree parts_to_do = = 0 doesn ' t imply is_done = = true . <nl> bool is_done = false ; <nl> + <nl> + String latest_failed_part ; <nl> + time_t latest_fail_time = 0 ; <nl> + String latest_fail_reason ; <nl> } ; <nl> <nl> } <nl> mmm a / dbms / src / Storages / MergeTree / ReplicatedMergeTreeQueue . cpp <nl> ppp b / dbms / src / Storages / MergeTree / ReplicatedMergeTreeQueue . cpp <nl> void ReplicatedMergeTreeQueue : : updateMutationsPartsToDo ( const String & part_name <nl> auto from_it = in_partition - > second . upper_bound ( part_info . getDataVersion ( ) ) ; <nl> for ( auto it = from_it ; it ! = in_partition - > second . end ( ) ; + + it ) <nl> { <nl> - it - > second - > parts_to_do + = ( add ? + 1 : - 1 ) ; <nl> - if ( it - > second - > parts_to_do < = 0 ) <nl> + MutationStatus & status = * it - > second ; <nl> + status . parts_to_do + = ( add ? + 1 : - 1 ) ; <nl> + if ( status . parts_to_do < = 0 ) <nl> some_mutations_are_probably_done = true ; <nl> + <nl> + if ( ! add & & ! status . latest_failed_part . empty ( ) & & part_info . contains ( status . latest_failed_part_info ) ) <nl> + { <nl> + status . latest_failed_part . clear ( ) ; <nl> + status . latest_failed_part_info = MergeTreePartInfo ( ) ; <nl> + status . latest_fail_time = 0 ; <nl> + status . latest_fail_reason . clear ( ) ; <nl> + } <nl> } <nl> <nl> if ( some_mutations_are_probably_done ) <nl> void ReplicatedMergeTreeQueue : : updateMutations ( zkutil : : ZooKeeperPtr zookeeper , C <nl> <nl> / / / Compare with the local state , delete obsolete entries and determine which new entries to load . <nl> Strings entries_to_load ; <nl> + bool some_active_mutations_were_killed = false ; <nl> { <nl> std : : lock_guard state_lock ( state_mutex ) ; <nl> <nl> void ReplicatedMergeTreeQueue : : updateMutations ( zkutil : : ZooKeeperPtr zookeeper , C <nl> const ReplicatedMergeTreeMutationEntry & entry = * it - > second . entry ; <nl> if ( ! entries_in_zk_set . count ( entry . znode_name ) ) <nl> { <nl> - LOG_DEBUG ( log , " Removing obsolete mutation " + entry . znode_name + " from local state . " ) ; <nl> + if ( ! it - > second . is_done ) <nl> + { <nl> + LOG_DEBUG ( log , " Removing killed mutation " + entry . znode_name + " from local state . " ) ; <nl> + some_active_mutations_were_killed = true ; <nl> + } <nl> + else <nl> + LOG_DEBUG ( log , " Removing obsolete mutation " + entry . znode_name + " from local state . " ) ; <nl> + <nl> for ( const auto & partition_and_block_num : entry . block_numbers ) <nl> { <nl> auto & in_partition = mutations_by_partition [ partition_and_block_num . first ] ; <nl> void ReplicatedMergeTreeQueue : : updateMutations ( zkutil : : ZooKeeperPtr zookeeper , C <nl> } <nl> } <nl> <nl> + if ( some_active_mutations_were_killed ) <nl> + storage . queue_task_handle - > wake ( ) ; <nl> + <nl> if ( ! entries_to_load . empty ( ) ) <nl> { <nl> LOG_INFO ( log , " Loading " + toString ( entries_to_load . size ( ) ) + " mutation entries : " <nl> void ReplicatedMergeTreeQueue : : updateMutations ( zkutil : : ZooKeeperPtr zookeeper , C <nl> <nl> for ( const ReplicatedMergeTreeMutationEntryPtr & entry : new_mutations ) <nl> { <nl> - auto & mutation = mutations_by_znode . emplace ( entry - > znode_name , MutationStatus { entry , 0 , false } ) <nl> + auto & mutation = mutations_by_znode . emplace ( entry - > znode_name , MutationStatus ( entry ) ) <nl> . first - > second ; <nl> <nl> for ( const auto & pair : entry - > block_numbers ) <nl> void ReplicatedMergeTreeQueue : : updateMutations ( zkutil : : ZooKeeperPtr zookeeper , C <nl> } <nl> <nl> <nl> + ReplicatedMergeTreeMutationEntryPtr ReplicatedMergeTreeQueue : : removeMutation ( <nl> + zkutil : : ZooKeeperPtr zookeeper , const String & mutation_id ) <nl> + { <nl> + std : : lock_guard lock ( update_mutations_mutex ) ; <nl> + <nl> + auto rc = zookeeper - > tryRemove ( zookeeper_path + " / mutations / " + mutation_id ) ; <nl> + if ( rc = = Coordination : : ZOK ) <nl> + LOG_DEBUG ( log , " Removed mutation " + mutation_id + " from ZooKeeper . " ) ; <nl> + <nl> + ReplicatedMergeTreeMutationEntryPtr entry ; <nl> + bool mutation_was_active = false ; <nl> + { <nl> + std : : lock_guard state_lock ( state_mutex ) ; <nl> + <nl> + auto it = mutations_by_znode . find ( mutation_id ) ; <nl> + if ( it = = mutations_by_znode . end ( ) ) <nl> + return nullptr ; <nl> + <nl> + mutation_was_active = ! it - > second . is_done ; <nl> + <nl> + entry = it - > second . entry ; <nl> + for ( const auto & partition_and_block_num : entry - > block_numbers ) <nl> + { <nl> + auto & in_partition = mutations_by_partition [ partition_and_block_num . first ] ; <nl> + in_partition . erase ( partition_and_block_num . second ) ; <nl> + if ( in_partition . empty ( ) ) <nl> + mutations_by_partition . erase ( partition_and_block_num . first ) ; <nl> + } <nl> + <nl> + mutations_by_znode . erase ( it ) ; <nl> + LOG_DEBUG ( log , " Removed mutation " + entry - > znode_name + " from local state . " ) ; <nl> + } <nl> + <nl> + if ( mutation_was_active ) <nl> + storage . queue_task_handle - > wake ( ) ; <nl> + <nl> + return entry ; <nl> + } <nl> + <nl> + <nl> ReplicatedMergeTreeQueue : : StringSet ReplicatedMergeTreeQueue : : moveSiblingPartsForMergeToEndOfQueue ( const String & part_name ) <nl> { <nl> std : : lock_guard lock ( state_mutex ) ; <nl> bool ReplicatedMergeTreeQueue : : processEntry ( <nl> if ( saved_exception ) <nl> { <nl> std : : lock_guard lock ( state_mutex ) ; <nl> + <nl> entry - > exception = saved_exception ; <nl> + <nl> + if ( entry - > type = = ReplicatedMergeTreeLogEntryData : : MUTATE_PART ) <nl> + { <nl> + / / / Record the exception in the system . mutations table . <nl> + Int64 result_data_version = MergeTreePartInfo : : fromPartName ( entry - > new_part_name , format_version ) <nl> + . getDataVersion ( ) ; <nl> + auto source_part_info = MergeTreePartInfo : : fromPartName ( <nl> + entry - > source_parts . at ( 0 ) , format_version ) ; <nl> + <nl> + auto in_partition = mutations_by_partition . find ( source_part_info . partition_id ) ; <nl> + if ( in_partition ! = mutations_by_partition . end ( ) ) <nl> + { <nl> + auto mutations_begin_it = in_partition - > second . upper_bound ( source_part_info . getDataVersion ( ) ) ; <nl> + auto mutations_end_it = in_partition - > second . upper_bound ( result_data_version ) ; <nl> + for ( auto it = mutations_begin_it ; it ! = mutations_end_it ; + + it ) <nl> + { <nl> + MutationStatus & status = * it - > second ; <nl> + status . latest_failed_part = entry - > source_parts . at ( 0 ) ; <nl> + status . latest_failed_part_info = source_part_info ; <nl> + status . latest_fail_time = time ( nullptr ) ; <nl> + status . latest_fail_reason = getExceptionMessage ( saved_exception , false ) ; <nl> + } <nl> + } <nl> + } <nl> + <nl> return false ; <nl> } <nl> <nl> MutationCommands ReplicatedMergeTreeQueue : : getMutationCommands ( <nl> auto in_partition = mutations_by_partition . find ( part - > info . partition_id ) ; <nl> if ( in_partition = = mutations_by_partition . end ( ) ) <nl> { <nl> - LOG_ERROR ( log , " There are no mutations for partition ID " < < part - > info . partition_id <nl> - < < " ( trying to mutate part " < < part - > name < < " to " < < toString ( desired_mutation_version ) < < " ) " ) ; <nl> + LOG_WARNING ( log , " There are no mutations for partition ID " < < part - > info . partition_id <nl> + < < " ( trying to mutate part " < < part - > name < < " to " < < toString ( desired_mutation_version ) < < " ) " ) ; <nl> return MutationCommands { } ; <nl> } <nl> <nl> MutationCommands ReplicatedMergeTreeQueue : : getMutationCommands ( <nl> <nl> auto end = in_partition - > second . lower_bound ( desired_mutation_version ) ; <nl> if ( end = = in_partition - > second . end ( ) | | end - > first ! = desired_mutation_version ) <nl> - LOG_ERROR ( log , " Mutation with version " < < desired_mutation_version <nl> + LOG_WARNING ( log , " Mutation with version " < < desired_mutation_version <nl> < < " not found in partition ID " < < part - > info . partition_id <nl> < < " ( trying to mutate part " < < part - > name + " ) " ) ; <nl> else <nl> std : : vector < MergeTreeMutationStatus > ReplicatedMergeTreeQueue : : getMutationsStatu <nl> entry . block_numbers , <nl> status . parts_to_do , <nl> status . is_done , <nl> + status . latest_failed_part , <nl> + status . latest_fail_time , <nl> + status . latest_fail_reason , <nl> } ) ; <nl> } <nl> } <nl> mmm a / dbms / src / Storages / MergeTree / ReplicatedMergeTreeQueue . h <nl> ppp b / dbms / src / Storages / MergeTree / ReplicatedMergeTreeQueue . h <nl> class ReplicatedMergeTreeQueue <nl> <nl> struct MutationStatus <nl> { <nl> + MutationStatus ( const ReplicatedMergeTreeMutationEntryPtr & entry_ ) <nl> + : entry ( entry_ ) <nl> + { <nl> + } <nl> + <nl> ReplicatedMergeTreeMutationEntryPtr entry ; <nl> <nl> / / / A number of parts that should be mutated / merged or otherwise moved to Obsolete state for this mutation to complete . <nl> class ReplicatedMergeTreeQueue <nl> / / / Note that is_done is not equivalent to parts_to_do = = 0 <nl> / / / ( even if parts_to_do = = 0 some relevant parts can still commit in the future ) . <nl> bool is_done = false ; <nl> + <nl> + String latest_failed_part ; <nl> + MergeTreePartInfo latest_failed_part_info ; <nl> + time_t latest_fail_time = 0 ; <nl> + String latest_fail_reason ; <nl> } ; <nl> <nl> std : : map < String , MutationStatus > mutations_by_znode ; <nl> class ReplicatedMergeTreeQueue <nl> / / / If watch_callback is not empty , will call it when new mutations appear in ZK . <nl> void updateMutations ( zkutil : : ZooKeeperPtr zookeeper , Coordination : : WatchCallback watch_callback = { } ) ; <nl> <nl> + / / / Remove a mutation from ZooKeeper and from the local set . Returns the removed entry or nullptr <nl> + / / / if it could not be found . <nl> + ReplicatedMergeTreeMutationEntryPtr removeMutation ( zkutil : : ZooKeeperPtr zookeeper , const String & mutation_id ) ; <nl> + <nl> / * * Remove the action from the queue with the parts covered by part_name ( from ZK and from the RAM ) . <nl> * And also wait for the completion of their execution , if they are now being executed . <nl> * / <nl> mmm a / dbms / src / Storages / StorageMergeTree . cpp <nl> ppp b / dbms / src / Storages / StorageMergeTree . cpp <nl> void StorageMergeTree : : alter ( <nl> <nl> <nl> / / / While exists , marks parts as ' currently_merging ' and reserves free space on filesystem . <nl> - / / / It ' s possible to mark parts before . <nl> struct CurrentlyMergingPartsTagger <nl> { <nl> - MergeTreeData : : DataPartsVector parts ; <nl> + FutureMergedMutatedPart future_part ; <nl> DiskSpaceMonitor : : ReservationPtr reserved_space ; <nl> - StorageMergeTree * storage = nullptr ; <nl> <nl> - CurrentlyMergingPartsTagger ( ) = default ; <nl> + bool is_successful = false ; <nl> + String exception_message ; <nl> <nl> - CurrentlyMergingPartsTagger ( const MergeTreeData : : DataPartsVector & parts_ , size_t total_size , StorageMergeTree & storage_ ) <nl> - : parts ( parts_ ) , storage ( & storage_ ) <nl> + StorageMergeTree & storage ; <nl> + <nl> + public : <nl> + CurrentlyMergingPartsTagger ( const FutureMergedMutatedPart & future_part_ , size_t total_size , StorageMergeTree & storage_ ) <nl> + : future_part ( future_part_ ) , storage ( storage_ ) <nl> { <nl> / / / Assume mutex is already locked , because this method is called from mergeTask . <nl> - reserved_space = DiskSpaceMonitor : : reserve ( storage - > full_path , total_size ) ; / / / May throw . <nl> - for ( const auto & part : parts ) <nl> + reserved_space = DiskSpaceMonitor : : reserve ( storage . full_path , total_size ) ; / / / May throw . <nl> + <nl> + for ( const auto & part : future_part . parts ) <nl> { <nl> - if ( storage - > currently_merging . count ( part ) ) <nl> + if ( storage . currently_merging . count ( part ) ) <nl> throw Exception ( " Tagging alreagy tagged part " + part - > name + " . This is a bug . " , ErrorCodes : : LOGICAL_ERROR ) ; <nl> } <nl> - storage - > currently_merging . insert ( parts . begin ( ) , parts . end ( ) ) ; <nl> + storage . currently_merging . insert ( future_part . parts . begin ( ) , future_part . parts . end ( ) ) ; <nl> } <nl> <nl> ~ CurrentlyMergingPartsTagger ( ) <nl> { <nl> - std : : lock_guard lock ( storage - > currently_merging_mutex ) ; <nl> + std : : lock_guard lock ( storage . currently_merging_mutex ) ; <nl> <nl> - for ( const auto & part : parts ) <nl> + for ( const auto & part : future_part . parts ) <nl> { <nl> - if ( ! storage - > currently_merging . count ( part ) ) <nl> + if ( ! storage . currently_merging . count ( part ) ) <nl> std : : terminate ( ) ; <nl> - storage - > currently_merging . erase ( part ) ; <nl> + storage . currently_merging . erase ( part ) ; <nl> + } <nl> + <nl> + / / / Update the information about failed parts in the system . mutations table . <nl> + <nl> + Int64 sources_data_version = future_part . parts . at ( 0 ) - > info . getDataVersion ( ) ; <nl> + Int64 result_data_version = future_part . part_info . getDataVersion ( ) ; <nl> + auto mutations_begin_it = storage . current_mutations_by_version . end ( ) ; <nl> + auto mutations_end_it = storage . current_mutations_by_version . end ( ) ; <nl> + if ( sources_data_version ! = result_data_version ) <nl> + { <nl> + mutations_begin_it = storage . current_mutations_by_version . upper_bound ( sources_data_version ) ; <nl> + mutations_end_it = storage . current_mutations_by_version . upper_bound ( result_data_version ) ; <nl> + } <nl> + <nl> + for ( auto it = mutations_begin_it ; it ! = mutations_end_it ; + + it ) <nl> + { <nl> + MergeTreeMutationEntry & entry = it - > second ; <nl> + if ( is_successful ) <nl> + { <nl> + if ( ! entry . latest_failed_part . empty ( ) & & future_part . part_info . contains ( entry . latest_failed_part_info ) ) <nl> + { <nl> + entry . latest_failed_part . clear ( ) ; <nl> + entry . latest_failed_part_info = MergeTreePartInfo ( ) ; <nl> + entry . latest_fail_time = 0 ; <nl> + entry . latest_fail_reason . clear ( ) ; <nl> + } <nl> + } <nl> + else <nl> + { <nl> + entry . latest_failed_part = future_part . parts . at ( 0 ) - > name ; <nl> + entry . latest_failed_part_info = future_part . parts . at ( 0 ) - > info ; <nl> + entry . latest_fail_time = time ( nullptr ) ; <nl> + entry . latest_fail_reason = exception_message ; <nl> + } <nl> } <nl> } <nl> } ; <nl> void StorageMergeTree : : mutate ( const MutationCommands & commands , const Context & <nl> Int64 version = increment . get ( ) ; <nl> entry . commit ( version ) ; <nl> file_name = entry . file_name ; <nl> - current_mutations_by_version . emplace ( version , std : : move ( entry ) ) ; <nl> + auto insertion = current_mutations_by_id . emplace ( file_name , std : : move ( entry ) ) ; <nl> + current_mutations_by_version . emplace ( version , insertion . first - > second ) ; <nl> } <nl> <nl> LOG_INFO ( log , " Added mutation : " < < file_name ) ; <nl> background_task_handle - > wake ( ) ; <nl> } <nl> <nl> - <nl> std : : vector < MergeTreeMutationStatus > StorageMergeTree : : getMutationsStatus ( ) const <nl> { <nl> std : : lock_guard lock ( currently_merging_mutex ) ; <nl> std : : vector < MergeTreeMutationStatus > StorageMergeTree : : getMutationsStatus ( ) cons <nl> block_numbers_map , <nl> parts_to_do , <nl> ( parts_to_do = = 0 ) , <nl> + entry . latest_failed_part , <nl> + entry . latest_fail_time , <nl> + entry . latest_fail_reason , <nl> } ) ; <nl> } <nl> } <nl> std : : vector < MergeTreeMutationStatus > StorageMergeTree : : getMutationsStatus ( ) cons <nl> return result ; <nl> } <nl> <nl> + CancellationCode StorageMergeTree : : killMutation ( const String & mutation_id ) <nl> + { <nl> + LOG_TRACE ( log , " Killing mutation " < < mutation_id ) ; <nl> + <nl> + std : : optional < MergeTreeMutationEntry > to_kill ; <nl> + { <nl> + std : : lock_guard lock ( currently_merging_mutex ) ; <nl> + auto it = current_mutations_by_id . find ( mutation_id ) ; <nl> + if ( it ! = current_mutations_by_id . end ( ) ) <nl> + { <nl> + to_kill . emplace ( std : : move ( it - > second ) ) ; <nl> + current_mutations_by_id . erase ( it ) ; <nl> + current_mutations_by_version . erase ( to_kill - > block_number ) ; <nl> + } <nl> + } <nl> + <nl> + if ( ! to_kill ) <nl> + return CancellationCode : : NotFound ; <nl> + <nl> + global_context . getMergeList ( ) . cancelPartMutations ( { } , to_kill - > block_number ) ; <nl> + to_kill - > removeFile ( ) ; <nl> + LOG_TRACE ( log , " Cancelled part mutations and removed mutation file " < < mutation_id ) ; <nl> + <nl> + / / / Maybe there is another mutation that was blocked by the killed one . Try to execute it immediately . <nl> + background_task_handle - > wake ( ) ; <nl> + <nl> + return CancellationCode : : CancelSent ; <nl> + } <nl> + <nl> <nl> void StorageMergeTree : : loadMutations ( ) <nl> { <nl> void StorageMergeTree : : loadMutations ( ) <nl> { <nl> MergeTreeMutationEntry entry ( full_path , it . name ( ) ) ; <nl> Int64 block_number = entry . block_number ; <nl> - current_mutations_by_version . emplace ( block_number , std : : move ( entry ) ) ; <nl> + auto insertion = current_mutations_by_id . emplace ( it . name ( ) , std : : move ( entry ) ) ; <nl> + current_mutations_by_version . emplace ( block_number , insertion . first - > second ) ; <nl> } <nl> else if ( startsWith ( it . name ( ) , " tmp_mutation_ " ) ) <nl> { <nl> bool StorageMergeTree : : merge ( <nl> { <nl> auto structure_lock = lockStructure ( true ) ; <nl> <nl> - MergeTreeDataMergerMutator : : FuturePart future_part ; <nl> + FutureMergedMutatedPart future_part ; <nl> <nl> / / / You must call destructor with unlocked ` currently_merging_mutex ` . <nl> std : : optional < CurrentlyMergingPartsTagger > merging_tagger ; <nl> bool StorageMergeTree : : merge ( <nl> if ( ! selected ) <nl> return false ; <nl> <nl> - merging_tagger . emplace ( future_part . parts , MergeTreeDataMergerMutator : : estimateNeededDiskSpace ( future_part . parts ) , * this ) ; <nl> + merging_tagger . emplace ( future_part , MergeTreeDataMergerMutator : : estimateNeededDiskSpace ( future_part . parts ) , * this ) ; <nl> } <nl> <nl> - MergeList : : EntryPtr merge_entry = global_context . getMergeList ( ) . insert ( database_name , table_name , future_part . name , future_part . parts ) ; <nl> + MergeList : : EntryPtr merge_entry = global_context . getMergeList ( ) . insert ( database_name , table_name , future_part ) ; <nl> <nl> / / / Logging <nl> Stopwatch stopwatch ; <nl> bool StorageMergeTree : : merge ( <nl> <nl> part_log_elem . database_name = database_name ; <nl> part_log_elem . table_name = table_name ; <nl> + part_log_elem . partition_id = future_part . part_info . partition_id ; <nl> part_log_elem . part_name = future_part . name ; <nl> <nl> if ( new_part ) <nl> bool StorageMergeTree : : merge ( <nl> for ( const auto & source_part : future_part . parts ) <nl> part_log_elem . source_part_names . push_back ( source_part - > name ) ; <nl> <nl> - part_log_elem . rows_read = ( * merge_entry ) - > bytes_read_uncompressed ; <nl> + part_log_elem . rows_read = ( * merge_entry ) - > rows_read ; <nl> part_log_elem . bytes_read_uncompressed = ( * merge_entry ) - > bytes_read_uncompressed ; <nl> <nl> part_log_elem . rows = ( * merge_entry ) - > rows_written ; <nl> bool StorageMergeTree : : merge ( <nl> merging_tagger - > reserved_space . get ( ) , deduplicate ) ; <nl> merger_mutator . renameMergedTemporaryPart ( new_part , future_part . parts , nullptr ) ; <nl> <nl> + merging_tagger - > is_successful = true ; <nl> write_part_log ( { } ) ; <nl> } <nl> catch ( . . . ) <nl> { <nl> + merging_tagger - > exception_message = getCurrentExceptionMessage ( false ) ; <nl> write_part_log ( ExecutionStatus : : fromCurrentException ( ) ) ; <nl> throw ; <nl> } <nl> bool StorageMergeTree : : tryMutatePart ( ) <nl> { <nl> auto structure_lock = lockStructure ( true ) ; <nl> <nl> - MergeTreeDataMergerMutator : : FuturePart future_part ; <nl> + FutureMergedMutatedPart future_part ; <nl> MutationCommands commands ; <nl> / / / You must call destructor with unlocked ` currently_merging_mutex ` . <nl> std : : optional < CurrentlyMergingPartsTagger > tagger ; <nl> bool StorageMergeTree : : tryMutatePart ( ) <nl> future_part . part_info = new_part_info ; <nl> future_part . name = part - > getNewName ( new_part_info ) ; <nl> <nl> - tagger . emplace ( { part } , estimated_needed_space , * this ) ; <nl> + tagger . emplace ( future_part , estimated_needed_space , * this ) ; <nl> break ; <nl> } <nl> } <nl> bool StorageMergeTree : : tryMutatePart ( ) <nl> if ( ! tagger ) <nl> return false ; <nl> <nl> + MergeList : : EntryPtr merge_entry = global_context . getMergeList ( ) . insert ( database_name , table_name , future_part ) ; <nl> + <nl> Stopwatch stopwatch ; <nl> MergeTreeData : : MutableDataPartPtr new_part ; <nl> <nl> bool StorageMergeTree : : tryMutatePart ( ) <nl> <nl> part_log_elem . database_name = database_name ; <nl> part_log_elem . table_name = table_name ; <nl> + part_log_elem . partition_id = future_part . part_info . partition_id ; <nl> part_log_elem . part_name = future_part . name ; <nl> <nl> + part_log_elem . rows_read = ( * merge_entry ) - > rows_read ; <nl> + part_log_elem . bytes_read_uncompressed = ( * merge_entry ) - > bytes_read_uncompressed ; <nl> + <nl> + part_log_elem . rows = ( * merge_entry ) - > rows_written ; <nl> + part_log_elem . bytes_uncompressed = ( * merge_entry ) - > bytes_written_uncompressed ; <nl> + <nl> if ( new_part ) <nl> - { <nl> part_log_elem . bytes_compressed_on_disk = new_part - > bytes_on_disk ; <nl> - part_log_elem . rows = new_part - > rows_count ; <nl> - } <nl> <nl> part_log_elem . source_part_names . reserve ( future_part . parts . size ( ) ) ; <nl> for ( const auto & source_part : future_part . parts ) <nl> bool StorageMergeTree : : tryMutatePart ( ) <nl> <nl> try <nl> { <nl> - new_part = merger_mutator . mutatePartToTemporaryPart ( future_part , commands , global_context ) ; <nl> + new_part = merger_mutator . mutatePartToTemporaryPart ( future_part , commands , * merge_entry , global_context ) ; <nl> data . renameTempPartAndReplace ( new_part ) ; <nl> + tagger - > is_successful = true ; <nl> write_part_log ( { } ) ; <nl> } <nl> catch ( . . . ) <nl> { <nl> + tagger - > exception_message = getCurrentExceptionMessage ( false ) ; <nl> write_part_log ( ExecutionStatus : : fromCurrentException ( ) ) ; <nl> throw ; <nl> } <nl> void StorageMergeTree : : clearOldMutations ( ) <nl> for ( size_t i = 0 ; i < to_delete_count ; + + i ) <nl> { <nl> mutations_to_delete . push_back ( std : : move ( it - > second ) ) ; <nl> + current_mutations_by_id . erase ( mutations_to_delete . back ( ) . file_name ) ; <nl> it = current_mutations_by_version . erase ( it ) ; <nl> } <nl> } <nl> mmm a / dbms / src / Storages / StorageMergeTree . h <nl> ppp b / dbms / src / Storages / StorageMergeTree . h <nl> class StorageMergeTree : public ext : : shared_ptr_helper < StorageMergeTree > , public <nl> void alterPartition ( const ASTPtr & query , const PartitionCommands & commands , const Context & context ) override ; <nl> <nl> void mutate ( const MutationCommands & commands , const Context & context ) override ; <nl> - <nl> std : : vector < MergeTreeMutationStatus > getMutationsStatus ( ) const ; <nl> + CancellationCode killMutation ( const String & mutation_id ) override ; <nl> <nl> void drop ( ) override ; <nl> void truncate ( const ASTPtr & , const Context & ) override ; <nl> class StorageMergeTree : public ext : : shared_ptr_helper < StorageMergeTree > , public <nl> <nl> mutable std : : mutex currently_merging_mutex ; <nl> MergeTreeData : : DataParts currently_merging ; <nl> - std : : multimap < Int64 , MergeTreeMutationEntry > current_mutations_by_version ; <nl> + std : : map < String , MergeTreeMutationEntry > current_mutations_by_id ; <nl> + std : : multimap < Int64 , MergeTreeMutationEntry & > current_mutations_by_version ; <nl> <nl> Logger * log ; <nl> <nl> mmm a / dbms / src / Storages / StorageReplicatedMergeTree . cpp <nl> ppp b / dbms / src / Storages / StorageReplicatedMergeTree . cpp <nl> void StorageReplicatedMergeTree : : writePartLog ( <nl> <nl> part_log_elem . database_name = database_name ; <nl> part_log_elem . table_name = table_name ; <nl> + part_log_elem . partition_id = MergeTreePartInfo : : fromPartName ( new_part_name , data . format_version ) . partition_id ; <nl> part_log_elem . part_name = new_part_name ; <nl> <nl> if ( result_part ) <nl> void StorageReplicatedMergeTree : : writePartLog ( <nl> <nl> if ( merge_entry ) <nl> { <nl> - part_log_elem . rows_read = ( * merge_entry ) - > bytes_read_uncompressed ; <nl> + part_log_elem . rows_read = ( * merge_entry ) - > rows_read ; <nl> part_log_elem . bytes_read_uncompressed = ( * merge_entry ) - > bytes_read_uncompressed ; <nl> <nl> part_log_elem . rows = ( * merge_entry ) - > rows_written ; <nl> bool StorageReplicatedMergeTree : : tryExecuteMerge ( const LogEntry & entry ) <nl> <nl> auto table_lock = lockStructure ( false ) ; <nl> <nl> - MergeList : : EntryPtr merge_entry = global_context . getMergeList ( ) . insert ( database_name , table_name , entry . new_part_name , parts ) ; <nl> - <nl> - MergeTreeDataMergerMutator : : FuturePart future_merged_part ( parts ) ; <nl> + FutureMergedMutatedPart future_merged_part ( parts ) ; <nl> if ( future_merged_part . name ! = entry . new_part_name ) <nl> { <nl> throw Exception ( " Future merged part name ` " + future_merged_part . name + " ` differs from part name in log entry : ` " <nl> + entry . new_part_name + " ` " , ErrorCodes : : BAD_DATA_PART_NAME ) ; <nl> } <nl> <nl> + MergeList : : EntryPtr merge_entry = global_context . getMergeList ( ) . insert ( database_name , table_name , future_merged_part ) ; <nl> + <nl> MergeTreeData : : Transaction transaction ( data ) ; <nl> MergeTreeData : : MutableDataPartPtr part ; <nl> <nl> bool StorageReplicatedMergeTree : : tryExecutePartMutation ( const StorageReplicatedM <nl> MergeTreeData : : MutableDataPartPtr new_part ; <nl> MergeTreeData : : Transaction transaction ( data ) ; <nl> <nl> - MergeTreeDataMergerMutator : : FuturePart future_mutated_part ; <nl> + FutureMergedMutatedPart future_mutated_part ; <nl> future_mutated_part . parts . push_back ( source_part ) ; <nl> future_mutated_part . part_info = new_part_info ; <nl> future_mutated_part . name = entry . new_part_name ; <nl> <nl> + MergeList : : EntryPtr merge_entry = global_context . getMergeList ( ) . insert ( <nl> + database_name , table_name , future_mutated_part ) ; <nl> + <nl> Stopwatch stopwatch ; <nl> <nl> auto write_part_log = [ & ] ( const ExecutionStatus & execution_status ) <nl> { <nl> writePartLog ( <nl> PartLogElement : : MUTATE_PART , execution_status , stopwatch . elapsed ( ) , <nl> - entry . new_part_name , new_part , future_mutated_part . parts , nullptr ) ; <nl> + entry . new_part_name , new_part , future_mutated_part . parts , merge_entry . get ( ) ) ; <nl> } ; <nl> <nl> try <nl> { <nl> - new_part = merger_mutator . mutatePartToTemporaryPart ( future_mutated_part , commands , global_context ) ; <nl> + new_part = merger_mutator . mutatePartToTemporaryPart ( future_mutated_part , commands , * merge_entry , global_context ) ; <nl> data . renameTempPartAndReplace ( new_part , nullptr , & transaction ) ; <nl> <nl> try <nl> void StorageReplicatedMergeTree : : mergeSelectingTask ( ) <nl> <nl> if ( max_source_parts_size > 0 ) <nl> { <nl> - MergeTreeDataMergerMutator : : FuturePart future_merged_part ; <nl> + FutureMergedMutatedPart future_merged_part ; <nl> if ( merger_mutator . selectPartsToMerge ( future_merged_part , false , max_source_parts_size , merge_pred ) ) <nl> { <nl> success = createLogEntryToMergeParts ( zookeeper , future_merged_part . parts , future_merged_part . name , deduplicate ) ; <nl> bool StorageReplicatedMergeTree : : optimize ( const ASTPtr & query , const ASTPtr & p <nl> <nl> for ( const String & partition_id : partition_ids ) <nl> { <nl> - MergeTreeDataMergerMutator : : FuturePart future_merged_part ; <nl> + FutureMergedMutatedPart future_merged_part ; <nl> bool selected = merger_mutator . selectAllPartsToMergeWithinPartition ( <nl> future_merged_part , disk_space , can_merge , partition_id , true , nullptr ) ; <nl> if ( selected & & <nl> bool StorageReplicatedMergeTree : : optimize ( const ASTPtr & query , const ASTPtr & p <nl> } <nl> else <nl> { <nl> - MergeTreeDataMergerMutator : : FuturePart future_merged_part ; <nl> + FutureMergedMutatedPart future_merged_part ; <nl> String disable_reason ; <nl> bool selected = false ; <nl> if ( ! partition ) <nl> std : : vector < MergeTreeMutationStatus > StorageReplicatedMergeTree : : getMutationsSta <nl> return queue . getMutationsStatus ( ) ; <nl> } <nl> <nl> + CancellationCode StorageReplicatedMergeTree : : killMutation ( const String & mutation_id ) <nl> + { <nl> + assertNotReadonly ( ) ; <nl> + <nl> + zkutil : : ZooKeeperPtr zookeeper = getZooKeeper ( ) ; <nl> + <nl> + LOG_TRACE ( log , " Killing mutation " < < mutation_id ) ; <nl> + <nl> + auto mutation_entry = queue . removeMutation ( zookeeper , mutation_id ) ; <nl> + if ( ! mutation_entry ) <nl> + return CancellationCode : : NotFound ; <nl> + <nl> + / / / After this point no new part mutations will start and part mutations that still exist <nl> + / / / in the queue will be skipped . <nl> + <nl> + / / / Cancel already running part mutations . <nl> + for ( const auto & pair : mutation_entry - > block_numbers ) <nl> + { <nl> + const String & partition_id = pair . first ; <nl> + Int64 block_number = pair . second ; <nl> + global_context . getMergeList ( ) . cancelPartMutations ( partition_id , block_number ) ; <nl> + } <nl> + return CancellationCode : : CancelSent ; <nl> + } <nl> + <nl> <nl> void StorageReplicatedMergeTree : : clearOldPartsAndRemoveFromZK ( ) <nl> { <nl> mmm a / dbms / src / Storages / StorageReplicatedMergeTree . h <nl> ppp b / dbms / src / Storages / StorageReplicatedMergeTree . h <nl> class StorageReplicatedMergeTree : public ext : : shared_ptr_helper < StorageReplicat <nl> void alterPartition ( const ASTPtr & query , const PartitionCommands & commands , const Context & query_context ) override ; <nl> <nl> void mutate ( const MutationCommands & commands , const Context & context ) override ; <nl> - <nl> std : : vector < MergeTreeMutationStatus > getMutationsStatus ( ) const ; <nl> + CancellationCode killMutation ( const String & mutation_id ) override ; <nl> <nl> / * * Removes a replica from ZooKeeper . If there are no other replicas , it deletes the entire table from ZooKeeper . <nl> * / <nl> mmm a / dbms / src / Storages / System / StorageSystemMerges . cpp <nl> ppp b / dbms / src / Storages / System / StorageSystemMerges . cpp <nl> NamesAndTypesList StorageSystemMerges : : getNamesAndTypes ( ) <nl> { " source_part_names " , std : : make_shared < DataTypeArray > ( std : : make_shared < DataTypeString > ( ) ) } , <nl> { " result_part_name " , std : : make_shared < DataTypeString > ( ) } , <nl> { " partition_id " , std : : make_shared < DataTypeString > ( ) } , <nl> + { " is_mutation " , std : : make_shared < DataTypeUInt8 > ( ) } , <nl> { " total_size_bytes_compressed " , std : : make_shared < DataTypeUInt64 > ( ) } , <nl> { " total_size_marks " , std : : make_shared < DataTypeUInt64 > ( ) } , <nl> { " bytes_read_uncompressed " , std : : make_shared < DataTypeUInt64 > ( ) } , <nl> void StorageSystemMerges : : fillData ( MutableColumns & res_columns , const Context & <nl> res_columns [ i + + ] - > insert ( merge . source_part_names ) ; <nl> res_columns [ i + + ] - > insert ( merge . result_part_name ) ; <nl> res_columns [ i + + ] - > insert ( merge . partition_id ) ; <nl> + res_columns [ i + + ] - > insert ( merge . is_mutation ) ; <nl> res_columns [ i + + ] - > insert ( merge . total_size_bytes_compressed ) ; <nl> res_columns [ i + + ] - > insert ( merge . total_size_marks ) ; <nl> res_columns [ i + + ] - > insert ( merge . bytes_read_uncompressed ) ; <nl> mmm a / dbms / src / Storages / System / StorageSystemMutations . cpp <nl> ppp b / dbms / src / Storages / System / StorageSystemMutations . cpp <nl> NamesAndTypesList StorageSystemMutations : : getNamesAndTypes ( ) <nl> { " block_numbers . number " , std : : make_shared < DataTypeArray > ( std : : make_shared < DataTypeInt64 > ( ) ) } , <nl> { " parts_to_do " , std : : make_shared < DataTypeInt64 > ( ) } , <nl> { " is_done " , std : : make_shared < DataTypeUInt8 > ( ) } , <nl> + { " latest_failed_part " , std : : make_shared < DataTypeString > ( ) } , <nl> + { " latest_fail_time " , std : : make_shared < DataTypeDateTime > ( ) } , <nl> + { " latest_fail_reason " , std : : make_shared < DataTypeString > ( ) } , <nl> } ; <nl> } <nl> <nl> void StorageSystemMutations : : fillData ( MutableColumns & res_columns , const Contex <nl> res_columns [ col_num + + ] - > insert ( block_numbers ) ; <nl> res_columns [ col_num + + ] - > insert ( status . parts_to_do ) ; <nl> res_columns [ col_num + + ] - > insert ( status . is_done ) ; <nl> + res_columns [ col_num + + ] - > insert ( status . latest_failed_part ) ; <nl> + res_columns [ col_num + + ] - > insert ( UInt64 ( status . latest_fail_time ) ) ; <nl> + res_columns [ col_num + + ] - > insert ( status . latest_fail_reason ) ; <nl> } <nl> } <nl> } <nl> new file mode 100644 <nl> index 00000000000 . . 577cf2d4e04 <nl> mmm / dev / null <nl> ppp b / dbms / tests / queries / 0_stateless / 00834_kill_mutation . reference <nl> <nl> + * * * Create and kill a single invalid mutation * * * <nl> + mutation_3 . txt 1 1 Code : 6 , <nl> + waiting test kill_mutation mutation_3 . txt <nl> + * * * Create and kill invalid mutation that blocks another mutation * * * <nl> + mutation_4 . txt 1 1 Code : 6 , <nl> + waiting test kill_mutation mutation_4 . txt <nl> + 2001 - 01 - 01 2 b <nl> new file mode 100755 <nl> index 00000000000 . . d70963db8e2 <nl> mmm / dev / null <nl> ppp b / dbms / tests / queries / 0_stateless / 00834_kill_mutation . sh <nl> <nl> + # ! / usr / bin / env bash <nl> + <nl> + CURDIR = $ ( cd " $ ( dirname " $ { BASH_SOURCE [ 0 ] } " ) " & & pwd ) <nl> + . $ CURDIR / . . / shell_config . sh <nl> + <nl> + . $ CURDIR / mergetree_mutations . lib <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " DROP TABLE IF EXISTS test . kill_mutation " <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " CREATE TABLE test . kill_mutation ( d Date , x UInt32 , s String ) ENGINE MergeTree ORDER BY x PARTITION BY d " <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " INSERT INTO test . kill_mutation VALUES ( ' 2000 - 01 - 01 ' , 1 , ' a ' ) " <nl> + $ { CLICKHOUSE_CLIENT } - - query = " INSERT INTO test . kill_mutation VALUES ( ' 2001 - 01 - 01 ' , 2 , ' b ' ) " <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " SELECT ' * * * Create and kill a single invalid mutation * * * ' " <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " ALTER TABLE test . kill_mutation DELETE WHERE toUInt32 ( s ) = 1 " <nl> + <nl> + sleep 0 . 1 <nl> + $ { CLICKHOUSE_CLIENT } - - query = " SELECT mutation_id , latest_failed_part IN ( ' 20000101_1_1_0 ' , ' 20010101_2_2_0 ' ) , latest_fail_time ! = 0 , substr ( latest_fail_reason , 1 , 8 ) FROM system . mutations WHERE database = ' test ' AND table = ' kill_mutation ' " <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " KILL MUTATION WHERE database = ' test ' AND table = ' kill_mutation ' " <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " SELECT mutation_id FROM system . mutations WHERE database = ' test ' AND table = ' kill_mutation ' " <nl> + <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " SELECT ' * * * Create and kill invalid mutation that blocks another mutation * * * ' " <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " ALTER TABLE test . kill_mutation DELETE WHERE toUInt32 ( s ) = 1 " <nl> + $ { CLICKHOUSE_CLIENT } - - query = " ALTER TABLE test . kill_mutation DELETE WHERE x = 1 " <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " SELECT mutation_id , latest_failed_part IN ( ' 20000101_1_1_0 ' , ' 20010101_2_2_0 ' ) , latest_fail_time ! = 0 , substr ( latest_fail_reason , 1 , 8 ) FROM system . mutations WHERE database = ' test ' AND table = ' kill_mutation ' AND mutation_id = ' mutation_4 . txt ' " <nl> + <nl> + sleep 0 . 1 <nl> + $ { CLICKHOUSE_CLIENT } - - query = " KILL MUTATION WHERE database = ' test ' AND table = ' kill_mutation ' AND mutation_id = ' mutation_4 . txt ' " <nl> + <nl> + wait_for_mutation " kill_mutation " " mutation_5 . txt " <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " SELECT * FROM test . kill_mutation " <nl> + <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " DROP TABLE test . kill_mutation " <nl> new file mode 100644 <nl> index 00000000000 . . 3db1b92953c <nl> mmm / dev / null <nl> ppp b / dbms / tests / queries / 0_stateless / 00834_kill_mutation_replicated_zookeeper . reference <nl> <nl> + * * * Create and kill a single invalid mutation * * * <nl> + 0000000000 1 1 Code : 6 , <nl> + waiting test kill_mutation_r1 0000000000 <nl> + * * * Create and kill invalid mutation that blocks another mutation * * * <nl> + 0000000001 1 1 Code : 6 , <nl> + waiting test kill_mutation_r1 0000000001 <nl> + 2001 - 01 - 01 2 b <nl> new file mode 100755 <nl> index 00000000000 . . dfaa85f2f2b <nl> mmm / dev / null <nl> ppp b / dbms / tests / queries / 0_stateless / 00834_kill_mutation_replicated_zookeeper . sh <nl> <nl> + # ! / usr / bin / env bash <nl> + <nl> + CURDIR = $ ( cd " $ ( dirname " $ { BASH_SOURCE [ 0 ] } " ) " & & pwd ) <nl> + . $ CURDIR / . . / shell_config . sh <nl> + <nl> + . $ CURDIR / mergetree_mutations . lib <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " DROP TABLE IF EXISTS test . kill_mutation_r1 " <nl> + $ { CLICKHOUSE_CLIENT } - - query = " DROP TABLE IF EXISTS test . kill_mutation_r2 " <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " CREATE TABLE test . kill_mutation_r1 ( d Date , x UInt32 , s String ) ENGINE ReplicatedMergeTree ( ' / clickhouse / tables / test / kill_mutation ' , ' 1 ' ) ORDER BY x PARTITION BY d " <nl> + $ { CLICKHOUSE_CLIENT } - - query = " CREATE TABLE test . kill_mutation_r2 ( d Date , x UInt32 , s String ) ENGINE ReplicatedMergeTree ( ' / clickhouse / tables / test / kill_mutation ' , ' 2 ' ) ORDER BY x PARTITION BY d " <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " INSERT INTO test . kill_mutation_r1 VALUES ( ' 2000 - 01 - 01 ' , 1 , ' a ' ) " <nl> + $ { CLICKHOUSE_CLIENT } - - query = " INSERT INTO test . kill_mutation_r1 VALUES ( ' 2001 - 01 - 01 ' , 2 , ' b ' ) " <nl> + <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " SELECT ' * * * Create and kill a single invalid mutation * * * ' " <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " ALTER TABLE test . kill_mutation_r1 DELETE WHERE toUInt32 ( s ) = 1 " <nl> + <nl> + sleep 1 <nl> + $ { CLICKHOUSE_CLIENT } - - query = " SELECT mutation_id , latest_failed_part IN ( ' 20000101_0_0_0 ' , ' 20010101_0_0_0 ' ) , latest_fail_time ! = 0 , substr ( latest_fail_reason , 1 , 8 ) FROM system . mutations WHERE database = ' test ' AND table = ' kill_mutation_r1 ' " <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " KILL MUTATION WHERE database = ' test ' AND table = ' kill_mutation_r1 ' " <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " SELECT mutation_id FROM system . mutations WHERE database = ' test ' AND table = ' kill_mutation_r1 ' " <nl> + <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " SELECT ' * * * Create and kill invalid mutation that blocks another mutation * * * ' " <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " SYSTEM SYNC REPLICA test . kill_mutation_r1 " <nl> + $ { CLICKHOUSE_CLIENT } - - query = " ALTER TABLE test . kill_mutation_r1 DELETE WHERE toUInt32 ( s ) = 1 " <nl> + $ { CLICKHOUSE_CLIENT } - - query = " ALTER TABLE test . kill_mutation_r1 DELETE WHERE x = 1 " <nl> + <nl> + sleep 1 <nl> + $ { CLICKHOUSE_CLIENT } - - query = " SELECT mutation_id , latest_failed_part IN ( ' 20000101_0_0_0_1 ' , ' 20010101_0_0_0_1 ' ) , latest_fail_time ! = 0 , substr ( latest_fail_reason , 1 , 8 ) FROM system . mutations WHERE database = ' test ' AND table = ' kill_mutation_r1 ' AND mutation_id = ' 0000000001 ' " <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " KILL MUTATION WHERE database = ' test ' AND table = ' kill_mutation_r1 ' AND mutation_id = ' 0000000001 ' " <nl> + <nl> + wait_for_mutation " kill_mutation_r2 " " 0000000002 " <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " SELECT * FROM test . kill_mutation_r2 " <nl> + <nl> + <nl> + $ { CLICKHOUSE_CLIENT } - - query = " DROP TABLE test . kill_mutation_r1 " <nl> + $ { CLICKHOUSE_CLIENT } - - query = " DROP TABLE test . kill_mutation_r2 " <nl> mmm a / docs / en / operations / system_tables . md <nl> ppp b / docs / en / operations / system_tables . md <nl> Columns : <nl> <nl> # # system . merges <nl> <nl> - Contains information about merges currently in process for tables in the MergeTree family . <nl> + Contains information about merges and part mutations currently in process for tables in the MergeTree family . <nl> <nl> Columns : <nl> <nl> Columns : <nl> - ` progress Float64 ` — The percentage of completed work from 0 to 1 . <nl> - ` num_parts UInt64 ` — The number of pieces to be merged . <nl> - ` result_part_name String ` — The name of the part that will be formed as the result of merging . <nl> + - ` is_mutation UInt8 ` - 1 if this process is a part mutation . <nl> - ` total_size_bytes_compressed UInt64 ` — The total size of the compressed data in the merged chunks . <nl> - ` total_size_marks UInt64 ` — The total number of marks in the merged partss . <nl> - ` bytes_read_uncompressed UInt64 ` — Number of bytes read , uncompressed . <nl> pzxid : 987021252247 <nl> path : / clickhouse / tables / 01 - 08 / visits / replicas <nl> ` ` ` <nl> <nl> + # # system . mutations { # system_tables - mutations } <nl> + <nl> + The table contains information about [ mutations ] ( . . / query_language / alter . md # alter - mutations ) of MergeTree tables and their progress . Each mutation command is represented by a single row . The table has the following columns : <nl> + <nl> + * * database * * , * * table * * - The name of the database and table to which the mutation was applied . <nl> + <nl> + * * mutation_id * * - The ID of the mutation . For replicated tables these IDs correspond to znode names in the ` < table_path_in_zookeeper > / mutations / ` directory in ZooKeeper . For unreplicated tables the IDs correspond to file names in the data directory of the table . <nl> + <nl> + * * command * * - The mutation command string ( the part of the query after ` ALTER TABLE [ db . ] table ` ) . <nl> + <nl> + * * create_time * * - When this mutation command was submitted for execution . <nl> + <nl> + * * block_numbers . partition_id * * , * * block_numbers . number * * - A Nested column . For mutations of replicated tables contains one record for each partition : the partition ID and the block number that was acquired by the mutation ( in each partition only parts that contain blocks with numbers less than the block number acquired by the mutation in that partition will be mutated ) . Because in non - replicated tables blocks numbers in all partitions form a single sequence , for mutatations of non - replicated tables the column will contain one record with a single block number acquired by the mutation . <nl> + <nl> + * * parts_to_do * * - The number of data parts that need to be mutated for the mutation to finish . <nl> + <nl> + * * is_done * * - Is the mutation done ? Note that even if ` parts_to_do = 0 ` it is possible that a mutation of a replicated table is not done yet because of a long - running INSERT that will create a new data part that will need to be mutated . <nl> + <nl> + If there were problems with mutating some parts the following columns contain additional information : <nl> + <nl> + * * latest_failed_part * * - The name of the most recent part that could not be mutated . <nl> + <nl> + * * latest_fail_time * * - The time of the most recent part mutation failure . <nl> + <nl> + * * latest_fail_reason * * - The exception message that caused the most recent part mutation failure . <nl> + <nl> [ Original article ] ( https : / / clickhouse . yandex / docs / en / operations / system_tables / ) < ! - - hide - - > <nl> mmm a / docs / en / query_language / alter . md <nl> ppp b / docs / en / query_language / alter . md <nl> For * MergeTree tables mutations execute by rewriting whole data parts . There is <nl> <nl> Mutations are totally ordered by their creation order and are applied to each part in that order . Mutations are also partially ordered with INSERTs - data that was inserted into the table before the mutation was submitted will be mutated and data that was inserted after that will not be mutated . Note that mutations do not block INSERTs in any way . <nl> <nl> - A mutation query returns immediately after the mutation entry is added ( in case of replicated tables to ZooKeeper , for nonreplicated tables - to the filesystem ) . The mutation itself executes asynchronously using the system profile settings . To track the progress of mutations you can use the ` system . mutations ` table . A mutation that was successfully submitted will continue to execute even if ClickHouse servers are restarted . There is no way to roll back the mutation once it is submitted . <nl> + A mutation query returns immediately after the mutation entry is added ( in case of replicated tables to ZooKeeper , for nonreplicated tables - to the filesystem ) . The mutation itself executes asynchronously using the system profile settings . To track the progress of mutations you can use the [ ` system . mutations ` ] ( . . / operations / system_tables . md # system_tables - mutations ) table . A mutation that was successfully submitted will continue to execute even if ClickHouse servers are restarted . There is no way to roll back the mutation once it is submitted , but if the mutation is stuck for some reason it can be cancelled with the [ ` KILL MUTATION ` ] ( misc . md # kill - mutation ) query . <nl> <nl> Entries for finished mutations are not deleted right away ( the number of preserved entries is determined by the ` finished_mutations_to_keep ` storage engine parameter ) . Older mutation entries are deleted . <nl> <nl> - # # # # system . mutations Table <nl> - <nl> - The table contains information about mutations of MergeTree tables and their progress . Each mutation command is represented by a single row . The table has the following columns : <nl> - <nl> - * * database * * , * * table * * - The name of the database and table to which the mutation was applied . <nl> - <nl> - * * mutation_id * * - The ID of the mutation . For replicated tables these IDs correspond to znode names in the ` < table_path_in_zookeeper > / mutations / ` directory in ZooKeeper . For unreplicated tables the IDs correspond to file names in the data directory of the table . <nl> - <nl> - * * command * * - The mutation command string ( the part of the query after ` ALTER TABLE [ db . ] table ` ) . <nl> - <nl> - * * create_time * * - When this mutation command was submitted for execution . <nl> - <nl> - * * block_numbers . partition_id * * , * * block_numbers . number * * - A Nested column . For mutations of replicated tables contains one record for each partition : the partition ID and the block number that was acquired by the mutation ( in each partition only parts that contain blocks with numbers less than the block number acquired by the mutation in that partition will be mutated ) . Because in non - replicated tables blocks numbers in all partitions form a single sequence , for mutatations of non - replicated tables the column will contain one record with a single block number acquired by the mutation . <nl> - <nl> - * * parts_to_do * * - The number of data parts that need to be mutated for the mutation to finish . <nl> - <nl> - * * is_done * * - Is the mutation done ? Note that even if ` parts_to_do = 0 ` it is possible that a mutation of a replicated table is not done yet because of a long - running INSERT that will create a new data part that will need to be mutated . <nl> - <nl> - <nl> [ Original article ] ( https : / / clickhouse . yandex / docs / en / query_language / alter / ) < ! - - hide - - > <nl> mmm a / docs / en / query_language / misc . md <nl> ppp b / docs / en / query_language / misc . md <nl> The response contains the ` kill_status ` column , which can take the following val <nl> <nl> A test query ( ` TEST ` ) only checks the user ' s rights and displays a list of queries to stop . <nl> <nl> - [ Original article ] ( https : / / clickhouse . yandex / docs / en / query_language / misc / ) < ! - - hide - - > <nl> + # # KILL MUTATION { # kill - mutation } <nl> + <nl> + ` ` ` sql <nl> + KILL MUTATION [ ON CLUSTER cluster ] <nl> + WHERE < where expression to SELECT FROM system . mutations query > <nl> + [ TEST ] <nl> + [ FORMAT format ] <nl> + ` ` ` <nl> + <nl> + Tries to cancel and remove [ mutations ] ( alter . md # alter - mutations ) that are currently executing . Mutations to cancel are selected from the [ ` system . mutations ` ] ( . . / operations / system_tables . md # system_tables - mutations ) table using the filter specified by the ` WHERE ` clause of the ` KILL ` query . <nl> + <nl> + A test query ( ` TEST ` ) only checks the user ' s rights and displays a list of queries to stop . <nl> + <nl> + Examples : <nl> + <nl> + ` ` ` sql <nl> + - - Cancel and remove all mutations of the single table : <nl> + KILL MUTATION WHERE database = ' default ' AND table = ' table ' <nl> + <nl> + - - Cancel the specific mutation : <nl> + KILL MUTATION WHERE database = ' default ' AND table = ' table ' AND mutation_id = ' mutation_3 . txt ' <nl> + ` ` ` <nl> + <nl> + The query is useful when a mutation is stuck and cannot finish ( e . g . if some function in the mutation query throws an exception when applied to the data contained in the table ) . <nl> + <nl> + Changes already made by the mutation are not rolled back . <nl> <nl> # # OPTIMIZE { # misc_operations - optimize } <nl> <nl> USE db <nl> Lets you set the current database for the session . <nl> The current database is used for searching for tables if the database is not explicitly defined in the query with a dot before the table name . <nl> This query can ' t be made when using the HTTP protocol , since there is no concept of a session . <nl> + <nl> + [ Original article ] ( https : / / clickhouse . yandex / docs / en / query_language / misc / ) < ! - - hide - - > <nl> mmm a / docs / ru / operations / system_tables . md <nl> ppp b / docs / ru / operations / system_tables . md <nl> default_expression String - выражение для значения по ум <nl> - ` is_aggregate ` ( ` UInt8 ` ) – Признак , является ли функция агрегатной . <nl> # # system . merges <nl> <nl> - Содержит информацию о производящихся прямо сейчас слияниях для таблиц семейства MergeTree . <nl> + Содержит информацию о производящихся прямо сейчас слияниях и мутациях кусков для таблиц семейства MergeTree . <nl> <nl> Столбцы : <nl> <nl> default_expression String - выражение для значения по ум <nl> - ` progress Float64 ` — Доля выполненной работы от 0 до 1 . <nl> - ` num_parts UInt64 ` — Количество сливаемых кусков . <nl> - ` result_part_name String ` — Имя куска , который будет образован в результате слияния . <nl> + - ` is_mutation UInt8 ` - Является ли данный процесс мутацией куска . <nl> - ` total_size_bytes_compressed UInt64 ` — Суммарный размер сжатых данных сливаемых кусков . <nl> - ` total_size_marks UInt64 ` — Суммарное количество засечек в сливаемых кусках . <nl> - ` bytes_read_uncompressed UInt64 ` — Количество прочитанных байт , разжатых . <nl> pzxid : 987021252247 <nl> path : / clickhouse / tables / 01 - 08 / visits / replicas <nl> ` ` ` <nl> <nl> + # # system . mutations { # system_tables - mutations } <nl> + <nl> + Таблица содержит информацию о ходе выполнения [ мутаций ] ( . . / query_language / alter . md # alter - mutations ) MergeTree - таблиц . Каждой команде мутации соответствует одна строка . В таблице есть следующие столбцы : <nl> + <nl> + * * database * * , * * table * * - имя БД и таблицы , к которой была применена мутация . <nl> + <nl> + * * mutation_id * * - ID запроса . Для реплицированных таблиц эти ID соответствуют именам записей в директории ` < table_path_in_zookeeper > / mutations / ` в ZooKeeper , для нереплицированных - именам файлов в директории с данными таблицы . <nl> + <nl> + * * command * * - Команда мутации ( часть запроса после ` ALTER TABLE [ db . ] table ` ) . <nl> + <nl> + * * create_time * * - Время создания мутации . <nl> + <nl> + * * block_numbers . partition_id * * , * * block_numbers . number * * - Nested - столбец . Для мутаций реплицированных таблиц для каждой партиции содержит номер блока , полученный этой мутацией ( в каждой партиции будут изменены только куски , содержащие блоки с номерами , меньшими номера , полученного мутацией в этой партиции ) . Для нереплицированных таблиц нумерация блоков сквозная по партициям , поэтому столбец содержит одну запись с единственным номером блока , полученным мутацией . <nl> + <nl> + * * parts_to_do * * - Количество кусков таблицы , которые ещё предстоит изменить . <nl> + <nl> + * * is_done * * - Завершена ли мутация . Замечание : даже если ` parts_to_do = 0 ` , для реплицированной таблицы возможна ситуация , когда мутация ещё не завершена из - за долго выполняющейся вставки , которая добавляет данные , которые нужно будет мутировать . <nl> + <nl> + Если во время мутации какого - либо куска возникли проблемы , заполняются следующие столбцы : <nl> + <nl> + * * latest_failed_part * * - Имя последнего куска , мутация которого не удалась . <nl> + <nl> + * * latest_fail_time * * - Время последней неудачной мутации куска . <nl> + <nl> + * * latest_fail_reason * * - Ошибка , возникшая при последней неудачной мутации куска . <nl> + <nl> [ Оригинальная статья ] ( https : / / clickhouse . yandex / docs / ru / operations / system_tables / ) < ! - - hide - - > <nl> mmm a / docs / ru / query_language / alter . md <nl> ppp b / docs / ru / query_language / alter . md <nl> ALTER TABLE [ db . ] table UPDATE column1 = expr1 [ , . . . ] WHERE filter_expr <nl> <nl> Мутации линейно упорядочены между собой и накладываются на каждый кусок в порядке добавления . Мутации также упорядочены со вставками - гарантируется , что данные , вставленные в таблицу до начала выполнения запроса мутации , будут изменены , а данные , вставленные после окончания запроса мутации , изменены не будут . При этом мутации никак не блокируют вставки . <nl> <nl> - Запрос завершается немедленно после добавления информации о мутации ( для реплицированных таблиц - в ZooKeeper , для нереплицированных - на файловую систему ) . Сама мутация выполняется асинхронно , используя настройки системного профиля . Следить за ходом её выполнения можно по таблице ` system . mutations ` . Добавленные мутации будут выполняться до конца даже в случае перезапуска серверов ClickHouse . Откатить мутацию после её добавления нельзя . <nl> + Запрос завершается немедленно после добавления информации о мутации ( для реплицированных таблиц - в ZooKeeper , для нереплицированных - на файловую систему ) . Сама мутация выполняется асинхронно , используя настройки системного профиля . Следить за ходом её выполнения можно по таблице [ ` system . mutations ` ] ( . . / operations / system_tables . md # system_tables - mutations ) . Добавленные мутации будут выполняться до конца даже в случае перезапуска серверов ClickHouse . Откатить мутацию после её добавления нельзя , но если мутация по какой - то причине не может выполниться до конца , её можно остановить с помощью запроса [ ` KILL MUTATION ` ] ( misc . md # kill - mutation ) . <nl> <nl> Записи о последних выполненных мутациях удаляются не сразу ( количество сохраняемых мутаций определяется параметром движка таблиц ` finished_mutations_to_keep ` ) . Более старые записи удаляются . <nl> <nl> - # # # # Таблица system . mutations <nl> - <nl> - Таблица содержит информацию о ходе выполнения мутаций MergeTree - таблиц . Каждой команде мутации соответствует одна строка . В таблице есть следующие столбцы : <nl> - <nl> - * * database * * , * * table * * - имя БД и таблицы , к которой была применена мутация . <nl> - <nl> - * * mutation_id * * - ID запроса . Для реплицированных таблиц эти ID соответствуют именам записей в директории ` < table_path_in_zookeeper > / mutations / ` в ZooKeeper , для нереплицированных - именам файлов в директории с данными таблицы . <nl> - <nl> - * * command * * - Команда мутации ( часть запроса после ` ALTER TABLE [ db . ] table ` ) . <nl> - <nl> - * * create_time * * - Время создания мутации . <nl> - <nl> - * * block_numbers . partition_id * * , * * block_numbers . number * * - Nested - столбец . Для мутаций реплицированных таблиц для каждой партиции содержит номер блока , полученный этой мутацией ( в каждой партиции будут изменены только куски , содержащие блоки с номерами , меньшими номера , полученного мутацией в этой партиции ) . Для нереплицированных таблиц нумерация блоков сквозная по партициям , поэтому столбец содержит одну запись с единственным номером блока , полученным мутацией . <nl> - <nl> - * * parts_to_do * * - Количество кусков таблицы , которые ещё предстоит изменить . <nl> - <nl> - * * is_done * * - Завершена ли мутация . Замечание : даже если ` parts_to_do = 0 ` , для реплицированной таблицы возможна ситуация , когда мутация ещё не завершена из - за долго выполняющейся вставки , которая добавляет данные , которые нужно будет мутировать . <nl> - <nl> [ Оригинальная статья ] ( https : / / clickhouse . yandex / docs / ru / query_language / alter / ) < ! - - hide - - > <nl> mmm a / docs / ru / query_language / misc . md <nl> ppp b / docs / ru / query_language / misc . md <nl> Readonly - пользователи могут останавливать толь <nl> <nl> Тестовый вариант запроса ( ` TEST ` ) только проверяет права пользователя и выводит список запросов для остановки . <nl> <nl> - [ Оригинальная статья ] ( https : / / clickhouse . yandex / docs / ru / query_language / misc / ) < ! - - hide - - > <nl> + # # KILL MUTATION { # kill - mutation } <nl> + <nl> + ` ` ` sql <nl> + KILL MUTATION [ ON CLUSTER cluster ] <nl> + WHERE < where expression to SELECT FROM system . mutations query > <nl> + [ TEST ] <nl> + [ FORMAT format ] <nl> + ` ` ` <nl> + <nl> + Пытается остановить выполняющиеся в данные момент [ мутации ] ( alter . md # alter - mutations ) . Мутации для остановки выбираются из таблицы [ ` system . mutations ` ] ( . . / operations / system_tables . md # system_tables - mutations ) с помощью условия , указанного в секции ` WHERE ` запроса ` KILL ` . <nl> + <nl> + Тестовый вариант запроса ( ` TEST ` ) только проверяет права пользователя и выводит список запросов для остановки . <nl> + <nl> + Примеры : <nl> + <nl> + ` ` ` sql <nl> + - - Останавливает все мутации одной таблицы : <nl> + KILL MUTATION WHERE database = ' default ' AND table = ' table ' <nl> + <nl> + - - Останавливает конкретную мутацию : <nl> + KILL MUTATION WHERE database = ' default ' AND table = ' table ' AND mutation_id = ' mutation_3 . txt ' <nl> + ` ` ` <nl> + <nl> + Запрос полезен в случаях , когда мутация не может выполниться до конца ( например , если функция в запросе мутации бросает исключение на данных таблицы ) . <nl> + <nl> + Данные , уже изменённые мутацией , остаются в таблице ( отката на старую версию данных не происходит ) . <nl> <nl> # # OPTIMIZE <nl> <nl> USE db <nl> Позволяет установить текущую базу данных для сессии . <nl> Текущая база данных используется для поиска таблиц , если база данных не указана в запросе явно через точку перед именем таблицы . <nl> При использовании HTTP протокола запрос не может быть выполнен , так как понятия сессии не существует . <nl> + <nl> + [ Оригинальная статья ] ( https : / / clickhouse . yandex / docs / ru / query_language / misc / ) < ! - - hide - - > <nl>
Merge pull request from yandex / mutations - introspection
ClickHouse/ClickHouse
2777e54a57142b57c4db325b95d38244f240a3c3
2019-02-09T21:51:30Z
mmm a / Documentation / BedLeveling . md <nl> ppp b / Documentation / BedLeveling . md <nl> My preferred method : <nl> * g ) You can raise the z probe with M402 command ; <nl> * h ) Fill the defines bellow multiplying the values by " - 1 " ( just change the signal ) <nl> <nl> - <nl> - * \ # define X_PROBE_OFFSET_FROM_EXTRUDER - 24 . 3 <nl> - * \ # define Y_PROBE_OFFSET_FROM_EXTRUDER 31 . 4 <nl> + * X and Y - Offset must be Integers ! <nl> + * \ # define X_PROBE_OFFSET_FROM_EXTRUDER - 24 <nl> + * \ # define Y_PROBE_OFFSET_FROM_EXTRUDER 31 <nl> * \ # define Z_PROBE_OFFSET_FROM_EXTRUDER - 5 . 1 <nl> <nl> Sled Option Notes <nl>
X and Y must be Integers not Float !
MarlinFirmware/Marlin
4546c92f5bb3e577ba3df15befde728ebc388133
2015-02-10T08:00:48Z
mmm a / tensorflow / tensorboard / components / vz - projector / async . ts <nl> ppp b / tensorflow / tensorboard / components / vz - projector / async . ts <nl> const WARNING_DURATION_MS = 5000 ; <nl> * Animation duration for the user message which should align with ` transition ` <nl> * css property in ` . notify - msg ` in ` vz - projector . html ` . <nl> * / <nl> - const MSG_ANIMATION_DURATION = 250 ; <nl> + const MSG_ANIMATION_DURATION = 300 ; <nl> <nl> <nl> / * * <nl> * Runs an expensive task asynchronously with some delay <nl> * so that it doesn ' t block the UI thread immediately . <nl> + * <nl> + * @ param message The message to display to the user . <nl> + * @ param task The expensive task to run . <nl> + * @ param msgId Optional . ID of an existing message . If provided , will overwrite <nl> + * an existing message and won ' t automatically clear the message when the <nl> + * task is done . <nl> + * @ return The value returned by the task . <nl> * / <nl> - export function runAsyncTask < T > ( message : string , task : ( ) = > T ) : Promise < T > { <nl> - let msgId = updateMessage ( message ) ; <nl> + export function runAsyncTask < T > ( message : string , task : ( ) = > T , <nl> + msgId : string = null ) : Promise < T > { <nl> + let autoClear = ( msgId = = null ) ; <nl> + msgId = updateMessage ( message , msgId ) ; <nl> return new Promise < T > ( ( resolve , reject ) = > { <nl> d3 . timer ( ( ) = > { <nl> try { <nl> let result = task ( ) ; <nl> / / Clearing the old message . <nl> - updateMessage ( null , msgId ) ; <nl> + if ( autoClear ) { <nl> + updateMessage ( null , msgId ) ; <nl> + } <nl> resolve ( result ) ; <nl> } catch ( ex ) { <nl> updateMessage ( ' Error : ' + ex . message ) ; <nl> let msgId = 0 ; <nl> * is assigned . <nl> * @ return The id of the message . <nl> * / <nl> - export function updateMessage ( msg : string , id = null ) : string { <nl> + export function updateMessage ( msg : string , id : string = null ) : string { <nl> if ( id = = null ) { <nl> id = ( msgId + + ) . toString ( ) ; <nl> } <nl> mmm a / tensorflow / tensorboard / components / vz - projector / data - loader . ts <nl> ppp b / tensorflow / tensorboard / components / vz - projector / data - loader . ts <nl> limitations under the License . <nl> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = * / <nl> <nl> import { runAsyncTask , updateMessage } from ' . / async ' ; <nl> - import { DataPoint , DataSet , DatasetMetadata , PointMetadata } from ' . / data ' ; <nl> + import { DataPoint , DataSet , DatasetMetadata , PointMetadata , MetadataInfo , ColumnStats } from ' . / data ' ; <nl> <nl> / * * Maximum number of colors supported in the color map . * / <nl> const NUM_COLORS_COLOR_MAP = 20 ; <nl> <nl> + const METADATA_MSG_ID = ' metadata ' ; <nl> + const TENSORS_MSG_ID = ' tensors ' ; <nl> + <nl> / * * Information associated with a tensor . * / <nl> export interface TensorInfo { <nl> / * * Name of the tensor . * / <nl> export interface DataProvider { <nl> * specified data source . <nl> * / <nl> retrieveMetadata ( run : string , tensorName : string , <nl> - callback : ( r : MetadataResult ) = > void ) : void ; <nl> + callback : ( r : MetadataInfo ) = > void ) : void ; <nl> <nl> / * * <nl> * Returns the name of the tensor that should be fetched by default . <nl> class ServerDataProvider implements DataProvider { <nl> <nl> retrieveTensor ( run : string , tensorName : string , callback : ( ds : DataSet ) = > void ) { <nl> / / Get the tensor . <nl> - let msgId = updateMessage ( ' Fetching tensor values . . . ' ) ; <nl> + updateMessage ( ' Fetching tensor values . . . ' , TENSORS_MSG_ID ) ; <nl> d3 . text ( <nl> ` $ { this . routePrefix } / tensor ? run = $ { run } & name = $ { tensorName } ` , <nl> ( err : Error , tsv : string ) = > { <nl> class ServerDataProvider implements DataProvider { <nl> console . error ( err ) ; <nl> return ; <nl> } <nl> - updateMessage ( null , msgId ) ; <nl> parseTensors ( tsv ) . then ( dataPoints = > { <nl> callback ( new DataSet ( dataPoints ) ) ; <nl> } ) ; <nl> class ServerDataProvider implements DataProvider { <nl> } <nl> <nl> retrieveMetadata ( run : string , tensorName : string , <nl> - callback : ( r : MetadataResult ) = > void ) { <nl> - let msgId = updateMessage ( ' Fetching metadata . . . ' ) ; <nl> + callback : ( r : MetadataInfo ) = > void ) { <nl> + updateMessage ( ' Fetching metadata . . . ' , METADATA_MSG_ID ) ; <nl> d3 . text ( <nl> ` $ { this . routePrefix } / metadata ? run = $ { run } & name = $ { tensorName } ` , <nl> ( err : Error , rawMetadata : string ) = > { <nl> class ServerDataProvider implements DataProvider { <nl> console . error ( err ) ; <nl> return ; <nl> } <nl> - updateMessage ( null , msgId ) ; <nl> parseMetadata ( rawMetadata ) . then ( result = > callback ( result ) ) ; <nl> } ) ; <nl> } <nl> export function parseRawTensors ( <nl> } <nl> <nl> export function parseRawMetadata ( <nl> - contents : string , callback : ( r : MetadataResult ) = > void ) { <nl> + contents : string , callback : ( r : MetadataInfo ) = > void ) { <nl> parseMetadata ( contents ) . then ( result = > callback ( result ) ) ; <nl> } <nl> <nl> function parseTensors ( content : string , delim = ' \ t ' ) : Promise < DataPoint [ ] > { <nl> } <nl> } ) ; <nl> return data ; <nl> + } , TENSORS_MSG_ID ) . then ( dataPoints = > { <nl> + updateMessage ( null , TENSORS_MSG_ID ) ; <nl> + return dataPoints ; <nl> } ) ; <nl> } <nl> <nl> - / * * Statistics for a metadata column . * / <nl> - export interface ColumnStats { <nl> - name : string ; <nl> - isNumeric : boolean ; <nl> - tooManyUniqueValues : boolean ; <nl> - uniqueEntries ? : { label : string , count : number } [ ] ; <nl> - min : number ; <nl> - max : number ; <nl> - } <nl> - <nl> - export interface MetadataResult { <nl> - stats : ColumnStats [ ] ; <nl> - metadata : PointMetadata [ ] ; <nl> - spriteImage ? : HTMLImageElement ; <nl> - datasetMetadata ? : DatasetMetadata ; <nl> - } <nl> - <nl> - function parseMetadata ( content : string ) : Promise < MetadataResult > { <nl> + function parseMetadata ( content : string ) : Promise < MetadataInfo > { <nl> return runAsyncTask ( ' Parsing metadata . . . ' , ( ) = > { <nl> let lines = content . split ( ' \ n ' ) . filter ( line = > line . trim ( ) . length > 0 ) ; <nl> let hasHeader = lines [ 0 ] . indexOf ( ' \ t ' ) > = 0 ; <nl> function parseMetadata ( content : string ) : Promise < MetadataResult > { <nl> } ) ; <nl> return { <nl> stats : columnStats , <nl> - metadata : allMetadata <nl> - } ; <nl> + pointsInfo : allMetadata <nl> + } as MetadataInfo ; <nl> + } , METADATA_MSG_ID ) . then ( metadata = > { <nl> + updateMessage ( null , METADATA_MSG_ID ) ; <nl> + return metadata ; <nl> } ) ; <nl> } <nl> <nl> class DemoDataProvider implements DataProvider { <nl> let demoDataSet = DemoDataProvider . DEMO_DATASETS [ tensorName ] ; <nl> let separator = demoDataSet . fpath . substr ( - 3 ) = = = ' tsv ' ? ' \ t ' : ' ' ; <nl> let url = ` $ { DemoDataProvider . DEMO_FOLDER } / $ { demoDataSet . fpath } ` ; <nl> - let msgId = updateMessage ( ' Fetching tensors . . . ' ) ; <nl> + updateMessage ( ' Fetching tensors . . . ' , TENSORS_MSG_ID ) ; <nl> d3 . text ( url , ( error : Error , dataString : string ) = > { <nl> if ( error ) { <nl> console . error ( error ) ; <nl> updateMessage ( ' Error loading data . ' ) ; <nl> return ; <nl> } <nl> - updateMessage ( null , msgId ) ; <nl> parseTensors ( dataString , separator ) . then ( points = > { <nl> callback ( new DataSet ( points ) ) ; <nl> } ) ; <nl> class DemoDataProvider implements DataProvider { <nl> } <nl> <nl> retrieveMetadata ( run : string , tensorName : string , <nl> - callback : ( r : MetadataResult ) = > void ) { <nl> + callback : ( r : MetadataInfo ) = > void ) { <nl> let demoDataSet = DemoDataProvider . DEMO_DATASETS [ tensorName ] ; <nl> - let dataSetPromise : Promise < MetadataResult > = null ; <nl> + let dataSetPromise : Promise < MetadataInfo > = null ; <nl> if ( demoDataSet . metadata_path ) { <nl> - dataSetPromise = new Promise < MetadataResult > ( ( resolve , reject ) = > { <nl> - let msgId = updateMessage ( ' Fetching metadata . . . ' ) ; <nl> + dataSetPromise = new Promise < MetadataInfo > ( ( resolve , reject ) = > { <nl> + updateMessage ( ' Fetching metadata . . . ' , METADATA_MSG_ID ) ; <nl> d3 . text ( <nl> ` $ { DemoDataProvider . DEMO_FOLDER } / $ { demoDataSet . metadata_path } ` , <nl> ( err : Error , rawMetadata : string ) = > { <nl> class DemoDataProvider implements DataProvider { <nl> reject ( err ) ; <nl> return ; <nl> } <nl> - updateMessage ( null , msgId ) ; <nl> resolve ( parseMetadata ( rawMetadata ) ) ; <nl> } ) ; <nl> } ) ; <nl> class DemoDataProvider implements DataProvider { <nl> if ( spriteMsgId ) { <nl> updateMessage ( null , spriteMsgId ) ; <nl> } <nl> - let [ result , spriteImage ] = values ; <nl> - result . spriteImage = spriteImage ; <nl> - result . datasetMetadata = demoDataSet . metadata ; <nl> - callback ( result ) ; <nl> + let [ metadata , spriteImage ] = values ; <nl> + metadata . spriteImage = spriteImage ; <nl> + metadata . datasetInfo = demoDataSet . metadata ; <nl> + callback ( metadata ) ; <nl> } ) ; <nl> } <nl> } <nl> mmm a / tensorflow / tensorboard / components / vz - projector / data . ts <nl> ppp b / tensorflow / tensorboard / components / vz - projector / data . ts <nl> See the License for the specific language governing permissions and <nl> limitations under the License . <nl> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = * / <nl> <nl> - import { runAsyncTask } from ' . / async ' ; <nl> + import { runAsyncTask , updateWarningMessage } from ' . / async ' ; <nl> import { TSNE } from ' . / bh_tsne ' ; <nl> import * as knn from ' . / knn ' ; <nl> import * as scatterPlot from ' . / scatterPlot ' ; <nl> export interface PointMetadata { <nl> [ key : string ] : number | string ; <nl> } <nl> <nl> + / * * Statistics for a metadata column . * / <nl> + export interface ColumnStats { <nl> + name : string ; <nl> + isNumeric : boolean ; <nl> + tooManyUniqueValues : boolean ; <nl> + uniqueEntries ? : { label : string , count : number } [ ] ; <nl> + min : number ; <nl> + max : number ; <nl> + } <nl> + <nl> + export interface MetadataInfo { <nl> + stats : ColumnStats [ ] ; <nl> + pointsInfo : PointMetadata [ ] ; <nl> + spriteImage ? : HTMLImageElement ; <nl> + datasetInfo ? : DatasetMetadata ; <nl> + } <nl> + <nl> export interface DataPoint extends scatterPlot . DataPoint { <nl> / * * The point in the original space . * / <nl> vector : number [ ] ; <nl> export class DataSet implements scatterPlot . DataSet { <nl> dim = [ 0 , 0 ] ; <nl> hasTSNERun : boolean = false ; <nl> spriteImage : HTMLImageElement ; <nl> - metadata : DatasetMetadata ; <nl> + datasetInfo : DatasetMetadata ; <nl> <nl> private tsne : TSNE ; <nl> <nl> export class DataSet implements scatterPlot . DataSet { <nl> } ) ; <nl> } <nl> <nl> - mergeMetadata ( metadata : PointMetadata [ ] ) { <nl> - metadata . forEach ( ( m , i ) = > this . points [ i ] . metadata = m ) ; <nl> + mergeMetadata ( info : MetadataInfo ) { <nl> + if ( info . pointsInfo . length ! = = this . points . length ) { <nl> + updateWarningMessage ( <nl> + ` Number of tensors ( $ { this . points . length } ) do not match ` + <nl> + ` the number of lines in metadata ( $ { info . pointsInfo . length } ) . ` ) ; <nl> + } <nl> + this . spriteImage = info . spriteImage ; <nl> + this . datasetInfo = info . datasetInfo ; <nl> + info . pointsInfo . forEach ( ( m , i ) = > this . points [ i ] . metadata = m ) ; <nl> } <nl> <nl> stopTSNE ( ) { this . tSNEShouldStop = true ; } <nl> export interface State { <nl> selectedProjection ? : Projection ; <nl> <nl> / * * The computed projections of the tensors . * / <nl> - projections ? : { [ key : string ] : number } [ ] ; <nl> + projections ? : Array < { [ key : string ] : number } > ; <nl> <nl> / * * The indices of selected points . * / <nl> selectedPoints ? : number [ ] ; <nl> mmm a / tensorflow / tensorboard / components / vz - projector / knn . ts <nl> ppp b / tensorflow / tensorboard / components / vz - projector / knn . ts <nl> See the License for the specific language governing permissions and <nl> limitations under the License . <nl> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = * / <nl> <nl> - import { runAsyncTask } from ' . / async ' ; <nl> + import { runAsyncTask , updateMessage } from ' . / async ' ; <nl> import { KMin } from ' . / heap ' ; <nl> import * as vector from ' . / vector ' ; <nl> <nl> export type NearestEntry = { <nl> * allocation limit , we can freeze the graphics of the whole OS . <nl> * / <nl> const OPTIMAL_GPU_BLOCK_SIZE = 256 ; <nl> + / * * Id of message box used for knn gpu progress bar . * / <nl> + const KNN_GPU_MSG_ID = ' knn - gpu ' ; <nl> <nl> / * * <nl> * Returns the K nearest neighbors for each vector where the distance <nl> export function findKNNGPUCosine < T > ( <nl> progress + = progressDiff ; <nl> offset + = B ; <nl> piece + + ; <nl> - } ) . then ( ( ) = > { <nl> + } , KNN_GPU_MSG_ID ) . then ( ( ) = > { <nl> if ( piece < numPieces ) { <nl> step ( resolve ) ; <nl> } else { <nl> + updateMessage ( null , KNN_GPU_MSG_ID ) ; <nl> bigMatrix . delete ( ) ; <nl> resolve ( nearest ) ; <nl> } <nl> mmm a / tensorflow / tensorboard / components / vz - projector / vz - projector - data - panel . ts <nl> ppp b / tensorflow / tensorboard / components / vz - projector / vz - projector - data - panel . ts <nl> See the License for the specific language governing permissions and <nl> limitations under the License . <nl> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = * / <nl> <nl> - import { ColorOption } from ' . / data ' ; <nl> - import { CheckpointInfo , ColumnStats , DataProvider , parseRawMetadata , parseRawTensors } from ' . / data - loader ' ; <nl> + import { ColorOption , ColumnStats } from ' . / data ' ; <nl> + import { CheckpointInfo , DataProvider , parseRawMetadata , parseRawTensors } from ' . / data - loader ' ; <nl> import { Projector } from ' . / vz - projector ' ; <nl> import { ColorLegendRenderInfo , ColorLegendThreshold } from ' . / vz - projector - legend ' ; <nl> / / tslint : disable - next - line : no - unused - variable <nl> export class DataPanel extends DataPanelPolymer { <nl> this . checkpointInfo . tensors [ this . selectedTensor ] . metadataFile ; <nl> if ( metadataFile ) { <nl> this . dataProvider . retrieveMetadata ( <nl> - this . selectedRun , this . selectedTensor , result = > { <nl> - this . updateMetadataUI ( result . stats , metadataFile ) ; <nl> - this . projector . updateDataSet ( ds , result ) ; <nl> + this . selectedRun , this . selectedTensor , metadata = > { <nl> + this . updateMetadataUI ( metadata . stats , metadataFile ) ; <nl> + this . projector . updateDataSet ( ds , metadata ) ; <nl> } ) ; <nl> } else { <nl> this . projector . updateDataSet ( ds , null ) ; <nl> export class DataPanel extends DataPanelPolymer { <nl> } <nl> <nl> private metadataWasReadFromFile ( rawContents : string , fileName : string ) { <nl> - parseRawMetadata ( rawContents , result = > { <nl> - this . projector . updateDataSet ( this . projector . currentDataSet , result ) ; <nl> - this . updateMetadataUI ( result . stats , fileName ) ; <nl> + parseRawMetadata ( rawContents , metadata = > { <nl> + this . projector . updateDataSet ( this . projector . currentDataSet , metadata ) ; <nl> + this . updateMetadataUI ( metadata . stats , fileName ) ; <nl> } ) ; <nl> } <nl> <nl> mmm a / tensorflow / tensorboard / components / vz - projector / vz - projector - inspector - panel . ts <nl> ppp b / tensorflow / tensorboard / components / vz - projector / vz - projector - inspector - panel . ts <nl> See the License for the specific language governing permissions and <nl> limitations under the License . <nl> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = * / <nl> <nl> - import { DistanceFunction } from ' . / data ' ; <nl> + import { DistanceFunction , MetadataInfo } from ' . / data ' ; <nl> import * as vector from ' . / vector ' ; <nl> import { ProjectorInput } from ' . / vz - projector - input ' ; <nl> import { Projector } from ' . / vz - projector ' ; <nl> import * as knn from ' . / knn ' ; <nl> - import { MetadataResult } from ' . / data - loader ' ; <nl> <nl> / / tslint : disable - next - line : no - unused - variable <nl> import { PolymerElement , PolymerHTMLElement } from ' . / vz - projector - util ' ; <nl> export class InspectorPanel extends PolymerClass { <nl> } <nl> } <nl> <nl> - metadataChanged ( result : MetadataResult ) { <nl> + metadataChanged ( metadata : MetadataInfo ) { <nl> let labelIndex = - 1 ; <nl> - this . metadataFields = result . stats . map ( ( stats , i ) = > { <nl> + this . metadataFields = metadata . stats . map ( ( stats , i ) = > { <nl> if ( ! stats . isNumeric & & labelIndex = = = - 1 ) { <nl> labelIndex = i ; <nl> } <nl> export class InspectorPanel extends PolymerClass { <nl> } ) ; <nl> labelIndex = Math . max ( 0 , labelIndex ) ; <nl> / / Make the default label the first non - numeric column . <nl> - this . selectedMetadataField = result . stats [ labelIndex ] . name ; <nl> + this . selectedMetadataField = metadata . stats [ labelIndex ] . name ; <nl> } <nl> <nl> datasetChanged ( ) { <nl> mmm a / tensorflow / tensorboard / components / vz - projector / vz - projector - projections - panel . ts <nl> ppp b / tensorflow / tensorboard / components / vz - projector / vz - projector - projections - panel . ts <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> - import { DataSet , PCA_SAMPLE_DIM , Projection , SAMPLE_SIZE } from ' . / data ' ; <nl> - import { MetadataResult } from ' . / data - loader ' ; <nl> + import { DataSet , MetadataInfo , PCA_SAMPLE_DIM , Projection , SAMPLE_SIZE } from ' . / data ' ; <nl> import * as vector from ' . / vector ' ; <nl> import { Projector } from ' . / vz - projector ' ; <nl> import { ProjectorInput } from ' . / vz - projector - input ' ; <nl> export class ProjectionsPanel extends ProjectionsPanelPolymer { <nl> this . setupAllInputsInCustomTab ( ) ; <nl> } <nl> <nl> - metadataChanged ( result : MetadataResult ) { <nl> + metadataChanged ( metadata : MetadataInfo ) { <nl> / / Project by options for custom projections . <nl> let searchByMetadataIndex = - 1 ; <nl> - if ( result . stats . length > 1 ) { <nl> - this . searchByMetadataOptions = result . stats . map ( ( stats , i ) = > { <nl> + if ( metadata . stats . length > 1 ) { <nl> + this . searchByMetadataOptions = metadata . stats . map ( ( stats , i ) = > { <nl> / / Make the default label by the first non - numeric column . <nl> if ( ! stats . isNumeric & & searchByMetadataIndex = = = - 1 ) { <nl> searchByMetadataIndex = i ; <nl> mmm a / tensorflow / tensorboard / components / vz - projector / vz - projector . html <nl> ppp b / tensorflow / tensorboard / components / vz - projector / vz - projector . html <nl> <nl> border : 1px solid # FBC02D ; <nl> backface - visibility : hidden ; <nl> opacity : 1 ; <nl> - transition : opacity 0 . 25s ease - in - out ; <nl> + transition : opacity 0 . 3s ease - out ; <nl> } <nl> <nl> # warning - msg { <nl> mmm a / tensorflow / tensorboard / components / vz - projector / vz - projector . ts <nl> ppp b / tensorflow / tensorboard / components / vz - projector / vz - projector . ts <nl> See the License for the specific language governing permissions and <nl> limitations under the License . <nl> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = * / <nl> <nl> - import { updateWarningMessage } from ' . / async ' ; <nl> - import { ColorOption , DataSet , Projection , State } from ' . / data ' ; <nl> - import { DataProvider , getDataProvider , MetadataResult } from ' . / data - loader ' ; <nl> + import { ColorOption , DataSet , Projection , State , MetadataInfo } from ' . / data ' ; <nl> + import { DataProvider , getDataProvider } from ' . / data - loader ' ; <nl> import { HoverContext , HoverListener } from ' . / hoverContext ' ; <nl> import * as knn from ' . / knn ' ; <nl> import { Mode , ScatterPlot } from ' . / scatterPlot ' ; <nl> export class Projector extends ProjectorPolymer implements SelectionContext , <nl> this . setCurrentDataSet ( this . dataSet . getSubset ( ) ) ; <nl> } <nl> <nl> - updateDataSet ( ds : DataSet , metadata : MetadataResult ) { <nl> + updateDataSet ( ds : DataSet , metadata : MetadataInfo ) { <nl> this . dataSet = ds ; <nl> if ( this . scatterPlot = = null | | this . dataSet = = null ) { <nl> / / We are not ready yet . <nl> export class Projector extends ProjectorPolymer implements SelectionContext , <nl> } <nl> this . normalizeData = this . dataSet . dim [ 1 ] > = THRESHOLD_DIM_NORMALIZE ; <nl> if ( metadata ! = null ) { <nl> - this . mergeMetadata ( ds , metadata ) ; <nl> + ds . mergeMetadata ( metadata ) ; <nl> } <nl> this . dataPanel . setNormalizeData ( this . normalizeData ) ; <nl> this . setCurrentDataSet ( this . dataSet . getSubset ( ) ) ; <nl> this . inspectorPanel . datasetChanged ( ) ; <nl> - <nl> + if ( metadata ! = null ) { <nl> + this . inspectorPanel . metadataChanged ( metadata ) ; <nl> + this . projectionsPanel . metadataChanged ( metadata ) ; <nl> + } <nl> / / Set the container to a fixed height , otherwise in Colab the <nl> / / height can grow indefinitely . <nl> let container = this . dom . select ( ' # container ' ) ; <nl> export class Projector extends ProjectorPolymer implements SelectionContext , <nl> l = > l ( this . selectedPointIndices , neighbors ) ) ; <nl> } <nl> <nl> - private mergeMetadata ( ds : DataSet , result : MetadataResult ) : void { <nl> - let numTensors = ds . points . length ; <nl> - if ( result . metadata . length ! = = numTensors ) { <nl> - updateWarningMessage ( <nl> - ` Number of tensors ( $ { numTensors } ) do not match ` + <nl> - ` the number of lines in metadata ( $ { result . metadata . length } ) . ` ) ; <nl> - } <nl> - ds . spriteImage = result . spriteImage ; <nl> - ds . metadata = result . datasetMetadata ; <nl> - ds . mergeMetadata ( result . metadata ) ; <nl> - this . inspectorPanel . metadataChanged ( result ) ; <nl> - this . projectionsPanel . metadataChanged ( result ) ; <nl> - } <nl> - <nl> / * * <nl> * Registers a listener to be called any time the mouse hovers over a point . <nl> * / <nl>
Allow for overwriting existing UI message boxes .
tensorflow/tensorflow
fca5240081c02d77c50756ec549a867ffc4504a8
2016-10-06T15:04:18Z
mmm a / dbms / src / Server / OLAPQueryConverter . cpp <nl> ppp b / dbms / src / Server / OLAPQueryConverter . cpp <nl> void QueryConverter : : fillNumericAttributeMap ( ) <nl> M ( " ClientTimeMinute " , " toMinute ( ClientEventTime ) " ) <nl> M ( " ClientTimeSecond " , " toSecond ( ClientEventTime ) " ) <nl> <nl> - M ( " EndURLHash " , " NormalizedEndURLHash " ) <nl> - M ( " RefererHash " , " NormalizedRefererHash " ) <nl> M ( " SearchPhraseHash " , " SearchPhraseHash " ) <nl> M ( " RefererDomainHash " , " RefererDomainHash " ) <nl> M ( " StartURLHash " , " NormalizedStartURLHash " ) <nl>
Removed columns NormalizedEndURLHash , NormalizedRefererHash everywhere [ # MTRSADMIN - 447 ] .
ClickHouse/ClickHouse
36866b7d6b30f968cbc30f40d5329007caa2ba35
2014-09-24T15:43:47Z
mmm a / scripts / cmake / vcpkg_find_acquire_program . cmake <nl> ppp b / scripts / cmake / vcpkg_find_acquire_program . cmake <nl> function ( vcpkg_find_acquire_program VAR ) <nl> unset ( NOEXTRACT ) <nl> unset ( _vfa_RENAME ) <nl> unset ( SUBDIR ) <nl> + unset ( PROG_PATH_SUBDIR ) <nl> unset ( REQUIRED_INTERPRETER ) <nl> unset ( _vfa_SUPPORTED ) <nl> unset ( POST_INSTALL_COMMAND ) <nl> - <nl> - vcpkg_get_program_files_platform_bitness ( PROGRAM_FILES_PLATFORM_BITNESS ) <nl> - set ( PROGRAM_FILES_32_BIT $ ENV { ProgramFiles \ ( X86 \ ) } ) <nl> - if ( NOT DEFINED PROGRAM_FILES_32_BIT ) <nl> - set ( PROGRAM_FILES_32_BIT $ ENV { PROGRAMFILES } ) <nl> - endif ( ) <nl> + unset ( PATHS ) <nl> <nl> if ( VAR MATCHES " PERL " ) <nl> set ( PROGNAME perl ) <nl> - set ( PATHS $ { DOWNLOADS } / tools / perl / perl / bin ) <nl> + set ( PERL_VERSION 5 . 30 . 0 . 1 ) <nl> + set ( SUBDIR $ { PERL_VERSION } ) <nl> + set ( PATHS $ { DOWNLOADS } / tools / perl / $ { SUBDIR } / perl / bin ) <nl> set ( BREW_PACKAGE_NAME " perl " ) <nl> set ( APT_PACKAGE_NAME " perl " ) <nl> set ( URL <nl> - " https : / / strawberry . perl . bot / download / 5 . 30 . 0 . 1 / strawberry - perl - 5 . 30 . 0 . 1 - 32bit . zip " <nl> - " http : / / strawberryperl . com / download / 5 . 30 . 0 . 1 / strawberry - perl - 5 . 30 . 0 . 1 - 32bit . zip " <nl> + " https : / / strawberry . perl . bot / download / $ { PERL_VERSION } / strawberry - perl - $ { PERL_VERSION } - 32bit . zip " <nl> + " http : / / strawberryperl . com / download / $ { PERL_VERSION } / strawberry - perl - $ { PERL_VERSION } - 32bit . zip " <nl> ) <nl> - set ( ARCHIVE " strawberry - perl - 5 . 30 . 0 . 1 - 32bit . zip " ) <nl> + set ( ARCHIVE " strawberry - perl - $ { PERL_VERSION } - 32bit . zip " ) <nl> set ( HASH d353d3dc743ebdc6d1e9f6f2b7a6db3c387c1ce6c890bae8adc8ae5deae8404f4c5e3cf249d1e151e7256d4c5ee9cd317e6c41f3b6f244340de18a24b938e0c4 ) <nl> elseif ( VAR MATCHES " NASM " ) <nl> set ( PROGNAME nasm ) <nl> - set ( PATHS $ { DOWNLOADS } / tools / nasm / nasm - 2 . 14 . 02 ) <nl> + set ( NASM_VERSION 2 . 14 . 02 ) <nl> + set ( PATHS $ { DOWNLOADS } / tools / nasm / nasm - $ { NASM_VERSION } ) <nl> set ( BREW_PACKAGE_NAME " nasm " ) <nl> set ( APT_PACKAGE_NAME " nasm " ) <nl> set ( URL <nl> - " https : / / www . nasm . us / pub / nasm / releasebuilds / 2 . 14 . 02 / win32 / nasm - 2 . 14 . 02 - win32 . zip " <nl> - " https : / / fossies . org / windows / misc / nasm - 2 . 14 . 02 - win32 . zip " <nl> + " https : / / www . nasm . us / pub / nasm / releasebuilds / $ { NASM_VERSION } / win32 / nasm - $ { NASM_VERSION } - win32 . zip " <nl> + " https : / / fossies . org / windows / misc / nasm - $ { NASM_VERSION } - win32 . zip " <nl> ) <nl> - set ( ARCHIVE " nasm - 2 . 14 . 02 - win32 . zip " ) <nl> + set ( ARCHIVE " nasm - $ { NASM_VERSION } - win32 . zip " ) <nl> set ( HASH a0f16a9f3b668b086e3c4e23a33ff725998e120f2e3ccac8c28293fd4faeae6fc59398919e1b89eed7461685d2730de02f2eb83e321f73609f35bf6b17a23d1e ) <nl> elseif ( VAR MATCHES " YASM " ) <nl> set ( PROGNAME yasm ) <nl> + set ( YASM_VERSION 1 . 3 . 0 . 6 . g1962 ) <nl> set ( SUBDIR 1 . 3 . 0 . 6 ) <nl> - set ( PATHS $ { DOWNLOADS } / tools / yasm / $ { SUBDIR } ) <nl> set ( BREW_PACKAGE_NAME " yasm " ) <nl> set ( APT_PACKAGE_NAME " yasm " ) <nl> - set ( URL " https : / / www . tortall . net / projects / yasm / snapshots / v1 . 3 . 0 . 6 . g1962 / yasm - 1 . 3 . 0 . 6 . g1962 . exe " ) <nl> - set ( ARCHIVE " yasm - 1 . 3 . 0 . 6 . g1962 . exe " ) <nl> + set ( URL " https : / / www . tortall . net / projects / yasm / snapshots / v $ { YASM_VERSION } / yasm - $ { YASM_VERSION } . exe " ) <nl> + set ( ARCHIVE " yasm - $ { YASM_VERSION } . exe " ) <nl> set ( _vfa_RENAME " yasm . exe " ) <nl> set ( NOEXTRACT ON ) <nl> set ( HASH c1945669d983b632a10c5ff31e86d6ecbff143c3d8b2c433c0d3d18f84356d2b351f71ac05fd44e5403651b00c31db0d14615d7f9a6ecce5750438d37105c55b ) <nl> elseif ( VAR MATCHES " GIT " ) <nl> set ( PROGNAME git ) <nl> if ( CMAKE_HOST_WIN32 ) <nl> - set ( SUBDIR " git - 2 . 26 . 2 - 1 - windows " ) <nl> - set ( URL " https : / / github . com / git - for - windows / git / releases / download / v2 . 26 . 2 . windows . 1 / PortableGit - 2 . 26 . 2 - 32 - bit . 7z . exe " ) <nl> - set ( ARCHIVE " PortableGit - 2 . 26 . 2 - 32 - bit . 7z . exe " ) <nl> + set ( GIT_VERSION 2 . 26 . 2 ) <nl> + set ( SUBDIR " git - $ { GIT_VERSION } - 1 - windows " ) <nl> + set ( URL " https : / / github . com / git - for - windows / git / releases / download / v $ { GIT_VERSION } . windows . 1 / PortableGit - $ { GIT_VERSION } - 32 - bit . 7z . exe " ) <nl> + set ( ARCHIVE " PortableGit - $ { GIT_VERSION } - 32 - bit . 7z . exe " ) <nl> set ( HASH d3cb60d62ca7b5d05ab7fbed0fa7567bec951984568a6c1646842a798c4aaff74bf534cf79414a6275c1927081a11b541d09931c017bf304579746e24fe57b36 ) <nl> set ( PATHS <nl> " $ { DOWNLOADS } / tools / $ { SUBDIR } / mingw32 / bin " <nl> function ( vcpkg_find_acquire_program VAR ) <nl> set ( HASH " 263e02bd79eee0cb7b664831b7898565c5656a046328d8f187ef7ae2a4d766991d477b190c9b425fcc960ab76f381cd3e396afb85cba7408ca9e74eb32c175db " ) <nl> endif ( ) <nl> set ( SUBDIR " $ { GN_VERSION } " ) <nl> - set ( PATHS " $ { DOWNLOADS } / tools / gn / $ { SUBDIR } " ) <nl> set ( URL " $ { CIPD_DOWNLOAD_GN } / $ { GN_PLATFORM } / + / $ { GN_VERSION } " ) <nl> set ( ARCHIVE " gn - $ { GN_PLATFORM } . zip " ) <nl> elseif ( VAR MATCHES " GO " ) <nl> set ( PROGNAME go ) <nl> - set ( PATHS $ { DOWNLOADS } / tools / go / go / bin ) <nl> + set ( SUBDIR 1 . 13 . 1 . windows - 386 ) <nl> + set ( PATHS $ { DOWNLOADS } / tools / go / $ { SUBDIR } / go / bin ) <nl> set ( BREW_PACKAGE_NAME " go " ) <nl> set ( APT_PACKAGE_NAME " golang - go " ) <nl> - set ( URL " https : / / dl . google . com / go / go1 . 13 . 1 . windows - 386 . zip " ) <nl> - set ( ARCHIVE " go1 . 13 . 1 . windows - 386 . zip " ) <nl> + set ( URL " https : / / dl . google . com / go / go $ { SUBDIR } . zip " ) <nl> + set ( ARCHIVE " go $ { SUBDIR } . zip " ) <nl> set ( HASH 2ab0f07e876ad98d592351a8808c2de42351ab387217e088bc4c5fa51d6a835694c501e2350802323b55a27dc0157f8b70045597f789f9e50f5ceae50dea3027 ) <nl> elseif ( VAR MATCHES " PYTHON3 " ) <nl> if ( CMAKE_HOST_WIN32 ) <nl> set ( PROGNAME python ) <nl> + set ( PYTHON_VERSION 3 . 8 . 3 ) <nl> if ( VCPKG_TARGET_ARCHITECTURE STREQUAL x86 ) <nl> - set ( SUBDIR " python - 3 . 8 . 3 - x86 " ) <nl> - set ( URL " https : / / www . python . org / ftp / python / 3 . 8 . 3 / python - 3 . 8 . 3 - embed - win32 . zip " ) <nl> - set ( ARCHIVE " python - 3 . 8 . 3 - embed - win32 . zip " ) <nl> + set ( SUBDIR " python - $ { PYTHON_VERSION } - x86 " ) <nl> + set ( URL " https : / / www . python . org / ftp / python / $ { PYTHON_VERSION } / python - $ { PYTHON_VERSION } - embed - win32 . zip " ) <nl> + set ( ARCHIVE " python - $ { PYTHON_VERSION } - embed - win32 . zip " ) <nl> set ( HASH 8c9078f55b1b5d694e0e809eee6ccf8a6e15810dd4649e8ae1209bff30e102d49546ce970a5d519349ca7759d93146f459c316dc440737171f018600255dcd0a ) <nl> else ( ) <nl> - set ( SUBDIR " python - 3 . 8 . 3 - x64 " ) <nl> - set ( URL " https : / / www . python . org / ftp / python / 3 . 8 . 3 / python - 3 . 8 . 3 - embed - amd64 . zip " ) <nl> - set ( ARCHIVE " python - 3 . 8 . 3 - embed - amd64 . zip " ) <nl> + set ( SUBDIR " python - $ { PYTHON_VERSION } - x64 " ) <nl> + set ( URL " https : / / www . python . org / ftp / python / $ { PYTHON_VERSION } / python - $ { PYTHON_VERSION } - embed - amd64 . zip " ) <nl> + set ( ARCHIVE " python - $ { PYTHON_VERSION } - embed - amd64 . zip " ) <nl> set ( HASH a322fc925167edb1897764297cf47e294ad3f52c109a05f8911412807eb83e104f780e9fe783b17fe0d9b18b7838797c15e9b0805dab759829f77a9bc0159424 ) <nl> endif ( ) <nl> set ( PATHS $ { DOWNLOADS } / tools / python / $ { SUBDIR } ) <nl> function ( vcpkg_find_acquire_program VAR ) <nl> elseif ( VAR MATCHES " PYTHON2 " ) <nl> if ( CMAKE_HOST_WIN32 ) <nl> set ( PROGNAME python ) <nl> + set ( PYTHON_VERSION 2 . 7 . 16 ) <nl> if ( VCPKG_TARGET_ARCHITECTURE STREQUAL x86 ) <nl> - set ( SUBDIR " python - 2 . 7 . 16 - x86 " ) <nl> - set ( URL " https : / / www . python . org / ftp / python / 2 . 7 . 16 / python - 2 . 7 . 16 . msi " ) <nl> - set ( ARCHIVE " python - 2 . 7 . 16 . msi " ) <nl> + set ( SUBDIR " python - $ { PYTHON_VERSION } - x86 " ) <nl> + set ( URL " https : / / www . python . org / ftp / python / $ { PYTHON_VERSION } / python - $ { PYTHON_VERSION } . msi " ) <nl> + set ( ARCHIVE " python - $ { PYTHON_VERSION } . msi " ) <nl> set ( HASH c34a6fa2438682104dccb53650a2bdb79eac7996deff075201a0f71bb835d60d3ed866652a1931f15a29510fe8e1009ac04e423b285122d2e5747fefc4c10254 ) <nl> else ( ) <nl> - set ( SUBDIR " python - 2 . 7 . 16 - x64 " ) <nl> - set ( URL " https : / / www . python . org / ftp / python / 2 . 7 . 16 / python - 2 . 7 . 16 . amd64 . msi " ) <nl> - set ( ARCHIVE " python - 2 . 7 . 16 . amd64 . msi " ) <nl> + set ( SUBDIR " python - $ { PYTHON_VERSION } - x64 " ) <nl> + set ( URL " https : / / www . python . org / ftp / python / $ { PYTHON_VERSION } / python - $ { PYTHON_VERSION } . amd64 . msi " ) <nl> + set ( ARCHIVE " python - $ { PYTHON_VERSION } . amd64 . msi " ) <nl> set ( HASH 47c1518d1da939e3ba6722c54747778b93a44c525bcb358b253c23b2510374a49a43739c8d0454cedade858f54efa6319763ba33316fdc721305bc457efe4ffb ) <nl> endif ( ) <nl> set ( PATHS $ { DOWNLOADS } / tools / python / $ { SUBDIR } ) <nl> function ( vcpkg_find_acquire_program VAR ) <nl> set ( HASH 5b158ead86be4eb3a6780928d9163f8562372f30bde051d8c281d81027b766119a6e9241166b91de0aa6146836cea77e5121290e62e31b7a959407840fc57b33 ) <nl> elseif ( VAR MATCHES " 7Z " ) <nl> set ( PROGNAME 7z ) <nl> - set ( PATHS " $ { PROGRAM_FILES_PLATFORM_BITNESS } / 7 - Zip " " $ { PROGRAM_FILES_32_BIT } / 7 - Zip " " $ { DOWNLOADS } / tools / 7z / Files / 7 - Zip " ) <nl> + set ( PATHS " $ { DOWNLOADS } / tools / 7z / Files / 7 - Zip " ) <nl> set ( URL " https : / / 7 - zip . org / a / 7z1900 . msi " ) <nl> set ( ARCHIVE " 7z1900 . msi " ) <nl> set ( HASH f73b04e2d9f29d4393fde572dcf3c3f0f6fa27e747e5df292294ab7536ae24c239bf917689d71eb10cc49f6b9a4ace26d7c122ee887d93cc935f268c404e9067 ) <nl> elseif ( VAR MATCHES " NINJA " ) <nl> set ( PROGNAME ninja ) <nl> set ( NINJA_VERSION 1 . 10 . 0 ) <nl> - set ( SUBDIR " ninja - $ { NINJA_VERSION } " ) <nl> set ( _vfa_SUPPORTED ON ) <nl> if ( CMAKE_HOST_WIN32 ) <nl> set ( ARCHIVE " ninja - win - $ { NINJA_VERSION } . zip " ) <nl> - set ( PATHS " $ { DOWNLOADS } / tools / $ { SUBDIR } - windows " ) <nl> - list ( APPEND PATHS " $ { DOWNLOADS } / tools / ninja / $ { SUBDIR } " ) <nl> + set ( SUBDIR " $ { NINJA_VERSION } - windows " ) <nl> set ( URL " https : / / github . com / ninja - build / ninja / releases / download / v $ { NINJA_VERSION } / ninja - win . zip " ) <nl> set ( HASH a196e243c53daa1df9d287af658d6d38d6b830b614f2d5704e8c88ffc61f179a533ae71cdb6d0d383d1559d65dacccbaaab270fb2a33aa211e5dba42ff046f97 ) <nl> elseif ( CMAKE_HOST_SYSTEM_NAME STREQUAL " Darwin " ) <nl> set ( ARCHIVE " ninja - mac - $ { NINJA_VERSION } . zip " ) <nl> set ( URL " https : / / github . com / ninja - build / ninja / releases / download / v $ { NINJA_VERSION } / ninja - mac . zip " ) <nl> - set ( PATHS " $ { DOWNLOADS } / tools / $ { SUBDIR } - osx " ) <nl> + set ( SUBDIR " $ { NINJA_VERSION } - osx " ) <nl> + set ( PATHS " $ { DOWNLOADS } / tools / ninja - $ { NINJA_VERSION } - osx " ) <nl> set ( HASH 619a1924067a0b30fc5f8887f868d3ee5481838d2f0f158d031f7614a2a10b95a73d4a56b658d5d560283ebf809e2e536b968c6c01ff0108075c3f393f5780ba ) <nl> elseif ( CMAKE_HOST_SYSTEM_NAME STREQUAL " FreeBSD " ) <nl> set ( PATHS " $ { DOWNLOADS } / tools / $ { SUBDIR } - freebsd " ) <nl> function ( vcpkg_find_acquire_program VAR ) <nl> else ( ) <nl> set ( ARCHIVE " ninja - linux - $ { NINJA_VERSION } . zip " ) <nl> set ( URL " https : / / github . com / ninja - build / ninja / releases / download / v $ { NINJA_VERSION } / ninja - linux . zip " ) <nl> - set ( PATHS " $ { DOWNLOADS } / tools / $ { SUBDIR } - linux " ) <nl> + set ( SUBDIR " $ { NINJA_VERSION } - linux " ) <nl> + set ( PATHS " $ { DOWNLOADS } / tools / ninja - $ { NINJA_VERSION } - linux " ) <nl> set ( HASH ffb179ab8ea315167fcc99a8f13286e1363590185b18cf819cc73e09f2a7553790e9dc45fd1ccd0bd1d2dbf543aee3f6c0951cf9ce453a7168ffd2ac873cdd29 ) <nl> endif ( ) <nl> set ( VERSION_CMD - - version ) <nl> elseif ( VAR MATCHES " NUGET " ) <nl> set ( PROGNAME nuget ) <nl> set ( SUBDIR " 5 . 5 . 1 " ) <nl> - set ( PATHS " $ { DOWNLOADS } / tools / nuget / $ { SUBDIR } " ) <nl> + set ( PATHS " $ { DOWNLOADS } / tools / nuget - $ { SUBDIR } - windows " ) <nl> set ( BREW_PACKAGE_NAME " nuget " ) <nl> set ( URL " https : / / dist . nuget . org / win - x86 - commandline / v5 . 5 . 1 / nuget . exe " ) <nl> set ( _vfa_RENAME " nuget . exe " ) <nl> function ( vcpkg_find_acquire_program VAR ) <nl> endif ( ) <nl> elseif ( VAR MATCHES " GPERF " ) <nl> set ( PROGNAME gperf ) <nl> + set ( GPERF_VERSION 3 . 0 . 1 ) <nl> set ( PATHS $ { DOWNLOADS } / tools / gperf / bin ) <nl> - set ( URL " https : / / sourceforge . net / projects / gnuwin32 / files / gperf / 3 . 0 . 1 / gperf - 3 . 0 . 1 - bin . zip / download " ) <nl> - set ( ARCHIVE " gperf - 3 . 0 . 1 - bin . zip " ) <nl> + set ( URL " https : / / sourceforge . net / projects / gnuwin32 / files / gperf / $ { GPERF_VERSION } / gperf - $ { GPERF_VERSION } - bin . zip / download " ) <nl> + set ( ARCHIVE " gperf - $ { GPERF_VERSION } - bin . zip " ) <nl> set ( HASH 3f2d3418304390ecd729b85f65240a9e4d204b218345f82ea466ca3d7467789f43d0d2129fcffc18eaad3513f49963e79775b10cc223979540fa2e502fe7d4d9 ) <nl> elseif ( VAR MATCHES " GASPREPROCESSOR " ) <nl> set ( NOEXTRACT true ) <nl> function ( vcpkg_find_acquire_program VAR ) <nl> set ( HASH 74f0fa29b5991ca655e34a9d1000d47d4272e071113fada86727ee943d913177ae96dc3d435eaf494d2158f37560cd4c2c5274176946ebdb17bf2354ced1c516 ) <nl> elseif ( VAR MATCHES " SCONS " ) <nl> set ( PROGNAME scons ) <nl> + set ( SCONS_VERSION 3 . 0 . 1 ) <nl> + set ( SUBDIR $ { SCONS_VERSION } ) <nl> set ( REQUIRED_INTERPRETER PYTHON2 ) <nl> set ( SCRIPTNAME " scons . py " ) <nl> - set ( PATHS $ { DOWNLOADS } / tools / scons ) <nl> - set ( URL " https : / / sourceforge . net / projects / scons / files / scons - local - 3 . 0 . 1 . zip / download " ) <nl> - set ( ARCHIVE " scons - local - 3 . 0 . 1 . zip " ) <nl> + set ( URL " https : / / sourceforge . net / projects / scons / files / scons - local - $ { SCONS_VERSION } . zip / download " ) <nl> + set ( ARCHIVE " scons - local - $ { SCONS_VERSION } . zip " ) <nl> set ( HASH fe121b67b979a4e9580c7f62cfdbe0c243eba62a05b560d6d513ac7f35816d439b26d92fc2d7b7d7241c9ce2a49ea7949455a17587ef53c04a5f5125ac635727 ) <nl> elseif ( VAR MATCHES " SWIG " ) <nl> set ( VERSION 4 . 0 . 2 ) <nl> set ( PROGNAME swig ) <nl> if ( CMAKE_HOST_WIN32 ) <nl> - set ( URL " https : / / sourceforge . net / projects / swig / files / swigwin / swigwin - $ { VERSION } / swigwin - $ { VERSION } . zip / download " ) <nl> + # set ( URL " https : / / sourceforge . net / projects / swig / files / swigwin / swigwin - $ { VERSION } / swigwin - $ { VERSION } . zip / download " ) <nl> set ( ARCHIVE " swigwin - $ { VERSION } . zip " ) <nl> set ( HASH b8f105f9b9db6acc1f6e3741990915b533cd1bc206eb9645fd6836457fd30789b7229d2e3219d8e35f2390605ade0fbca493ae162ec3b4bc4e428b57155db03d ) <nl> - set ( SUBDIR " swigwin - $ { VERSION } " ) <nl> - set ( PATHS " $ { DOWNLOADS } / tools / swig / $ { SUBDIR } / $ { SUBDIR } " ) <nl> + set ( SUBDIR b8f105f9b9 - f0518bc3b7 / swigwin - $ { VERSION } ) <nl> + # set ( SUBDIR " swigwin - $ { VERSION } " ) <nl> + # set ( PATHS " $ { DOWNLOADS } / tools / swig / swigwin - $ { VERSION } " ) <nl> else ( ) <nl> # Not used <nl> set ( _vfa_SUPPORTED TRUE ) <nl> function ( vcpkg_find_acquire_program VAR ) <nl> set ( PATHS " $ { DOWNLOADS } / tools / swig / $ { SUBDIR } " ) <nl> endif ( ) <nl> set ( SOURCEFORGE_ARGS <nl> - REPO swig <nl> + REPO swig / swigwin <nl> + REF swigwin - $ { VERSION } <nl> FILENAME " $ { ARCHIVE } " <nl> SHA512 " $ { HASH } " <nl> NO_REMOVE_ONE_LEVEL <nl> function ( vcpkg_find_acquire_program VAR ) <nl> elseif ( VAR MATCHES " DOXYGEN " ) <nl> set ( PROGNAME doxygen ) <nl> set ( DOXYGEN_VERSION 1 . 8 . 17 ) <nl> - set ( PATHS $ { DOWNLOADS } / tools / doxygen ) <nl> - set ( URL <nl> - " https : / / doxygen . nl / files / doxygen - $ { DOXYGEN_VERSION } . windows . bin . zip " <nl> - " https : / / sourceforge . net / projects / doxygen / files / rel - $ { DOXYGEN_VERSION } / doxygen - $ { DOXYGEN_VERSION } . windows . bin . zip " ) <nl> - set ( ARCHIVE " doxygen - $ { DOXYGEN_VERSION } . windows . bin . zip " ) <nl> - set ( HASH 6bac47ec552486783a70cc73b44cf86b4ceda12aba6b52835c2221712bd0a6c845cecec178c9ddaa88237f5a781f797add528f47e4ed017c7888eb1dd2bc0b4b ) <nl> + set ( SOURCEFORGE_ARGS <nl> + REPO doxygen <nl> + REF rel - $ { DOXYGEN_VERSION } <nl> + FILENAME " doxygen - $ { DOXYGEN_VERSION } . windows . bin . zip " <nl> + SHA512 6bac47ec552486783a70cc73b44cf86b4ceda12aba6b52835c2221712bd0a6c845cecec178c9ddaa88237f5a781f797add528f47e4ed017c7888eb1dd2bc0b4b <nl> + NO_REMOVE_ONE_LEVEL <nl> + WORKING_DIRECTORY " $ { DOWNLOADS } / tools / doxygen " <nl> + ) <nl> + set ( SUBDIR 6bac47ec55 - 25c819fd77 ) <nl> elseif ( VAR MATCHES " BAZEL " ) <nl> set ( PROGNAME bazel ) <nl> set ( BAZEL_VERSION 0 . 25 . 2 ) <nl> - set ( SUBDIR $ { BAZEL_VERSION } ) <nl> - set ( PATHS $ { DOWNLOADS } / tools / bazel / $ { SUBDIR } ) <nl> set ( _vfa_RENAME " bazel " ) <nl> if ( CMAKE_HOST_SYSTEM_NAME STREQUAL " Linux " ) <nl> set ( _vfa_SUPPORTED ON ) <nl> - set ( URL " https : / / github . com / bazelbuild / bazel / releases / download / $ { BAZEL_VERSION } / bazel - $ { BAZEL_VERSION } - linux - x86_64 " ) <nl> - set ( ARCHIVE " bazel - $ { BAZEL_VERSION } - linux - x86_64 " ) <nl> + set ( SUBDIR $ { BAZEL_VERSION } - linux ) <nl> + set ( URL " https : / / github . com / bazelbuild / bazel / releases / download / $ { BAZEL_VERSION } / bazel - $ { SUBDIR } - x86_64 " ) <nl> + set ( ARCHIVE " bazel - $ { SUBDIR } - x86_64 " ) <nl> set ( NOEXTRACT ON ) <nl> set ( HASH db4a583cf2996aeb29fd008261b12fe39a4a5faf0fbf96f7124e6d3ffeccf6d9655d391378e68dd0915bc91c9e146a51fd9661963743857ca25179547feceab1 ) <nl> elseif ( CMAKE_HOST_SYSTEM_NAME STREQUAL " Darwin " ) <nl> set ( _vfa_SUPPORTED ON ) <nl> - set ( URL " https : / / github . com / bazelbuild / bazel / releases / download / $ { BAZEL_VERSION } / bazel - $ { BAZEL_VERSION } - darwin - x86_64 " ) <nl> - set ( ARCHIVE " bazel - $ { BAZEL_VERSION } - darwin - x86_64 " ) <nl> + set ( SUBDIR $ { BAZEL_VERSION } - darwin ) <nl> + set ( URL " https : / / github . com / bazelbuild / bazel / releases / download / $ { BAZEL_VERSION } / bazel - $ { SUBDIR } - x86_64 " ) <nl> + set ( ARCHIVE " bazel - $ { SUBDIR } - x86_64 " ) <nl> set ( NOEXTRACT ON ) <nl> set ( HASH 420a37081e6ee76441b0d92ff26d1715ce647737ce888877980d0665197b5a619d6afe6102f2e7edfb5062c9b40630a10b2539585e35479b780074ada978d23c ) <nl> else ( ) <nl> - set ( URL " https : / / github . com / bazelbuild / bazel / releases / download / $ { BAZEL_VERSION } / bazel - $ { BAZEL_VERSION } - windows - x86_64 . zip " ) <nl> - set ( ARCHIVE " bazel - $ { BAZEL_VERSION } - windows - x86_64 . zip " ) <nl> + set ( SUBDIR $ { BAZEL_VERSION } - windows ) <nl> + set ( URL " https : / / github . com / bazelbuild / bazel / releases / download / $ { BAZEL_VERSION } / bazel - $ { SUBDIR } - x86_64 . zip " ) <nl> + set ( ARCHIVE " bazel - $ { SUBDIR } - x86_64 . zip " ) <nl> set ( HASH 6482f99a0896f55ef65739e7b53452fd9c0adf597b599d0022a5e0c5fa4374f4a958d46f98e8ba25af4b065adacc578bfedced483d8c169ea5cb1777a99eea53 ) <nl> endif ( ) <nl> - # Download Tools <nl> elseif ( VAR MATCHES " ARIA2 " ) <nl> set ( PROGNAME aria2c ) <nl> - set ( PATHS $ { DOWNLOADS } / tools / aria2c / aria2 - 1 . 34 . 0 - win - 32bit - build1 ) <nl> - set ( URL " https : / / github . com / aria2 / aria2 / releases / download / release - 1 . 34 . 0 / aria2 - 1 . 34 . 0 - win - 32bit - build1 . zip " ) <nl> - set ( ARCHIVE " aria2 - 1 . 34 . 0 - win - 32bit - build1 . zip " ) <nl> + set ( ARIA2_VERSION 1 . 34 . 0 ) <nl> + set ( PATHS $ { DOWNLOADS } / tools / aria2c / aria2 - $ { ARIA2_VERSION } - win - 32bit - build1 ) <nl> + set ( URL " https : / / github . com / aria2 / aria2 / releases / download / release - $ { ARIA2_VERSION } / aria2 - $ { ARIA2_VERSION } - win - 32bit - build1 . zip " ) <nl> + set ( ARCHIVE " aria2 - $ { ARIA2_VERSION } - win - 32bit - build1 . zip " ) <nl> set ( HASH 2a5480d503ac6e8203040c7e516a3395028520da05d0ebf3a2d56d5d24ba5d17630e8f318dd4e3cc2094cc4668b90108fb58e8b986b1ffebd429995058063c27 ) <nl> elseif ( VAR MATCHES " PKGCONFIG " ) <nl> set ( PROGNAME pkg - config ) <nl> + set ( VERSION 0 . 29 . 2 - 1 ) <nl> + set ( LIBWINPTHREAD_VERSION git - 8 . 0 . 0 . 5906 . c9a21571 - 1 ) <nl> if ( ENV { PKG_CONFIG } ) <nl> debug_message ( STATUS " PKG_CONFIG found in ENV ! Using $ ENV { PKG_CONFIG } " ) <nl> set ( PKGCONFIG $ ENV { PKG_CONFIG } PARENT_SCOPE ) <nl> return ( ) <nl> elseif ( CMAKE_HOST_WIN32 ) <nl> - set ( PROG_PATH_SUBDIR " $ { DOWNLOADS } / tools / $ { PROGNAME } / 0 . 29 . 2 - 1 " ) <nl> + set ( PROG_PATH_SUBDIR " $ { DOWNLOADS } / tools / $ { PROGNAME } / $ { VERSION } " ) <nl> set ( PKGCONFIG " $ { PROG_PATH_SUBDIR } / mingw32 / bin / pkg - config . exe " ) <nl> if ( NOT EXISTS " $ { PKGCONFIG } " ) <nl> vcpkg_download_distfile ( PKGCONFIG_ARCHIVE <nl> - URLS " https : / / repo . msys2 . org / mingw / i686 / mingw - w64 - i686 - pkg - config - 0 . 29 . 2 - 1 - any . pkg . tar . xz " <nl> + URLS " https : / / repo . msys2 . org / mingw / i686 / mingw - w64 - i686 - pkg - config - $ { VERSION } - any . pkg . tar . xz " <nl> SHA512 3b1b706a24d9aef7bbdf3ce4427aaa813ba6fbd292ed9dda181b4300e117c3d59a159ddcca8b013fd01ce76da2d95d590314ff9628c0d68a6966bac4842540f0 <nl> - FILENAME mingw - w64 - i686 - pkg - config - 0 . 29 . 2 - 1 - any . pkg . tar . xz <nl> + FILENAME mingw - w64 - i686 - pkg - config - $ { VERSION } - any . pkg . tar . xz <nl> ) <nl> vcpkg_download_distfile ( LIBWINPTHREAD_ARCHIVE <nl> - URLS " https : / / repo . msys2 . org / mingw / i686 / mingw - w64 - i686 - libwinpthread - git - 8 . 0 . 0 . 5906 . c9a21571 - 1 - any . pkg . tar . zst " <nl> + URLS " https : / / repo . msys2 . org / mingw / i686 / mingw - w64 - i686 - libwinpthread - $ { LIBWINPTHREAD_VERSION } - any . pkg . tar . zst " <nl> SHA512 2c3d9e6b2eee6a4c16fd69ddfadb6e2dc7f31156627d85845c523ac85e5c585d4cfa978659b1fe2ec823d44ef57bc2b92a6127618ff1a8d7505458b794f3f01c <nl> - FILENAME mingw - w64 - i686 - libwinpthread - git - 8 . 0 . 0 . 5906 . c9a21571 - 1 - any . pkg . tar . zst <nl> + FILENAME mingw - w64 - i686 - libwinpthread - $ { LIBWINPTHREAD_VERSION } - any . pkg . tar . zst <nl> ) <nl> file ( REMOVE_RECURSE $ { PROG_PATH_SUBDIR } $ { PROG_PATH_SUBDIR } . tmp ) <nl> file ( MAKE_DIRECTORY $ { PROG_PATH_SUBDIR } . tmp ) <nl> function ( vcpkg_find_acquire_program VAR ) <nl> endif ( ) <nl> endmacro ( ) <nl> <nl> + if ( NOT DEFINED PROG_PATH_SUBDIR ) <nl> + set ( PROG_PATH_SUBDIR " $ { DOWNLOADS } / tools / $ { PROGNAME } / $ { SUBDIR } " ) <nl> + endif ( ) <nl> + if ( DEFINED SUBDIR ) <nl> + list ( APPEND PATHS $ { PROG_PATH_SUBDIR } ) <nl> + endif ( ) <nl> + <nl> do_find ( ) <nl> if ( NOT $ { VAR } ) <nl> if ( NOT CMAKE_HOST_SYSTEM_NAME STREQUAL " Windows " AND NOT _vfa_SUPPORTED ) <nl> function ( vcpkg_find_acquire_program VAR ) <nl> FILENAME $ { ARCHIVE } <nl> ) <nl> <nl> - set ( PROG_PATH_SUBDIR " $ { DOWNLOADS } / tools / $ { PROGNAME } / $ { SUBDIR } " ) <nl> file ( MAKE_DIRECTORY $ { PROG_PATH_SUBDIR } ) <nl> if ( DEFINED NOEXTRACT ) <nl> if ( DEFINED _vfa_RENAME ) <nl> new file mode 100644 <nl> index 00000000000 . . 6f248be58af <nl> mmm / dev / null <nl> ppp b / scripts / test_ports / vcpkg - find - acquire - program / CONTROL <nl> <nl> + Source : vcpkg - find - acquire - program <nl> + Version : 0 <nl> + Description : Test port to exercise vcpkg_find_acquire_program <nl> + Supports : windows <nl> new file mode 100644 <nl> index 00000000000 . . 88a4856c5f5 <nl> mmm / dev / null <nl> ppp b / scripts / test_ports / vcpkg - find - acquire - program / portfile . cmake <nl> <nl> + set ( VCPKG_POLICY_EMPTY_PACKAGE enabled ) <nl> + <nl> + if ( CMAKE_HOST_WIN32 ) <nl> + foreach ( PROG GO JOM NASM PERL YASM GIT PYTHON3 PYTHON2 RUBY 7Z NUGET FLEX BISON GPERF GASPREPROCESSOR DARK SCONS SWIG DOXYGEN ARIA2 PKGCONFIG ) <nl> + vcpkg_find_acquire_program ( $ { PROG } ) <nl> + foreach ( SUBPROG IN LISTS $ { PROG } ) <nl> + if ( NOT EXISTS " $ { SUBPROG } " ) <nl> + message ( FATAL_ERROR " Program $ { SUBPROG } did not exist . " ) <nl> + endif ( ) <nl> + endforeach ( ) <nl> + endforeach ( ) <nl> + endif ( ) <nl> + <nl> + foreach ( PROG GN NINJA MESON BAZEL ) <nl> + vcpkg_find_acquire_program ( $ { PROG } ) <nl> + foreach ( SUBPROG IN LISTS $ { PROG } ) <nl> + if ( NOT EXISTS " $ { SUBPROG } " ) <nl> + message ( FATAL_ERROR " Program $ { SUBPROG } did not exist . " ) <nl> + endif ( ) <nl> + endforeach ( ) <nl> + endforeach ( ) <nl>
[ vcpkg_find_acquire_program ] Cleanup and add CI testing ( )
microsoft/vcpkg
4abea84d561623e7e9ee4669c1529c0b69fa601a
2020-08-26T01:41:56Z
mmm a / ports / paho - mqtt / portfile . cmake <nl> ppp b / ports / paho - mqtt / portfile . cmake <nl> file ( GLOB HEADERS " $ { SOURCE_PATH } / * / * . h " ) <nl> if ( DLLS ) <nl> file ( INSTALL $ { DLLS } DESTINATION $ { CURRENT_PACKAGES_DIR } / bin ) <nl> endif ( ) <nl> - file ( INSTALL $ { LIBS } DESTINATION $ { CURRENT_PACKAGES_DIR } / lib ) <nl> + if ( LIBS ) <nl> + file ( INSTALL $ { LIBS } DESTINATION $ { CURRENT_PACKAGES_DIR } / lib ) <nl> + endif ( ) <nl> if ( DEBUG_DLLS ) <nl> file ( INSTALL $ { DEBUG_DLLS } DESTINATION $ { CURRENT_PACKAGES_DIR } / debug / bin ) <nl> endif ( ) <nl> - file ( INSTALL $ { DEBUG_LIBS } DESTINATION $ { CURRENT_PACKAGES_DIR } / debug / lib ) <nl> + if ( DEBUG_LIBS ) <nl> + file ( INSTALL $ { DEBUG_LIBS } DESTINATION $ { CURRENT_PACKAGES_DIR } / debug / lib ) <nl> + endif ( ) <nl> file ( INSTALL $ { HEADERS } DESTINATION $ { CURRENT_PACKAGES_DIR } / include ) <nl> <nl> if ( VCPKG_LIBRARY_LINKAGE STREQUAL static ) <nl>
Merge pull request from past - due / paho - mqtt_fix_vcpkg_build_type
microsoft/vcpkg
60572a997b5e61fdfa96d48dc54f9e19b894e942
2018-03-20T07:27:52Z
mmm a / test / test_torch . py <nl> ppp b / test / test_torch . py <nl> def test_linear_algebra_scalar_raises ( self ) : <nl> self . assertRaises ( RuntimeError , lambda : torch . addr ( m , v , s ) ) <nl> self . assertRaises ( RuntimeError , lambda : torch . addr ( m , s , v ) ) <nl> <nl> - def _test_math ( self , torchfn , mathfn , input = None , test_expand = False , rtol = None , atol = None ) : <nl> - if input is None : <nl> - input = [ ] <nl> - input . append ( list ( range ( - 5 , 5 ) ) ) <nl> - input . append ( [ 0 for x in range ( - 5 , 5 ) ] ) <nl> - input . append ( [ x + 1e - 6 for x in range ( - 5 , 5 ) ] ) <nl> - # Some vectorized implementations don ' t support large ranges <nl> - input . append ( [ x + 1e10 for x in range ( - 5 , 5 ) ] ) <nl> - input . append ( [ x - 1e10 for x in range ( - 5 , 5 ) ] ) <nl> - input . append ( torch . randn ( 10 ) . tolist ( ) ) <nl> - input . append ( ( torch . randn ( 10 ) + 1e6 ) . tolist ( ) ) <nl> - input . append ( [ math . pi * ( x / 2 ) for x in range ( - 5 , 5 ) ] ) <nl> - <nl> - def compare_reference ( input , dtype ) : <nl> - input = torch . tensor ( input , dtype = dtype ) <nl> - res1 = torchfn ( input . clone ( ) ) <nl> - res2 = input . clone ( ) . apply_ ( mathfn ) <nl> - torch . testing . assert_allclose ( res1 , res2 , rtol = rtol , atol = atol ) <nl> - <nl> - # compare against the reference math function <nl> - compare_reference ( input , torch . double ) <nl> - compare_reference ( input , torch . float ) <nl> - <nl> - def check_non_contiguous ( shape , dtype ) : <nl> - contig = torch . randn ( shape , dtype = dtype ) <nl> - non_contig = torch . empty ( shape + ( 2 , ) , dtype = dtype ) [ . . . , 0 ] <nl> - non_contig . copy_ ( contig ) <nl> - self . assertFalse ( non_contig . is_contiguous ( ) ) <nl> - self . assertEqual ( torchfn ( contig ) , torchfn ( non_contig ) , ' non - contiguous ' ) <nl> - <nl> - # compare application against contiguous vs . non - contiguous <nl> - check_non_contiguous ( ( 5 , 7 ) , torch . double ) <nl> - check_non_contiguous ( ( 1024 , ) , torch . double ) <nl> - check_non_contiguous ( ( 5 , 7 ) , torch . float ) <nl> - check_non_contiguous ( ( 1024 , ) , torch . float ) <nl> - <nl> - def check_non_contiguous_index ( dtype ) : <nl> - contig = torch . randn ( ( 2 , 2 , 1 , 2 ) , dtype = dtype ) <nl> - non_contig = contig [ : , 1 , . . . ] <nl> - contig = non_contig . clone ( ) <nl> - self . assertFalse ( non_contig . is_contiguous ( ) ) <nl> - self . assertEqual ( torchfn ( contig ) , torchfn ( non_contig ) , ' non - contiguous index ' ) <nl> - <nl> - check_non_contiguous_index ( torch . float ) <nl> - check_non_contiguous_index ( torch . double ) <nl> - <nl> - def check_non_contiguous_expand ( shape , dtype ) : <nl> - contig = torch . randn ( shape , dtype = dtype ) <nl> - non_contig = contig . clone ( ) . expand ( 3 , - 1 , - 1 ) <nl> - self . assertFalse ( non_contig . is_contiguous ( ) ) <nl> - contig = torchfn ( contig ) <nl> - non_contig = torchfn ( non_contig ) <nl> - for i in range ( 3 ) : <nl> - self . assertEqual ( contig , non_contig [ i ] , ' non - contiguous expand [ ' + str ( i ) + ' ] ' ) <nl> - <nl> - # Expand is not defined for in - place operations <nl> - if test_expand : <nl> - # The size 1 case is special as it leads to 0 stride and needs to persists <nl> - check_non_contiguous_expand ( ( 1 , 3 ) , torch . double ) <nl> - check_non_contiguous_expand ( ( 1 , 7 ) , torch . double ) <nl> - check_non_contiguous_expand ( ( 5 , 7 ) , torch . float ) <nl> - <nl> - # If size ( dim ) = = 1 , stride ( dim ) is not defined . <nl> - # The code needs to be able to handle this <nl> - def check_contiguous_size1 ( dtype ) : <nl> - contig = torch . randn ( ( 5 , 100 ) , dtype = dtype ) <nl> - contig = contig [ : 1 , : 50 ] <nl> - contig2 = torch . empty ( contig . size ( ) , dtype = dtype ) <nl> - contig2 . copy_ ( contig ) <nl> - self . assertTrue ( contig . is_contiguous ( ) ) <nl> - self . assertTrue ( contig2 . is_contiguous ( ) ) <nl> - self . assertEqual ( torchfn ( contig ) , torchfn ( contig2 ) , ' contiguous size1 ' ) <nl> - <nl> - check_contiguous_size1 ( torch . double ) <nl> - check_contiguous_size1 ( torch . float ) <nl> - <nl> - def check_contiguous_size1_largedim ( dtype ) : <nl> - contig = torch . randn ( ( 5 , 2 , 3 , 1 , 4 , 5 , 3 , 2 , 1 , 2 , 3 , 4 ) , dtype = dtype ) <nl> - contig = contig [ : 1 , : , : , : , : , : , : , : , : , : , : , : ] <nl> - contig2 = torch . empty ( contig . size ( ) , dtype = dtype ) <nl> - contig2 . copy_ ( contig ) <nl> - self . assertTrue ( contig . is_contiguous ( ) ) <nl> - self . assertTrue ( contig2 . is_contiguous ( ) ) <nl> - self . assertEqual ( torchfn ( contig ) , torchfn ( contig2 ) , ' contiguous size1 ' ) <nl> - <nl> - check_contiguous_size1_largedim ( torch . double ) <nl> - check_contiguous_size1_largedim ( torch . float ) <nl> - <nl> - def check_large ( dtype ) : <nl> - input = torch . randn ( 1024 , 512 , dtype = dtype ) <nl> - actual = torchfn ( input ) <nl> - expected = torch . stack ( [ torchfn ( slice ) for slice in input ] ) <nl> - self . assertEqual ( actual , expected , ' large ' ) <nl> - <nl> - # compare large tensor vs . repeated small applications to expose <nl> - # possible parallelism bugs . <nl> - check_large ( torch . double ) <nl> - check_large ( torch . float ) <nl> - <nl> - def __test_math_by_name ( self , function_name , mathfn , selffn ) : <nl> - mathfn = getattr ( math , mathfn ) <nl> - if selffn : <nl> - def torchfn ( x ) : <nl> - return getattr ( x , function_name ) ( ) <nl> - else : <nl> - torchfn = getattr ( torch , function_name ) <nl> - self . _test_math ( torchfn , mathfn , test_expand = ( not selffn ) ) <nl> - <nl> - def _test_math_by_name ( self , function_name , test_self = True ) : <nl> - if test_self : <nl> - self . __test_math_by_name ( function_name + " _ " , function_name , True ) <nl> - self . __test_math_by_name ( function_name , function_name , False ) <nl> - <nl> - def test_sin ( self ) : <nl> - self . _test_math_by_name ( ' sin ' ) <nl> - <nl> - def test_sinh ( self ) : <nl> - def sinh ( x ) : <nl> - try : <nl> - return math . sinh ( x ) <nl> - except OverflowError : <nl> - return inf if x > 0 else - inf <nl> - self . _test_math ( torch . sinh , sinh ) <nl> - <nl> - def test_lgamma ( self ) : <nl> - def lgamma ( x ) : <nl> - if x < = 0 and x = = int ( x ) : <nl> - return inf <nl> - return math . lgamma ( x ) <nl> - self . _test_math ( torch . lgamma , lgamma ) <nl> - <nl> @ unittest . skipIf ( not TEST_SCIPY , " Scipy not found " ) <nl> def test_mvlgamma ( self ) : <nl> from scipy . special import multigammaln <nl> def test_msnpu_error ( self ) : <nl> with self . assertRaisesRegex ( RuntimeError , " support for msnpu " ) : <nl> torch . zeros ( 1 , device = torch . device ( ' msnpu ' ) ) <nl> <nl> - def _digamma_input ( self , test_poles = True ) : <nl> - input = [ ] <nl> - input . append ( ( torch . randn ( 10 ) . abs ( ) + 1e - 4 ) . tolist ( ) ) <nl> - input . append ( ( torch . randn ( 10 ) . abs ( ) + 1e6 ) . tolist ( ) ) <nl> - zeros = torch . linspace ( - 9 . 5 , - 0 . 5 , 10 ) <nl> - input . append ( zeros . tolist ( ) ) <nl> - input . append ( ( zeros - 0 . 49 ) . tolist ( ) ) <nl> - input . append ( ( zeros + 0 . 49 ) . tolist ( ) ) <nl> - input . append ( ( zeros + ( torch . rand ( 10 ) * 0 . 99 ) - 0 . 5 ) . tolist ( ) ) <nl> - <nl> - if test_poles : <nl> - input . append ( [ - 0 . 999999994 , - 1 . 999999994 , - 2 . 0000000111 , <nl> - - 100 . 99999994 , - 1931 . 99999994 , 0 . 000000111 , <nl> - - 0 . 000000111 , 0 , - 2 , - 329 ] ) <nl> - return input <nl> - <nl> - @ unittest . skipIf ( not TEST_SCIPY , " Scipy not found " ) <nl> - def test_digamma ( self ) : <nl> - from scipy . special import digamma <nl> - <nl> - # scipy 1 . 1 . 0 changed when it returns + / - inf vs . NaN <nl> - def torch_digamma_without_inf ( inp ) : <nl> - res = torch . digamma ( inp ) <nl> - res [ ( res = = - inf ) | ( res = = inf ) ] = nan <nl> - return res <nl> - <nl> - def scipy_digamma_without_inf ( inp ) : <nl> - res = digamma ( inp ) <nl> - if np . isscalar ( res ) : <nl> - return res if np . isfinite ( res ) else nan <nl> - res [ np . isinf ( res ) ] = nan <nl> - return res <nl> - <nl> - self . _test_math ( torch_digamma_without_inf , scipy_digamma_without_inf , self . _digamma_input ( ) ) <nl> - <nl> - @ unittest . skipIf ( not TEST_SCIPY , " Scipy not found " ) <nl> - def test_polygamma ( self ) : <nl> - from scipy . special import polygamma <nl> - for n in [ 0 , 1 ] : <nl> - self . _test_math ( lambda x : torch . polygamma ( n , x ) , <nl> - lambda x : polygamma ( n , x ) . item ( ) , <nl> - self . _digamma_input ( test_poles = False ) ) <nl> - <nl> + def test_polygamma_neg ( self ) : <nl> with self . assertRaisesRegex ( RuntimeError , r ' polygamma \ ( n , x \ ) does not support negative n \ . ' ) : <nl> torch . polygamma ( - 1 , torch . tensor ( [ 1 . 0 , 2 . 0 ] ) ) <nl> <nl> - def test_asin ( self ) : <nl> - self . _test_math ( torch . asin , lambda x : math . asin ( x ) if abs ( x ) < = 1 else nan ) <nl> - <nl> - def test_cos ( self ) : <nl> - self . _test_math_by_name ( ' cos ' ) <nl> - <nl> - def test_cosh ( self ) : <nl> - def cosh ( x ) : <nl> - try : <nl> - return math . cosh ( x ) <nl> - except OverflowError : <nl> - # Return inf on overflow . <nl> - # See http : / / en . cppreference . com / w / cpp / numeric / math / cosh <nl> - return inf <nl> - self . _test_math ( torch . cosh , cosh ) <nl> - <nl> - def test_acos ( self ) : <nl> - self . _test_math ( torch . acos , lambda x : math . acos ( x ) if abs ( x ) < = 1 else nan ) <nl> - <nl> - def test_tan ( self ) : <nl> - self . _test_math_by_name ( ' tan ' ) <nl> - <nl> - def test_tanh ( self ) : <nl> - self . _test_math_by_name ( ' tanh ' ) <nl> - <nl> - def test_atan ( self ) : <nl> - self . _test_math_by_name ( ' atan ' ) <nl> - <nl> - def test_log ( self ) : <nl> - def log ( x ) : <nl> - if x = = 0 : <nl> - return - inf <nl> - elif x < 0 : <nl> - return nan <nl> - return math . log ( x ) <nl> - self . _test_math ( torch . log , log ) <nl> - <nl> - def test_log10 ( self ) : <nl> - def log10 ( x ) : <nl> - if x = = 0 : <nl> - return - inf <nl> - elif x < 0 : <nl> - return nan <nl> - return math . log10 ( x ) <nl> - self . _test_math ( torch . log10 , log10 ) <nl> - <nl> - def test_log1p ( self ) : <nl> - def log1p ( x ) : <nl> - if x = = - 1 : <nl> - return - inf <nl> - elif x < - 1 : <nl> - return nan <nl> - return math . log1p ( x ) <nl> - self . _test_math ( torch . log1p , log1p ) <nl> - <nl> - def test_log2 ( self ) : <nl> - def log2 ( x ) : <nl> - if x = = 0 : <nl> - return - inf <nl> - elif x < 0 : <nl> - return nan <nl> - try : <nl> - return math . log2 ( x ) <nl> - except AttributeError : <nl> - return math . log ( x , 2 ) <nl> - self . _test_math ( torch . log2 , log2 ) <nl> - <nl> - def test_sqrt ( self ) : <nl> - self . _test_math ( torch . sqrt , lambda x : math . sqrt ( x ) if x > = 0 else nan ) <nl> - <nl> - def test_erf ( self ) : <nl> - self . _test_math_by_name ( ' erf ' ) <nl> - <nl> - def test_erfc ( self ) : <nl> - self . _test_math_by_name ( ' erfc ' ) <nl> - <nl> - def test_exp ( self ) : <nl> - def exp ( x ) : <nl> - try : <nl> - return math . exp ( x ) <nl> - except OverflowError : <nl> - return inf <nl> - self . _test_math ( torch . exp , exp ) <nl> - <nl> - def test_expm1 ( self ) : <nl> - def expm1 ( x ) : <nl> - try : <nl> - return math . expm1 ( x ) <nl> - except OverflowError : <nl> - return inf <nl> - self . _test_math ( torch . expm1 , expm1 ) <nl> - <nl> - def test_floor ( self ) : <nl> - self . _test_math_by_name ( ' floor ' ) <nl> - <nl> - # Note : this is consistent with NumPy <nl> - with self . assertRaises ( RuntimeError ) : <nl> - torch . floor ( torch . tensor ( ( 1 + 1j ) ) ) <nl> - <nl> - def test_ceil ( self ) : <nl> - self . _test_math_by_name ( ' ceil ' ) <nl> - <nl> - # Note : this is consistent with NumPy <nl> - with self . assertRaises ( RuntimeError ) : <nl> - torch . ceil ( torch . tensor ( ( 1 + 1j ) ) ) <nl> - <nl> - def test_rsqrt ( self ) : <nl> - def rsqrt ( x ) : <nl> - if x = = 0 : <nl> - return inf <nl> - elif x < 0 : <nl> - return nan <nl> - return 1 . 0 / math . sqrt ( x ) <nl> - <nl> - self . _test_math ( torch . rsqrt , rsqrt ) <nl> - <nl> - def test_frac ( self ) : <nl> - self . _test_math ( torch . frac , lambda x : math . fmod ( x , 1 ) ) <nl> - <nl> - def test_trunc ( self ) : <nl> - self . _test_math ( torch . trunc , lambda x : x - math . fmod ( x , 1 ) ) <nl> - <nl> - # Note : this is consistent with NumPy <nl> - with self . assertRaises ( RuntimeError ) : <nl> - torch . trunc ( torch . tensor ( ( 1 + 1j ) ) ) <nl> - <nl> - def test_round ( self ) : <nl> - self . _test_math ( torch . round , round ) <nl> <nl> def test_has_storage ( self ) : <nl> self . assertIsNotNone ( torch . Tensor ( ) . storage ( ) ) <nl> def test_complex_type_conversions ( self , device ) : <nl> else : <nl> self . assertEqual ( from_tensor , to_tensor , exact_dtype = False ) <nl> <nl> + @ onlyCPU <nl> + @ dtypes ( torch . complex64 , torch . complex128 ) <nl> + def test_complex_unsupported ( self , device , dtype ) : <nl> + inp = torch . tensor ( ( 1 + 1j ) , device = device , dtype = dtype ) <nl> + # Note : this is consistent with NumPy <nl> + with self . assertRaises ( RuntimeError ) : <nl> + torch . floor ( inp ) <nl> + with self . assertRaises ( RuntimeError ) : <nl> + torch . ceil ( inp ) <nl> + with self . assertRaises ( RuntimeError ) : <nl> + torch . trunc ( inp ) <nl> + <nl> # NOTE [ Linspace + Logspace precision override ] <nl> # Our Linspace and logspace torch . half CUDA kernels are not very precise . <nl> # Since linspace / logspace are deterministic , we can compute an expected <nl> def caller ( cls , <nl> for test in tensor_op_tests : <nl> caller ( cls , * test ) <nl> <nl> + def _generate_reference_input ( dtype , device ) : <nl> + input = [ ] <nl> + input . append ( list ( range ( - 5 , 5 ) ) ) <nl> + input . append ( [ 0 for x in range ( - 5 , 5 ) ] ) <nl> + input . append ( [ x + 1e - 6 for x in range ( - 5 , 5 ) ] ) <nl> + # Some vectorized implementations don ' t support large values <nl> + input . append ( [ x + 1e10 for x in range ( - 5 , 5 ) ] ) <nl> + input . append ( [ x - 1e10 for x in range ( - 5 , 5 ) ] ) <nl> + input . append ( torch . randn ( 10 ) . tolist ( ) ) <nl> + input . append ( ( torch . randn ( 10 ) * 1e6 ) . tolist ( ) ) <nl> + input . append ( [ math . pi * ( x / 2 ) for x in range ( - 5 , 5 ) ] ) <nl> + return torch . tensor ( input , dtype = dtype , device = device ) <nl> + <nl> + def _generate_gamma_input ( dtype , device , test_poles = True ) : <nl> + input = [ ] <nl> + input . append ( ( torch . randn ( 10 ) . abs ( ) + 1e - 4 ) . tolist ( ) ) <nl> + input . append ( ( torch . randn ( 10 ) . abs ( ) + 1e6 ) . tolist ( ) ) <nl> + zeros = torch . linspace ( - 9 . 5 , - 0 . 5 , 10 ) <nl> + input . append ( zeros . tolist ( ) ) <nl> + input . append ( ( zeros - 0 . 49 ) . tolist ( ) ) <nl> + input . append ( ( zeros + 0 . 49 ) . tolist ( ) ) <nl> + input . append ( ( zeros + ( torch . rand ( 10 ) * 0 . 99 ) - 0 . 5 ) . tolist ( ) ) <nl> + if test_poles : <nl> + input . append ( [ - 0 . 999999994 , - 1 . 999999994 , - 2 . 0000000111 , <nl> + - 100 . 99999994 , - 1931 . 99999994 , 0 . 000000111 , <nl> + - 0 . 000000111 , 0 , - 2 , - 329 ] ) <nl> + return torch . tensor ( input , dtype = dtype , device = device ) <nl> + <nl> + # this class contains information needed to generate tests for torch math functions <nl> + # the generated tests compare torch implementation with the reference numpy / scipy implementation , <nl> + # and also check proper behavior for contiguous / discontiguous / inplace outputs . <nl> + class _TorchMathTestMeta ( object ) : <nl> + def __init__ ( self , <nl> + opstr , <nl> + args = ( ) , <nl> + reffn = None , <nl> + refargs = lambda x : ( x . numpy ( ) , ) , <nl> + input_fn = _generate_reference_input , <nl> + inputargs = ( ) , <nl> + substr = ' ' , <nl> + make_inplace = True , <nl> + decorators = None , <nl> + ref_backend = ' numpy ' , <nl> + rtol = None , <nl> + atol = None , <nl> + dtypes = _float_types_no_half , <nl> + replace_inf_with_nan = False ) : <nl> + self . opstr = opstr <nl> + self . args = args <nl> + self . reffn = reffn # reffn is either callable or ref_backend attribute , set to opstr if not specified <nl> + self . refargs = refargs <nl> + self . input_fn = input_fn <nl> + self . inputargs = inputargs <nl> + self . substr = substr <nl> + self . make_inplace = make_inplace <nl> + assert ref_backend = = ' numpy ' or ref_backend = = ' scipy ' <nl> + self . ref_backend = ref_backend <nl> + if ref_backend = = ' numpy ' : <nl> + self . ref_decorator = [ unittest . skipIf ( not TEST_NUMPY , " Numpy not found " ) ] <nl> + elif ref_backend = = ' scipy ' : <nl> + self . ref_decorator = [ unittest . skipIf ( not TEST_SCIPY , " Scipy not found " ) ] <nl> + self . decorators = decorators <nl> + self . rtol = rtol <nl> + self . atol = atol <nl> + self . dtypes = dtypes <nl> + self . replace_inf_with_nan = replace_inf_with_nan <nl> + <nl> + torch_op_tests = [ _TorchMathTestMeta ( ' sin ' ) , <nl> + _TorchMathTestMeta ( ' asin ' , reffn = ' arcsin ' ) , <nl> + _TorchMathTestMeta ( ' sinh ' ) , <nl> + _TorchMathTestMeta ( ' cos ' ) , <nl> + _TorchMathTestMeta ( ' acos ' , reffn = ' arccos ' ) , <nl> + _TorchMathTestMeta ( ' cosh ' ) , <nl> + _TorchMathTestMeta ( ' tan ' ) , <nl> + _TorchMathTestMeta ( ' atan ' , reffn = ' arctan ' ) , <nl> + _TorchMathTestMeta ( ' tanh ' ) , <nl> + _TorchMathTestMeta ( ' log ' ) , <nl> + _TorchMathTestMeta ( ' log10 ' ) , <nl> + _TorchMathTestMeta ( ' log1p ' ) , <nl> + _TorchMathTestMeta ( ' log2 ' ) , <nl> + _TorchMathTestMeta ( ' sqrt ' ) , <nl> + _TorchMathTestMeta ( ' erf ' , ref_backend = ' scipy ' ) , <nl> + _TorchMathTestMeta ( ' erfc ' , ref_backend = ' scipy ' ) , <nl> + _TorchMathTestMeta ( ' exp ' ) , <nl> + _TorchMathTestMeta ( ' expm1 ' ) , <nl> + _TorchMathTestMeta ( ' floor ' ) , <nl> + _TorchMathTestMeta ( ' ceil ' ) , <nl> + _TorchMathTestMeta ( ' rsqrt ' , reffn = lambda x : np . reciprocal ( np . sqrt ( x ) ) ) , <nl> + _TorchMathTestMeta ( ' frac ' , reffn = ' fmod ' , refargs = lambda x : ( x . numpy ( ) , 1 ) ) , <nl> + _TorchMathTestMeta ( ' trunc ' ) , <nl> + _TorchMathTestMeta ( ' round ' ) , <nl> + _TorchMathTestMeta ( ' lgamma ' , reffn = ' gammaln ' , ref_backend = ' scipy ' ) , <nl> + _TorchMathTestMeta ( ' polygamma ' , args = [ 0 ] , substr = ' _0 ' , reffn = ' polygamma ' , <nl> + refargs = lambda x : ( 0 , x . numpy ( ) ) , input_fn = _generate_gamma_input , inputargs = [ False ] , <nl> + ref_backend = ' scipy ' ) , <nl> + _TorchMathTestMeta ( ' polygamma ' , args = [ 1 ] , substr = ' _1 ' , reffn = ' polygamma ' , <nl> + refargs = lambda x : ( 1 , x . numpy ( ) ) , input_fn = _generate_gamma_input , inputargs = [ False ] , <nl> + ref_backend = ' scipy ' , rtol = 0 . 0008 , atol = 1e - 5 ) , <nl> + _TorchMathTestMeta ( ' digamma ' , <nl> + input_fn = _generate_gamma_input , inputargs = [ True ] , ref_backend = ' scipy ' , <nl> + replace_inf_with_nan = True ) ] <nl> + <nl> + <nl> + def generate_torch_test_functions ( cls , testmeta , inplace ) : <nl> + opstr = testmeta . opstr if not inplace else testmeta . opstr + " _ " <nl> + <nl> + def torchfn ( x ) : <nl> + return getattr ( x , opstr ) ( * testmeta . args ) <nl> + <nl> + def fn_check_reference ( self , device , dtype ) : <nl> + def reffn ( x ) : <nl> + backend = np if testmeta . ref_backend = = ' numpy ' else scipy . special <nl> + opstr = None <nl> + if testmeta . reffn is None : <nl> + opstr = testmeta . opstr <nl> + elif isinstance ( testmeta . reffn , str ) : <nl> + opstr = testmeta . reffn <nl> + if callable ( testmeta . reffn ) : <nl> + fn = testmeta . reffn <nl> + else : <nl> + assert opstr is not None , " invalid reffn " <nl> + fn = getattr ( backend , opstr ) <nl> + return fn ( * testmeta . refargs ( x ) ) <nl> + <nl> + inp = testmeta . input_fn ( dtype , device , * testmeta . inputargs ) <nl> + with warnings . catch_warnings ( ) : <nl> + warnings . simplefilter ( " ignore " ) <nl> + expected = torch . from_numpy ( reffn ( inp ) ) <nl> + actual = torchfn ( inp ) <nl> + if testmeta . replace_inf_with_nan : <nl> + actual [ ( actual = = - inf ) | ( actual = = inf ) ] = nan <nl> + expected [ ( expected = = - inf ) | ( expected = = inf ) ] = nan <nl> + <nl> + torch . testing . assert_allclose ( actual , expected , rtol = testmeta . rtol , atol = testmeta . atol ) <nl> + <nl> + def fn_non_contig ( self , device , dtype ) : <nl> + shapes = [ ( 5 , 7 ) , ( 1024 , ) ] <nl> + for shape in shapes : <nl> + contig = _make_tensor ( shape , dtype = dtype , device = device ) <nl> + non_contig = torch . empty ( shape + ( 2 , ) , dtype = dtype ) [ . . . , 0 ] <nl> + non_contig . copy_ ( contig ) <nl> + self . assertFalse ( non_contig . is_contiguous ( ) ) <nl> + self . assertEqual ( torchfn ( contig ) , torchfn ( non_contig ) , ' non - contiguous ' ) <nl> + <nl> + def fn_non_contig_index ( self , device , dtype ) : <nl> + contig = _make_tensor ( ( 2 , 2 , 1 , 2 ) , dtype = dtype , device = device ) <nl> + non_contig = contig [ : , 1 , . . . ] <nl> + contig = non_contig . clone ( ) <nl> + self . assertFalse ( non_contig . is_contiguous ( ) ) <nl> + self . assertEqual ( torchfn ( contig ) , torchfn ( non_contig ) , ' non - contiguous index ' ) <nl> + <nl> + def fn_non_contig_expand ( self , device , dtype ) : <nl> + shapes = [ ( 1 , 3 ) , ( 1 , 7 ) , ( 5 , 7 ) ] <nl> + for shape in shapes : <nl> + contig = _make_tensor ( shape , dtype = dtype , device = device ) <nl> + non_contig = contig . clone ( ) . expand ( 3 , - 1 , - 1 ) <nl> + self . assertFalse ( non_contig . is_contiguous ( ) ) <nl> + contig = torchfn ( contig ) <nl> + non_contig = torchfn ( non_contig ) <nl> + for i in range ( 3 ) : <nl> + self . assertEqual ( contig , non_contig [ i ] , ' non - contiguous expand [ ' + str ( i ) + ' ] ' ) <nl> + <nl> + def fn_contig_size1 ( self , device , dtype ) : <nl> + contig = _make_tensor ( ( 5 , 100 ) , dtype = dtype , device = device ) <nl> + contig = contig [ : 1 , : 50 ] <nl> + contig2 = torch . empty ( contig . size ( ) , dtype = dtype ) <nl> + contig2 . copy_ ( contig ) <nl> + self . assertTrue ( contig . is_contiguous ( ) ) <nl> + self . assertTrue ( contig2 . is_contiguous ( ) ) <nl> + self . assertEqual ( torchfn ( contig ) , torchfn ( contig2 ) , ' contiguous size1 ' ) <nl> + <nl> + def fn_contig_size1_large_dim ( self , device , dtype ) : <nl> + contig = _make_tensor ( ( 5 , 2 , 3 , 1 , 4 , 5 , 3 , 2 , 1 , 2 , 3 , 4 ) , dtype = dtype , device = device ) <nl> + contig = contig [ : 1 , : , : , : , : , : , : , : , : , : , : , : ] <nl> + contig2 = torch . empty ( contig . size ( ) , dtype = dtype ) <nl> + contig2 . copy_ ( contig ) <nl> + self . assertTrue ( contig . is_contiguous ( ) ) <nl> + self . assertTrue ( contig2 . is_contiguous ( ) ) <nl> + self . assertEqual ( torchfn ( contig ) , torchfn ( contig2 ) , ' contiguous size1 ' ) <nl> + <nl> + def fn_large ( self , device , dtype ) : <nl> + input = _make_tensor ( ( 1024 , 512 ) , dtype = dtype , device = device ) <nl> + # clone input to properly test inplace functions <nl> + actual = torchfn ( input . clone ( ) ) <nl> + expected = torch . stack ( [ torchfn ( slice ) for slice in input ] ) <nl> + self . assertEqual ( actual , expected , ' large ' ) <nl> + <nl> + test_functions = { " test_reference_ " : fn_check_reference , <nl> + " test_non_contig_ " : fn_non_contig , <nl> + " test_non_contig_index_ " : fn_non_contig_index , <nl> + " test_non_contig_expand_ " : fn_non_contig_expand , <nl> + " test_contig_size1_ " : fn_contig_size1 , <nl> + " test_check_contig_size1_large_dim_ " : fn_contig_size1_large_dim , <nl> + " test_large_ " : fn_large } <nl> + for name in test_functions : <nl> + if inplace and ' expand ' in name : <nl> + continue <nl> + test_name = name + testmeta . opstr + testmeta . substr <nl> + if inplace : <nl> + test_name + = " _inplace " <nl> + assert not hasattr ( cls , test_name ) , " { 0 } already in TestTorchMathOps " . format ( test_name ) <nl> + <nl> + decorators = [ ] if testmeta . decorators is None else testmeta . decorators <nl> + if ' reference ' in name : <nl> + decorators = decorators + testmeta . ref_decorator <nl> + decorators = decorators + [ dtypes ( * testmeta . dtypes ) ] <nl> + fn_test = test_functions [ name ] <nl> + for dec in decorators : <nl> + fn_test = dec ( fn_test ) <nl> + setattr ( cls , test_name , fn_test ) <nl> + <nl> + <nl> + <nl> + <nl> + def generate_torch_op_tests ( cls ) : <nl> + for t in torch_op_tests : <nl> + generate_torch_test_functions ( cls , t , False ) <nl> + if t . make_inplace : <nl> + generate_torch_test_functions ( cls , t , True ) <nl> + <nl> + <nl> + <nl> + <nl> <nl> tensor_binary_ops = [ <nl> ' __lt__ ' , ' __le__ ' , <nl> def test_svd_tall_some_col_maj ( self , device , dtype ) : <nl> def test_svd_tall_all_col_maj ( self , device , dtype ) : <nl> self . _test_svd_helper ( ( 5 , 20 ) , False , True , device , dtype ) <nl> <nl> + class TestTorchMathOps ( TestCase ) : <nl> + exact_dtype = True <nl> + <nl> class TestTorch ( TestCase , _TestTorchMixin ) : <nl> exact_dtype = True <nl> <nl> class TestTorch ( TestCase , _TestTorchMixin ) : <nl> add_neg_dim_tests ( ) <nl> generate_tensor_op_tests ( TestTensorDeviceOps ) <nl> generate_not_implemented_tests ( TestTorchDeviceType ) <nl> + generate_torch_op_tests ( TestTorchMathOps ) <nl> instantiate_device_type_tests ( TestTorchDeviceType , globals ( ) ) <nl> instantiate_device_type_tests ( TestViewOps , globals ( ) ) <nl> instantiate_device_type_tests ( TestDevicePrecision , globals ( ) , except_for = ' cpu ' ) <nl> instantiate_device_type_tests ( TestTensorDeviceOps , globals ( ) ) <nl> + instantiate_device_type_tests ( TestTorchMathOps , globals ( ) , only_for = ' cpu ' ) <nl> <nl> if __name__ = = ' __main__ ' : <nl> run_tests ( ) <nl> mmm a / torch / testing / _internal / common_device_type . py <nl> ppp b / torch / testing / _internal / common_device_type . py <nl> def setUpClass ( cls ) : <nl> # The tests in these test cases are derived from the generic tests in <nl> # generic_test_class . <nl> # See note " Generic Device Type Testing . " <nl> - def instantiate_device_type_tests ( generic_test_class , scope , except_for = None ) : <nl> + def instantiate_device_type_tests ( generic_test_class , scope , except_for = None , only_for = None ) : <nl> # Removes the generic test class from its enclosing scope so its tests <nl> # are not discoverable . <nl> del scope [ generic_test_class . __name__ ] <nl> def instantiate_device_type_tests ( generic_test_class , scope , except_for = None ) : <nl> # Creates device - specific test cases <nl> for base in device_type_test_bases : <nl> # Skips bases listed in except_for <nl> + if except_for is not None and only_for is not None : <nl> + assert base . device_type not in except_for or base . device_type not in only_for , \ <nl> + " same device cannot appear in except_for and only_for " <nl> if except_for is not None and base . device_type in except_for : <nl> continue <nl> + if only_for is not None and base . device_type not in only_for : <nl> + continue <nl> <nl> class_name = generic_test_class . __name__ + base . device_type . upper ( ) <nl> device_type_test_class = type ( class_name , ( base , empty_class ) , { } ) <nl>
Moves torch cpu math tests to device - generic framework ( )
pytorch/pytorch
dc1ecdf8d91fd0e5129aa469d847374d8e1ba26a
2020-04-01T06:28:38Z
mmm a / benchmark / scripts / compare_perf_tests . py <nl> ppp b / benchmark / scripts / compare_perf_tests . py <nl> def write_to_file ( file_name , data ) : <nl> <nl> def sort_ratio_list ( ratio_list , changes_only = False ) : <nl> " " " <nl> - Return 3 sorted list imporvment , regression and normal . <nl> + Return 3 sorted list improvement , regression and normal . <nl> " " " <nl> decreased_perf_list = [ ] <nl> increased_perf_list = [ ] <nl> mmm a / include / swift / IDE / Formatting . h <nl> ppp b / include / swift / IDE / Formatting . h <nl> size_t getOffsetOfTrimmedLine ( unsigned LineIndex , StringRef Text ) ; <nl> / / / \ brief Returns the Text on \ p LineIndex , excluding Leading WS <nl> StringRef getTrimmedTextForLine ( unsigned LineIndex , StringRef Text ) ; <nl> <nl> - / / / \ brief Returns the number of spaces at the begining of \ p LineIndex <nl> + / / / \ brief Returns the number of spaces at the beginning of \ p LineIndex <nl> / / / or if indenting is done by Tabs , the number of Tabs * TabWidthp <nl> size_t getExpandedIndentForLine ( unsigned LineIndex , CodeFormatOptions Options , <nl> StringRef Text ) ; <nl> mmm a / include / swift / SILOptimizer / Analysis / ARCAnalysis . h <nl> ppp b / include / swift / SILOptimizer / Analysis / ARCAnalysis . h <nl> class ConsumedResultToEpilogueRetainMatcher { <nl> <nl> / / / Return true if all the successors of the EpilogueRetainInsts do not have <nl> / / / a retain . <nl> - bool isTransistiveSuccessorsRetainFree ( llvm : : DenseSet < SILBasicBlock * > BBs ) ; <nl> + bool isTransitiveSuccessorsRetainFree ( llvm : : DenseSet < SILBasicBlock * > BBs ) ; <nl> <nl> / / / Finds matching releases in the provided block \ p BB . <nl> RetainKindValue findMatchingRetainsInBasicBlock ( SILBasicBlock * BB , SILValue V ) ; <nl> mmm a / include / swift / SILOptimizer / Utils / FunctionSignatureOptUtils . h <nl> ppp b / include / swift / SILOptimizer / Utils / FunctionSignatureOptUtils . h <nl> <nl> # include " swift / SIL / SILValue . h " <nl> # include " swift / SIL / SILArgument . h " <nl> # include " swift / SIL / SILFunction . h " <nl> - # include " swift / SIL / SILInstruction . h " <nl> # include " swift / SIL / SILDebugScope . h " <nl> # include " swift / SIL / Projection . h " <nl> # include " swift / SILOptimizer / Analysis / Analysis . h " <nl> mmm a / include / swift / SILOptimizer / Utils / Local . h <nl> ppp b / include / swift / SILOptimizer / Utils / Local . h <nl> recursivelyDeleteTriviallyDeadInstructions ( <nl> / / / This routine only examines the state of the instruction at hand . <nl> bool isInstructionTriviallyDead ( SILInstruction * I ) ; <nl> <nl> - / / / \ brief Return true if this is a release instruction thats not going to <nl> + / / / \ brief Return true if this is a release instruction that ' s not going to <nl> / / / free the object . <nl> bool isIntermediateRelease ( SILInstruction * I , <nl> ConsumedArgToEpilogueReleaseMatcher & ERM ) ; <nl> mmm a / lib / ClangImporter / ClangImporter . cpp <nl> ppp b / lib / ClangImporter / ClangImporter . cpp <nl> auto ClangImporter : : Implementation : : importFullName ( <nl> StringRef baseName ; <nl> SmallVector < StringRef , 4 > argumentNames ; <nl> SmallString < 16 > selectorSplitScratch ; <nl> - StringScratchSpace stringScratch ; <nl> ArrayRef < const clang : : ParmVarDecl * > params ; <nl> switch ( D - > getDeclName ( ) . getNameKind ( ) ) { <nl> case clang : : DeclarationName : : CXXConstructorName : <nl> mmm a / lib / Parse / ParseExpr . cpp <nl> ppp b / lib / Parse / ParseExpr . cpp <nl> static bool isValidTrailingClosure ( bool isExprBasic , Expr * baseExpr , Parser & P ) { <nl> <nl> / / If this is a normal expression ( not an expr - basic ) then trailing closures <nl> / / are allowed , so this is obviously one . <nl> - / / TODO : We could handle try to diambiguate cases like : <nl> + / / TODO : We could handle try to disambiguate cases like : <nl> / / let x = foo <nl> / / { . . . } ( ) <nl> / / by looking ahead for the ( ) ' s , but this has been replaced by do { } , so this <nl> mmm a / lib / SILOptimizer / Analysis / ARCAnalysis . cpp <nl> ppp b / lib / SILOptimizer / Analysis / ARCAnalysis . cpp <nl> void ConsumedResultToEpilogueRetainMatcher : : recompute ( ) { <nl> <nl> bool <nl> ConsumedResultToEpilogueRetainMatcher : : <nl> - isTransistiveSuccessorsRetainFree ( llvm : : DenseSet < SILBasicBlock * > BBs ) { <nl> + isTransitiveSuccessorsRetainFree ( llvm : : DenseSet < SILBasicBlock * > BBs ) { <nl> / / For every block with retain , we need to check the transitive <nl> / / closure of its successors are retain - free . <nl> for ( auto & I : EpilogueRetainInsts ) { <nl> findMatchingRetains ( SILBasicBlock * BB ) { <nl> } <nl> <nl> / / Lastly , check whether all the successor blocks are retain - free . <nl> - if ( ! isTransistiveSuccessorsRetainFree ( RetainFrees ) ) <nl> + if ( ! isTransitiveSuccessorsRetainFree ( RetainFrees ) ) <nl> EpilogueRetainInsts . clear ( ) ; <nl> <nl> / / At this point , we ' ve either failed to find any epilogue retains or <nl> mmm a / lib / SILOptimizer / IPO / EagerSpecializer . cpp <nl> ppp b / lib / SILOptimizer / IPO / EagerSpecializer . cpp <nl> SILValue EagerDispatch : : emitArgumentCast ( SILArgument * OrigArg , unsigned Idx ) { <nl> } <nl> <nl> / / / Converts each generic function argument into a SILValue that can be passed <nl> - / / / to the specialized call by emiting a cast followed by a load . <nl> + / / / to the specialized call by emitting a cast followed by a load . <nl> / / / <nl> / / / Populates the CallArgs with the converted arguments . <nl> / / / <nl> mmm a / lib / SILOptimizer / IPO / LetPropertiesOpts . cpp <nl> ppp b / lib / SILOptimizer / IPO / LetPropertiesOpts . cpp <nl> class LetPropertiesOpt { <nl> llvm : : SmallPtrSet < NominalTypeDecl * , 16 > SkipTypeProcessing ; <nl> / / Properties in this set cannot be removed . <nl> llvm : : SmallPtrSet < VarDecl * , 16 > CannotRemove ; <nl> - / / Set of let propeties in a given nominal type . <nl> + / / Set of let properties in a given nominal type . <nl> llvm : : MapVector < NominalTypeDecl * , Properties > NominalTypeLetProperties ; <nl> / / Set of properties whose initializer functions were processed already . <nl> llvm : : SmallPtrSet < VarDecl * , 16 > ProcessedPropertyInitializers ; <nl> void LetPropertiesOpt : : collectStructPropertiesAccess ( StructInst * SI , <nl> } <nl> <nl> if ( LetProps . empty ( ) ) { <nl> - / / No interesting let propeties in this struct . <nl> + / / No interesting let properties in this struct . <nl> SkipTypeProcessing . insert ( structDecl ) ; <nl> return ; <nl> } <nl> void LetPropertiesOpt : : collectStructPropertiesAccess ( StructInst * SI , <nl> auto & Props = NominalTypeLetProperties [ structDecl ] ; <nl> <nl> DEBUG ( llvm : : dbgs ( ) <nl> - < < " Found a struct instruction intializing some let properties : " ; <nl> + < < " Found a struct instruction initializing some let properties : " ; <nl> SI - > dumpInContext ( ) ) ; <nl> / / Figure out the initializing sequence for each <nl> / / of the properties . <nl> void LetPropertiesOpt : : collectStructPropertiesAccess ( StructInst * SI , <nl> < < " ' : " < < PropValue < < " \ n " ) ; <nl> if ( ! analyzeInitValue ( SI , Prop ) ) { <nl> SkipProcessing . insert ( Prop ) ; <nl> - DEBUG ( llvm : : dbgs ( ) < < " The value of a let propertiy ' " <nl> + DEBUG ( llvm : : dbgs ( ) < < " The value of a let property ' " <nl> < < structDecl - > getName ( ) < < " : : " < < Prop - > getName ( ) <nl> < < " ' is not statically known \ n " ) ; <nl> } <nl> void LetPropertiesOpt : : collectPropertyAccess ( SILInstruction * I , <nl> return ; <nl> <nl> DEBUG ( llvm : : dbgs ( ) <nl> - < < " Collecting propery access for property ' " <nl> + < < " Collecting property access for property ' " <nl> < < dyn_cast < NominalTypeDecl > ( Property - > getDeclContext ( ) ) - > getName ( ) <nl> < < " : : " < < Property - > getName ( ) < < " ' : \ n " ; <nl> llvm : : dbgs ( ) < < " The instructions are : \ n " ; I - > dumpInContext ( ) ) ; <nl> mmm a / lib / SILOptimizer / Utils / Local . cpp <nl> ppp b / lib / SILOptimizer / Utils / Local . cpp <nl> bool swift : : isIntermediateRelease ( SILInstruction * I , <nl> if ( Arg - > hasConvention ( SILArgumentConvention : : Direct_Guaranteed ) ) <nl> return true ; <nl> <nl> - / / This is a release on a owned parameter and its not the epilogue relase . <nl> + / / This is a release on an owned parameter and its not the epilogue release . <nl> / / Its not the final release . <nl> SILInstruction * Rel = ERM . getSingleReleaseForArgument ( Arg ) ; <nl> if ( Rel & & Rel ! = I ) <nl> mmm a / stdlib / private / SwiftReflectionTest / SwiftReflectionTest . swift <nl> ppp b / stdlib / private / SwiftReflectionTest / SwiftReflectionTest . swift <nl> <nl> - / / = = = mmm ReflectionPipe . swift mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm * - swift - * - = = = / / <nl> + / / = = = mmm SwiftReflectionTest . swift mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> / / <nl> / / This source file is part of the Swift . org open source project <nl> / / <nl> internal struct Section { <nl> <nl> / / / Holds the addresses and sizes of sections related to reflection <nl> internal struct ReflectionInfo : Sequence { <nl> - / / / The name of the laoded image <nl> + / / / The name of the loaded image <nl> internal let imageName : String <nl> <nl> / / / The Field Metadata section <nl> mmm a / stdlib / public / core / String . swift <nl> ppp b / stdlib / public / core / String . swift <nl> extension String : Hashable { <nl> # else <nl> let hashOffset = Int ( bitPattern : 0x429b_1266_88dd_cc21 ) <nl> # endif <nl> - / / If we have a contigous string then we can use the stack optimization . <nl> + / / If we have a contiguous string then we can use the stack optimization . <nl> let core = self . _core <nl> let isASCII = core . isASCII <nl> if core . hasContiguousStorage { <nl> mmm a / stdlib / public / core / Unicode . swift <nl> ppp b / stdlib / public / core / Unicode . swift <nl> public struct UTF8 : UnicodeCodec { <nl> / / / well - formed ; otherwise the * maximal subpart of the ill - formed <nl> / / / sequence * ( Unicode 8 . 0 . 0 , Ch 3 . 9 , D93b ) , i . e . the number of leading <nl> / / / code units that were valid or 1 in case none were valid . Unicode <nl> - / / / recommends to skip these bytes bytes and replace them by a single <nl> + / / / recommends to skip these bytes and replace them by a single <nl> / / / replacement character ( U + FFFD ) . <nl> / / / <nl> / / / - Requires : There is at least one used byte in ` buffer ` , and the unused <nl> mmm a / test / 1_stdlib / tgmath . swift <nl> ppp b / test / 1_stdlib / tgmath . swift <nl> f1 = acosh ( fx ) <nl> g1 = acosh ( gx ) <nl> print3 ( " acosh " , d1 . isNaN , f1 . isNaN , g1 . isNaN ) <nl> / / CHECK - NEXT : acosh true true acosh <nl> - / / Note : We cannot check the output with " nan nan " using String interpolations <nl> + / / Note : We cannot check the output with " nan nan " using String interpolations <nl> / / because glibc on Linux outputs the result as " - nan " instead of " nan " . <nl> <nl> d1 = asinh ( dx ) <nl> mmm a / test / IDE / complete_operators . swift <nl> ppp b / test / IDE / complete_operators . swift <nl> func testAssignTuple3 ( ) { <nl> void ( ) # ^ ASSIGN_TUPLE_3 ^ # <nl> } <nl> / / FIXME : technically this is sometimes legal , but we would need to <nl> - / / differentiate between casese like ( ) = and print ( ) = . Since it ' s not very <nl> + / / differentiate between cases like ( ) = and print ( ) = . Since it ' s not very <nl> / / useful anyway , just omit the completion . <nl> / / ASSIGN_TUPLE_1 - NOT : Pattern / None : = { <nl> <nl> mmm a / test / IDE / print_synthesized_extensions . swift <nl> ppp b / test / IDE / print_synthesized_extensions . swift <nl> public extension P5 where T1 : Comparable { <nl> public func foo3 ( ) { } <nl> } <nl> <nl> - public extension P5 where T1 : Comparable { <nl> + public extension P5 where T1 : Comparable { <nl> <nl> / / / This is picked <nl> public func foo4 ( ) { } <nl> mmm a / test / Prototypes / Integers . swift . gyb <nl> ppp b / test / Prototypes / Integers . swift . gyb <nl> extension Arithmetic { <nl> } <nl> <nl> / / / SignedArithmetic protocol will only be conformed to by signed numbers , <nl> - / / / otherwise it would be posible to negate an unsigned value . <nl> + / / / otherwise it would be possible to negate an unsigned value . <nl> / / / <nl> / / / The only method of this protocol has the default implementation in an <nl> / / / extension , that uses a parameterless initializer and subtraction . <nl> public typealias UWord = UInt $ { word_bits } <nl> % ' IntegerLiteralConvertible , CustomStringConvertible ' <nl> <nl> / / / Integer protocol is a base for all the integer types that are available in <nl> - / / / the standard library , and besides should be suffecient to implement <nl> + / / / the standard library , and besides should be sufficient to implement <nl> / / / arbitrary precision integer types . <nl> / / / <nl> / / / ` isEqual ( to : ) ` and ` isLess ( than : ) ` methods are the ones responsible for <nl> public struct DoubleWidth < <nl> self . _storage = ( high : _value . 0 , low : _value . 1 ) <nl> } <nl> <nl> - / / aithmetic <nl> + / / arithmetic <nl> / / <nl> public init ( ) { <nl> self . init ( ( High ( ) , Low ( ) ) ) <nl> mmm a / test / SILOptimizer / let_properties_opts . swift <nl> ppp b / test / SILOptimizer / let_properties_opts . swift <nl> func testStructWithMultipleInits ( _ boos1 : Boo3 , _ boos2 : Boo3 ) - > Int32 { <nl> <nl> public func testStructWithMultipleInitsAndInlinedInitializer ( ) { <nl> let things = [ C ( ) ] <nl> - / / This line results in inlinig of the initializer Boo3 ( C , C ) and later <nl> + / / This line results in inlining of the initializer Boo3 ( C , C ) and later <nl> / / removal of this initializer by the dead function elimination pass . <nl> / / As a result , only one initializer , Boo3 ( C ) is seen by the Let Properties Propagation <nl> - / / pass . This pass may think that there is only one intializer and take the <nl> + / / pass . This pass may think that there is only one initializer and take the <nl> / / values of let properties assigned there as constants and try to propagate <nl> / / those values into uses . But this is wrong ! The pass should be clever enough <nl> / / to detect all stores to the let properties , including those outside of <nl> mmm a / test / SILOptimizer / let_properties_opts_runtime . swift <nl> ppp b / test / SILOptimizer / let_properties_opts_runtime . swift <nl> func testStructWithMultipleInits ( _ boos1 : Boo3 , _ boos2 : Boo3 ) - > Int32 { <nl> <nl> public func testStructWithMultipleInitsAndInlinedInitializer ( ) { <nl> let things = [ C ( ) ] <nl> - / / This line results in inlinig of the initializer Boo3 ( C , C ) and later <nl> + / / This line results in inlining of the initializer Boo3 ( C , C ) and later <nl> / / removal of this initializer by the dead function elimination pass . <nl> / / As a result , only one initializer , Boo3 ( C ) is seen by the Let Properties Propagation <nl> - / / pass . This pass may think that there is only one intializer and take the <nl> + / / pass . This pass may think that there is only one initializer and take the <nl> / / values of let properties assigned there as constants and try to propagate <nl> / / those values into uses . But this is wrong ! The pass should be clever enough <nl> / / to detect all stores to the let properties , including those outside of <nl> mmm a / validation - test / stdlib / Slice / Slice_Of_DefaultedRandomAccessCollection_WithSuffix . swift . gyb <nl> ppp b / validation - test / stdlib / Slice / Slice_Of_DefaultedRandomAccessCollection_WithSuffix . swift . gyb <nl> var SliceTests = TestSuite ( " Collection " ) <nl> % Wrapper = ' Slice ' , <nl> % name = ' WithSuffix ' , <nl> % prefix = [ ] , <nl> - % suffix = [ - 9999 , - 9998 , - 9997 ] ) <nl> + % suffix = [ - 9999 , - 9998 , - 9997 ] ) <nl> $ { SliceTest } <nl> <nl> runAllTests ( ) <nl>
[ gardening ] Weekly gardening : typos , duplicate includes , header formatting , etc .
apple/swift
d00a5ef814b61899d52f3418012630b8338b513e
2016-03-24T21:41:10Z
mmm a / shell / servers . js <nl> ppp b / shell / servers . js <nl> ShardingTest . prototype . getChunksString = function ( ns ) { <nl> var q = { } <nl> if ( ns ) <nl> q . ns = ns ; <nl> - return Array . tojson ( this . config . chunks . find ( q ) . toArray ( ) , " \ n " ) ; <nl> + <nl> + var s = " " ; <nl> + this . config . chunks . find ( q ) . sort ( { min : 1 } ) . forEach ( <nl> + function ( z ) { <nl> + s + = " " + z . _id + " \ t " + z . lastmod . t + " | " + z . lastmod . i + " \ t " + tojson ( z . min ) + " - > " + tojson ( z . max ) + " " + z . shard + " " + z . ns + " \ n " ; <nl> + } <nl> + ) ; <nl> + <nl> + return s ; <nl> } <nl> <nl> ShardingTest . prototype . printChunks = function ( ns ) { <nl>
better printChunks
mongodb/mongo
5f974197778a05ae1450ce4a4d01e368d93b1ead
2010-07-01T20:05:37Z
mmm a / src / wasm / baseline / arm / liftoff - assembler - arm . h <nl> ppp b / src / wasm / baseline / arm / liftoff - assembler - arm . h <nl> void LiftoffAssembler : : MoveStackValue ( uint32_t dst_index , uint32_t src_index , <nl> UNIMPLEMENTED ( ) ; <nl> } <nl> <nl> - void LiftoffAssembler : : MoveToReturnRegister ( LiftoffRegister reg ) { <nl> + void LiftoffAssembler : : MoveToReturnRegister ( LiftoffRegister reg , <nl> + ValueType type ) { <nl> UNIMPLEMENTED ( ) ; <nl> } <nl> <nl> - void LiftoffAssembler : : Move ( LiftoffRegister dst , LiftoffRegister src ) { <nl> + void LiftoffAssembler : : Move ( Register dst , Register src , ValueType type ) { <nl> + UNIMPLEMENTED ( ) ; <nl> + } <nl> + <nl> + void LiftoffAssembler : : Move ( DoubleRegister dst , DoubleRegister src , <nl> + ValueType type ) { <nl> UNIMPLEMENTED ( ) ; <nl> } <nl> <nl> mmm a / src / wasm / baseline / arm64 / liftoff - assembler - arm64 . h <nl> ppp b / src / wasm / baseline / arm64 / liftoff - assembler - arm64 . h <nl> void LiftoffAssembler : : MoveStackValue ( uint32_t dst_index , uint32_t src_index , <nl> UNIMPLEMENTED ( ) ; <nl> } <nl> <nl> - void LiftoffAssembler : : MoveToReturnRegister ( LiftoffRegister reg ) { <nl> + void LiftoffAssembler : : MoveToReturnRegister ( LiftoffRegister reg , <nl> + ValueType type ) { <nl> UNIMPLEMENTED ( ) ; <nl> } <nl> <nl> - void LiftoffAssembler : : Move ( LiftoffRegister dst , LiftoffRegister src ) { <nl> + void LiftoffAssembler : : Move ( Register dst , Register src , ValueType type ) { <nl> + UNIMPLEMENTED ( ) ; <nl> + } <nl> + <nl> + void LiftoffAssembler : : Move ( DoubleRegister dst , DoubleRegister src , <nl> + ValueType type ) { <nl> UNIMPLEMENTED ( ) ; <nl> } <nl> <nl> mmm a / src / wasm / baseline / ia32 / liftoff - assembler - ia32 . h <nl> ppp b / src / wasm / baseline / ia32 / liftoff - assembler - ia32 . h <nl> void LiftoffAssembler : : MoveStackValue ( uint32_t dst_index , uint32_t src_index , <nl> } <nl> } <nl> <nl> - void LiftoffAssembler : : MoveToReturnRegister ( LiftoffRegister reg ) { <nl> + void LiftoffAssembler : : MoveToReturnRegister ( LiftoffRegister reg , <nl> + ValueType type ) { <nl> / / TODO ( wasm ) : Extract the destination register from the CallDescriptor . <nl> / / TODO ( wasm ) : Add multi - return support . <nl> LiftoffRegister dst = <nl> reg . is_pair ( ) <nl> ? LiftoffRegister : : ForPair ( LiftoffRegister ( eax ) , LiftoffRegister ( edx ) ) <nl> : reg . is_gp ( ) ? LiftoffRegister ( eax ) : LiftoffRegister ( xmm1 ) ; <nl> - if ( reg ! = dst ) Move ( dst , reg ) ; <nl> + if ( reg ! = dst ) Move ( dst , reg , type ) ; <nl> } <nl> <nl> - void LiftoffAssembler : : Move ( LiftoffRegister dst , LiftoffRegister src ) { <nl> - / / The caller should check that the registers are not equal . For most <nl> - / / occurences , this is already guaranteed , so no need to check within this <nl> - / / method . <nl> + void LiftoffAssembler : : Move ( Register dst , Register src , ValueType type ) { <nl> DCHECK_NE ( dst , src ) ; <nl> - DCHECK_EQ ( dst . reg_class ( ) , src . reg_class ( ) ) ; <nl> - if ( src . is_pair ( ) ) { <nl> - if ( dst . low_gp ( ) ! = src . low_gp ( ) ) mov ( dst . low_gp ( ) , src . low_gp ( ) ) ; <nl> - if ( dst . high_gp ( ) ! = src . high_gp ( ) ) mov ( dst . high_gp ( ) , src . high_gp ( ) ) ; <nl> - } else if ( dst . is_gp ( ) ) { <nl> - mov ( dst . gp ( ) , src . gp ( ) ) ; <nl> + DCHECK_EQ ( kWasmI32 , type ) ; <nl> + mov ( dst , src ) ; <nl> + } <nl> + <nl> + void LiftoffAssembler : : Move ( DoubleRegister dst , DoubleRegister src , <nl> + ValueType type ) { <nl> + DCHECK_NE ( dst , src ) ; <nl> + if ( type = = kWasmF32 ) { <nl> + movss ( dst , src ) ; <nl> } else { <nl> - movsd ( dst . fp ( ) , src . fp ( ) ) ; <nl> + DCHECK_EQ ( kWasmF64 , type ) ; <nl> + movsd ( dst , src ) ; <nl> } <nl> } <nl> <nl> mmm a / src / wasm / baseline / liftoff - assembler . cc <nl> ppp b / src / wasm / baseline / liftoff - assembler . cc <nl> class StackTransferRecipe { <nl> if ( ( move_dst_regs_ & move_src_regs_ ) . is_empty ( ) ) { <nl> / / No overlap in src and dst registers . Just execute the moves in any <nl> / / order . <nl> - for ( RegisterMove & rm : register_moves_ ) asm_ - > Move ( rm . dst , rm . src ) ; <nl> + for ( RegisterMove & rm : register_moves_ ) { <nl> + asm_ - > Move ( rm . dst , rm . src , rm . type ) ; <nl> + } <nl> register_moves_ . clear ( ) ; <nl> } else { <nl> / / Keep use counters of src registers . <nl> class StackTransferRecipe { <nl> int executed_moves = 0 ; <nl> for ( auto & rm : register_moves_ ) { <nl> if ( src_reg_use_count [ rm . dst . liftoff_code ( ) ] = = 0 ) { <nl> - asm_ - > Move ( rm . dst , rm . src ) ; <nl> + asm_ - > Move ( rm . dst , rm . src , rm . type ) ; <nl> + + executed_moves ; <nl> DCHECK_LT ( 0 , src_reg_use_count [ rm . src . liftoff_code ( ) ] ) ; <nl> - - src_reg_use_count [ rm . src . liftoff_code ( ) ] ; <nl> class StackTransferRecipe { <nl> uint32_t max_used_spill_slot_ = 0 ; <nl> } ; <nl> <nl> - static constexpr ValueType kWasmIntPtr = <nl> - kPointerSize = = 8 ? kWasmI64 : kWasmI32 ; <nl> - <nl> } / / namespace <nl> <nl> / / TODO ( clemensh ) : Don ' t copy the full parent state ( this makes us N ^ 2 ) . <nl> void LiftoffAssembler : : FinishCall ( wasm : : FunctionSig * sig , <nl> } <nl> } <nl> <nl> + void LiftoffAssembler : : Move ( LiftoffRegister dst , LiftoffRegister src , <nl> + ValueType type ) { <nl> + DCHECK_EQ ( dst . reg_class ( ) , src . reg_class ( ) ) ; <nl> + if ( kNeedI64RegPair & & dst . is_pair ( ) ) { <nl> + if ( dst . low ( ) ! = src . low ( ) ) Move ( dst . low_gp ( ) , src . low_gp ( ) , kWasmI32 ) ; <nl> + if ( dst . high ( ) ! = src . high ( ) ) Move ( dst . high_gp ( ) , src . high_gp ( ) , kWasmI32 ) ; <nl> + } else if ( dst . is_gp ( ) ) { <nl> + Move ( dst . gp ( ) , src . gp ( ) , type ) ; <nl> + } else { <nl> + Move ( dst . fp ( ) , src . fp ( ) , type ) ; <nl> + } <nl> + } <nl> + <nl> LiftoffRegister LiftoffAssembler : : SpillOneRegister ( LiftoffRegList candidates , <nl> LiftoffRegList pinned ) { <nl> / / Spill one cached value to free a register . <nl> mmm a / src / wasm / baseline / liftoff - assembler . h <nl> ppp b / src / wasm / baseline / liftoff - assembler . h <nl> class LiftoffAssembler : public TurboAssembler { <nl> / / Each slot in our stack frame currently has exactly 8 bytes . <nl> static constexpr uint32_t kStackSlotSize = 8 ; <nl> <nl> + static constexpr ValueType kWasmIntPtr = <nl> + kPointerSize = = 8 ? kWasmI64 : kWasmI32 ; <nl> + <nl> class VarState { <nl> public : <nl> enum Location : uint8_t { kStack , kRegister , KIntConst } ; <nl> class LiftoffAssembler : public TurboAssembler { <nl> / / Process return values of the call . <nl> void FinishCall ( wasm : : FunctionSig * , compiler : : CallDescriptor * ) ; <nl> <nl> + void Move ( LiftoffRegister dst , LiftoffRegister src , ValueType ) ; <nl> + <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / Platform - specific part . / / <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> class LiftoffAssembler : public TurboAssembler { <nl> ValueType ) ; <nl> inline void MoveStackValue ( uint32_t dst_index , uint32_t src_index , ValueType ) ; <nl> <nl> - inline void MoveToReturnRegister ( LiftoffRegister ) ; <nl> - / / TODO ( clemensh ) : Pass the type to { Move } , to emit more efficient code . <nl> - inline void Move ( LiftoffRegister dst , LiftoffRegister src ) ; <nl> + inline void MoveToReturnRegister ( LiftoffRegister src , ValueType ) ; <nl> + inline void Move ( Register dst , Register src , ValueType ) ; <nl> + inline void Move ( DoubleRegister dst , DoubleRegister src , ValueType ) ; <nl> <nl> inline void Spill ( uint32_t index , LiftoffRegister , ValueType ) ; <nl> inline void Spill ( uint32_t index , WasmValue ) ; <nl> mmm a / src / wasm / baseline / liftoff - compiler . cc <nl> ppp b / src / wasm / baseline / liftoff - compiler . cc <nl> class LiftoffCompiler { <nl> if ( param_loc . IsRegister ( ) ) { <nl> DCHECK ( ! param_loc . IsAnyRegister ( ) ) ; <nl> int reg_code = param_loc . AsRegister ( ) ; <nl> - LiftoffRegister reg = <nl> - rc = = kGpReg ? LiftoffRegister ( Register : : from_code ( reg_code ) ) <nl> - : LiftoffRegister ( DoubleRegister : : from_code ( reg_code ) ) ; <nl> - LiftoffRegList cache_regs = GetCacheRegList ( rc ) ; <nl> - if ( cache_regs . has ( reg ) ) { <nl> + RegList cache_regs = rc = = kGpReg ? kLiftoffAssemblerGpCacheRegs <nl> + : kLiftoffAssemblerFpCacheRegs ; <nl> + if ( cache_regs & ( 1 < < reg_code ) ) { <nl> / / This is a cache register , just use it . <nl> + LiftoffRegister reg = <nl> + rc = = kGpReg ? LiftoffRegister ( Register : : from_code ( reg_code ) ) <nl> + : LiftoffRegister ( DoubleRegister : : from_code ( reg_code ) ) ; <nl> __ PushRegister ( type , reg ) ; <nl> return ; <nl> } <nl> / / Move to a cache register . <nl> + / / Note that we cannot create a { LiftoffRegister } for reg_code , since <nl> + / / { LiftoffRegister } can only store cache regs . <nl> LiftoffRegister cache_reg = __ GetUnusedRegister ( rc ) ; <nl> - __ Move ( cache_reg , reg ) ; <nl> - __ PushRegister ( type , reg ) ; <nl> + if ( rc = = kGpReg ) { <nl> + __ Move ( cache_reg . gp ( ) , Register : : from_code ( reg_code ) , type ) ; <nl> + } else { <nl> + __ Move ( cache_reg . fp ( ) , DoubleRegister : : from_code ( reg_code ) , type ) ; <nl> + } <nl> + __ PushRegister ( type , cache_reg ) ; <nl> return ; <nl> } <nl> if ( param_loc . IsCallerFrameSlot ( ) ) { <nl> class LiftoffCompiler { <nl> DCHECK ( return_loc . IsRegister ( ) ) ; <nl> Register return_reg = Register : : from_code ( return_loc . AsRegister ( ) ) ; <nl> if ( return_reg ! = res_reg ) { <nl> - __ Move ( LiftoffRegister ( res_reg ) , LiftoffRegister ( return_reg ) ) ; <nl> + DCHECK_EQ ( MachineRepresentation : : kWord32 , <nl> + sig . GetReturn ( 0 ) . representation ( ) ) ; <nl> + __ Move ( LiftoffRegister ( res_reg ) , LiftoffRegister ( return_reg ) , kWasmI32 ) ; <nl> } <nl> } <nl> <nl> class LiftoffCompiler { <nl> if ( values . size ( ) > 1 ) return unsupported ( decoder , " multi - return " ) ; <nl> RegClass rc = reg_class_for ( values [ 0 ] . type ) ; <nl> LiftoffRegister reg = __ PopToRegister ( rc ) ; <nl> - __ MoveToReturnRegister ( reg ) ; <nl> + __ MoveToReturnRegister ( reg , values [ 0 ] . type ) ; <nl> } <nl> __ LeaveFrame ( StackFrame : : WASM_COMPILED ) ; <nl> __ DropStackSlotsAndRet ( <nl> class LiftoffCompiler { <nl> compiler : : LinkageLocation param_loc = desc - > GetInputLocation ( kInputShift ) ; <nl> if ( param_loc . IsRegister ( ) ) { <nl> Register reg = Register : : from_code ( param_loc . AsRegister ( ) ) ; <nl> - __ Move ( LiftoffRegister ( reg ) , LiftoffRegister ( args [ 0 ] ) ) ; <nl> + __ Move ( LiftoffRegister ( reg ) , LiftoffRegister ( args [ 0 ] ) , <nl> + LiftoffAssembler : : kWasmIntPtr ) ; <nl> } else { <nl> DCHECK ( param_loc . IsCallerFrameSlot ( ) ) ; <nl> __ PushCallerFrameSlot ( LiftoffRegister ( args [ 0 ] ) ) ; <nl> class LiftoffCompiler { <nl> if ( __ cache_state ( ) - > is_used ( index ) ) { <nl> LiftoffRegister new_index = <nl> __ GetUnusedRegister ( kGpReg , LiftoffRegList : : ForRegs ( index ) ) ; <nl> - __ Move ( new_index , index ) ; <nl> + __ Move ( new_index , index , kWasmI32 ) ; <nl> index = new_index ; <nl> } <nl> <nl> mmm a / src / wasm / baseline / mips / liftoff - assembler - mips . h <nl> ppp b / src / wasm / baseline / mips / liftoff - assembler - mips . h <nl> void LiftoffAssembler : : MoveStackValue ( uint32_t dst_index , uint32_t src_index , <nl> UNIMPLEMENTED ( ) ; <nl> } <nl> <nl> - void LiftoffAssembler : : MoveToReturnRegister ( LiftoffRegister reg ) { <nl> + void LiftoffAssembler : : MoveToReturnRegister ( LiftoffRegister reg , <nl> + ValueType type ) { <nl> / / TODO ( wasm ) : Extract the destination register from the CallDescriptor . <nl> / / TODO ( wasm ) : Add multi - return support . <nl> LiftoffRegister dst = <nl> reg . is_pair ( ) <nl> ? LiftoffRegister : : ForPair ( LiftoffRegister ( v0 ) , LiftoffRegister ( v1 ) ) <nl> : reg . is_gp ( ) ? LiftoffRegister ( v0 ) : LiftoffRegister ( f0 ) ; <nl> - if ( reg ! = dst ) Move ( dst , reg ) ; <nl> + if ( reg ! = dst ) Move ( dst , reg , type ) ; <nl> } <nl> <nl> - void LiftoffAssembler : : Move ( LiftoffRegister dst , LiftoffRegister src ) { <nl> - / / The caller should check that the registers are not equal . For most <nl> - / / occurences , this is already guaranteed , so no need to check within this <nl> - / / method . <nl> + void LiftoffAssembler : : Move ( Register dst , Register src , ValueType type ) { <nl> DCHECK_NE ( dst , src ) ; <nl> - DCHECK_EQ ( dst . reg_class ( ) , src . reg_class ( ) ) ; <nl> - if ( src . is_pair ( ) ) { <nl> - TurboAssembler : : Move ( dst . low_gp ( ) , src . low_gp ( ) ) ; <nl> - TurboAssembler : : Move ( dst . high_gp ( ) , src . high_gp ( ) ) ; <nl> - } else if ( src . is_gp ( ) ) { <nl> - TurboAssembler : : mov ( dst . gp ( ) , src . gp ( ) ) ; <nl> - } else { <nl> - TurboAssembler : : Move ( dst . fp ( ) , src . fp ( ) ) ; <nl> - } <nl> + TurboAssembler : : mov ( dst , src ) ; <nl> + } <nl> + <nl> + void LiftoffAssembler : : Move ( DoubleRegister dst , DoubleRegister src , <nl> + ValueType type ) { <nl> + DCHECK_NE ( dst , src ) ; <nl> + TurboAssembler : : Move ( dst , src ) ; <nl> } <nl> <nl> void LiftoffAssembler : : Spill ( uint32_t index , LiftoffRegister reg , <nl> mmm a / src / wasm / baseline / mips64 / liftoff - assembler - mips64 . h <nl> ppp b / src / wasm / baseline / mips64 / liftoff - assembler - mips64 . h <nl> void LiftoffAssembler : : MoveStackValue ( uint32_t dst_index , uint32_t src_index , <nl> UNIMPLEMENTED ( ) ; <nl> } <nl> <nl> - void LiftoffAssembler : : MoveToReturnRegister ( LiftoffRegister reg ) { <nl> + void LiftoffAssembler : : MoveToReturnRegister ( LiftoffRegister reg , <nl> + ValueType type ) { <nl> LiftoffRegister dst = reg . is_gp ( ) ? LiftoffRegister ( v0 ) : LiftoffRegister ( f0 ) ; <nl> - if ( reg ! = dst ) Move ( dst , reg ) ; <nl> + if ( reg ! = dst ) Move ( dst , reg , type ) ; <nl> } <nl> <nl> - void LiftoffAssembler : : Move ( LiftoffRegister dst , LiftoffRegister src ) { <nl> - / / The caller should check that the registers are not equal . For most <nl> - / / occurences , this is already guaranteed , so no need to check within this <nl> - / / method . <nl> + void LiftoffAssembler : : Move ( Register dst , Register src , ValueType type ) { <nl> DCHECK_NE ( dst , src ) ; <nl> - DCHECK_EQ ( dst . reg_class ( ) , src . reg_class ( ) ) ; <nl> / / TODO ( ksreten ) : Handle different sizes here . <nl> - if ( dst . is_gp ( ) ) { <nl> - TurboAssembler : : Move ( dst . gp ( ) , src . gp ( ) ) ; <nl> - } else { <nl> - TurboAssembler : : Move ( dst . fp ( ) , src . fp ( ) ) ; <nl> - } <nl> + TurboAssembler : : Move ( dst , src ) ; <nl> + } <nl> + <nl> + void LiftoffAssembler : : Move ( DoubleRegister dst , DoubleRegister src , <nl> + ValueType type ) { <nl> + DCHECK_NE ( dst , src ) ; <nl> + TurboAssembler : : Move ( dst , src ) ; <nl> } <nl> <nl> void LiftoffAssembler : : Spill ( uint32_t index , LiftoffRegister reg , <nl> mmm a / src / wasm / baseline / ppc / liftoff - assembler - ppc . h <nl> ppp b / src / wasm / baseline / ppc / liftoff - assembler - ppc . h <nl> void LiftoffAssembler : : MoveStackValue ( uint32_t dst_index , uint32_t src_index , <nl> UNIMPLEMENTED ( ) ; <nl> } <nl> <nl> - void LiftoffAssembler : : MoveToReturnRegister ( LiftoffRegister reg ) { <nl> + void LiftoffAssembler : : MoveToReturnRegister ( LiftoffRegister reg , <nl> + ValueType type ) { <nl> UNIMPLEMENTED ( ) ; <nl> } <nl> <nl> - void LiftoffAssembler : : Move ( LiftoffRegister dst , LiftoffRegister src ) { <nl> + void LiftoffAssembler : : Move ( Register dst , Register src , ValueType type ) { <nl> + UNIMPLEMENTED ( ) ; <nl> + } <nl> + <nl> + void LiftoffAssembler : : Move ( DoubleRegister dst , DoubleRegister src , <nl> + ValueType type ) { <nl> UNIMPLEMENTED ( ) ; <nl> } <nl> <nl> mmm a / src / wasm / baseline / s390 / liftoff - assembler - s390 . h <nl> ppp b / src / wasm / baseline / s390 / liftoff - assembler - s390 . h <nl> void LiftoffAssembler : : MoveStackValue ( uint32_t dst_index , uint32_t src_index , <nl> UNIMPLEMENTED ( ) ; <nl> } <nl> <nl> - void LiftoffAssembler : : MoveToReturnRegister ( LiftoffRegister reg ) { <nl> + void LiftoffAssembler : : MoveToReturnRegister ( LiftoffRegister reg , <nl> + ValueType type ) { <nl> UNIMPLEMENTED ( ) ; <nl> } <nl> <nl> - void LiftoffAssembler : : Move ( LiftoffRegister dst , LiftoffRegister src ) { <nl> + void LiftoffAssembler : : Move ( Register dst , Register src , ValueType type ) { <nl> + UNIMPLEMENTED ( ) ; <nl> + } <nl> + <nl> + void LiftoffAssembler : : Move ( DoubleRegister dst , DoubleRegister src , <nl> + ValueType type ) { <nl> UNIMPLEMENTED ( ) ; <nl> } <nl> <nl> mmm a / src / wasm / baseline / x64 / liftoff - assembler - x64 . h <nl> ppp b / src / wasm / baseline / x64 / liftoff - assembler - x64 . h <nl> void LiftoffAssembler : : MoveStackValue ( uint32_t dst_index , uint32_t src_index , <nl> } <nl> } <nl> <nl> - void LiftoffAssembler : : MoveToReturnRegister ( LiftoffRegister reg ) { <nl> + void LiftoffAssembler : : MoveToReturnRegister ( LiftoffRegister reg , <nl> + ValueType type ) { <nl> / / TODO ( wasm ) : Extract the destination register from the CallDescriptor . <nl> / / TODO ( wasm ) : Add multi - return support . <nl> LiftoffRegister dst = <nl> reg . is_gp ( ) ? LiftoffRegister ( rax ) : LiftoffRegister ( xmm1 ) ; <nl> - if ( reg ! = dst ) Move ( dst , reg ) ; <nl> + if ( reg ! = dst ) Move ( dst , reg , type ) ; <nl> } <nl> <nl> - void LiftoffAssembler : : Move ( LiftoffRegister dst , LiftoffRegister src ) { <nl> - / / The caller should check that the registers are not equal . For most <nl> - / / occurences , this is already guaranteed , so no need to check within this <nl> - / / method . <nl> + void LiftoffAssembler : : Move ( Register dst , Register src , ValueType type ) { <nl> DCHECK_NE ( dst , src ) ; <nl> - DCHECK_EQ ( dst . reg_class ( ) , src . reg_class ( ) ) ; <nl> - / / TODO ( clemensh ) : Handle different sizes here . <nl> - if ( dst . is_gp ( ) ) { <nl> - movq ( dst . gp ( ) , src . gp ( ) ) ; <nl> + if ( type = = kWasmI32 ) { <nl> + movl ( dst , src ) ; <nl> } else { <nl> - Movsd ( dst . fp ( ) , src . fp ( ) ) ; <nl> + DCHECK_EQ ( kWasmI64 , type ) ; <nl> + movq ( dst , src ) ; <nl> + } <nl> + } <nl> + <nl> + void LiftoffAssembler : : Move ( DoubleRegister dst , DoubleRegister src , <nl> + ValueType type ) { <nl> + DCHECK_NE ( dst , src ) ; <nl> + if ( type = = kWasmF32 ) { <nl> + Movss ( dst , src ) ; <nl> + } else { <nl> + DCHECK_EQ ( kWasmF64 , type ) ; <nl> + Movsd ( dst , src ) ; <nl> } <nl> } <nl> <nl>
[ Liftoff ] Pass type for register moves
v8/v8
f831905cca0e61c69e69cfeeaec1fe032abb705e
2018-02-09T14:26:36Z
mmm a / dbms / src / AggregateFunctions / AggregateFunctionQuantileTiming . h <nl> ppp b / dbms / src / AggregateFunctions / AggregateFunctionQuantileTiming . h <nl> <nl> # include < ext / range . h > <nl> <nl> <nl> + namespace ErrorCodes <nl> + { <nl> + extern const int LOGICAL_ERROR ; <nl> + } <nl> + <nl> namespace DB <nl> { <nl> <nl> mmm a / dbms / src / Functions / FunctionsCoding . h <nl> ppp b / dbms / src / Functions / FunctionsCoding . h <nl> namespace DB <nl> namespace ErrorCodes <nl> { <nl> extern const int TOO_LESS_ARGUMENTS_FOR_FUNCTION ; <nl> + extern const int LOGICAL_ERROR ; <nl> } <nl> <nl> <nl>
Fix . h compile
ClickHouse/ClickHouse
8f6c2d4e476fa87d2a21e16ea74a88d0c5ed5c99
2017-08-01T15:02:16Z
mmm a / tensorflow / core / kernels / mkl_pooling_ops_common . h <nl> ppp b / tensorflow / core / kernels / mkl_pooling_ops_common . h <nl> class MklPoolingOpBase : public OpKernel { <nl> / / We may not get this attribute for this node if it does not go through <nl> / / graph rewrite pass . So we do not check for error while retrieving this <nl> / / attribute value . <nl> - TF_CHECK_OK ( <nl> - context - > GetAttr ( " workspace_enabled " , & this - > workspace_enabled_ ) ) ; <nl> + context - > GetAttr ( " workspace_enabled " , & this - > workspace_enabled_ ) ; <nl> } <nl> void Compute ( OpKernelContext * context ) override = 0 ; <nl> <nl>
Reverting a change to remove TF_CHECK_Ok , since GetAttr can legally return non - ok .
tensorflow/tensorflow
e6c23d5e29dcf8adb9eae3fff2a77df6e078aeaf
2019-07-12T19:10:21Z
mmm a / Code / CryEngine / CryDynamicResponseSystem / ConditionsCollection . cpp <nl> ppp b / Code / CryEngine / CryDynamicResponseSystem / ConditionsCollection . cpp <nl> void CConditionsCollection : : SConditionInfo : : Serialize ( Serialization : : IArchive & a <nl> # if ! defined ( _RELEASE ) <nl> if ( ar . getFilter ( ) & CResponseManager : : eSH_EvaluateResponses ) <nl> { <nl> - CryDRS : : SSignal tempSignal ( CHashedString : : GetEmpty ( ) , static_cast < CResponseActor * > ( s_pActorForEvaluation ) , nullptr ) ; <nl> - CResponseInstance tempResponseInstance ( tempSignal , nullptr ) ; <nl> - bool bCurrentlyMet = m_pCondition - > IsMet ( & tempResponseInstance ) ; <nl> + bool bCurrentlyMet = false ; <nl> + if ( s_pActorForEvaluation ) <nl> + { <nl> + CryDRS : : SSignal tempSignal ( CHashedString : : GetEmpty ( ) , static_cast < CResponseActor * > ( s_pActorForEvaluation ) , nullptr ) ; <nl> + CResponseInstance tempResponseInstance ( tempSignal , nullptr ) ; <nl> + bCurrentlyMet = m_pCondition - > IsMet ( & tempResponseInstance ) ; <nl> + } <nl> ar ( bCurrentlyMet , " currentlyMet " , " ^ ^ Currently met " ) ; <nl> } <nl> # endif <nl> mmm a / Code / CryEngine / CryDynamicResponseSystem / Variable . cpp <nl> ppp b / Code / CryEngine / CryDynamicResponseSystem / Variable . cpp <nl> CVariableCollection * IVariableUsingBase : : GetCurrentCollection ( CResponseInstance * <nl> { <nl> if ( m_collectionName = = CVariableCollection : : s_localCollectionName ) / / local variable collection <nl> { <nl> - CResponseActor * pCurrentActor = pResponseInstance - > GetCurrentActor ( ) ; <nl> + CResponseActor * const pCurrentActor = pResponseInstance - > GetCurrentActor ( ) ; <nl> # if defined ( DRS_COLLECT_DEBUG_DATA ) <nl> s_lastTestedObjectName = pCurrentActor - > GetName ( ) . GetText ( ) ; <nl> # endif <nl>
! B ( DRS ) Missing Icons in WebLauncher Version ( Approved by thomasw )
CRYTEK/CRYENGINE
4bf4f98a4ddfabb8956b0b3427d4bbd7130d7da2
2016-05-13T15:06:18Z
mmm a / test / test_torch . py <nl> ppp b / test / test_torch . py <nl> def test_logical_xor ( self , device ) : <nl> expected_res = torch . tensor ( [ 0 , 0 , 1 , 1 ] , dtype = dtype , device = device ) <nl> a = torch . tensor ( [ 10 , 0 , 1 , 0 ] , dtype = dtype , device = device ) <nl> for other_dtype in torch . testing . get_all_dtypes ( ) : <nl> - # Skip bfloat16 on CUDA <nl> + b = torch . tensor ( [ 1 , 0 , 0 , 10 ] , dtype = other_dtype , device = device ) <nl> + <nl> + # Skip bfloat16 on CUDA . Remove this after bfloat16 is supported on CUDA . <nl> if device ! = ' cpu ' and torch . bfloat16 in ( dtype , other_dtype ) : <nl> + with self . assertRaises ( RuntimeError ) : <nl> + a . logical_xor ( b ) <nl> continue <nl> # TODO Remove this skipping after bfloat16 can be handled nicely with other dtypes . <nl> # Skip only if either dtype or other_dtype is bfloat16 . <nl> if ( dtype = = torch . bfloat16 ) ! = ( other_dtype = = torch . bfloat16 ) : <nl> + with self . assertRaises ( RuntimeError ) : <nl> + a . logical_xor ( b ) <nl> continue <nl> - b = torch . tensor ( [ 1 , 0 , 0 , 10 ] , dtype = other_dtype , device = device ) <nl> # new tensor <nl> self . assertEqual ( expected_res . bool ( ) , a . logical_xor ( b ) ) <nl> # out <nl> def test_logical_xor ( self , device ) : <nl> torch . logical_xor ( a , b , out = c ) <nl> self . assertEqual ( expected_res . bool ( ) , c . bool ( ) ) <nl> <nl> - # in - place ( skip bfloat16 on CUDA ) <nl> - if device = = ' cpu ' or dtype ! = torch . bfloat16 : <nl> - b = torch . tensor ( [ 1 , 0 , 0 , 10 ] , dtype = dtype , device = device ) <nl> - a . logical_xor_ ( b ) <nl> - self . assertEqual ( expected_res , a ) <nl> + # in - place <nl> + b = torch . tensor ( [ 1 , 0 , 0 , 10 ] , dtype = dtype , device = device ) <nl> + # Skip bfloat16 on CUDA . Remove this after bfloat16 is supported on CUDA . <nl> + if device ! = ' cpu ' and dtype = = torch . bfloat16 : <nl> + with self . assertRaises ( RuntimeError ) : <nl> + a . logical_xor_ ( b ) <nl> + continue <nl> + a . logical_xor_ ( b ) <nl> + self . assertEqual ( expected_res , a ) <nl> <nl> def test_isinf ( self , device ) : <nl> t1 = torch . Tensor ( [ 1 , inf , 2 , - inf , nan ] ) . to ( device ) <nl> mmm a / torch / _torch_docs . py <nl> ppp b / torch / _torch_docs . py <nl> def merge_dicts ( * dicts ) : <nl> tensor ( [ True , True , False , False ] ) <nl> > > > torch . logical_xor ( a . double ( ) , b ) <nl> tensor ( [ True , True , False , False ] ) <nl> - > > > torch . logical_xor ( a , b , out = torch . empty ( 4 , dtype = torch . int8 ) ) <nl> - tensor ( [ 1 , 1 , 0 , 0 ] , dtype = torch . int8 ) <nl> + > > > torch . logical_xor ( a , b , out = torch . empty ( 4 , dtype = torch . bool ) ) <nl> + tensor ( [ True , True , False , False ] ) <nl> " " " . format ( * * common_args ) ) <nl> <nl> add_docstr ( torch . logspace , <nl>
Improve the doc and test of logical_xor ( )
pytorch/pytorch
cbb4c87d434350d380ba8eb8ff2f0c60e17de58e
2019-10-16T20:57:53Z
mmm a / src / openalpr / support / timing . cpp <nl> ppp b / src / openalpr / support / timing . cpp <nl> namespace alpr <nl> <nl> void _getTime ( bool realtime , timespec * time ) <nl> { <nl> - # ifdef __MACH__ / / OS X does not have clock_gettime , use clock_get_time <nl> + # if defined ( __APPLE__ ) & & defined ( __MACH__ ) / / OS X does not have clock_gettime , use clock_get_time <nl> clock_serv_t cclock ; <nl> mach_timespec_t mts ; <nl> host_get_clock_service ( mach_host_self ( ) , CALENDAR_CLOCK , & cclock ) ; <nl> mmm a / src / openalpr / support / timing . h <nl> ppp b / src / openalpr / support / timing . h <nl> <nl> # endif <nl> <nl> / / Support for OS X <nl> - # ifdef __MACH__ <nl> + # if defined ( __APPLE__ ) & & defined ( __MACH__ ) <nl> # include < mach / clock . h > <nl> # include < mach / mach . h > <nl> # endif <nl>
Resolves debian build issue on Hurd
openalpr/openalpr
dc6d077fad681beee7e065903bbb0b37251f1f62
2016-02-01T02:33:37Z
mmm a / dbms / src / Interpreters / evaluateConstantExpression . cpp <nl> ppp b / dbms / src / Interpreters / evaluateConstantExpression . cpp <nl> ASTPtr evaluateConstantExpressionAsLiteral ( ASTPtr & node , const Context & contex <nl> } <nl> <nl> <nl> - ASTPtr evaluateConstantExpressionOrIdentidierAsLiteral ( ASTPtr & node , const Context & context ) <nl> + ASTPtr evaluateConstantExpressionOrIdentifierAsLiteral ( ASTPtr & node , const Context & context ) <nl> { <nl> if ( const ASTIdentifier * id = typeid_cast < const ASTIdentifier * > ( node . get ( ) ) ) <nl> return std : : make_shared < ASTLiteral > ( node - > range , Field ( id - > name ) ) ; <nl> mmm a / dbms / src / Interpreters / evaluateConstantExpression . h <nl> ppp b / dbms / src / Interpreters / evaluateConstantExpression . h <nl> std : : shared_ptr < IAST > evaluateConstantExpressionAsLiteral ( std : : shared_ptr < IAST > <nl> * Also , if AST is identifier , then return string literal with its name . <nl> * Useful in places where some name may be specified as identifier , or as result of a constant expression . <nl> * / <nl> - std : : shared_ptr < IAST > evaluateConstantExpressionOrIdentidierAsLiteral ( std : : shared_ptr < IAST > & node , const Context & context ) ; <nl> + std : : shared_ptr < IAST > evaluateConstantExpressionOrIdentifierAsLiteral ( std : : shared_ptr < IAST > & node , const Context & context ) ; <nl> <nl> } <nl> mmm a / dbms / src / Storages / StorageFactory . cpp <nl> ppp b / dbms / src / Storages / StorageFactory . cpp <nl> StoragePtr StorageFactory : : get ( <nl> if ( args . empty ( ) | | args . size ( ) > 2 ) <nl> throw Exception ( error_msg , ErrorCodes : : NUMBER_OF_ARGUMENTS_DOESNT_MATCH ) ; <nl> <nl> - args [ 0 ] = evaluateConstantExpressionOrIdentidierAsLiteral ( args [ 0 ] , local_context ) ; <nl> + args [ 0 ] = evaluateConstantExpressionOrIdentifierAsLiteral ( args [ 0 ] , local_context ) ; <nl> String format_name = static_cast < const ASTLiteral & > ( * args [ 0 ] ) . value . safeGet < String > ( ) ; <nl> <nl> int source_fd = - 1 ; <nl> StoragePtr StorageFactory : : get ( <nl> source_fd = static_cast < int > ( literal - > value . get < UInt64 > ( ) ) ; <nl> } <nl> <nl> - args [ 1 ] = evaluateConstantExpressionOrIdentidierAsLiteral ( args [ 1 ] , local_context ) ; <nl> + args [ 1 ] = evaluateConstantExpressionOrIdentifierAsLiteral ( args [ 1 ] , local_context ) ; <nl> source_path = static_cast < const ASTLiteral & > ( * args [ 1 ] ) . value . safeGet < String > ( ) ; <nl> } <nl> <nl> StoragePtr StorageFactory : : get ( <nl> " - name of source database and regexp for table names . " , <nl> ErrorCodes : : NUMBER_OF_ARGUMENTS_DOESNT_MATCH ) ; <nl> <nl> - args [ 0 ] = evaluateConstantExpressionOrIdentidierAsLiteral ( args [ 0 ] , local_context ) ; <nl> + args [ 0 ] = evaluateConstantExpressionOrIdentifierAsLiteral ( args [ 0 ] , local_context ) ; <nl> args [ 1 ] = evaluateConstantExpressionAsLiteral ( args [ 1 ] , local_context ) ; <nl> <nl> String source_database = static_cast < const ASTLiteral & > ( * args [ 0 ] ) . value . safeGet < String > ( ) ; <nl> StoragePtr StorageFactory : : get ( <nl> <nl> String cluster_name = getClusterName ( * args [ 0 ] ) ; <nl> <nl> - args [ 1 ] = evaluateConstantExpressionOrIdentidierAsLiteral ( args [ 1 ] , local_context ) ; <nl> - args [ 2 ] = evaluateConstantExpressionOrIdentidierAsLiteral ( args [ 2 ] , local_context ) ; <nl> + args [ 1 ] = evaluateConstantExpressionOrIdentifierAsLiteral ( args [ 1 ] , local_context ) ; <nl> + args [ 2 ] = evaluateConstantExpressionOrIdentifierAsLiteral ( args [ 2 ] , local_context ) ; <nl> <nl> String remote_database = static_cast < const ASTLiteral & > ( * args [ 1 ] ) . value . safeGet < String > ( ) ; <nl> String remote_table = static_cast < const ASTLiteral & > ( * args [ 2 ] ) . value . safeGet < String > ( ) ; <nl> StoragePtr StorageFactory : : get ( <nl> " destination_database , destination_table , num_buckets , min_time , max_time , min_rows , max_rows , min_bytes , max_bytes . " , <nl> ErrorCodes : : NUMBER_OF_ARGUMENTS_DOESNT_MATCH ) ; <nl> <nl> - args [ 0 ] = evaluateConstantExpressionOrIdentidierAsLiteral ( args [ 0 ] , local_context ) ; <nl> - args [ 1 ] = evaluateConstantExpressionOrIdentidierAsLiteral ( args [ 1 ] , local_context ) ; <nl> + args [ 0 ] = evaluateConstantExpressionOrIdentifierAsLiteral ( args [ 0 ] , local_context ) ; <nl> + args [ 1 ] = evaluateConstantExpressionOrIdentifierAsLiteral ( args [ 1 ] , local_context ) ; <nl> <nl> String destination_database = static_cast < const ASTLiteral & > ( * args [ 0 ] ) . value . safeGet < String > ( ) ; <nl> String destination_table = static_cast < const ASTLiteral & > ( * args [ 1 ] ) . value . safeGet < String > ( ) ; <nl> StoragePtr StorageFactory : : get ( <nl> throw Exception ( error_message_argument_number_mismatch , <nl> ErrorCodes : : NUMBER_OF_ARGUMENTS_DOESNT_MATCH ) ; <nl> <nl> - args [ 0 ] = evaluateConstantExpressionOrIdentidierAsLiteral ( args [ 0 ] , local_context ) ; <nl> - args [ 1 ] = evaluateConstantExpressionOrIdentidierAsLiteral ( args [ 1 ] , local_context ) ; <nl> + args [ 0 ] = evaluateConstantExpressionOrIdentifierAsLiteral ( args [ 0 ] , local_context ) ; <nl> + args [ 1 ] = evaluateConstantExpressionOrIdentifierAsLiteral ( args [ 1 ] , local_context ) ; <nl> <nl> String destination_database = static_cast < const ASTLiteral & > ( * args [ 0 ] ) . value . safeGet < String > ( ) ; <nl> String destination_table = static_cast < const ASTLiteral & > ( * args [ 1 ] ) . value . safeGet < String > ( ) ; <nl> mmm a / dbms / src / TableFunctions / TableFunctionMerge . cpp <nl> ppp b / dbms / src / TableFunctions / TableFunctionMerge . cpp <nl> StoragePtr TableFunctionMerge : : execute ( const ASTPtr & ast_function , const Contex <nl> " - name of source database and regexp for table names . " , <nl> ErrorCodes : : NUMBER_OF_ARGUMENTS_DOESNT_MATCH ) ; <nl> <nl> - args [ 0 ] = evaluateConstantExpressionOrIdentidierAsLiteral ( args [ 0 ] , context ) ; <nl> + args [ 0 ] = evaluateConstantExpressionOrIdentifierAsLiteral ( args [ 0 ] , context ) ; <nl> args [ 1 ] = evaluateConstantExpressionAsLiteral ( args [ 1 ] , context ) ; <nl> <nl> String source_database = static_cast < const ASTLiteral & > ( * args [ 0 ] ) . value . safeGet < String > ( ) ; <nl> mmm a / dbms / src / TableFunctions / TableFunctionNumbers . cpp <nl> ppp b / dbms / src / TableFunctions / TableFunctionNumbers . cpp <nl> StoragePtr TableFunctionNumbers : : execute ( const ASTPtr & ast_function , const Cont <nl> throw Exception ( " Table function ' numbers ' requires exactly one argument : amount of numbers . " , <nl> ErrorCodes : : NUMBER_OF_ARGUMENTS_DOESNT_MATCH ) ; <nl> <nl> - args [ 0 ] = evaluateConstantExpressionOrIdentidierAsLiteral ( args [ 0 ] , context ) ; <nl> + args [ 0 ] = evaluateConstantExpressionOrIdentifierAsLiteral ( args [ 0 ] , context ) ; <nl> <nl> UInt64 limit = static_cast < const ASTLiteral & > ( * args [ 0 ] ) . value . safeGet < UInt64 > ( ) ; <nl> <nl> mmm a / dbms / src / TableFunctions / TableFunctionRemote . cpp <nl> ppp b / dbms / src / TableFunctions / TableFunctionRemote . cpp <nl> StoragePtr TableFunctionRemote : : execute ( const ASTPtr & ast_function , const Conte <nl> description = getStringLiteral ( * args [ arg_num ] , " Hosts pattern " ) ; <nl> + + arg_num ; <nl> <nl> - args [ arg_num ] = evaluateConstantExpressionOrIdentidierAsLiteral ( args [ arg_num ] , context ) ; <nl> + args [ arg_num ] = evaluateConstantExpressionOrIdentifierAsLiteral ( args [ arg_num ] , context ) ; <nl> remote_database = static_cast < const ASTLiteral & > ( * args [ arg_num ] ) . value . safeGet < String > ( ) ; <nl> + + arg_num ; <nl> <nl> StoragePtr TableFunctionRemote : : execute ( const ASTPtr & ast_function , const Conte <nl> if ( arg_num > = args . size ( ) ) <nl> throw Exception ( err , ErrorCodes : : NUMBER_OF_ARGUMENTS_DOESNT_MATCH ) ; <nl> <nl> - args [ arg_num ] = evaluateConstantExpressionOrIdentidierAsLiteral ( args [ arg_num ] , context ) ; <nl> + args [ arg_num ] = evaluateConstantExpressionOrIdentifierAsLiteral ( args [ arg_num ] , context ) ; <nl> remote_table = static_cast < const ASTLiteral & > ( * args [ arg_num ] ) . value . safeGet < String > ( ) ; <nl> + + arg_num ; <nl> } <nl> mmm a / dbms / src / TableFunctions / TableFunctionShardByHash . cpp <nl> ppp b / dbms / src / TableFunctions / TableFunctionShardByHash . cpp <nl> StoragePtr TableFunctionShardByHash : : execute ( const ASTPtr & ast_function , const <nl> cluster_name = getClusterName ( * args [ 0 ] ) ; <nl> key = getStringLiteral ( * args [ 1 ] , " Key to hash " ) ; <nl> <nl> - args [ 2 ] = evaluateConstantExpressionOrIdentidierAsLiteral ( args [ 2 ] , context ) ; <nl> - args [ 3 ] = evaluateConstantExpressionOrIdentidierAsLiteral ( args [ 3 ] , context ) ; <nl> + args [ 2 ] = evaluateConstantExpressionOrIdentifierAsLiteral ( args [ 2 ] , context ) ; <nl> + args [ 3 ] = evaluateConstantExpressionOrIdentifierAsLiteral ( args [ 3 ] , context ) ; <nl> <nl> remote_database = static_cast < const ASTLiteral & > ( * args [ 2 ] ) . value . safeGet < String > ( ) ; <nl> remote_table = static_cast < const ASTLiteral & > ( * args [ 3 ] ) . value . safeGet < String > ( ) ; <nl>
Fix typo
ClickHouse/ClickHouse
61f65e97a8f43dba2d5365d1d542710dbcf6bf4b
2017-08-18T19:38:56Z
mmm a / utils / list - versions / version_date . tsv <nl> ppp b / utils / list - versions / version_date . tsv <nl> <nl> v20 . 9 . 3 . 45 - stable 2020 - 10 - 08 <nl> v20 . 9 . 2 . 20 - stable 2020 - 09 - 22 <nl> + v20 . 8 . 4 . 11 - lts 2020 - 10 - 09 <nl> v20 . 8 . 3 . 18 - stable 2020 - 09 - 18 <nl> v20 . 8 . 2 . 3 - stable 2020 - 09 - 08 <nl> v20 . 7 . 4 . 11 - stable 2020 - 10 - 09 <nl>
Update version_date . tsv after release 20 . 8 . 4 . 11
ClickHouse/ClickHouse
af0b96466af3edb47fa082f31f01950f0b0c9a18
2020-10-08T23:39:25Z
mmm a / Installation / Jenkins / build . sh <nl> ppp b / Installation / Jenkins / build . sh <nl> if test - n " $ { TARGET_DIR } " ; then <nl> ) <nl> <nl> rm files . $ $ <nl> - <nl> - gzip < $ { TARFILE_TMP } > $ { dir } / $ { TARFILE } <nl> - md5sum < $ { dir } / $ { TARFILE } > $ { dir } / $ { TARFILE } . md5 <nl> - rm $ { TARFILE_TMP } <nl> fi <nl> + <nl> + gzip < $ { TARFILE_TMP } > $ { dir } / $ { TARFILE } <nl> + md5sum < $ { dir } / $ { TARFILE } > $ { dir } / $ { TARFILE } . md5 <nl> fi <nl>
Fix delivery of tarball
arangodb/arangodb
0559acea33d12e7f6e3ba1b37df023db6bfb0091
2016-08-08T16:31:50Z
mmm a / Code / CryEngine / CrySchematyc / Core / Impl / Script / ScriptRegistry . cpp <nl> ppp b / Code / CryEngine / CrySchematyc / Core / Impl / Script / ScriptRegistry . cpp <nl> bool CScriptRegistry : : IsValidScope ( EScriptElementType elementType , IScriptElemen <nl> } <nl> case EScriptElementType : : Variable : <nl> { <nl> - return scopeElementType = = EScriptElementType : : Class | | scopeElementType = = EScriptElementType : : Module ; <nl> + / / TODO : Variables in modules aren ' t supported yet . <nl> + return scopeElementType = = EScriptElementType : : Class / * | | scopeElementType = = EScriptElementType : : Module * / ; <nl> + / / ~ TODO <nl> } <nl> case EScriptElementType : : Timer : <nl> { <nl>
! XT ( CrySchematyc ) Diasabled variables in libraries because they aren ' t supported by the compiler yet . ( Approved by samuelk )
CRYTEK/CRYENGINE
476af9c7a5aa2c3e519d54e7d02dcb81739959eb
2017-05-09T13:10:08Z
mmm a / src / mongo / logv2 / attribute_storage . h <nl> ppp b / src / mongo / logv2 / attribute_storage . h <nl> <nl> # include < functional > <nl> # include < string_view > <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> class TypeErasedAttributeStorage ; <nl> <nl> auto mapLog ( It begin , It end ) { <nl> return detail : : AssociativeContainerLogger ( begin , end ) ; <nl> } <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / attributes . cpp <nl> ppp b / src / mongo / logv2 / attributes . cpp <nl> <nl> <nl> # include < boost / log / attributes / attribute_name . hpp > <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> - namespace attributes { <nl> + namespace mongo : : logv2 : : attributes { <nl> <nl> const boost : : log : : attribute_name & domain ( ) { <nl> static const boost : : log : : attribute_name attr ( " domain " ) ; <nl> const boost : : log : : attribute_name & userassert ( ) { <nl> return attr ; <nl> } <nl> <nl> - } / / namespace attributes <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 : : attributes <nl> mmm a / src / mongo / logv2 / attributes . h <nl> ppp b / src / mongo / logv2 / attributes . h <nl> <nl> <nl> # include < boost / log / attributes / attribute_name . hpp > <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> - namespace attributes { <nl> + namespace mongo : : logv2 : : attributes { <nl> <nl> / / Reusable attribute names , so they only need to be constructed once . <nl> const boost : : log : : attribute_name & domain ( ) ; <nl> const boost : : log : : attribute_name & attributes ( ) ; <nl> const boost : : log : : attribute_name & truncation ( ) ; <nl> const boost : : log : : attribute_name & userassert ( ) ; <nl> <nl> - } / / namespace attributes <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 : : attributes <nl> mmm a / src / mongo / logv2 / bson_formatter . cpp <nl> ppp b / src / mongo / logv2 / bson_formatter . cpp <nl> <nl> <nl> # include < fmt / format . h > <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> namespace { <nl> struct BSONValueExtractor { <nl> BSONObj BSONFormatter : : operator ( ) ( boost : : log : : record_view const & rec ) const { <nl> return builder . obj ( ) ; <nl> } <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / bson_formatter . h <nl> ppp b / src / mongo / logv2 / bson_formatter . h <nl> <nl> # include " mongo / bson / bsonobjbuilder . h " <nl> # include " mongo / logv2 / constants . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> class BSONFormatter { <nl> public : <nl> class BSONFormatter { <nl> BSONObj operator ( ) ( boost : : log : : record_view const & rec ) const ; <nl> } ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / component_settings_filter . h <nl> ppp b / src / mongo / logv2 / component_settings_filter . h <nl> <nl> # include " mongo / logv2 / log_component_settings . h " <nl> # include " mongo / logv2 / log_severity . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> / / Boost : : log filter that enables logging if Component + Severity match current settings <nl> class ComponentSettingsFilter : public DomainFilter < ComponentSettingsFilter > { <nl> class ComponentSettingsFilter : public DomainFilter < ComponentSettingsFilter > { <nl> const LogComponentSettings & _settings ; <nl> } ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / composite_backend . h <nl> ppp b / src / mongo / logv2 / composite_backend . h <nl> <nl> # include < boost / log / sinks / frontend_requirements . hpp > <nl> # include < tuple > <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> template < typename . . . Backend > <nl> class CompositeBackend <nl> class CompositeBackend <nl> std : : tuple < BackendTraits < Backend > . . . > _backendTraits ; <nl> } ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / console . cpp <nl> ppp b / src / mongo / logv2 / console . cpp <nl> <nl> # include < io . h > <nl> # endif <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> namespace { <nl> <nl> # if defined ( _WIN32 ) <nl> std : : ostream & Console : : out ( ) { <nl> return std : : cout ; <nl> } <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / console . h <nl> ppp b / src / mongo / logv2 / console . h <nl> <nl> <nl> # include " mongo / platform / mutex . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> / * * <nl> * Representation of the console . Use this in place of cout / cin , in applications that write to <nl> class Console { <nl> static std : : ostream & out ( ) ; <nl> } ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / domain_filter . h <nl> ppp b / src / mongo / logv2 / domain_filter . h <nl> <nl> # include " mongo / logv2 / attributes . h " <nl> # include " mongo / logv2 / log_domain . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> / / Boost : : log filter that enables logging if domain match . Using CRTP , users should inherit from <nl> / / this and provide the concrete type as the template argument to this class . <nl> class AllLogsFilter : public DomainFilter < AllLogsFilter > { <nl> } <nl> } ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_component . cpp <nl> ppp b / src / mongo / logv2 / log_component . cpp <nl> <nl> # include " mongo / base / static_assert . h " <nl> # include " mongo / util / assert_util . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> namespace { <nl> <nl> std : : ostream & operator < < ( std : : ostream & os , LogComponent component ) { <nl> return os < < component . getNameForLog ( ) ; <nl> } <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_component . h <nl> ppp b / src / mongo / logv2 / log_component . h <nl> <nl> <nl> # include " mongo / base / string_data . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> / * * <nl> * Log components . <nl> class LogComponent { <nl> <nl> std : : ostream & operator < < ( std : : ostream & os , LogComponent component ) ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_component_settings . cpp <nl> ppp b / src / mongo / logv2 / log_component_settings . cpp <nl> <nl> <nl> # include " mongo / util / assert_util . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> LogComponentSettings : : LogComponentSettings ( ) { <nl> _minimumLoggedSeverity [ LogComponent : : kDefault ] . store ( LogSeverity : : Log ( ) . toInt ( ) ) ; <nl> bool LogComponentSettings : : shouldLog ( LogComponent component , LogSeverity severit <nl> return severity > = LogSeverity : : cast ( _minimumLoggedSeverity [ component ] . loadRelaxed ( ) ) ; <nl> } <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_component_settings . h <nl> ppp b / src / mongo / logv2 / log_component_settings . h <nl> <nl> # include " mongo / platform / atomic_word . h " <nl> # include " mongo / platform / mutex . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> / * * <nl> * Contains log severities for a list of log components . <nl> class LogComponentSettings { <nl> AtomicWord < int > _minimumLoggedSeverity [ LogComponent : : kNumLogComponents ] ; <nl> } ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_detail . cpp <nl> ppp b / src / mongo / logv2 / log_detail . cpp <nl> <nl> # include " mongo / logv2 / log_options . h " <nl> # include " mongo / logv2 / log_source . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> - namespace detail { <nl> + namespace mongo : : logv2 : : detail { <nl> <nl> void doLogImpl ( int32_t id , <nl> LogSeverity const & severity , <nl> void doLogImpl ( int32_t id , <nl> } <nl> } <nl> <nl> - } / / namespace detail <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 : : detail <nl> mmm a / src / mongo / logv2 / log_detail . h <nl> ppp b / src / mongo / logv2 / log_detail . h <nl> <nl> # include " mongo / util / errno_util . h " <nl> <nl> namespace mongo { <nl> - namespace logv2 { <nl> - namespace detail { <nl> + namespace logv2 : : detail { <nl> <nl> void doLogImpl ( int32_t id , <nl> LogSeverity const & severity , <nl> void doLog ( int32_t id , <nl> doLogImpl ( id , severity , options , StringData ( msg . data ( ) , msg . size ( ) ) , dynamicAttrs ) ; <nl> } <nl> <nl> - } / / namespace detail <nl> - } / / namespace logv2 <nl> + } / / namespace logv2 : : detail <nl> <nl> inline namespace literals { <nl> inline fmt : : internal : : udl_arg < char > operator " " _attr ( const char * s , std : : size_t ) { <nl> mmm a / src / mongo / logv2 / log_domain . cpp <nl> ppp b / src / mongo / logv2 / log_domain . cpp <nl> <nl> * / <nl> <nl> # include " mongo / logv2 / log_domain . h " <nl> + <nl> + # include < memory > <nl> + # include < utility > <nl> + <nl> # include " mongo / logv2 / log_domain_internal . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> + <nl> LogDomain : : LogDomain ( std : : unique_ptr < LogDomain : : Internal > internalDomain ) <nl> : _internal ( std : : move ( internalDomain ) ) { } <nl> LogDomain : : ~ LogDomain ( ) = default ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_domain . h <nl> ppp b / src / mongo / logv2 / log_domain . h <nl> <nl> # include " mongo / logv2 / log_severity . h " <nl> # include " mongo / logv2 / log_tag . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> class LogComponentSettings ; <nl> <nl> / / Log domain class , implemented with the pimpl idiom to not leak out boost : : log types <nl> class LogDomain { <nl> std : : unique_ptr < Internal > _internal ; <nl> } ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_domain_global . cpp <nl> ppp b / src / mongo / logv2 / log_domain_global . cpp <nl> <nl> # include < boost / log / core . hpp > <nl> # include < boost / log / sinks . hpp > <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> void LogDomainGlobal : : ConfigurationOptions : : makeDisabled ( ) { <nl> consoleEnabled = false ; <nl> LogComponentSettings & LogDomainGlobal : : settings ( ) { <nl> return _impl - > _settings ; <nl> } <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_domain_global . h <nl> ppp b / src / mongo / logv2 / log_domain_global . h <nl> <nl> # include " mongo / logv2 / log_domain_internal . h " <nl> # include " mongo / logv2 / log_format . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> class LogDomainGlobal : public LogDomain : : Internal { <nl> public : <nl> struct ConfigurationOptions { <nl> class LogDomainGlobal : public LogDomain : : Internal { <nl> struct Impl ; <nl> std : : unique_ptr < Impl > _impl ; <nl> } ; <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_domain_internal . cpp <nl> ppp b / src / mongo / logv2 / log_domain_internal . cpp <nl> <nl> <nl> # include " log_domain_internal . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> + <nl> LogDomain : : Internal : : ~ Internal ( ) = default ; <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_domain_internal . h <nl> ppp b / src / mongo / logv2 / log_domain_internal . h <nl> <nl> # include " mongo / logv2 / log_domain . h " <nl> # include " mongo / logv2 / log_source . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> + <nl> class LogDomain : : Internal { <nl> public : <nl> Internal ( ) = default ; <nl> class LogDomain : : Internal { <nl> virtual LogSource & source ( ) = 0 ; <nl> } ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_format . h <nl> ppp b / src / mongo / logv2 / log_format . h <nl> <nl> <nl> # pragma once <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> + <nl> enum class LogFormat { kDefault , kJson , kPlain } ; <nl> enum class LogTimestampFormat { kISO8601UTC , kISO8601Local } ; <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_manager . cpp <nl> ppp b / src / mongo / logv2 / log_manager . cpp <nl> <nl> # include " mongo / logv2 / log_domain . h " <nl> # include " mongo / logv2 / log_domain_global . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> struct LogManager : : Impl { <nl> Impl ( ) { } <nl> LogComponentSettings & LogManager : : getGlobalSettings ( ) { <nl> return getGlobalDomainInternal ( ) . settings ( ) ; <nl> } <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_manager . h <nl> ppp b / src / mongo / logv2 / log_manager . h <nl> <nl> # include < memory > <nl> # include < string > <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> class LogDomain ; <nl> class LogDomainGlobal ; <nl> class LogManager { <nl> std : : unique_ptr < Impl > _impl ; <nl> } ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_options . h <nl> ppp b / src / mongo / logv2 / log_options . h <nl> <nl> # include " mongo / logv2 / log_tag . h " <nl> # include " mongo / logv2 / log_truncation . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> class UserAssertAfterLog { <nl> public : <nl> class LogOptions { <nl> FatalMode _fatalMode = FatalMode : : kAssert ; <nl> } ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_severity . cpp <nl> ppp b / src / mongo / logv2 / log_severity . cpp <nl> <nl> <nl> # include < iostream > <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> namespace { <nl> <nl> std : : ostream & operator < < ( std : : ostream & os , LogSeverity severity ) { <nl> return os < < severity . toStringData ( ) ; <nl> } <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_severity . h <nl> ppp b / src / mongo / logv2 / log_severity . h <nl> <nl> <nl> # include " mongo / base / string_data . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> / * * <nl> * Representation of the severity / priority of a log message . <nl> bool LogSeverity : : operator > = ( LogSeverity other ) const { <nl> return _severity < = other . _severity ; <nl> } <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_source . h <nl> ppp b / src / mongo / logv2 / log_source . h <nl> <nl> # include " mongo / logv2 / log_truncation . h " <nl> # include " mongo / util / time_support . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> / / Custom logging source that automatically add our set of attributes <nl> class LogSource : public boost : : log : : sources : : <nl> class LogSource : public boost : : log : : sources : : <nl> boost : : log : : attributes : : mutable_constant < int32_t > _id ; <nl> } ; <nl> <nl> - <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_tag . cpp <nl> ppp b / src / mongo / logv2 / log_tag . cpp <nl> <nl> <nl> # include " mongo / bson / bsonobjbuilder . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> BSONArray LogTag : : toBSONArray ( ) { <nl> BSONArrayBuilder builder ; <nl> BSONArray LogTag : : toBSONArray ( ) { <nl> <nl> return builder . arr ( ) ; <nl> } <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_tag . h <nl> ppp b / src / mongo / logv2 / log_tag . h <nl> <nl> # include < cstdint > <nl> # include < string > <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> + <nl> class LogTag { <nl> public : <nl> enum Value { <nl> class LogTag { <nl> uint64_t _value ; <nl> } ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_test_v2 . cpp <nl> ppp b / src / mongo / logv2 / log_test_v2 . cpp <nl> <nl> # include < boost / property_tree / json_parser . hpp > <nl> # include < boost / property_tree / ptree . hpp > <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> namespace { <nl> <nl> struct TypeWithoutBSON { <nl> TEST_F ( LogTestV2 , UserAssert ) { <nl> } <nl> <nl> } / / namespace <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_test_v2 . h <nl> ppp b / src / mongo / logv2 / log_test_v2 . h <nl> <nl> # include " mongo / logv2 / log_manager . h " <nl> # include " mongo / unittest / unittest . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> class LogTestV2 : public unittest : : Test { <nl> <nl> class LogTestV2 : public unittest : : Test { <nl> std : : vector < boost : : shared_ptr < boost : : log : : sinks : : sink > > _attachedSinks ; <nl> } ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / log_truncation . h <nl> ppp b / src / mongo / logv2 / log_truncation . h <nl> <nl> <nl> # pragma once <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> enum class LogTruncation { Enabled , Disabled } ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / ramlog . cpp <nl> ppp b / src / mongo / logv2 / ramlog . cpp <nl> <nl> # include " mongo / util / map_util . h " <nl> # include " mongo / util / str . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> using std : : string ; <nl> <nl> MONGO_INITIALIZER ( RamLogCatalogV2 ) ( InitializerContext * ) { <nl> return Status : : OK ( ) ; <nl> } <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / ramlog . h <nl> ppp b / src / mongo / logv2 / ramlog . h <nl> <nl> # include " mongo / util / concurrency / mutex . h " <nl> # include " mongo / util / concurrency / with_lock . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> / * * <nl> * Variable - capacity circular log of line - oriented messages . <nl> class RamLog : : LineIterator { <nl> size_t _nextLineIndex ; <nl> } ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / ramlog_sink . h <nl> ppp b / src / mongo / logv2 / ramlog_sink . h <nl> <nl> <nl> # include " mongo / logv2 / ramlog . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> class RamLogSink : public boost : : log : : sinks : : <nl> basic_formatted_sink_backend < char , boost : : log : : sinks : : concurrent_feeding > { <nl> class RamLogSink : public boost : : log : : sinks : : <nl> RamLog * _ramlog ; <nl> } ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl> mmm a / src / mongo / logv2 / tagged_severity_filter . h <nl> ppp b / src / mongo / logv2 / tagged_severity_filter . h <nl> <nl> # include " mongo / logv2 / log_severity . h " <nl> # include " mongo / logv2 / log_tag . h " <nl> <nl> - namespace mongo { <nl> - namespace logv2 { <nl> + namespace mongo : : logv2 { <nl> <nl> / / Boost : : log filter that enables logging if Tag exists with Severity over threshold <nl> class TaggedSeverityFilter : public DomainFilter < TaggedSeverityFilter > { <nl> class TaggedSeverityFilter : public DomainFilter < TaggedSeverityFilter > { <nl> LogSeverity _severity ; <nl> } ; <nl> <nl> - } / / namespace logv2 <nl> - } / / namespace mongo <nl> + } / / namespace mongo : : logv2 <nl>
SERVER - 43933 open namespace mongo : : logv2 C + + 17 syntax
mongodb/mongo
599cabff5a9a40370d985addd8ef689c88211b18
2020-03-25T16:48:45Z
mmm a / include / caffe / common . hpp <nl> ppp b / include / caffe / common . hpp <nl> class Caffe { <nl> explicit RNG ( unsigned int seed ) ; <nl> explicit RNG ( const RNG & ) ; <nl> RNG & operator = ( const RNG & ) ; <nl> - const void * generator ( ) const ; <nl> + void * generator ( ) ; <nl> void set_generator ( const void * other_rng ) ; <nl> private : <nl> class Generator ; <nl> class Caffe { <nl> } ; <nl> <nl> / / Getters for boost rng , curand , and cublas handles <nl> - inline static const RNG & rng_stream ( ) { <nl> + inline static RNG & rng_stream ( ) { <nl> if ( ! Get ( ) . random_generator_ ) { <nl> Get ( ) . random_generator_ . reset ( new RNG ( ) ) ; <nl> } <nl> mmm a / include / caffe / util / rng . hpp <nl> ppp b / include / caffe / util / rng . hpp <nl> namespace caffe { <nl> <nl> typedef boost : : mt19937 rng_t ; <nl> <nl> - inline const rng_t & caffe_rng ( ) { <nl> - return * static_cast < const caffe : : rng_t * > ( Caffe : : rng_stream ( ) . generator ( ) ) ; <nl> + inline rng_t * caffe_rng ( ) { <nl> + return static_cast < caffe : : rng_t * > ( Caffe : : rng_stream ( ) . generator ( ) ) ; <nl> } <nl> <nl> inline void caffe_set_rng ( const caffe : : rng_t & other ) { <nl> mmm a / src / caffe / common . cpp <nl> ppp b / src / caffe / common . cpp <nl> class Caffe : : RNG : : Generator { <nl> explicit Generator ( unsigned int seed ) : rng_ ( new caffe : : rng_t ( seed ) ) { } <nl> explicit Generator ( const caffe : : rng_t & other ) : <nl> rng_ ( new caffe : : rng_t ( other ) ) { } <nl> - const caffe : : rng_t & rng ( ) const { return * rng_ ; } <nl> + caffe : : rng_t * rng ( ) { return rng_ . get ( ) ; } <nl> private : <nl> shared_ptr < caffe : : rng_t > rng_ ; <nl> } ; <nl> Caffe : : RNG & Caffe : : RNG : : operator = ( const RNG & other ) { <nl> return * this ; <nl> } <nl> <nl> - const void * Caffe : : RNG : : generator ( ) const { <nl> - return static_cast < const void * > ( & generator_ - > rng ( ) ) ; <nl> + void * Caffe : : RNG : : generator ( ) { <nl> + return static_cast < void * > ( generator_ - > rng ( ) ) ; <nl> } <nl> <nl> void Caffe : : RNG : : set_generator ( const void * other_rng ) { <nl> mmm a / src / caffe / util / math_functions . cpp <nl> ppp b / src / caffe / util / math_functions . cpp <nl> void caffe_rng_uniform ( const int n , const Dtype a , const Dtype b , Dtype * r ) { <nl> CHECK ( r ) ; <nl> CHECK_LE ( a , b ) ; <nl> boost : : uniform_real < Dtype > random_distribution ( a , caffe_nextafter < Dtype > ( b ) ) ; <nl> - boost : : variate_generator < caffe : : rng_t , boost : : uniform_real < Dtype > > <nl> + boost : : variate_generator < caffe : : rng_t * , boost : : uniform_real < Dtype > > <nl> variate_generator ( caffe_rng ( ) , random_distribution ) ; <nl> for ( int i = 0 ; i < n ; + + i ) { <nl> r [ i ] = variate_generator ( ) ; <nl> } <nl> - caffe_set_rng ( variate_generator . engine ( ) ) ; <nl> } <nl> <nl> template <nl> void caffe_rng_gaussian ( const int n , const Dtype a , <nl> CHECK ( r ) ; <nl> CHECK_GT ( sigma , 0 ) ; <nl> boost : : normal_distribution < Dtype > random_distribution ( a , sigma ) ; <nl> - boost : : variate_generator < caffe : : rng_t , boost : : normal_distribution < Dtype > > <nl> + boost : : variate_generator < caffe : : rng_t * , boost : : normal_distribution < Dtype > > <nl> variate_generator ( caffe_rng ( ) , random_distribution ) ; <nl> for ( int i = 0 ; i < n ; + + i ) { <nl> r [ i ] = variate_generator ( ) ; <nl> } <nl> - caffe_set_rng ( variate_generator . engine ( ) ) ; <nl> } <nl> <nl> template <nl> void caffe_rng_bernoulli ( const int n , const Dtype p , int * r ) { <nl> CHECK_GE ( p , 0 ) ; <nl> CHECK_LE ( p , 1 ) ; <nl> boost : : bernoulli_distribution < Dtype > random_distribution ( p ) ; <nl> - boost : : variate_generator < caffe : : rng_t , boost : : bernoulli_distribution < Dtype > > <nl> + boost : : variate_generator < caffe : : rng_t * , boost : : bernoulli_distribution < Dtype > > <nl> variate_generator ( caffe_rng ( ) , random_distribution ) ; <nl> for ( int i = 0 ; i < n ; + + i ) { <nl> r [ i ] = variate_generator ( ) ; <nl> } <nl> - caffe_set_rng ( variate_generator . engine ( ) ) ; <nl> } <nl> <nl> template <nl>
pass caffe rng ref into variate_generator constructor instead of having
BVLC/caffe
c795bec00224c2ae0e2b26649ccf3bb671792945
2014-04-18T18:07:38Z
mmm a / ports / libmariadb / CONTROL <nl> ppp b / ports / libmariadb / CONTROL <nl> <nl> Source : libmariadb <nl> - Version : 3 . 0 . 10 <nl> + Version : 3 . 0 . 10 - 1 <nl> Description : MariaDB Connector / C is used to connect C / C + + applications to MariaDB and MySQL databases <nl> new file mode 100644 <nl> index 00000000000 . . c877fb50b2a <nl> mmm / dev / null <nl> ppp b / ports / libmariadb / disable - test - build . patch <nl> <nl> + diff - - git a / unittest / libmariadb / CMakeLists . txt b / unittest / libmariadb / CMakeLists . txt <nl> + index 9cea916 . . a39ba94 100644 <nl> + mmm a / unittest / libmariadb / CMakeLists . txt <nl> ppp + b / unittest / libmariadb / CMakeLists . txt <nl> + ENDIF ( ) <nl> + <nl> + ADD_LIBRARY ( ma_getopt ma_getopt . c ) <nl> + <nl> + - FOREACH ( API_TEST $ { API_TESTS } ) <nl> + - IF ( NOT TARGET $ { API_TEST } ) <nl> + - ADD_EXECUTABLE ( $ { API_TEST } $ { API_TEST } . c ) <nl> + - ENDIF ( ) <nl> + - TARGET_LINK_LIBRARIES ( $ { API_TEST } cctap ma_getopt mariadbclient ) <nl> + - ADD_TEST ( $ { API_TEST } $ { EXECUTABLE_OUTPUT_PATH } / $ { API_TEST } ) <nl> + - SET_TESTS_PROPERTIES ( $ { API_TEST } PROPERTIES TIMEOUT 180 ) <nl> + - ENDFOREACH ( API_TEST ) <nl> + - <nl> + - FOREACH ( API_TEST $ { MANUAL_TESTS } ) <nl> + - ADD_EXECUTABLE ( $ { API_TEST } $ { API_TEST } . c ) <nl> + - TARGET_LINK_LIBRARIES ( $ { API_TEST } cctap ma_getopt mariadbclient ) <nl> + - ENDFOREACH ( ) <nl> + + # FOREACH ( API_TEST $ { API_TESTS } ) <nl> + + # IF ( NOT TARGET $ { API_TEST } ) <nl> + + # ADD_EXECUTABLE ( $ { API_TEST } $ { API_TEST } . c ) <nl> + + # ENDIF ( ) <nl> + + # TARGET_LINK_LIBRARIES ( $ { API_TEST } cctap ma_getopt mariadbclient ) <nl> + + # ADD_TEST ( $ { API_TEST } $ { EXECUTABLE_OUTPUT_PATH } / $ { API_TEST } ) <nl> + + # SET_TESTS_PROPERTIES ( $ { API_TEST } PROPERTIES TIMEOUT 180 ) <nl> + + # ENDFOREACH ( API_TEST ) <nl> + + # <nl> + + # FOREACH ( API_TEST $ { MANUAL_TESTS } ) <nl> + + # ADD_EXECUTABLE ( $ { API_TEST } $ { API_TEST } . c ) <nl> + + # TARGET_LINK_LIBRARIES ( $ { API_TEST } cctap ma_getopt mariadbclient ) <nl> + + # ENDFOREACH ( ) <nl> mmm a / ports / libmariadb / portfile . cmake <nl> ppp b / ports / libmariadb / portfile . cmake <nl> vcpkg_from_github ( <nl> REF v3 . 0 . 10 <nl> SHA512 43f89ead531d1b2f6ede943486bf39f606124762309c294b0f3e185937aef7439cb345103fc065e7940ed64c01ca1bf16940cd2fb0d80da60f39009c3b5a910b <nl> HEAD_REF master <nl> - PATCHES md . patch <nl> + PATCHES <nl> + md . patch <nl> + disable - test - build . patch <nl> ) <nl> <nl> vcpkg_configure_cmake ( <nl>
[ libmariadb ] Disable test build . ( )
microsoft/vcpkg
c7528e76ad590332e9e73bc1b5daf3dcc8011543
2019-05-24T04:44:54Z
mmm a / trunk / configure <nl> ppp b / trunk / configure <nl> fi <nl> MODULE_ID = " CORE " <nl> MODULE_DEPENDS = ( ) <nl> ModuleLibIncs = ( $ { SRS_OBJS_DIR } ) <nl> - MODULE_FILES = ( " srs_core " " srs_core_autofree " " srs_core_performance " <nl> + MODULE_FILES = ( " srs_core " " srs_core_version3 " " srs_core_autofree " " srs_core_performance " <nl> " srs_core_mem_watch " " srs_core_time " ) <nl> CORE_INCS = " src / core " ; MODULE_DIR = $ { CORE_INCS } . auto / modules . sh <nl> CORE_OBJS = " $ { MODULE_OBJS [ @ ] } " <nl> new file mode 100644 <nl> index 000000000 . . 97724f2b1 <nl> mmm / dev / null <nl> ppp b / trunk / src / core / srs_core_version3 . cpp <nl> <nl> + / * * <nl> + * The MIT License ( MIT ) <nl> + * <nl> + * Copyright ( c ) 2013 - 2020 Winlin <nl> + * <nl> + * Permission is hereby granted , free of charge , to any person obtaining a copy of <nl> + * this software and associated documentation files ( the " Software " ) , to deal in <nl> + * the Software without restriction , including without limitation the rights to <nl> + * use , copy , modify , merge , publish , distribute , sublicense , and / or sell copies of <nl> + * the Software , and to permit persons to whom the Software is furnished to do so , <nl> + * subject to the following conditions : <nl> + * <nl> + * The above copyright notice and this permission notice shall be included in all <nl> + * copies or substantial portions of the Software . <nl> + * <nl> + * THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + * IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , FITNESS <nl> + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR <nl> + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER LIABILITY , WHETHER <nl> + * IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , OUT OF OR IN <nl> + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE . <nl> + * / <nl> + <nl> + # include < srs_core_version3 . hpp > <nl>
Refine version3
ossrs/srs
c01806d5c4a26fd2b3da0412effc93fe4d04e04c
2020-02-04T09:04:03Z
mmm a / Marlin / Marlin_main . cpp <nl> ppp b / Marlin / Marlin_main . cpp <nl> inline void gcode_G92 ( ) { <nl> current_position [ i ] = code_value_axis_units ( i ) ; <nl> if ( i ! = E_AXIS ) didXYZ = true ; <nl> # else <nl> - float p = current_position [ i ] , <nl> - v = code_value_axis_units ( i ) ; <nl> + # if DISABLED ( NO_WORKSPACE_OFFSETS ) <nl> + float p = current_position [ i ] ; <nl> + # endif <nl> + float v = code_value_axis_units ( i ) ; <nl> <nl> current_position [ i ] = v ; <nl> <nl>
prevent warning with define of NO_WORKSPACE_OFFSETS
MarlinFirmware/Marlin
71ac6f9d42ca4b39eda86b725c3daece1ec40b46
2017-03-09T22:49:57Z
mmm a / tests / integration / test_polymorphic_parts / test . py <nl> ppp b / tests / integration / test_polymorphic_parts / test . py <nl> def create_tables_old_format ( name , nodes , shard ) : <nl> node2 = cluster . add_instance ( ' node2 ' , config_dir = " configs " , with_zookeeper = True ) <nl> <nl> settings_default = { ' index_granularity ' : 64 , ' index_granularity_bytes ' : 10485760 , ' min_rows_for_wide_part ' : 512 , ' min_bytes_for_wide_part ' : 0 } <nl> + settings_compact_only = { ' index_granularity ' : 64 , ' index_granularity_bytes ' : 10485760 , ' min_rows_for_wide_part ' : 1000000 , ' min_bytes_for_wide_part ' : 0 } <nl> settings_not_adaptive = { ' index_granularity ' : 64 , ' index_granularity_bytes ' : 0 , ' min_rows_for_wide_part ' : 512 , ' min_bytes_for_wide_part ' : 0 } <nl> <nl> node3 = cluster . add_instance ( ' node3 ' , config_dir = " configs " , with_zookeeper = True ) <nl> def start_cluster ( ) : <nl> cluster . start ( ) <nl> <nl> create_tables ( ' polymorphic_table ' , [ node1 , node2 ] , [ settings_default , settings_default ] , " shard1 " ) <nl> + create_tables ( ' compact_parts_only ' , [ node1 , node2 ] , [ settings_compact_only , settings_compact_only ] , " shard1 " ) <nl> create_tables ( ' non_adaptive_table ' , [ node1 , node2 ] , [ settings_not_adaptive , settings_default ] , " shard1 " ) <nl> create_tables ( ' polymorphic_table_compact ' , [ node3 , node4 ] , [ settings_compact , settings_wide ] , " shard2 " ) <nl> create_tables ( ' polymorphic_table_wide ' , [ node3 , node4 ] , [ settings_wide , settings_compact ] , " shard2 " ) <nl> def test_polymorphic_parts_basics ( start_cluster , first_node , second_node ) : <nl> second_node . query ( " SELECT count ( ss ) FROM polymorphic_table " ) = = " 2000 \ n " <nl> second_node . query ( " SELECT uniqExact ( ss ) FROM polymorphic_table " ) = = " 600 \ n " <nl> <nl> + # Checks mostly that merge from compact part to compact part works . <nl> + def test_compact_parts_only ( start_cluster ) : <nl> + for i in range ( 20 ) : <nl> + insert_random_data ( ' compact_parts_only ' , node1 , 100 ) <nl> + insert_random_data ( ' compact_parts_only ' , node2 , 100 ) <nl> + <nl> + node1 . query ( " SYSTEM SYNC REPLICA compact_parts_only " , timeout = 20 ) <nl> + node2 . query ( " SYSTEM SYNC REPLICA compact_parts_only " , timeout = 20 ) <nl> + <nl> + assert node1 . query ( " SELECT count ( ) FROM compact_parts_only " ) = = " 4000 \ n " <nl> + assert node2 . query ( " SELECT count ( ) FROM compact_parts_only " ) = = " 4000 \ n " <nl> + <nl> + assert node1 . query ( " SELECT DISTINCT part_type FROM system . parts WHERE table = ' compact_parts_only ' AND active " ) = = " Compact \ n " <nl> + assert node2 . query ( " SELECT DISTINCT part_type FROM system . parts WHERE table = ' compact_parts_only ' AND active " ) = = " Compact \ n " <nl> + <nl> + node1 . query ( " OPTIMIZE TABLE compact_parts_only FINAL " ) <nl> + node2 . query ( " SYSTEM SYNC REPLICA compact_parts_only " , timeout = 20 ) <nl> + assert node2 . query ( " SELECT count ( ) FROM compact_parts_only " ) = = " 4000 \ n " <nl> + <nl> + expected = " Compact \ t1 \ n " <nl> + assert TSV ( node1 . query ( " SELECT part_type , count ( ) FROM system . parts " \ <nl> + " WHERE table = ' compact_parts_only ' AND active GROUP BY part_type ORDER BY part_type " ) ) = = TSV ( expected ) <nl> + assert TSV ( node2 . query ( " SELECT part_type , count ( ) FROM system . parts " \ <nl> + " WHERE table = ' compact_parts_only ' AND active GROUP BY part_type ORDER BY part_type " ) ) = = TSV ( expected ) <nl> + <nl> <nl> # Check that follower replicas create parts of the same type , which leader has chosen at merge . <nl> @ pytest . mark . parametrize ( <nl>
add a test just in case
ClickHouse/ClickHouse
1789d6fa8213761d8309c925ea67ea291c8f0230
2020-04-28T23:07:11Z
mmm a / src / arm / lithium - arm . cc <nl> ppp b / src / arm / lithium - arm . cc <nl> LInstruction * LChunkBuilder : : DoAbnormalExit ( HAbnormalExit * instr ) { <nl> } <nl> <nl> <nl> - LInstruction * LChunkBuilder : : DoThrow ( HThrow * instr ) { <nl> - LOperand * context = UseFixed ( instr - > context ( ) , cp ) ; <nl> - LOperand * value = UseFixed ( instr - > value ( ) , r0 ) ; <nl> - return MarkAsCall ( new ( zone ( ) ) LThrow ( context , value ) , instr ) ; <nl> - } <nl> - <nl> - <nl> LInstruction * LChunkBuilder : : DoUseConst ( HUseConst * instr ) { <nl> return NULL ; <nl> } <nl> mmm a / src / arm / lithium - arm . h <nl> ppp b / src / arm / lithium - arm . h <nl> class LCodeGen ; <nl> V ( RSubI ) \ <nl> V ( TaggedToI ) \ <nl> V ( ThisFunction ) \ <nl> - V ( Throw ) \ <nl> V ( ToFastProperties ) \ <nl> V ( TransitionElementsKind ) \ <nl> V ( TrapAllocationMemento ) \ <nl> class LSeqStringSetChar V8_FINAL : public LTemplateInstruction < 1 , 4 , 0 > { <nl> } ; <nl> <nl> <nl> - class LThrow V8_FINAL : public LTemplateInstruction < 0 , 2 , 0 > { <nl> - public : <nl> - LThrow ( LOperand * context , LOperand * value ) { <nl> - inputs_ [ 0 ] = context ; <nl> - inputs_ [ 1 ] = value ; <nl> - } <nl> - <nl> - LOperand * context ( ) { return inputs_ [ 0 ] ; } <nl> - LOperand * value ( ) { return inputs_ [ 1 ] ; } <nl> - <nl> - DECLARE_CONCRETE_INSTRUCTION ( Throw , " throw " ) <nl> - } ; <nl> - <nl> - <nl> class LAddI V8_FINAL : public LTemplateInstruction < 1 , 2 , 0 > { <nl> public : <nl> LAddI ( LOperand * left , LOperand * right ) { <nl> mmm a / src / arm / lithium - codegen - arm . cc <nl> ppp b / src / arm / lithium - codegen - arm . cc <nl> void LCodeGen : : DoSeqStringSetChar ( LSeqStringSetChar * instr ) { <nl> } <nl> <nl> <nl> - void LCodeGen : : DoThrow ( LThrow * instr ) { <nl> - __ push ( ToRegister ( instr - > value ( ) ) ) ; <nl> - ASSERT ( ToRegister ( instr - > context ( ) ) . is ( cp ) ) ; <nl> - CallRuntime ( Runtime : : kThrow , 1 , instr ) ; <nl> - <nl> - if ( FLAG_debug_code ) { <nl> - __ stop ( " Unreachable code . " ) ; <nl> - } <nl> - } <nl> - <nl> - <nl> void LCodeGen : : DoAddI ( LAddI * instr ) { <nl> LOperand * left = instr - > left ( ) ; <nl> LOperand * right = instr - > right ( ) ; <nl> mmm a / src / hydrogen - instructions . h <nl> ppp b / src / hydrogen - instructions . h <nl> class LChunkBuilder ; <nl> V ( StringCompareAndBranch ) \ <nl> V ( Sub ) \ <nl> V ( ThisFunction ) \ <nl> - V ( Throw ) \ <nl> V ( ToFastProperties ) \ <nl> V ( TransitionElementsKind ) \ <nl> V ( TrapAllocationMemento ) \ <nl> class HUnaryOperation : public HTemplateInstruction < 1 > { <nl> } ; <nl> <nl> <nl> - class HThrow V8_FINAL : public HTemplateInstruction < 2 > { <nl> - public : <nl> - DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1 ( HThrow , HValue * ) ; <nl> - <nl> - virtual Representation RequiredInputRepresentation ( int index ) V8_OVERRIDE { <nl> - return Representation : : Tagged ( ) ; <nl> - } <nl> - <nl> - HValue * context ( ) { return OperandAt ( 0 ) ; } <nl> - HValue * value ( ) { return OperandAt ( 1 ) ; } <nl> - <nl> - DECLARE_CONCRETE_INSTRUCTION ( Throw ) <nl> - <nl> - private : <nl> - HThrow ( HValue * context , HValue * value ) { <nl> - SetOperandAt ( 0 , context ) ; <nl> - SetOperandAt ( 1 , value ) ; <nl> - SetAllSideEffects ( ) ; <nl> - } <nl> - } ; <nl> - <nl> - <nl> class HUseConst V8_FINAL : public HUnaryOperation { <nl> public : <nl> DECLARE_INSTRUCTION_FACTORY_P1 ( HUseConst , HValue * ) ; <nl> mmm a / src / hydrogen . cc <nl> ppp b / src / hydrogen . cc <nl> void HOptimizedGraphBuilder : : VisitThrow ( Throw * expr ) { <nl> <nl> HValue * value = environment ( ) - > Pop ( ) ; <nl> if ( ! FLAG_emit_opt_code_positions ) SetSourcePosition ( expr - > position ( ) ) ; <nl> - Add < HThrow > ( value ) ; <nl> + Add < HPushArgument > ( value ) ; <nl> + Add < HCallRuntime > ( isolate ( ) - > factory ( ) - > empty_string ( ) , <nl> + Runtime : : FunctionForId ( Runtime : : kThrow ) , 1 ) ; <nl> Add < HSimulate > ( expr - > id ( ) ) ; <nl> <nl> / / If the throw definitely exits the function , we can finish with a dummy <nl> mmm a / src / ia32 / lithium - codegen - ia32 . cc <nl> ppp b / src / ia32 / lithium - codegen - ia32 . cc <nl> void LCodeGen : : DoSeqStringSetChar ( LSeqStringSetChar * instr ) { <nl> } <nl> <nl> <nl> - void LCodeGen : : DoThrow ( LThrow * instr ) { <nl> - __ push ( ToOperand ( instr - > value ( ) ) ) ; <nl> - ASSERT ( ToRegister ( instr - > context ( ) ) . is ( esi ) ) ; <nl> - CallRuntime ( Runtime : : kThrow , 1 , instr ) ; <nl> - <nl> - if ( FLAG_debug_code ) { <nl> - Comment ( " Unreachable code . " ) ; <nl> - __ int3 ( ) ; <nl> - } <nl> - } <nl> - <nl> - <nl> void LCodeGen : : DoAddI ( LAddI * instr ) { <nl> LOperand * left = instr - > left ( ) ; <nl> LOperand * right = instr - > right ( ) ; <nl> mmm a / src / ia32 / lithium - ia32 . cc <nl> ppp b / src / ia32 / lithium - ia32 . cc <nl> LInstruction * LChunkBuilder : : DoAbnormalExit ( HAbnormalExit * instr ) { <nl> } <nl> <nl> <nl> - LInstruction * LChunkBuilder : : DoThrow ( HThrow * instr ) { <nl> - LOperand * context = UseFixed ( instr - > context ( ) , esi ) ; <nl> - LOperand * value = UseFixed ( instr - > value ( ) , eax ) ; <nl> - return MarkAsCall ( new ( zone ( ) ) LThrow ( context , value ) , instr ) ; <nl> - } <nl> - <nl> - <nl> LInstruction * LChunkBuilder : : DoUseConst ( HUseConst * instr ) { <nl> return NULL ; <nl> } <nl> mmm a / src / ia32 / lithium - ia32 . h <nl> ppp b / src / ia32 / lithium - ia32 . h <nl> class LCodeGen ; <nl> V ( SubI ) \ <nl> V ( TaggedToI ) \ <nl> V ( ThisFunction ) \ <nl> - V ( Throw ) \ <nl> V ( ToFastProperties ) \ <nl> V ( TransitionElementsKind ) \ <nl> V ( TrapAllocationMemento ) \ <nl> class LSeqStringSetChar V8_FINAL : public LTemplateInstruction < 1 , 4 , 0 > { <nl> } ; <nl> <nl> <nl> - class LThrow V8_FINAL : public LTemplateInstruction < 0 , 2 , 0 > { <nl> - public : <nl> - LThrow ( LOperand * context , LOperand * value ) { <nl> - inputs_ [ 0 ] = context ; <nl> - inputs_ [ 1 ] = value ; <nl> - } <nl> - <nl> - LOperand * context ( ) { return inputs_ [ 0 ] ; } <nl> - LOperand * value ( ) { return inputs_ [ 1 ] ; } <nl> - <nl> - DECLARE_CONCRETE_INSTRUCTION ( Throw , " throw " ) <nl> - } ; <nl> - <nl> - <nl> class LAddI V8_FINAL : public LTemplateInstruction < 1 , 2 , 0 > { <nl> public : <nl> LAddI ( LOperand * left , LOperand * right ) { <nl> mmm a / src / mips / lithium - codegen - mips . cc <nl> ppp b / src / mips / lithium - codegen - mips . cc <nl> void LCodeGen : : DoSeqStringSetChar ( LSeqStringSetChar * instr ) { <nl> } <nl> <nl> <nl> - void LCodeGen : : DoThrow ( LThrow * instr ) { <nl> - __ push ( ToRegister ( instr - > value ( ) ) ) ; <nl> - ASSERT ( ToRegister ( instr - > context ( ) ) . is ( cp ) ) ; <nl> - CallRuntime ( Runtime : : kThrow , 1 , instr ) ; <nl> - <nl> - if ( FLAG_debug_code ) { <nl> - __ stop ( " Unreachable code . " ) ; <nl> - } <nl> - } <nl> - <nl> - <nl> void LCodeGen : : DoAddI ( LAddI * instr ) { <nl> LOperand * left = instr - > left ( ) ; <nl> LOperand * right = instr - > right ( ) ; <nl> mmm a / src / mips / lithium - mips . cc <nl> ppp b / src / mips / lithium - mips . cc <nl> LInstruction * LChunkBuilder : : DoAbnormalExit ( HAbnormalExit * instr ) { <nl> } <nl> <nl> <nl> - LInstruction * LChunkBuilder : : DoThrow ( HThrow * instr ) { <nl> - LOperand * context = UseFixed ( instr - > context ( ) , cp ) ; <nl> - LOperand * value = UseFixed ( instr - > value ( ) , a0 ) ; <nl> - return MarkAsCall ( new ( zone ( ) ) LThrow ( context , value ) , instr ) ; <nl> - } <nl> - <nl> - <nl> LInstruction * LChunkBuilder : : DoUseConst ( HUseConst * instr ) { <nl> return NULL ; <nl> } <nl> mmm a / src / mips / lithium - mips . h <nl> ppp b / src / mips / lithium - mips . h <nl> class LCodeGen ; <nl> V ( SubI ) \ <nl> V ( TaggedToI ) \ <nl> V ( ThisFunction ) \ <nl> - V ( Throw ) \ <nl> V ( ToFastProperties ) \ <nl> V ( TransitionElementsKind ) \ <nl> V ( TrapAllocationMemento ) \ <nl> class LSeqStringSetChar V8_FINAL : public LTemplateInstruction < 1 , 4 , 0 > { <nl> } ; <nl> <nl> <nl> - class LThrow V8_FINAL : public LTemplateInstruction < 0 , 2 , 0 > { <nl> - public : <nl> - LThrow ( LOperand * context , LOperand * value ) { <nl> - inputs_ [ 0 ] = context ; <nl> - inputs_ [ 1 ] = value ; <nl> - } <nl> - <nl> - LOperand * context ( ) { return inputs_ [ 0 ] ; } <nl> - LOperand * value ( ) { return inputs_ [ 1 ] ; } <nl> - <nl> - DECLARE_CONCRETE_INSTRUCTION ( Throw , " throw " ) <nl> - } ; <nl> - <nl> - <nl> class LAddI V8_FINAL : public LTemplateInstruction < 1 , 2 , 0 > { <nl> public : <nl> LAddI ( LOperand * left , LOperand * right ) { <nl> mmm a / src / x64 / lithium - codegen - x64 . cc <nl> ppp b / src / x64 / lithium - codegen - x64 . cc <nl> void LCodeGen : : DoSeqStringSetChar ( LSeqStringSetChar * instr ) { <nl> } <nl> <nl> <nl> - void LCodeGen : : DoThrow ( LThrow * instr ) { <nl> - __ push ( ToRegister ( instr - > value ( ) ) ) ; <nl> - ASSERT ( ToRegister ( instr - > context ( ) ) . is ( rsi ) ) ; <nl> - CallRuntime ( Runtime : : kThrow , 1 , instr ) ; <nl> - <nl> - if ( FLAG_debug_code ) { <nl> - Comment ( " Unreachable code . " ) ; <nl> - __ int3 ( ) ; <nl> - } <nl> - } <nl> - <nl> - <nl> void LCodeGen : : DoAddI ( LAddI * instr ) { <nl> LOperand * left = instr - > left ( ) ; <nl> LOperand * right = instr - > right ( ) ; <nl> mmm a / src / x64 / lithium - x64 . cc <nl> ppp b / src / x64 / lithium - x64 . cc <nl> LInstruction * LChunkBuilder : : DoAbnormalExit ( HAbnormalExit * instr ) { <nl> } <nl> <nl> <nl> - LInstruction * LChunkBuilder : : DoThrow ( HThrow * instr ) { <nl> - LOperand * context = UseFixed ( instr - > context ( ) , rsi ) ; <nl> - LOperand * value = UseFixed ( instr - > value ( ) , rax ) ; <nl> - return MarkAsCall ( new ( zone ( ) ) LThrow ( context , value ) , instr ) ; <nl> - } <nl> - <nl> - <nl> LInstruction * LChunkBuilder : : DoUseConst ( HUseConst * instr ) { <nl> return NULL ; <nl> } <nl> mmm a / src / x64 / lithium - x64 . h <nl> ppp b / src / x64 / lithium - x64 . h <nl> class LCodeGen ; <nl> V ( SubI ) \ <nl> V ( TaggedToI ) \ <nl> V ( ThisFunction ) \ <nl> - V ( Throw ) \ <nl> V ( ToFastProperties ) \ <nl> V ( TransitionElementsKind ) \ <nl> V ( TrapAllocationMemento ) \ <nl> class LSeqStringSetChar V8_FINAL : public LTemplateInstruction < 1 , 4 , 0 > { <nl> } ; <nl> <nl> <nl> - class LThrow V8_FINAL : public LTemplateInstruction < 0 , 2 , 0 > { <nl> - public : <nl> - explicit LThrow ( LOperand * context , LOperand * value ) { <nl> - inputs_ [ 0 ] = context ; <nl> - inputs_ [ 1 ] = value ; <nl> - } <nl> - <nl> - LOperand * context ( ) { return inputs_ [ 0 ] ; } <nl> - LOperand * value ( ) { return inputs_ [ 1 ] ; } <nl> - <nl> - DECLARE_CONCRETE_INSTRUCTION ( Throw , " throw " ) <nl> - } ; <nl> - <nl> - <nl> class LAddI V8_FINAL : public LTemplateInstruction < 1 , 2 , 0 > { <nl> public : <nl> LAddI ( LOperand * left , LOperand * right ) { <nl>
Replace HThrow with HCallRuntime .
v8/v8
4a0959e360125fb18bb36802b63279d30481ff6a
2014-01-29T14:03:32Z
mmm a / lib / AST / Expr . cpp <nl> ppp b / lib / AST / Expr . cpp <nl> Expr * CallExpr : : getDirectCallee ( ) const { <nl> continue ; <nl> } <nl> <nl> + if ( auto ctorCall = dyn_cast < ConstructorRefCallExpr > ( fn ) ) { <nl> + fn = ctorCall - > getFn ( ) ; <nl> + continue ; <nl> + } <nl> + <nl> return fn ; <nl> } <nl> } <nl> new file mode 100644 <nl> index 000000000000 . . 9012d4a0a819 <nl> mmm / dev / null <nl> ppp b / validation - test / compiler_crashers_2_fixed / sr11062 . swift <nl> <nl> + / / RUN : % target - swift - frontend - emit - ir % s <nl> + <nl> + struct MyText < V > { <nl> + let label : String <nl> + let value : V <nl> + } <nl> + <nl> + extension MyText where V = = Void { <nl> + init ( _ label : String , defaulted : Int = 17 ) { <nl> + self . label = label <nl> + self . value = ( ) <nl> + } <nl> + } <nl> + <nl> + struct ImagePulse { <nl> + @ Inspectable ( control : { MyText ( " duration " ) } ) <nl> + var test : Double = 0 <nl> + } <nl> + <nl> + @ propertyWrapper <nl> + final class Inspectable < Value > { <nl> + var wrappedValue : Value <nl> + <nl> + init < V > ( wrappedValue initialValue : Value , control : @ escaping ( ) - > V ) { <nl> + self . wrappedValue = initialValue <nl> + } <nl> + } <nl>
Merge remote - tracking branch ' origin / master ' into master - next
apple/swift
a5e8425d048224c934be4124648303ffe1522183
2019-09-14T20:30:12Z
mmm a / src / core / iomgr / fd_posix . h <nl> ppp b / src / core / iomgr / fd_posix . h <nl> void grpc_fd_become_readable ( grpc_fd * fd , int allow_synchronous_callback ) ; <nl> void grpc_fd_become_writable ( grpc_fd * fd , int allow_synchronous_callback ) ; <nl> <nl> / * Reference counting for fds * / <nl> - # define GRPC_FD_REF_COUNT_DEBUG <nl> - <nl> # ifdef GRPC_FD_REF_COUNT_DEBUG <nl> void grpc_fd_ref ( grpc_fd * fd , const char * reason , const char * file , int line ) ; <nl> void grpc_fd_unref ( grpc_fd * fd , const char * reason , const char * file , int line ) ; <nl>
Turn off debug
grpc/grpc
e3b63c2d0156ba164525e8d180f0f4011be39e28
2015-06-02T23:29:27Z
similarity index 100 % <nl> rename from js / apps / system / aardvark / aardvark . js <nl> rename to js / apps / system / _admin / aardvark / APP / aardvark . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / aqlfunction . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / aqlfunction . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / batch . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / batch . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / collection . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / collection . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / cursor . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / cursor . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / database . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / database . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / document . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / document . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / edge . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / edge . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / edges . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / edges . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / endpoint . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / endpoint . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / explain . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / explain . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / graph . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / graph . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / import . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / import . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / index . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / index . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / job . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / job . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / log . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / log . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / query . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / query . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / replication . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / replication . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / simple . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / simple . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / structure . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / structure . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / system . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / system . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / tasks . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / tasks . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / transaction . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / transaction . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / traversal . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / traversal . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / user . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / user . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / api - docs / version . json <nl> rename to js / apps / system / _admin / aardvark / APP / api - docs / version . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / cluster . js <nl> rename to js / apps / system / _admin / aardvark / APP / cluster . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / html / head . html . part <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / html / head . html . part <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / html / scripts . html . part <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / html / scripts . html . part <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / collections / _automaticRetryCollection . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / collections / _automaticRetryCollection . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / collections / arangoClusterStatisticsCollection . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / collections / arangoClusterStatisticsCollection . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / collections / clusterCollections . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / collections / clusterCollections . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / collections / clusterCoordinators . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / collections / clusterCoordinators . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / collections / clusterDatabases . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / collections / clusterDatabases . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / collections / clusterServers . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / collections / clusterServers . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / collections / clusterShards . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / collections / clusterShards . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / models / clusterCollection . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / models / clusterCollection . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / models / clusterCoordinator . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / models / clusterCoordinator . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / models / clusterDatabase . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / models / clusterDatabase . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / models / clusterPlan . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / models / clusterPlan . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / models / clusterServer . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / models / clusterServer . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / models / clusterShard . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / models / clusterShard . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / models / clusterType . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / models / clusterType . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / routers / clusterRouter . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / routers / clusterRouter . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / routers / startApp . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / routers / startApp . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / templates / clusterDown . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / templates / clusterDown . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / templates / clusterUnreachable . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / templates / clusterUnreachable . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / templates / detailView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / templates / detailView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / templates / loginModal . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / templates / loginModal . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / templates / modalDashboardDummy . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / templates / modalDashboardDummy . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / templates / planScenarioSelector . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / templates / planScenarioSelector . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / templates / serverEntry . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / templates / serverEntry . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / templates / showCluster . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / templates / showCluster . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / templates / showShards . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / templates / showShards . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / templates / shutdownButtonView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / templates / shutdownButtonView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / templates / symmetricPlan . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / templates / symmetricPlan . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / templates / testPlan . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / templates / testPlan . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / templates / waitModal . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / templates / waitModal . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / views / clusterDownView . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / views / clusterDownView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / views / clusterUnreachableView . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / views / clusterUnreachableView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / views / dbServerDashboardView . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / views / dbServerDashboardView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / views / loginModalView . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / views / loginModalView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / views / planScenarioSelectorView . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / views / planScenarioSelectorView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / views / planSymmetricView . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / views / planSymmetricView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / views / planTestView . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / views / planTestView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / views / showClusterView . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / views / showClusterView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / views / showShardsView . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / views / showShardsView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / clusterFrontend / js / views / shutdownButtonView . js <nl> rename to js / apps / system / _admin / aardvark / APP / clusterFrontend / js / views / shutdownButtonView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / favicon . ico <nl> rename to js / apps / system / _admin / aardvark / APP / favicon . ico <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / foxxTemplates . js <nl> rename to js / apps / system / _admin / aardvark / APP / foxxTemplates . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / aqltemplates . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / aqltemplates . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / css / ansi . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / css / ansi . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / css / bootstrap . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / css / bootstrap . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / css / cluster . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / css / cluster . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / css / jquery - ui - 1 . 9 . 2 . custom . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / css / jquery - ui - 1 . 9 . 2 . custom . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / css / jquery . contextmenu . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / css / jquery . contextmenu . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / css / jquery . dataTables . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / css / jquery . dataTables . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / css / jsoneditor . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / css / jsoneditor . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / css / nv . d3 . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / css / nv . d3 . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / css / select2 - bootstrap . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / css / select2 - bootstrap . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / css / select2 . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / css / select2 . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / css / style . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / css / style . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / css / swagger / hightlight . default . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / css / swagger / hightlight . default . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / css / swagger / screen . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / css / swagger / screen . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / css / swagger / screen . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / css / swagger / screen . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / css / swaggerView . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / css / swaggerView . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / favicon . ico <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / favicon . ico <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / fonts / fontawesome / FontAwesome . otf <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / fonts / fontawesome / FontAwesome . otf <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / fonts / fontawesome / fontawesome - webfont . eot <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / fonts / fontawesome / fontawesome - webfont . eot <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / fonts / fontawesome / fontawesome - webfont . svg <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / fonts / fontawesome / fontawesome - webfont . svg <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / fonts / fontawesome / fontawesome - webfont . ttf <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / fonts / fontawesome / fontawesome - webfont . ttf <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / fonts / fontawesome / fontawesome - webfont . woff <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / fonts / fontawesome / fontawesome - webfont . woff <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / fonts / opensans / OpenSans . woff <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / fonts / opensans / OpenSans . woff <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / fonts / opensans / OpenSansBold . woff <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / fonts / opensans / OpenSansBold . woff <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / fonts / opensans / OpenSansBoldItalic . woff <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / fonts / opensans / OpenSansBoldItalic . woff <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / fonts / opensans / OpenSansItalic . woff <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / fonts / opensans / OpenSansItalic . woff <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / fonts / opensans / OpenSansLight . woff <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / fonts / opensans / OpenSansLight . woff <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / fonts / opensans / OpenSansLightItalic . woff <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / fonts / opensans / OpenSansLightItalic . woff <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / html / body . html . part <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / html / body . html . part <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / html / end . html . part <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / html / end . html . part <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / html / head . html . part <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / html / head . html . part <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / html / redirect . html <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / html / redirect . html <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / html / scripts . html . part <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / html / scripts . html . part <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / html / start . html . part <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / html / start . html . part <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / ajax - loader . gif <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / ajax - loader . gif <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / arangodblogoAvatar_150 . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / arangodblogoAvatar_150 . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / arangodblogoAvatar_24 . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / arangodblogoAvatar_24 . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / arangodblogoAvatar_50 . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / arangodblogoAvatar_50 . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / back_disabled . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / back_disabled . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / back_enabled . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / back_enabled . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / back_enabled_hover . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / back_enabled_hover . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / check_radio_sheet . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / check_radio_sheet . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / cpu . svg <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / cpu . svg <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / dark - check - green - round . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / dark - check - green - round . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / dark - check - green . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / dark - check - green . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / databaseIcon . svg <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / databaseIcon . svg <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / enter_icon . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / enter_icon . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / forward_disabled . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / forward_disabled . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / forward_enabled . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / forward_enabled . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / forward_enabled_hover . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / forward_enabled_hover . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / glyphicons - halflings - white . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / glyphicons - halflings - white . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / glyphicons - halflings . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / glyphicons - halflings . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / gv_arrow_bottom . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / gv_arrow_bottom . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / gv_arrow_left . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / gv_arrow_left . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / gv_arrow_right . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / gv_arrow_right . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / gv_arrow_top . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / gv_arrow_top . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / gv_button_bg_reverse . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / gv_button_bg_reverse . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / gv_collapse . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / gv_collapse . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / icon_arango . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / icon_arango . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / icon_delete . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / icon_delete . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / icon_document - alt . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / icon_document - alt . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / icon_document . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / icon_document . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / icon_document . pxm <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / icon_document . pxm <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / icon_node - alt . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / icon_node - alt . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / icon_node . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / icon_node . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / icon_node . pxm <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / icon_node . pxm <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / jsoneditor - icons . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / jsoneditor - icons . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / logo_arangodb_transp . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / logo_arangodb_transp . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / logo_arangodb_white . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / logo_arangodb_white . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / plus_icon . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / plus_icon . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / ram . svg <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / ram . svg <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / requests . svg <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / requests . svg <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / select2 - spinner . gif <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / select2 - spinner . gif <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / select2 . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / select2 . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / sort_asc . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / sort_asc . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / sort_asc_disabled . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / sort_asc_disabled . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / sort_both . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / sort_both . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / sort_desc . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / sort_desc . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / sort_desc_disabled . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / sort_desc_disabled . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / stripes . gif <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / stripes . gif <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / stripes90 . gif <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / stripes90 . gif <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / swagger / logo_small . png <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / swagger / logo_small . png <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / img / swagger / throbber . gif <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / img / swagger / throbber . gif <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / arango / arango . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / arango / arango . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / arango / templateEngine . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / arango / templateEngine . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / bootstrap / errors . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / bootstrap / errors . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / bootstrap / module - console . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / bootstrap / module - console . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / bootstrap / module - internal . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / bootstrap / module - internal . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / bootstrap / monkeypatches . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / bootstrap / monkeypatches . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / client / bootstrap / module - internal . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / client / bootstrap / module - internal . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / client / client . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / client / client . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / collections / _paginatedCollection . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / collections / _paginatedCollection . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / collections / arangoCollections . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / collections / arangoCollections . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / collections / arangoDatabase . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / collections / arangoDatabase . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / collections / arangoDocument . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / collections / arangoDocument . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / collections / arangoDocuments . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / collections / arangoDocuments . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / collections / arangoLogs . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / collections / arangoLogs . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / collections / arangoQueries . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / collections / arangoQueries . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / collections / arangoReplication . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / collections / arangoReplication . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / collections / arangoStatisticsCollection . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / collections / arangoStatisticsCollection . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / collections / arangoStatisticsDescriptionCollection . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / collections / arangoStatisticsDescriptionCollection . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / collections / arangoUsers . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / collections / arangoUsers . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / collections / foxxCollection . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / collections / foxxCollection . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / collections / graphCollection . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / collections / graphCollection . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / collections / notificationCollection . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / collections / notificationCollection . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / config / dygraphConfig . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / config / dygraphConfig . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / documentation / arangoAdapter . md <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / documentation / arangoAdapter . md <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / documentation / edgeShaper . md <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / documentation / edgeShaper . md <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / documentation / nodeShaper . md <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / documentation / nodeShaper . md <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / JSONAdapter . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / JSONAdapter . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / abstractAdapter . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / abstractAdapter . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / arangoAdapter . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / arangoAdapter . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / colourMapper . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / colourMapper . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / communityNode . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / communityNode . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / domObserverFactory . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / domObserverFactory . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / edgeShaper . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / edgeShaper . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / eventDispatcher . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / eventDispatcher . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / eventLibrary . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / eventLibrary . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / expandedClass . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / expandedClass . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / forceLayouter . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / forceLayouter . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / foxxAdapter . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / foxxAdapter . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / gharialAdapter . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / gharialAdapter . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / modularityJoiner . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / modularityJoiner . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / nodeReducer . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / nodeReducer . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / nodeShaper . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / nodeShaper . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / previewAdapter . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / previewAdapter . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / webWorkerWrapper . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / webWorkerWrapper . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graph / zoomManager . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graph / zoomManager . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / graphViewer . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / graphViewer . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 0 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 0 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 1 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 1 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 10 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 10 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 11 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 11 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 12 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 12 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 1337 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 1337 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 2 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 2 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 3 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 3 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 4 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 4 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 42 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 42 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 43 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 43 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 44 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 44 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 45 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 45 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 5 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 5 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 6 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 6 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 7 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 7 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 8 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 8 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / 9 . json <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / 9 . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / test_data / graph . txt <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / test_data / graph . txt <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / ui / arangoAdapterControls . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / ui / arangoAdapterControls . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / ui / contextMenuHelper . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / ui / contextMenuHelper . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / ui / edgeShaperControls . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / ui / edgeShaperControls . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / ui / eventDispatcherControls . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / ui / eventDispatcherControls . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / ui / gharialAdapterControls . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / ui / gharialAdapterControls . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / ui / graphViewerPreview . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / ui / graphViewerPreview . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / ui / graphViewerUI . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / ui / graphViewerUI . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / ui / graphViewerWidget . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / ui / graphViewerWidget . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / ui / layouterControls . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / ui / layouterControls . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / ui / modalDialogHelper . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / ui / modalDialogHelper . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / ui / nodeShaperControls . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / ui / nodeShaperControls . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / graphViewer / ui / uiComponentsHelper . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / graphViewer / ui / uiComponentsHelper . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / backbone . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / backbone . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / bootstrap - pagination . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / bootstrap - pagination . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / bootstrap . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / bootstrap . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / d3 . fisheye . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / d3 . fisheye . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / d3 . v3 . min . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / d3 . v3 . min . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / dygraph - combined . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / dygraph - combined . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / ejs_production . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / ejs_production . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / handlebars - 1 . 0 . rc . 1 . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / handlebars - 1 . 0 . rc . 1 . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / highlight . 7 . 3 . pack . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / highlight . 7 . 3 . pack . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / joi . browser . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / joi . browser . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / jqconsole . min . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / jqconsole . min . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / jquery - 2 . 1 . 0 . min . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / jquery - 2 . 1 . 0 . min . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / jquery - ui - 1 . 9 . 2 . custom . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / jquery - ui - 1 . 9 . 2 . custom . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / jquery . autogrow . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / jquery . autogrow . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / jquery . contextmenu . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / jquery . contextmenu . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / jquery . form . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / jquery . form . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / jquery . hotkeys . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / jquery . hotkeys . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / jquery . jeditable . autogrow . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / jquery . jeditable . autogrow . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / jquery . jeditable . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / jquery . jeditable . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / jquery . slideto . min . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / jquery . slideto . min . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / jquery . snippet . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / jquery . snippet . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / jquery . uploadfile . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / jquery . uploadfile . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / jquery . wiggle . min . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / jquery . wiggle . min . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / jsoneditor - min . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / jsoneditor - min . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / md5 . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / md5 . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / nv . d3 . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / nv . d3 . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / select2 . min . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / select2 . min . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / strftime - min . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / strftime - min . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / swagger - ui . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / swagger - ui . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / swagger - ui . min . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / swagger - ui . min . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / swagger . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / swagger . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / lib / underscore . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / lib / underscore . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / models / arangoCollectionModel . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / models / arangoCollectionModel . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / models / arangoDatabase . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / models / arangoDatabase . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / models / arangoDocument . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / models / arangoDocument . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / models / arangoQuery . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / models / arangoQuery . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / models / arangoReplication . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / models / arangoReplication . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / models / arangoSession . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / models / arangoSession . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / models / arangoStatistics . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / models / arangoStatistics . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / models / arangoStatisticsDescription . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / models / arangoStatisticsDescription . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / models / arangoUsers . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / models / arangoUsers . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / models / currentDatabase . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / models / currentDatabase . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / models / foxx . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / models / foxx . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / models / graph . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / models / graph . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / models / newArangoLog . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / models / newArangoLog . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / models / notification . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / models / notification . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb - common . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb - common . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / aql / functions . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / aql / functions . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / arango - collection - common . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / arango - collection - common . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / arango - collection . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / arango - collection . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / arango - database . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / arango - database . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / arango - query - cursor . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / arango - query - cursor . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / arango - statement - common . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / arango - statement - common . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / arango - statement . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / arango - statement . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / arangosh . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / arangosh . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / general - graph . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / general - graph . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / graph - blueprint . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / graph - blueprint . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / graph - common . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / graph - common . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / graph . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / graph . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / graph / traversal . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / graph / traversal . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / is . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / is . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / mimetypes . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / mimetypes . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / replication . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / replication . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / simple - query - common . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / simple - query - common . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / simple - query . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / simple - query . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / org / arangodb / tutorial . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / org / arangodb / tutorial . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / modules / underscore . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / modules / underscore . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / routers / router . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / routers / router . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / routers / startApp . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / routers / startApp . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / routers / versionCheck . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / routers / versionCheck . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / shell / browser . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / shell / browser . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / aboutView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / aboutView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / apiView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / apiView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / appDocumentationView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / appDocumentationView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / applicationDetailView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / applicationDetailView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / applicationListView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / applicationListView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / applicationsView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / applicationsView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / arangoTabbar . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / arangoTabbar . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / arangoTable . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / arangoTable . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / collectionsItemView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / collectionsItemView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / collectionsView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / collectionsView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / dashboardView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / dashboardView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / databaseView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / databaseView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / dbSelectionView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / dbSelectionView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / documentView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / documentView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / documentsView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / documentsView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / edgeDefinitionTable . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / edgeDefinitionTable . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / editListEntryView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / editListEntryView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / footerView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / footerView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / foxxActiveView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / foxxActiveView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / foxxEditView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / foxxEditView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / foxxMountView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / foxxMountView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / graphManagementView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / graphManagementView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / graphViewGroupByEntry . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / graphViewGroupByEntry . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / lineChartDetailView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / lineChartDetailView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / loadingTableView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / loadingTableView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / loginView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / loginView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / logsView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / logsView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / modalApplicationMount . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / modalApplicationMount . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / modalBase . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / modalBase . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / modalCollectionInfo . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / modalCollectionInfo . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / modalDownloadFoxx . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / modalDownloadFoxx . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / modalFoxxDevPath . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / modalFoxxDevPath . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / modalGraph . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / modalGraph . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / modalGraphTable . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / modalGraphTable . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / modalHotkeys . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / modalHotkeys . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / modalNewVersion . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / modalNewVersion . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / modalTable . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / modalTable . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / navigationView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / navigationView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / notificationItem . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / notificationItem . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / notificationView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / notificationView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / progressBase . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / progressBase . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / queryView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / queryView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / shellView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / shellView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / statisticBarView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / statisticBarView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / tableView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / tableView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / testView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / testView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / userBarView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / userBarView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / templates / userManagementView . ejs <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / templates / userManagementView . ejs <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / _paginationView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / _paginationView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / apiView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / apiView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / appDocumentationView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / appDocumentationView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / applicationDetailView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / applicationDetailView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / applicationsView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / applicationsView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / collectionsItemView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / collectionsItemView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / collectionsView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / collectionsView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / dashboardView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / dashboardView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / databaseView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / databaseView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / dbSelectionView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / dbSelectionView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / documentView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / documentView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / documentsView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / documentsView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / editListEntryView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / editListEntryView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / footerView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / footerView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / foxxActiveListView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / foxxActiveListView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / foxxActiveView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / foxxActiveView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / foxxInstalledView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / foxxInstalledView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / graphManagementView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / graphManagementView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / loginView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / loginView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / logsView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / logsView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / modalView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / modalView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / navigationView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / navigationView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / notificationView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / notificationView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / progressView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / progressView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / queryView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / queryView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / shellView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / shellView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / statisticBarView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / statisticBarView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / tableView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / tableView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / testView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / testView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / userBarView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / userBarView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / js / views / userManagementView . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / js / views / userManagementView . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _abstracts . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _abstracts . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _accordion . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _accordion . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _alert . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _alert . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _api . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _api . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _applicationDetailView . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _applicationDetailView . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _arangoTabbar . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _arangoTabbar . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _arangoTable . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _arangoTable . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _body . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _body . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _buttons . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _buttons . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _checkbox . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _checkbox . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _clusterCharts . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _clusterCharts . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _clusterStates . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _clusterStates . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _collection . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _collection . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _colors . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _colors . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _constants . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _constants . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _contentTables . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _contentTables . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _dashboard . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _dashboard . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _dashboardDistribution . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _dashboardDistribution . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _dashboardHttpGroup . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _dashboardHttpGroup . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _dataTables . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _dataTables . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _dbSelection . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _dbSelection . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _dialogs . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _dialogs . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _documentView . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _documentView . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _documentsView . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _documentsView . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _dropdowns . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _dropdowns . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _fonts . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _fonts . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _footer . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _footer . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _general . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _general . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _graphViewer . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _graphViewer . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _headerBar . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _headerBar . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _hotkeys . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _hotkeys . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _icons . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _icons . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _jsonEditor . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _jsonEditor . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _login . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _login . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _logs . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _logs . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _mixins . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _mixins . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _modals . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _modals . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _navbar . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _navbar . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _newDashboard . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _newDashboard . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _notification . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _notification . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _pagination . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _pagination . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _plannerImages . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _plannerImages . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _progressView . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _progressView . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _queryView . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _queryView . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _resizing . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _resizing . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _screenSizes . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _screenSizes . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _searchBar . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _searchBar . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _shared . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _shared . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _shellView . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _shellView . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _shortcuts . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _shortcuts . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _snippet . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _snippet . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _statisticBar . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _statisticBar . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _tabViews . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _tabViews . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _tiles . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _tiles . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _tooltips . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _tooltips . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _uploadfile . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _uploadfile . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / _userMenu . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / _userMenu . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / cluster . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / cluster . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / cluster . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / cluster . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / font - awesome / _bordered - pulled . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / font - awesome / _bordered - pulled . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / font - awesome / _core . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / font - awesome / _core . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / font - awesome / _fixed - width . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / font - awesome / _fixed - width . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / font - awesome / _font - awesome . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / font - awesome / _font - awesome . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / font - awesome / _icons . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / font - awesome / _icons . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / font - awesome / _larger . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / font - awesome / _larger . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / font - awesome / _list . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / font - awesome / _list . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / font - awesome / _mixins . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / font - awesome / _mixins . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / font - awesome / _path . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / font - awesome / _path . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / font - awesome / _rotated - flipped . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / font - awesome / _rotated - flipped . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / font - awesome / _spinning . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / font - awesome / _spinning . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / font - awesome / _stacked . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / font - awesome / _stacked . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / font - awesome / _variables . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / font - awesome / _variables . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / generated . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / generated . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / generated . css . map <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / generated . css . map <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / style . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / style . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / scss / style . scss <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / scss / style . scss <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / ace . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / ace . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / ext - searchbox . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / ext - searchbox . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / ext - spellcheck . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / ext - spellcheck . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / ext - static_highlight . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / ext - static_highlight . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / ext - textarea . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / ext - textarea . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / keybinding - emacs . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / keybinding - emacs . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / keybinding - vim . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / keybinding - vim . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - abap . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - abap . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - aql . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - aql . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - asciidoc . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - asciidoc . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - c9search . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - c9search . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - c_cpp . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - c_cpp . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - clojure . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - clojure . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - coffee . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - coffee . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - coldfusion . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - coldfusion . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - csharp . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - csharp . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - css . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - css . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - curly . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - curly . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - dart . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - dart . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - diff . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - diff . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - django . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - django . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - dot . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - dot . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - glsl . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - glsl . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - golang . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - golang . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - groovy . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - groovy . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - haml . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - haml . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - haxe . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - haxe . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - html . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - html . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - jade . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - jade . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - java . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - java . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - javascript . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - javascript . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - json . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - json . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - jsp . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - jsp . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - jsx . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - jsx . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - latex . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - latex . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - less . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - less . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - liquid . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - liquid . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - lisp . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - lisp . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - livescript . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - livescript . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - lua . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - lua . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - luapage . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - luapage . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - lucene . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - lucene . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - makefile . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - makefile . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - markdown . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - markdown . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - objectivec . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - objectivec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - ocaml . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - ocaml . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - perl . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - perl . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - pgsql . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - pgsql . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - php . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - php . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - powershell . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - powershell . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - python . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - python . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - r . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - r . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - rdoc . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - rdoc . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - rhtml . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - rhtml . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - ruby . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - ruby . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - scad . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - scad . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - scala . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - scala . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - scheme . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - scheme . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - scss . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - scss . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - sh . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - sh . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - sql . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - sql . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - stylus . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - stylus . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - svg . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - svg . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - tcl . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - tcl . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - tex . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - tex . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - text . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - text . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - textile . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - textile . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - tm_snippet . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - tm_snippet . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - typescript . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - typescript . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - vbscript . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - vbscript . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - xml . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - xml . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - xquery . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - xquery . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / mode - yaml . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / mode - yaml . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - ambiance . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - ambiance . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - chaos . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - chaos . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - chrome . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - chrome . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - clouds . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - clouds . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - clouds_midnight . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - clouds_midnight . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - cobalt . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - cobalt . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - crimson_editor . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - crimson_editor . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - dawn . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - dawn . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - dreamweaver . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - dreamweaver . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - eclipse . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - eclipse . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - github . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - github . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - idle_fingers . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - idle_fingers . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - jsoneditor . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - jsoneditor . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - kr . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - kr . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - merbivore . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - merbivore . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - merbivore_soft . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - merbivore_soft . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - mono_industrial . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - mono_industrial . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - monokai . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - monokai . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - pastel_on_dark . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - pastel_on_dark . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - solarized_dark . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - solarized_dark . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - solarized_light . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - solarized_light . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - textmate . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - textmate . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - tomorrow . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - tomorrow . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - tomorrow_night . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - tomorrow_night . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - tomorrow_night_blue . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - tomorrow_night_blue . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - tomorrow_night_bright . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - tomorrow_night_bright . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - tomorrow_night_eighties . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - tomorrow_night_eighties . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - twilight . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - twilight . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - vibrant_ink . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - vibrant_ink . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / theme - xcode . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / theme - xcode . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / worker - coffee . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / worker - coffee . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / worker - css . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / worker - css . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / worker - javascript . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / worker - javascript . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / worker - json . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / worker - json . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / worker - php . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / worker - php . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / src / worker - xquery . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / src / worker - xquery . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / ttf / arangofont / fonts / arangodb . eot <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / ttf / arangofont / fonts / arangodb . eot <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / ttf / arangofont / fonts / arangodb . svg <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / ttf / arangofont / fonts / arangodb . svg <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / ttf / arangofont / fonts / arangodb . ttf <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / ttf / arangofont / fonts / arangodb . ttf <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / ttf / arangofont / fonts / arangodb . woff <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / ttf / arangofont / fonts / arangodb . woff <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / ttf / arangofont / ie7 / ie7 . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / ttf / arangofont / ie7 / ie7 . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / ttf / arangofont / ie7 / ie7 . js <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / ttf / arangofont / ie7 / ie7 . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / ttf / arangofont / style . css <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / ttf / arangofont / style . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / ttf / droidsans - bold . ttf <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / ttf / droidsans - bold . ttf <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / frontend / ttf / droidsans . ttf <nl> rename to js / apps / system / _admin / aardvark / APP / frontend / ttf / droidsans . ttf <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / index . html <nl> rename to js / apps / system / _admin / aardvark / APP / index . html <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / lib / foxxTemplateEngine . js <nl> rename to js / apps / system / _admin / aardvark / APP / lib / foxxTemplateEngine . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / lib / foxxes . js <nl> rename to js / apps / system / _admin / aardvark / APP / lib / foxxes . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / lib / swagger . js <nl> rename to js / apps / system / _admin / aardvark / APP / lib / swagger . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / manifest . json <nl> rename to js / apps / system / _admin / aardvark / APP / manifest . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / models / configuration . js <nl> rename to js / apps / system / _admin / aardvark / APP / models / configuration . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / node_modules / i / . npmignore <nl> rename to js / apps / system / _admin / aardvark / APP / node_modules / i / . npmignore <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / node_modules / i / . travis . yml <nl> rename to js / apps / system / _admin / aardvark / APP / node_modules / i / . travis . yml <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / node_modules / i / LICENSE <nl> rename to js / apps / system / _admin / aardvark / APP / node_modules / i / LICENSE <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / node_modules / i / README . md <nl> rename to js / apps / system / _admin / aardvark / APP / node_modules / i / README . md <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / node_modules / i / lib / defaults . js <nl> rename to js / apps / system / _admin / aardvark / APP / node_modules / i / lib / defaults . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / node_modules / i / lib / inflect . js <nl> rename to js / apps / system / _admin / aardvark / APP / node_modules / i / lib / inflect . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / node_modules / i / lib / inflections . js <nl> rename to js / apps / system / _admin / aardvark / APP / node_modules / i / lib / inflections . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / node_modules / i / lib / methods . js <nl> rename to js / apps / system / _admin / aardvark / APP / node_modules / i / lib / methods . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / node_modules / i / lib / native . js <nl> rename to js / apps / system / _admin / aardvark / APP / node_modules / i / lib / native . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / node_modules / i / lib / util . js <nl> rename to js / apps / system / _admin / aardvark / APP / node_modules / i / lib / util . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / node_modules / i / package . json <nl> rename to js / apps / system / _admin / aardvark / APP / node_modules / i / package . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / node_modules / i / test / inflector / cases . js <nl> rename to js / apps / system / _admin / aardvark / APP / node_modules / i / test / inflector / cases . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / node_modules / i / test / inflector / inflections - test . js <nl> rename to js / apps / system / _admin / aardvark / APP / node_modules / i / test / inflector / inflections - test . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / node_modules / i / test / inflector / methods - test . js <nl> rename to js / apps / system / _admin / aardvark / APP / node_modules / i / test / inflector / methods - test . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / node_modules / i / test / utils / array - test . js <nl> rename to js / apps / system / _admin / aardvark / APP / node_modules / i / test / utils / array - test . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / node_modules / i / test / utils / string - test . js <nl> rename to js / apps / system / _admin / aardvark / APP / node_modules / i / test / utils / string - test . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / repositories / plans . js <nl> rename to js / apps / system / _admin / aardvark / APP / repositories / plans . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / statistics . js <nl> rename to js / apps / system / _admin / aardvark / APP / statistics . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / templates / controller . js . tmpl <nl> rename to js / apps / system / _admin / aardvark / APP / templates / controller . js . tmpl <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / templates / model . js . tmpl <nl> rename to js / apps / system / _admin / aardvark / APP / templates / model . js . tmpl <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / templates / repository . js . tmpl <nl> rename to js / apps / system / _admin / aardvark / APP / templates / repository . js . tmpl <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / templates / setup . js . tmpl <nl> rename to js / apps / system / _admin / aardvark / APP / templates / setup . js . tmpl <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / templates / teardown . js . tmpl <nl> rename to js / apps / system / _admin / aardvark / APP / templates / teardown . js . tmpl <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / clusterSpecs / views / clusterDownViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / clusterSpecs / views / clusterDownViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / clusterSpecs / views / dbServerDashboardViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / clusterSpecs / views / dbServerDashboardViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / clusterSpecs / views / loginModalViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / clusterSpecs / views / loginModalViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / clusterSpecs / views / planScenarioSelectorViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / clusterSpecs / views / planScenarioSelectorViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / clusterSpecs / views / planSymmetricViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / clusterSpecs / views / planSymmetricViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / clusterSpecs / views / planTestViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / clusterSpecs / views / planTestViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / clusterSpecs / views / showClusterViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / clusterSpecs / views / showClusterViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / clusterSpecs / views / showShardsViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / clusterSpecs / views / showShardsViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / clusterSpecs / views / shutdownButtonViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / clusterSpecs / views / shutdownButtonViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / dummy . html <nl> rename to js / apps / system / _admin / aardvark / APP / test / dummy . html <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / karma / files . json <nl> rename to js / apps / system / _admin / aardvark / APP / test / karma / files . json <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / karma / karma . conf . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / karma / karma . conf . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / karma / karma_coverage . conf . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / karma / karma_coverage . conf . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / karma / karma_coverage_local . conf . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / karma / karma_coverage_local . conf . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / karma / karma_planner . conf . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / karma / karma_planner . conf . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / lib / ejs . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / lib / ejs . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / lib / jasmine - 1 . 3 . 1 / MIT . LICENSE <nl> rename to js / apps / system / _admin / aardvark / APP / test / lib / jasmine - 1 . 3 . 1 / MIT . LICENSE <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / lib / jasmine - 1 . 3 . 1 / jasmine - html . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / lib / jasmine - 1 . 3 . 1 / jasmine - html . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / lib / jasmine - 1 . 3 . 1 / jasmine . css <nl> rename to js / apps / system / _admin / aardvark / APP / test / lib / jasmine - 1 . 3 . 1 / jasmine . css <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / lib / jasmine - 1 . 3 . 1 / jasmine . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / lib / jasmine - 1 . 3 . 1 / jasmine . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / lib / jshint . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / lib / jshint . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / lib / underscore . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / lib / underscore . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / mocks / disableEJS . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / mocks / disableEJS . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / mocks / overwriteAjax . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / mocks / overwriteAjax . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / runnerAll . html <nl> rename to js / apps / system / _admin / aardvark / APP / test / runnerAll . html <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / runnerJSLint . html <nl> rename to js / apps / system / _admin / aardvark / APP / test / runnerJSLint . html <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specJSLint / jsLintSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specJSLint / jsLintSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / arango / arangoSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / arango / arangoSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / ClusterStatisticsCollectionSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / ClusterStatisticsCollectionSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / arangoCollectionsSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / arangoCollectionsSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / arangoDatabaseSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / arangoDatabaseSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / arangoDocumentSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / arangoDocumentSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / arangoDocumentsSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / arangoDocumentsSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / arangoLogsSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / arangoLogsSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / arangoReplicationSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / arangoReplicationSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / arangoStatisticsCollectionSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / arangoStatisticsCollectionSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / arangoStatisticsDescriptionCollectionSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / arangoStatisticsDescriptionCollectionSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / arangoUsersSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / arangoUsersSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / clusterCollectionsSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / clusterCollectionsSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / clusterCoordinatorsSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / clusterCoordinatorsSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / clusterDatabasesSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / clusterDatabasesSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / clusterServersSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / clusterServersSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / clusterShardsSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / clusterShardsSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / foxxCollectionSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / foxxCollectionSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / graphCollectionSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / graphCollectionSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / collections / notificationCollectionSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / collections / notificationCollectionSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / config / dygraphConfigSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / config / dygraphConfigSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / helper / commMock . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / helper / commMock . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / helper / eventHelper . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / helper / eventHelper . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / helper / mocks . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / helper / mocks . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / helper / objectsHelper . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / helper / objectsHelper . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / helper / uiMatchers . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / helper / uiMatchers . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specAdapter / abstractAdapterSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specAdapter / abstractAdapterSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specAdapter / arangoAdapterSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specAdapter / arangoAdapterSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specAdapter / arangoAdapterUISpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specAdapter / arangoAdapterUISpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specAdapter / foxxAdapterSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specAdapter / foxxAdapterSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specAdapter / gharialAdapterSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specAdapter / gharialAdapterSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specAdapter / gharialAdapterUISpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specAdapter / gharialAdapterUISpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specAdapter / interfaceSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specAdapter / interfaceSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specAdapter / jsonAdapterSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specAdapter / jsonAdapterSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specAdapter / previewAdapterSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specAdapter / previewAdapterSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specColourMapper / colourMapperSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specColourMapper / colourMapperSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specCommunityNode / communityNodeSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specCommunityNode / communityNodeSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specContextMenu / contextMenuSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specContextMenu / contextMenuSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specEdgeShaper / edgeShaperSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specEdgeShaper / edgeShaperSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specEdgeShaper / edgeShaperUISpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specEdgeShaper / edgeShaperUISpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specEvents / eventDispatcherSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specEvents / eventDispatcherSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specEvents / eventDispatcherUISpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specEvents / eventDispatcherUISpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specEvents / eventLibrarySpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specEvents / eventLibrarySpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specForceLayouter / forceLayouterSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specForceLayouter / forceLayouterSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specForceLayouter / forceLayouterUISpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specForceLayouter / forceLayouterUISpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specGraphViewer / graphViewerPreviewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specGraphViewer / graphViewerPreviewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specGraphViewer / graphViewerSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specGraphViewer / graphViewerSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specGraphViewer / graphViewerUISpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specGraphViewer / graphViewerUISpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specGraphViewer / graphViewerWidgetSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specGraphViewer / graphViewerWidgetSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specNodeReducer / modularityJoinerSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specNodeReducer / modularityJoinerSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specNodeReducer / nodeReducerSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specNodeReducer / nodeReducerSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specNodeShaper / nodeShaperSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specNodeShaper / nodeShaperSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specNodeShaper / nodeShaperUISpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specNodeShaper / nodeShaperUISpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specWindowObjects / domObserverFactorySpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specWindowObjects / domObserverFactorySpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specWindowObjects / workerWrapperSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specWindowObjects / workerWrapperSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / graphViewer / specZoomManager / zoomManagerSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / graphViewer / specZoomManager / zoomManagerSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / models / arangoCollectionModelSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / models / arangoCollectionModelSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / models / arangoDatabaseSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / models / arangoDatabaseSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / models / arangoDocumentSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / models / arangoDocumentSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / models / arangoLogModelSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / models / arangoLogModelSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / models / arangoReplicationSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / models / arangoReplicationSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / models / arangoStatisticsDescriptionSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / models / arangoStatisticsDescriptionSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / models / arangoStatisticsSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / models / arangoStatisticsSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / models / arangoUsersSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / models / arangoUsersSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / models / clusterCoordinatorSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / models / clusterCoordinatorSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / models / clusterPlanSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / models / clusterPlanSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / models / currentDatabaseSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / models / currentDatabaseSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / models / foxxSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / models / foxxSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / models / graphSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / models / graphSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / planner / router / routerSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / planner / router / routerSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / planner / views / planScenarioSelectorViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / planner / views / planScenarioSelectorViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / planner / views / planSymmetricViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / planner / views / planSymmetricViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / planner / views / planTestViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / planner / views / planTestViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / router / clusterRouterSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / router / clusterRouterSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / router / routerSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / router / routerSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / router / versionCheckSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / router / versionCheckSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / addNewGraphViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / addNewGraphViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / apiViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / apiViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / appDocumentationViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / appDocumentationViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / applicationsViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / applicationsViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / clusterCollectionViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / clusterCollectionViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / clusterCoordinatorViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / clusterCoordinatorViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / clusterDashboardViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / clusterDashboardViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / clusterDatabaseViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / clusterDatabaseViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / clusterOverviewViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / clusterOverviewViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / clusterServerViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / clusterServerViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / clusterShardsViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / clusterShardsViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / collectionsItemViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / collectionsItemViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / collectionsViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / collectionsViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / dashboardViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / dashboardViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / dbSelectionViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / dbSelectionViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / documentViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / documentViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / documentsViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / documentsViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / editListEntryViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / editListEntryViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / foxxEditViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / foxxEditViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / graphManagementViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / graphManagementViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / loginViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / loginViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / modalViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / modalViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / navigationViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / navigationViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / newLogsViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / newLogsViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / notificationViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / notificationViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / queryViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / queryViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / shellViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / shellViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / statisticBarViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / statisticBarViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / userBarViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / userBarViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / aardvark / test / specs / views / userManagementViewSpec . js <nl> rename to js / apps / system / _admin / aardvark / APP / test / specs / views / userManagementViewSpec . js <nl> similarity index 100 % <nl> rename from js / apps / system / gharial / gharial . js <nl> rename to js / apps / system / _api / gharial / APP / gharial . js <nl> similarity index 100 % <nl> rename from js / apps / system / gharial / manifest . json <nl> rename to js / apps / system / _api / gharial / APP / manifest . json <nl> similarity index 100 % <nl> rename from js / apps / system / cerberus / cerberus . js <nl> rename to js / apps / system / _system / cerberus / APP / cerberus . js <nl> similarity index 100 % <nl> rename from js / apps / system / cerberus / css / style . css <nl> rename to js / apps / system / _system / cerberus / APP / css / style . css <nl> similarity index 100 % <nl> rename from js / apps / system / cerberus / html / changePassword . html <nl> rename to js / apps / system / _system / cerberus / APP / html / changePassword . html <nl> similarity index 100 % <nl> rename from js / apps / system / cerberus / html / confirmed . html <nl> rename to js / apps / system / _system / cerberus / APP / html / confirmed . html <nl> similarity index 100 % <nl> rename from js / apps / system / cerberus / html / invalid . html <nl> rename to js / apps / system / _system / cerberus / APP / html / invalid . html <nl> similarity index 100 % <nl> rename from js / apps / system / cerberus / manifest . json <nl> rename to js / apps / system / _system / cerberus / APP / manifest . json <nl> similarity index 100 % <nl> rename from js / apps / system / sessions / . gitignore <nl> rename to js / apps / system / _system / sessions / APP / . gitignore <nl> similarity index 100 % <nl> rename from js / apps / system / sessions / app . js <nl> rename to js / apps / system / _system / sessions / APP / app . js <nl> similarity index 100 % <nl> rename from js / apps / system / sessions / errors . js <nl> rename to js / apps / system / _system / sessions / APP / errors . js <nl> similarity index 100 % <nl> rename from js / apps / system / sessions / manifest . json <nl> rename to js / apps / system / _system / sessions / APP / manifest . json <nl> similarity index 100 % <nl> rename from js / apps / system / sessions / package . json <nl> rename to js / apps / system / _system / sessions / APP / package . json <nl> similarity index 100 % <nl> rename from js / apps / system / sessions / setup . js <nl> rename to js / apps / system / _system / sessions / APP / setup . js <nl> similarity index 100 % <nl> rename from js / apps / system / sessions / storage . js <nl> rename to js / apps / system / _system / sessions / APP / storage . js <nl> similarity index 100 % <nl> rename from js / apps / system / sessions / test / errors . js <nl> rename to js / apps / system / _system / sessions / APP / test / errors . js <nl> similarity index 100 % <nl> rename from js / apps / system / sessions / test / setup . js <nl> rename to js / apps / system / _system / sessions / APP / test / setup . js <nl> similarity index 100 % <nl> rename from js / apps / system / simple - auth / . gitignore <nl> rename to js / apps / system / _system / simple - auth / APP / . gitignore <nl> similarity index 100 % <nl> rename from js / apps / system / simple - auth / auth . js <nl> rename to js / apps / system / _system / simple - auth / APP / auth . js <nl> similarity index 100 % <nl> rename from js / apps / system / simple - auth / manifest . json <nl> rename to js / apps / system / _system / simple - auth / APP / manifest . json <nl> similarity index 100 % <nl> rename from js / apps / system / simple - auth / package . json <nl> rename to js / apps / system / _system / simple - auth / APP / package . json <nl> similarity index 100 % <nl> rename from js / apps / system / simple - auth / test / hashPassword . js <nl> rename to js / apps / system / _system / simple - auth / APP / test / hashPassword . js <nl> similarity index 100 % <nl> rename from js / apps / system / simple - auth / test / verifyPassword . js <nl> rename to js / apps / system / _system / simple - auth / APP / test / verifyPassword . js <nl> similarity index 100 % <nl> rename from js / apps / system / users / . gitignore <nl> rename to js / apps / system / _system / users / APP / . gitignore <nl> similarity index 100 % <nl> rename from js / apps / system / users / errors . js <nl> rename to js / apps / system / _system / users / APP / errors . js <nl> similarity index 100 % <nl> rename from js / apps / system / users / manifest . json <nl> rename to js / apps / system / _system / users / APP / manifest . json <nl> similarity index 100 % <nl> rename from js / apps / system / users / package . json <nl> rename to js / apps / system / _system / users / APP / package . json <nl> similarity index 100 % <nl> rename from js / apps / system / users / setup . js <nl> rename to js / apps / system / _system / users / APP / setup . js <nl> similarity index 100 % <nl> rename from js / apps / system / users / storage . js <nl> rename to js / apps / system / _system / users / APP / storage . js <nl> similarity index 100 % <nl> rename from js / apps / system / users / test / errors . js <nl> rename to js / apps / system / _system / users / APP / test / errors . js <nl> similarity index 100 % <nl> rename from js / apps / system / users / test / setup . js <nl> rename to js / apps / system / _system / users / APP / test / setup . js <nl>
Moved all system apps to new folder structure
arangodb/arangodb
a006634c7e34c7a38add1b09465e3664f478c760
2015-01-19T16:50:35Z
mmm a / tensorflow / compiler / xla / tests / filecheck . cc <nl> ppp b / tensorflow / compiler / xla / tests / filecheck . cc <nl> StatusOr < bool > RunFileCheck ( const string & input , const string & pattern ) { <nl> tensorflow : : SubProcess file_check_process ; <nl> file_check_process . SetProgram ( <nl> file_check_path , <nl> - { file_check_path , " - v " , " - dump - input = always " , pattern_path } ) ; <nl> + { file_check_path , " - v " , " - dump - input = fail " , pattern_path } ) ; <nl> file_check_process . SetChannelAction ( tensorflow : : CHAN_STDIN , <nl> tensorflow : : ACTION_PIPE ) ; <nl> file_check_process . SetChannelAction ( tensorflow : : CHAN_STDERR , <nl>
[ XLA ] Do not dump FileCheck input when test succeeds .
tensorflow/tensorflow
0ea905b7546e4ed3493a39fc1dd40af25bf085d0
2019-07-16T00:17:35Z
mmm a / src / ast / scopes . cc <nl> ppp b / src / ast / scopes . cc <nl> Scope : : Scope ( Zone * zone , Scope * outer_scope , ScopeType scope_type ) <nl> DCHECK_NE ( SCRIPT_SCOPE , scope_type ) ; <nl> SetDefaults ( ) ; <nl> set_language_mode ( outer_scope - > language_mode ( ) ) ; <nl> - force_context_allocation_ = <nl> - ! is_function_scope ( ) & & outer_scope - > has_forced_context_allocation ( ) ; <nl> outer_scope_ - > AddInnerScope ( this ) ; <nl> } <nl> <nl> bool Scope : : AllowsLazyParsingWithoutUnresolvedVariables ( <nl> if ( s - > is_catch_scope ( ) ) continue ; <nl> / / With scopes do not introduce variables that need allocation . <nl> if ( s - > is_with_scope ( ) ) continue ; <nl> - / / Module scopes context - allocate all variables , and have no <nl> - / / { this } or { arguments } variables whose existence depends on <nl> - / / references to them . <nl> - if ( s - > is_module_scope ( ) ) continue ; <nl> - / / Only block scopes and function scopes should disallow preparsing . <nl> - DCHECK ( s - > is_block_scope ( ) | | s - > is_function_scope ( ) ) ; <nl> + DCHECK ( s - > is_module_scope ( ) | | s - > is_block_scope ( ) | | <nl> + s - > is_function_scope ( ) ) ; <nl> return false ; <nl> } <nl> return true ; <nl> void Scope : : Print ( int n ) { <nl> if ( scope - > was_lazily_parsed ( ) ) Indent ( n1 , " / / lazily parsed \ n " ) ; <nl> if ( scope - > ShouldEagerCompile ( ) ) Indent ( n1 , " / / will be compiled \ n " ) ; <nl> } <nl> - if ( has_forced_context_allocation ( ) ) { <nl> - Indent ( n1 , " / / forces context allocation \ n " ) ; <nl> - } <nl> if ( num_stack_slots_ > 0 ) { <nl> Indent ( n1 , " / / " ) ; <nl> PrintF ( " % d stack slots \ n " , num_stack_slots_ ) ; <nl> bool Scope : : MustAllocateInContext ( Variable * var ) { <nl> / / an eval ( ) call or a runtime with lookup ) , it must be allocated in the <nl> / / context . <nl> / / <nl> - / / Exceptions : If the scope as a whole has forced context allocation , all <nl> - / / variables will have context allocation , even temporaries . Otherwise <nl> - / / temporary variables are always stack - allocated . Catch - bound variables are <nl> + / / Temporary variables are always stack - allocated . Catch - bound variables are <nl> / / always context - allocated . <nl> - if ( has_forced_context_allocation ( ) ) return true ; <nl> if ( var - > mode ( ) = = TEMPORARY ) return false ; <nl> if ( is_catch_scope ( ) ) return true ; <nl> if ( ( is_script_scope ( ) | | is_eval_scope ( ) ) & & <nl> mmm a / src / ast / scopes . h <nl> ppp b / src / ast / scopes . h <nl> class V8_EXPORT_PRIVATE Scope : public NON_EXPORTED_BASE ( ZoneObject ) { <nl> bool is_hidden ( ) const { return is_hidden_ ; } <nl> void set_is_hidden ( ) { is_hidden_ = true ; } <nl> <nl> - / / In some cases we want to force context allocation for a whole scope . <nl> - void ForceContextAllocation ( ) { <nl> - DCHECK ( ! already_resolved_ ) ; <nl> - force_context_allocation_ = true ; <nl> - } <nl> - bool has_forced_context_allocation ( ) const { <nl> - return force_context_allocation_ ; <nl> - } <nl> void ForceContextAllocationForParameters ( ) { <nl> DCHECK ( ! already_resolved_ ) ; <nl> force_context_allocation_for_parameters_ = true ; <nl> mmm a / src / parsing / parser . cc <nl> ppp b / src / parsing / parser . cc <nl> FunctionLiteral * Parser : : DoParseProgram ( ParseInfo * info ) { <nl> var - > AllocateTo ( VariableLocation : : PARAMETER , 0 ) ; <nl> <nl> PrepareGeneratorVariables ( ) ; <nl> - scope - > ForceContextAllocation ( ) ; <nl> Expression * initial_yield = <nl> BuildInitialYield ( kNoSourcePosition , kGeneratorFunction ) ; <nl> body - > Add ( <nl> mmm a / test / cctest / interpreter / bytecode_expectations / Modules . golden <nl> ppp b / test / cctest / interpreter / bytecode_expectations / Modules . golden <nl> top level : yes <nl> snippet : " <nl> import \ " bar \ " ; <nl> " <nl> - frame size : 5 <nl> + frame size : 6 <nl> parameter count : 2 <nl> - bytecode array length : 96 <nl> + bytecode array length : 91 <nl> bytecodes : [ <nl> - B ( Ldar ) , R ( 1 ) , <nl> + B ( Ldar ) , R ( 0 ) , <nl> B ( JumpIfUndefined ) , U8 ( 18 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 1 ) , U8 ( 1 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( RestoreGeneratorState ) , R ( 1 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 0 ) , U8 ( 1 ) , <nl> + B ( PushContext ) , R ( 3 ) , <nl> + B ( RestoreGeneratorState ) , R ( 0 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> B ( Abort ) , U8 ( 42 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> B ( LdaConstant ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> - B ( Mov ) , R ( arg0 ) , R ( 2 ) , <nl> - B ( Mov ) , R ( closure ) , R ( 3 ) , <nl> - B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 2 ) , U8 ( 3 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( Mov ) , R ( this ) , R ( 4 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 3 ) , U8 ( 2 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> + B ( Mov ) , R ( arg0 ) , R ( 3 ) , <nl> + B ( Mov ) , R ( closure ) , R ( 4 ) , <nl> + B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 3 ) , U8 ( 3 ) , <nl> + B ( PushContext ) , R ( 3 ) , <nl> + B ( Mov ) , R ( this ) , R ( 5 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 4 ) , U8 ( 2 ) , <nl> + B ( Star ) , R ( 0 ) , <nl> / * 0 E > * / B ( StackCheck ) , <nl> - B ( Star ) , R ( 1 ) , <nl> - B ( LdaImmutableCurrentContextSlot ) , U8 ( 4 ) , <nl> - / * 0 E > * / B ( SuspendGenerator ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , U8 ( 0 ) , <nl> + / * 0 E > * / B ( SuspendGenerator ) , R ( 0 ) , R ( 0 ) , U8 ( 4 ) , U8 ( 0 ) , <nl> / * 13 S > * / B ( Return ) , <nl> - B ( RestoreGeneratorRegisters ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , <nl> + B ( RestoreGeneratorRegisters ) , R ( 0 ) , R ( 0 ) , U8 ( 4 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 1 ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 3 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 1 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 0 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 4 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 0 ) , U8 ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 2 ) , U8 ( 2 ) , I8 ( 0 ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 4 ) , <nl> / * 0 E > * / B ( Throw ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 4 ) , <nl> / * 13 S > * / B ( Return ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 5 ) , <nl> - B ( LdaCurrentContextSlot ) , U8 ( 5 ) , <nl> + B ( Mov ) , R ( 4 ) , R ( 1 ) , <nl> + B ( Ldar ) , R ( 1 ) , <nl> / * 13 S > * / B ( Return ) , <nl> ] <nl> constant pool : [ <nl> - Smi [ 47 ] , <nl> + Smi [ 43 ] , <nl> FIXED_ARRAY_TYPE , <nl> Smi [ 10 ] , <nl> Smi [ 7 ] , <nl> handlers : [ <nl> snippet : " <nl> import { foo } from \ " bar \ " ; <nl> " <nl> - frame size : 5 <nl> + frame size : 6 <nl> parameter count : 2 <nl> - bytecode array length : 96 <nl> + bytecode array length : 91 <nl> bytecodes : [ <nl> - B ( Ldar ) , R ( 1 ) , <nl> + B ( Ldar ) , R ( 0 ) , <nl> B ( JumpIfUndefined ) , U8 ( 18 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 1 ) , U8 ( 1 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( RestoreGeneratorState ) , R ( 1 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 0 ) , U8 ( 1 ) , <nl> + B ( PushContext ) , R ( 3 ) , <nl> + B ( RestoreGeneratorState ) , R ( 0 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> B ( Abort ) , U8 ( 42 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> B ( LdaConstant ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> - B ( Mov ) , R ( arg0 ) , R ( 2 ) , <nl> - B ( Mov ) , R ( closure ) , R ( 3 ) , <nl> - B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 2 ) , U8 ( 3 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( Mov ) , R ( this ) , R ( 4 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 3 ) , U8 ( 2 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> + B ( Mov ) , R ( arg0 ) , R ( 3 ) , <nl> + B ( Mov ) , R ( closure ) , R ( 4 ) , <nl> + B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 3 ) , U8 ( 3 ) , <nl> + B ( PushContext ) , R ( 3 ) , <nl> + B ( Mov ) , R ( this ) , R ( 5 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 4 ) , U8 ( 2 ) , <nl> + B ( Star ) , R ( 0 ) , <nl> / * 0 E > * / B ( StackCheck ) , <nl> - B ( Star ) , R ( 1 ) , <nl> - B ( LdaImmutableCurrentContextSlot ) , U8 ( 4 ) , <nl> - / * 0 E > * / B ( SuspendGenerator ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , U8 ( 0 ) , <nl> + / * 0 E > * / B ( SuspendGenerator ) , R ( 0 ) , R ( 0 ) , U8 ( 4 ) , U8 ( 0 ) , <nl> / * 24 S > * / B ( Return ) , <nl> - B ( RestoreGeneratorRegisters ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , <nl> + B ( RestoreGeneratorRegisters ) , R ( 0 ) , R ( 0 ) , U8 ( 4 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 1 ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 3 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 1 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 0 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 4 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 0 ) , U8 ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 2 ) , U8 ( 2 ) , I8 ( 0 ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 4 ) , <nl> / * 0 E > * / B ( Throw ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 4 ) , <nl> / * 24 S > * / B ( Return ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 5 ) , <nl> - B ( LdaCurrentContextSlot ) , U8 ( 5 ) , <nl> + B ( Mov ) , R ( 4 ) , R ( 1 ) , <nl> + B ( Ldar ) , R ( 1 ) , <nl> / * 24 S > * / B ( Return ) , <nl> ] <nl> constant pool : [ <nl> - Smi [ 47 ] , <nl> + Smi [ 43 ] , <nl> FIXED_ARRAY_TYPE , <nl> Smi [ 10 ] , <nl> Smi [ 7 ] , <nl> snippet : " <nl> goo ( 42 ) ; <nl> { let x ; { goo ( 42 ) } } ; <nl> " <nl> - frame size : 6 <nl> + frame size : 7 <nl> parameter count : 2 <nl> - bytecode array length : 140 <nl> + bytecode array length : 121 <nl> bytecodes : [ <nl> B ( Ldar ) , R ( 1 ) , <nl> B ( JumpIfUndefined ) , U8 ( 18 ) , <nl> B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 1 ) , U8 ( 1 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> + B ( PushContext ) , R ( 4 ) , <nl> B ( RestoreGeneratorState ) , R ( 1 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( Star ) , R ( 3 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> B ( Abort ) , U8 ( 42 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( Star ) , R ( 3 ) , <nl> B ( LdaConstant ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> - B ( Mov ) , R ( arg0 ) , R ( 2 ) , <nl> - B ( Mov ) , R ( closure ) , R ( 3 ) , <nl> - B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 2 ) , U8 ( 3 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( Mov ) , R ( this ) , R ( 4 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 3 ) , U8 ( 2 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> - / * 0 E > * / B ( StackCheck ) , <nl> + B ( Star ) , R ( 6 ) , <nl> + B ( Mov ) , R ( arg0 ) , R ( 4 ) , <nl> + B ( Mov ) , R ( closure ) , R ( 5 ) , <nl> + B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 4 ) , U8 ( 3 ) , <nl> + B ( PushContext ) , R ( 4 ) , <nl> + B ( Mov ) , R ( this ) , R ( 6 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 5 ) , U8 ( 2 ) , <nl> B ( Star ) , R ( 1 ) , <nl> - B ( LdaImmutableCurrentContextSlot ) , U8 ( 4 ) , <nl> - / * 0 E > * / B ( SuspendGenerator ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , U8 ( 0 ) , <nl> + / * 0 E > * / B ( StackCheck ) , <nl> + / * 0 E > * / B ( SuspendGenerator ) , R ( 1 ) , R ( 0 ) , U8 ( 5 ) , U8 ( 0 ) , <nl> / * 64 S > * / B ( Return ) , <nl> - B ( RestoreGeneratorRegisters ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , <nl> + B ( RestoreGeneratorRegisters ) , R ( 1 ) , R ( 0 ) , U8 ( 5 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 1 ) , U8 ( 1 ) , <nl> B ( Star ) , R ( 3 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 1 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 1 ) , U8 ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 2 ) , U8 ( 2 ) , I8 ( 0 ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 5 ) , <nl> / * 0 E > * / B ( Throw ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 5 ) , <nl> / * 64 S > * / B ( Return ) , <nl> / * 32 S > * / B ( LdaModuleVariable ) , I8 ( - 1 ) , U8 ( 0 ) , <nl> B ( ThrowReferenceErrorIfHole ) , U8 ( 4 ) , <nl> - B ( Star ) , R ( 3 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> B ( LdaSmi ) , I8 ( 42 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> - / * 32 E > * / B ( CallUndefinedReceiver1 ) , R ( 3 ) , R ( 4 ) , U8 ( 0 ) , <nl> - B ( Ldar ) , R ( closure ) , <nl> - B ( CreateBlockContext ) , U8 ( 5 ) , <nl> - B ( PushContext ) , R ( 3 ) , <nl> - B ( LdaTheHole ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> + B ( Star ) , R ( 6 ) , <nl> + / * 32 E > * / B ( CallUndefinedReceiver1 ) , R ( 5 ) , R ( 6 ) , U8 ( 0 ) , <nl> / * 47 S > * / B ( LdaUndefined ) , <nl> - / * 47 E > * / B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> - / * 52 S > * / B ( LdaModuleVariable ) , I8 ( - 1 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 0 ) , <nl> + / * 52 S > * / B ( LdaModuleVariable ) , I8 ( - 1 ) , U8 ( 0 ) , <nl> B ( ThrowReferenceErrorIfHole ) , U8 ( 4 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> - B ( LdaSmi ) , I8 ( 42 ) , <nl> B ( Star ) , R ( 5 ) , <nl> - / * 52 E > * / B ( CallUndefinedReceiver1 ) , R ( 4 ) , R ( 5 ) , U8 ( 2 ) , <nl> - B ( StaContextSlot ) , R ( 3 ) , U8 ( 5 ) , U8 ( 0 ) , <nl> - B ( PopContext ) , R ( 3 ) , <nl> - B ( LdaCurrentContextSlot ) , U8 ( 5 ) , <nl> + B ( LdaSmi ) , I8 ( 42 ) , <nl> + B ( Star ) , R ( 6 ) , <nl> + / * 52 E > * / B ( CallUndefinedReceiver1 ) , R ( 5 ) , R ( 6 ) , U8 ( 2 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> / * 64 S > * / B ( Return ) , <nl> ] <nl> constant pool : [ <nl> - Smi [ 47 ] , <nl> + Smi [ 43 ] , <nl> FIXED_ARRAY_TYPE , <nl> Smi [ 10 ] , <nl> Smi [ 7 ] , <nl> ONE_BYTE_INTERNALIZED_STRING_TYPE [ " goo " ] , <nl> - FIXED_ARRAY_TYPE , <nl> ] <nl> handlers : [ <nl> ] <nl> snippet : " <nl> foo + + ; <nl> { let x ; { foo + + } } ; <nl> " <nl> - frame size : 5 <nl> + frame size : 7 <nl> parameter count : 2 <nl> - bytecode array length : 137 <nl> + bytecode array length : 119 <nl> bytecodes : [ <nl> B ( Ldar ) , R ( 1 ) , <nl> B ( JumpIfUndefined ) , U8 ( 18 ) , <nl> B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 1 ) , U8 ( 1 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> + B ( PushContext ) , R ( 4 ) , <nl> B ( RestoreGeneratorState ) , R ( 1 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( Star ) , R ( 3 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> B ( Abort ) , U8 ( 42 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( Star ) , R ( 3 ) , <nl> B ( LdaConstant ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> - B ( Mov ) , R ( arg0 ) , R ( 2 ) , <nl> - B ( Mov ) , R ( closure ) , R ( 3 ) , <nl> - B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 2 ) , U8 ( 3 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( Mov ) , R ( this ) , R ( 4 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 3 ) , U8 ( 2 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> - / * 0 E > * / B ( StackCheck ) , <nl> + B ( Star ) , R ( 6 ) , <nl> + B ( Mov ) , R ( arg0 ) , R ( 4 ) , <nl> + B ( Mov ) , R ( closure ) , R ( 5 ) , <nl> + B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 4 ) , U8 ( 3 ) , <nl> + B ( PushContext ) , R ( 4 ) , <nl> + B ( Mov ) , R ( this ) , R ( 6 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 5 ) , U8 ( 2 ) , <nl> B ( Star ) , R ( 1 ) , <nl> - B ( LdaImmutableCurrentContextSlot ) , U8 ( 4 ) , <nl> - / * 0 E > * / B ( SuspendGenerator ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , U8 ( 0 ) , <nl> + / * 0 E > * / B ( StackCheck ) , <nl> + / * 0 E > * / B ( SuspendGenerator ) , R ( 1 ) , R ( 0 ) , U8 ( 5 ) , U8 ( 0 ) , <nl> / * 49 S > * / B ( Return ) , <nl> - B ( RestoreGeneratorRegisters ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , <nl> + B ( RestoreGeneratorRegisters ) , R ( 1 ) , R ( 0 ) , U8 ( 5 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 1 ) , U8 ( 1 ) , <nl> B ( Star ) , R ( 3 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 1 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 1 ) , U8 ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 2 ) , U8 ( 2 ) , I8 ( 0 ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 5 ) , <nl> / * 0 E > * / B ( Throw ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 5 ) , <nl> / * 49 S > * / B ( Return ) , <nl> / * 17 S > * / B ( LdaSmi ) , I8 ( 42 ) , <nl> / * 17 E > * / B ( StaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> / * 21 S > * / B ( LdaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> B ( Inc ) , U8 ( 0 ) , <nl> / * 24 E > * / B ( StaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> - B ( Ldar ) , R ( closure ) , <nl> - B ( CreateBlockContext ) , U8 ( 4 ) , <nl> - B ( PushContext ) , R ( 3 ) , <nl> - B ( LdaTheHole ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> / * 34 S > * / B ( LdaUndefined ) , <nl> - / * 34 E > * / B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> - / * 39 S > * / B ( LdaModuleVariable ) , I8 ( 1 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 0 ) , <nl> + / * 39 S > * / B ( LdaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> B ( ToNumeric ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> B ( Inc ) , U8 ( 1 ) , <nl> - / * 42 E > * / B ( StaModuleVariable ) , I8 ( 1 ) , U8 ( 1 ) , <nl> - B ( Ldar ) , R ( 4 ) , <nl> - B ( StaContextSlot ) , R ( 3 ) , U8 ( 5 ) , U8 ( 0 ) , <nl> - B ( PopContext ) , R ( 3 ) , <nl> - B ( LdaCurrentContextSlot ) , U8 ( 5 ) , <nl> + / * 42 E > * / B ( StaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> + B ( Mov ) , R ( 5 ) , R ( 2 ) , <nl> + B ( Ldar ) , R ( 2 ) , <nl> / * 49 S > * / B ( Return ) , <nl> ] <nl> constant pool : [ <nl> - Smi [ 47 ] , <nl> + Smi [ 43 ] , <nl> FIXED_ARRAY_TYPE , <nl> Smi [ 10 ] , <nl> Smi [ 7 ] , <nl> - FIXED_ARRAY_TYPE , <nl> ] <nl> handlers : [ <nl> ] <nl> snippet : " <nl> foo + + ; <nl> { let x ; { foo + + } } ; <nl> " <nl> - frame size : 5 <nl> + frame size : 7 <nl> parameter count : 2 <nl> - bytecode array length : 141 <nl> + bytecode array length : 125 <nl> bytecodes : [ <nl> B ( Ldar ) , R ( 1 ) , <nl> B ( JumpIfUndefined ) , U8 ( 18 ) , <nl> B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 1 ) , U8 ( 1 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> + B ( PushContext ) , R ( 4 ) , <nl> B ( RestoreGeneratorState ) , R ( 1 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( Star ) , R ( 3 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> B ( Abort ) , U8 ( 42 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( Star ) , R ( 3 ) , <nl> B ( LdaConstant ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> - B ( Mov ) , R ( arg0 ) , R ( 2 ) , <nl> - B ( Mov ) , R ( closure ) , R ( 3 ) , <nl> - B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 2 ) , U8 ( 3 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( Mov ) , R ( this ) , R ( 4 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 3 ) , U8 ( 2 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> + B ( Star ) , R ( 6 ) , <nl> + B ( Mov ) , R ( arg0 ) , R ( 4 ) , <nl> + B ( Mov ) , R ( closure ) , R ( 5 ) , <nl> + B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 4 ) , U8 ( 3 ) , <nl> + B ( PushContext ) , R ( 4 ) , <nl> + B ( Mov ) , R ( this ) , R ( 6 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 5 ) , U8 ( 2 ) , <nl> B ( Star ) , R ( 1 ) , <nl> B ( LdaTheHole ) , <nl> B ( StaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> / * 0 E > * / B ( StackCheck ) , <nl> - B ( LdaImmutableCurrentContextSlot ) , U8 ( 4 ) , <nl> - / * 0 E > * / B ( SuspendGenerator ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , U8 ( 0 ) , <nl> + B ( Ldar ) , R ( 1 ) , <nl> + / * 0 E > * / B ( SuspendGenerator ) , R ( 1 ) , R ( 0 ) , U8 ( 5 ) , U8 ( 0 ) , <nl> / * 49 S > * / B ( Return ) , <nl> - B ( RestoreGeneratorRegisters ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , <nl> + B ( RestoreGeneratorRegisters ) , R ( 1 ) , R ( 0 ) , U8 ( 5 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 1 ) , U8 ( 1 ) , <nl> B ( Star ) , R ( 3 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 1 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 1 ) , U8 ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 2 ) , U8 ( 2 ) , I8 ( 0 ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 5 ) , <nl> / * 0 E > * / B ( Throw ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 5 ) , <nl> / * 49 S > * / B ( Return ) , <nl> / * 17 S > * / B ( LdaSmi ) , I8 ( 42 ) , <nl> / * 17 E > * / B ( StaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> / * 21 S > * / B ( LdaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> B ( Inc ) , U8 ( 0 ) , <nl> / * 24 E > * / B ( StaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> - B ( Ldar ) , R ( closure ) , <nl> - B ( CreateBlockContext ) , U8 ( 4 ) , <nl> - B ( PushContext ) , R ( 3 ) , <nl> - B ( LdaTheHole ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> / * 34 S > * / B ( LdaUndefined ) , <nl> - / * 34 E > * / B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> - / * 39 S > * / B ( LdaModuleVariable ) , I8 ( 1 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 0 ) , <nl> + / * 39 S > * / B ( LdaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> B ( ToNumeric ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> B ( Inc ) , U8 ( 1 ) , <nl> - / * 42 E > * / B ( StaModuleVariable ) , I8 ( 1 ) , U8 ( 1 ) , <nl> - B ( Ldar ) , R ( 4 ) , <nl> - B ( StaContextSlot ) , R ( 3 ) , U8 ( 5 ) , U8 ( 0 ) , <nl> - B ( PopContext ) , R ( 3 ) , <nl> - B ( LdaCurrentContextSlot ) , U8 ( 5 ) , <nl> + / * 42 E > * / B ( StaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> + B ( Mov ) , R ( 5 ) , R ( 2 ) , <nl> + B ( Ldar ) , R ( 2 ) , <nl> / * 49 S > * / B ( Return ) , <nl> ] <nl> constant pool : [ <nl> - Smi [ 51 ] , <nl> + Smi [ 49 ] , <nl> FIXED_ARRAY_TYPE , <nl> Smi [ 10 ] , <nl> Smi [ 7 ] , <nl> - FIXED_ARRAY_TYPE , <nl> ] <nl> handlers : [ <nl> ] <nl> snippet : " <nl> foo + + ; <nl> { let x ; { foo + + } } ; <nl> " <nl> - frame size : 5 <nl> + frame size : 7 <nl> parameter count : 2 <nl> - bytecode array length : 145 <nl> + bytecode array length : 129 <nl> bytecodes : [ <nl> B ( Ldar ) , R ( 1 ) , <nl> B ( JumpIfUndefined ) , U8 ( 18 ) , <nl> B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 1 ) , U8 ( 1 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> + B ( PushContext ) , R ( 4 ) , <nl> B ( RestoreGeneratorState ) , R ( 1 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( Star ) , R ( 3 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> B ( Abort ) , U8 ( 42 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( Star ) , R ( 3 ) , <nl> B ( LdaConstant ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> - B ( Mov ) , R ( arg0 ) , R ( 2 ) , <nl> - B ( Mov ) , R ( closure ) , R ( 3 ) , <nl> - B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 2 ) , U8 ( 3 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( Mov ) , R ( this ) , R ( 4 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 3 ) , U8 ( 2 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> + B ( Star ) , R ( 6 ) , <nl> + B ( Mov ) , R ( arg0 ) , R ( 4 ) , <nl> + B ( Mov ) , R ( closure ) , R ( 5 ) , <nl> + B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 4 ) , U8 ( 3 ) , <nl> + B ( PushContext ) , R ( 4 ) , <nl> + B ( Mov ) , R ( this ) , R ( 6 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 5 ) , U8 ( 2 ) , <nl> B ( Star ) , R ( 1 ) , <nl> B ( LdaTheHole ) , <nl> B ( StaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> / * 0 E > * / B ( StackCheck ) , <nl> - B ( LdaImmutableCurrentContextSlot ) , U8 ( 4 ) , <nl> - / * 0 E > * / B ( SuspendGenerator ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , U8 ( 0 ) , <nl> + B ( Ldar ) , R ( 1 ) , <nl> + / * 0 E > * / B ( SuspendGenerator ) , R ( 1 ) , R ( 0 ) , U8 ( 5 ) , U8 ( 0 ) , <nl> / * 51 S > * / B ( Return ) , <nl> - B ( RestoreGeneratorRegisters ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , <nl> + B ( RestoreGeneratorRegisters ) , R ( 1 ) , R ( 0 ) , U8 ( 5 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 1 ) , U8 ( 1 ) , <nl> B ( Star ) , R ( 3 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 1 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 1 ) , U8 ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 2 ) , U8 ( 2 ) , I8 ( 0 ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 5 ) , <nl> / * 0 E > * / B ( Throw ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 5 ) , <nl> / * 51 S > * / B ( Return ) , <nl> / * 19 S > * / B ( LdaSmi ) , I8 ( 42 ) , <nl> / * 19 E > * / B ( StaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> / * 23 S > * / B ( LdaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> B ( Inc ) , U8 ( 0 ) , <nl> / * 26 E > * / B ( CallRuntime ) , U16 ( Runtime : : kThrowConstAssignError ) , R ( 0 ) , U8 ( 0 ) , <nl> - B ( Ldar ) , R ( closure ) , <nl> - B ( CreateBlockContext ) , U8 ( 4 ) , <nl> - B ( PushContext ) , R ( 3 ) , <nl> - B ( LdaTheHole ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> / * 36 S > * / B ( LdaUndefined ) , <nl> - / * 36 E > * / B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> - / * 41 S > * / B ( LdaModuleVariable ) , I8 ( 1 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 0 ) , <nl> + / * 41 S > * / B ( LdaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> B ( ToNumeric ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> B ( Inc ) , U8 ( 1 ) , <nl> / * 44 E > * / B ( CallRuntime ) , U16 ( Runtime : : kThrowConstAssignError ) , R ( 0 ) , U8 ( 0 ) , <nl> - B ( Ldar ) , R ( 4 ) , <nl> - B ( StaContextSlot ) , R ( 3 ) , U8 ( 5 ) , U8 ( 0 ) , <nl> - B ( PopContext ) , R ( 3 ) , <nl> - B ( LdaCurrentContextSlot ) , U8 ( 5 ) , <nl> + B ( Mov ) , R ( 5 ) , R ( 2 ) , <nl> + B ( Ldar ) , R ( 2 ) , <nl> / * 51 S > * / B ( Return ) , <nl> ] <nl> constant pool : [ <nl> - Smi [ 51 ] , <nl> + Smi [ 49 ] , <nl> FIXED_ARRAY_TYPE , <nl> Smi [ 10 ] , <nl> Smi [ 7 ] , <nl> - FIXED_ARRAY_TYPE , <nl> ] <nl> handlers : [ <nl> ] <nl> handlers : [ <nl> snippet : " <nl> export default ( function ( ) { } ) ; <nl> " <nl> - frame size : 5 <nl> + frame size : 6 <nl> parameter count : 2 <nl> - bytecode array length : 107 <nl> + bytecode array length : 104 <nl> bytecodes : [ <nl> - B ( Ldar ) , R ( 1 ) , <nl> + B ( Ldar ) , R ( 0 ) , <nl> B ( JumpIfUndefined ) , U8 ( 18 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 1 ) , U8 ( 1 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( RestoreGeneratorState ) , R ( 1 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 0 ) , U8 ( 1 ) , <nl> + B ( PushContext ) , R ( 3 ) , <nl> + B ( RestoreGeneratorState ) , R ( 0 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> B ( Abort ) , U8 ( 42 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> B ( LdaConstant ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> - B ( Mov ) , R ( arg0 ) , R ( 2 ) , <nl> - B ( Mov ) , R ( closure ) , R ( 3 ) , <nl> - B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 2 ) , U8 ( 3 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( Mov ) , R ( this ) , R ( 4 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 3 ) , U8 ( 2 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> - B ( Star ) , R ( 1 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> + B ( Mov ) , R ( arg0 ) , R ( 3 ) , <nl> + B ( Mov ) , R ( closure ) , R ( 4 ) , <nl> + B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 3 ) , U8 ( 3 ) , <nl> + B ( PushContext ) , R ( 3 ) , <nl> + B ( Mov ) , R ( this ) , R ( 5 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 4 ) , U8 ( 2 ) , <nl> + B ( Star ) , R ( 0 ) , <nl> B ( LdaTheHole ) , <nl> B ( StaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> / * 0 E > * / B ( StackCheck ) , <nl> - B ( LdaImmutableCurrentContextSlot ) , U8 ( 4 ) , <nl> - / * 0 E > * / B ( SuspendGenerator ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , U8 ( 0 ) , <nl> + B ( Ldar ) , R ( 0 ) , <nl> + / * 0 E > * / B ( SuspendGenerator ) , R ( 0 ) , R ( 0 ) , U8 ( 4 ) , U8 ( 0 ) , <nl> / * 32 S > * / B ( Return ) , <nl> - B ( RestoreGeneratorRegisters ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , <nl> + B ( RestoreGeneratorRegisters ) , R ( 0 ) , R ( 0 ) , U8 ( 4 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 1 ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 3 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 1 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 0 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 4 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 0 ) , U8 ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 2 ) , U8 ( 2 ) , I8 ( 0 ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 4 ) , <nl> / * 0 E > * / B ( Throw ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 4 ) , <nl> / * 32 S > * / B ( Return ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 5 ) , <nl> + B ( Mov ) , R ( 4 ) , R ( 1 ) , <nl> B ( CreateClosure ) , U8 ( 4 ) , U8 ( 0 ) , U8 ( 0 ) , <nl> B ( StaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> - B ( LdaCurrentContextSlot ) , U8 ( 5 ) , <nl> + B ( Ldar ) , R ( 1 ) , <nl> / * 32 S > * / B ( Return ) , <nl> ] <nl> constant pool : [ <nl> - Smi [ 51 ] , <nl> + Smi [ 49 ] , <nl> FIXED_ARRAY_TYPE , <nl> Smi [ 10 ] , <nl> Smi [ 7 ] , <nl> handlers : [ <nl> snippet : " <nl> export default ( class { } ) ; <nl> " <nl> - frame size : 7 <nl> + frame size : 8 <nl> parameter count : 2 <nl> - bytecode array length : 128 <nl> + bytecode array length : 125 <nl> bytecodes : [ <nl> - B ( Ldar ) , R ( 1 ) , <nl> + B ( Ldar ) , R ( 0 ) , <nl> B ( JumpIfUndefined ) , U8 ( 18 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 1 ) , U8 ( 1 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( RestoreGeneratorState ) , R ( 1 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 0 ) , U8 ( 1 ) , <nl> + B ( PushContext ) , R ( 3 ) , <nl> + B ( RestoreGeneratorState ) , R ( 0 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> B ( Abort ) , U8 ( 42 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> B ( LdaConstant ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> - B ( Mov ) , R ( arg0 ) , R ( 2 ) , <nl> - B ( Mov ) , R ( closure ) , R ( 3 ) , <nl> - B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 2 ) , U8 ( 3 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( Mov ) , R ( this ) , R ( 4 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 3 ) , U8 ( 2 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> - B ( Star ) , R ( 1 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> + B ( Mov ) , R ( arg0 ) , R ( 3 ) , <nl> + B ( Mov ) , R ( closure ) , R ( 4 ) , <nl> + B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 3 ) , U8 ( 3 ) , <nl> + B ( PushContext ) , R ( 3 ) , <nl> + B ( Mov ) , R ( this ) , R ( 5 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 4 ) , U8 ( 2 ) , <nl> + B ( Star ) , R ( 0 ) , <nl> B ( LdaTheHole ) , <nl> B ( StaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> / * 0 E > * / B ( StackCheck ) , <nl> - B ( LdaImmutableCurrentContextSlot ) , U8 ( 4 ) , <nl> - / * 0 E > * / B ( SuspendGenerator ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , U8 ( 0 ) , <nl> + B ( Ldar ) , R ( 0 ) , <nl> + / * 0 E > * / B ( SuspendGenerator ) , R ( 0 ) , R ( 0 ) , U8 ( 4 ) , U8 ( 0 ) , <nl> / * 26 S > * / B ( Return ) , <nl> - B ( RestoreGeneratorRegisters ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , <nl> + B ( RestoreGeneratorRegisters ) , R ( 0 ) , R ( 0 ) , U8 ( 4 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 1 ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 3 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 1 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 0 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 4 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 0 ) , U8 ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 2 ) , U8 ( 2 ) , I8 ( 0 ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 4 ) , <nl> / * 0 E > * / B ( Throw ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 4 ) , <nl> / * 26 S > * / B ( Return ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 5 ) , <nl> + B ( Mov ) , R ( 4 ) , R ( 1 ) , <nl> B ( LdaTheHole ) , <nl> - B ( Star ) , R ( 6 ) , <nl> + B ( Star ) , R ( 7 ) , <nl> B ( CreateClosure ) , U8 ( 5 ) , U8 ( 0 ) , U8 ( 0 ) , <nl> - B ( Star ) , R ( 3 ) , <nl> - B ( LdaConstant ) , U8 ( 4 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> - B ( Mov ) , R ( 3 ) , R ( 5 ) , <nl> - B ( CallRuntime ) , U16 ( Runtime : : kDefineClass ) , R ( 4 ) , U8 ( 3 ) , <nl> B ( Star ) , R ( 4 ) , <nl> - B ( Ldar ) , R ( 5 ) , <nl> + B ( LdaConstant ) , U8 ( 4 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> + B ( Mov ) , R ( 4 ) , R ( 6 ) , <nl> + B ( CallRuntime ) , U16 ( Runtime : : kDefineClass ) , R ( 5 ) , U8 ( 3 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> + B ( Ldar ) , R ( 6 ) , <nl> B ( StaModuleVariable ) , I8 ( 1 ) , U8 ( 0 ) , <nl> - B ( LdaCurrentContextSlot ) , U8 ( 5 ) , <nl> + B ( Ldar ) , R ( 1 ) , <nl> / * 26 S > * / B ( Return ) , <nl> ] <nl> constant pool : [ <nl> - Smi [ 51 ] , <nl> + Smi [ 49 ] , <nl> FIXED_ARRAY_TYPE , <nl> Smi [ 10 ] , <nl> Smi [ 7 ] , <nl> handlers : [ <nl> snippet : " <nl> export { foo as goo } from \ " bar \ " <nl> " <nl> - frame size : 5 <nl> + frame size : 6 <nl> parameter count : 2 <nl> - bytecode array length : 96 <nl> + bytecode array length : 91 <nl> bytecodes : [ <nl> - B ( Ldar ) , R ( 1 ) , <nl> + B ( Ldar ) , R ( 0 ) , <nl> B ( JumpIfUndefined ) , U8 ( 18 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 1 ) , U8 ( 1 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( RestoreGeneratorState ) , R ( 1 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 0 ) , U8 ( 1 ) , <nl> + B ( PushContext ) , R ( 3 ) , <nl> + B ( RestoreGeneratorState ) , R ( 0 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> B ( Abort ) , U8 ( 42 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> B ( LdaConstant ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> - B ( Mov ) , R ( arg0 ) , R ( 2 ) , <nl> - B ( Mov ) , R ( closure ) , R ( 3 ) , <nl> - B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 2 ) , U8 ( 3 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( Mov ) , R ( this ) , R ( 4 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 3 ) , U8 ( 2 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> + B ( Mov ) , R ( arg0 ) , R ( 3 ) , <nl> + B ( Mov ) , R ( closure ) , R ( 4 ) , <nl> + B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 3 ) , U8 ( 3 ) , <nl> + B ( PushContext ) , R ( 3 ) , <nl> + B ( Mov ) , R ( this ) , R ( 5 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 4 ) , U8 ( 2 ) , <nl> + B ( Star ) , R ( 0 ) , <nl> / * 0 E > * / B ( StackCheck ) , <nl> - B ( Star ) , R ( 1 ) , <nl> - B ( LdaImmutableCurrentContextSlot ) , U8 ( 4 ) , <nl> - / * 0 E > * / B ( SuspendGenerator ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , U8 ( 0 ) , <nl> + / * 0 E > * / B ( SuspendGenerator ) , R ( 0 ) , R ( 0 ) , U8 ( 4 ) , U8 ( 0 ) , <nl> / * 30 S > * / B ( Return ) , <nl> - B ( RestoreGeneratorRegisters ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , <nl> + B ( RestoreGeneratorRegisters ) , R ( 0 ) , R ( 0 ) , U8 ( 4 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 1 ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 3 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 1 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 0 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 4 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 0 ) , U8 ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 2 ) , U8 ( 2 ) , I8 ( 0 ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 4 ) , <nl> / * 0 E > * / B ( Throw ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 4 ) , <nl> / * 30 S > * / B ( Return ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 5 ) , <nl> - B ( LdaCurrentContextSlot ) , U8 ( 5 ) , <nl> + B ( Mov ) , R ( 4 ) , R ( 1 ) , <nl> + B ( Ldar ) , R ( 1 ) , <nl> / * 30 S > * / B ( Return ) , <nl> ] <nl> constant pool : [ <nl> - Smi [ 47 ] , <nl> + Smi [ 43 ] , <nl> FIXED_ARRAY_TYPE , <nl> Smi [ 10 ] , <nl> Smi [ 7 ] , <nl> handlers : [ <nl> snippet : " <nl> export * from \ " bar \ " <nl> " <nl> - frame size : 5 <nl> + frame size : 6 <nl> parameter count : 2 <nl> - bytecode array length : 96 <nl> + bytecode array length : 91 <nl> bytecodes : [ <nl> - B ( Ldar ) , R ( 1 ) , <nl> + B ( Ldar ) , R ( 0 ) , <nl> B ( JumpIfUndefined ) , U8 ( 18 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 1 ) , U8 ( 1 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( RestoreGeneratorState ) , R ( 1 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 0 ) , U8 ( 1 ) , <nl> + B ( PushContext ) , R ( 3 ) , <nl> + B ( RestoreGeneratorState ) , R ( 0 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> B ( Abort ) , U8 ( 42 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> B ( LdaConstant ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> - B ( Mov ) , R ( arg0 ) , R ( 2 ) , <nl> - B ( Mov ) , R ( closure ) , R ( 3 ) , <nl> - B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 2 ) , U8 ( 3 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( Mov ) , R ( this ) , R ( 4 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 3 ) , U8 ( 2 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> + B ( Mov ) , R ( arg0 ) , R ( 3 ) , <nl> + B ( Mov ) , R ( closure ) , R ( 4 ) , <nl> + B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 3 ) , U8 ( 3 ) , <nl> + B ( PushContext ) , R ( 3 ) , <nl> + B ( Mov ) , R ( this ) , R ( 5 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 4 ) , U8 ( 2 ) , <nl> + B ( Star ) , R ( 0 ) , <nl> / * 0 E > * / B ( StackCheck ) , <nl> - B ( Star ) , R ( 1 ) , <nl> - B ( LdaImmutableCurrentContextSlot ) , U8 ( 4 ) , <nl> - / * 0 E > * / B ( SuspendGenerator ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , U8 ( 0 ) , <nl> + / * 0 E > * / B ( SuspendGenerator ) , R ( 0 ) , R ( 0 ) , U8 ( 4 ) , U8 ( 0 ) , <nl> / * 19 S > * / B ( Return ) , <nl> - B ( RestoreGeneratorRegisters ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , <nl> + B ( RestoreGeneratorRegisters ) , R ( 0 ) , R ( 0 ) , U8 ( 4 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 1 ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 3 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 1 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 0 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 4 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 0 ) , U8 ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 2 ) , U8 ( 2 ) , I8 ( 0 ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 4 ) , <nl> / * 0 E > * / B ( Throw ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 4 ) , <nl> / * 19 S > * / B ( Return ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 5 ) , <nl> - B ( LdaCurrentContextSlot ) , U8 ( 5 ) , <nl> + B ( Mov ) , R ( 4 ) , R ( 1 ) , <nl> + B ( Ldar ) , R ( 1 ) , <nl> / * 19 S > * / B ( Return ) , <nl> ] <nl> constant pool : [ <nl> - Smi [ 47 ] , <nl> + Smi [ 43 ] , <nl> FIXED_ARRAY_TYPE , <nl> Smi [ 10 ] , <nl> Smi [ 7 ] , <nl> snippet : " <nl> import * as foo from \ " bar \ " <nl> foo . f ( foo , foo . x ) ; <nl> " <nl> - frame size : 7 <nl> + frame size : 9 <nl> parameter count : 2 <nl> - bytecode array length : 134 <nl> + bytecode array length : 118 <nl> bytecodes : [ <nl> - B ( Ldar ) , R ( 1 ) , <nl> + B ( Ldar ) , R ( 0 ) , <nl> B ( JumpIfUndefined ) , U8 ( 18 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 1 ) , U8 ( 1 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( RestoreGeneratorState ) , R ( 1 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetContext ) , R ( 0 ) , U8 ( 1 ) , <nl> + B ( PushContext ) , R ( 4 ) , <nl> + B ( RestoreGeneratorState ) , R ( 0 ) , <nl> + B ( Star ) , R ( 3 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 0 ) , U8 ( 1 ) , I8 ( 0 ) , <nl> B ( Abort ) , U8 ( 42 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> + B ( Star ) , R ( 3 ) , <nl> B ( LdaConstant ) , U8 ( 1 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> - B ( Mov ) , R ( arg0 ) , R ( 2 ) , <nl> - B ( Mov ) , R ( closure ) , R ( 3 ) , <nl> - B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 2 ) , U8 ( 3 ) , <nl> - B ( PushContext ) , R ( 2 ) , <nl> - B ( Mov ) , R ( this ) , R ( 4 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 3 ) , U8 ( 2 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 4 ) , <nl> - B ( Star ) , R ( 1 ) , <nl> + B ( Star ) , R ( 6 ) , <nl> + B ( Mov ) , R ( arg0 ) , R ( 4 ) , <nl> + B ( Mov ) , R ( closure ) , R ( 5 ) , <nl> + B ( CallRuntime ) , U16 ( Runtime : : kPushModuleContext ) , R ( 4 ) , U8 ( 3 ) , <nl> + B ( PushContext ) , R ( 4 ) , <nl> + B ( Mov ) , R ( this ) , R ( 6 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_CreateJSGeneratorObject ) , R ( 5 ) , U8 ( 2 ) , <nl> + B ( Star ) , R ( 0 ) , <nl> B ( LdaZero ) , <nl> - B ( Star ) , R ( 3 ) , <nl> - B ( CallRuntime ) , U16 ( Runtime : : kGetModuleNamespace ) , R ( 3 ) , U8 ( 1 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 5 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> + B ( CallRuntime ) , U16 ( Runtime : : kGetModuleNamespace ) , R ( 5 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 1 ) , <nl> / * 0 E > * / B ( StackCheck ) , <nl> - B ( LdaImmutableCurrentContextSlot ) , U8 ( 4 ) , <nl> - / * 0 E > * / B ( SuspendGenerator ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , U8 ( 0 ) , <nl> + B ( Ldar ) , R ( 0 ) , <nl> + / * 0 E > * / B ( SuspendGenerator ) , R ( 0 ) , R ( 0 ) , U8 ( 5 ) , U8 ( 0 ) , <nl> / * 45 S > * / B ( Return ) , <nl> - B ( RestoreGeneratorRegisters ) , R ( 1 ) , R ( 0 ) , U8 ( 3 ) , <nl> + B ( RestoreGeneratorRegisters ) , R ( 0 ) , R ( 0 ) , U8 ( 5 ) , <nl> B ( LdaSmi ) , I8 ( - 2 ) , <nl> - B ( Star ) , R ( 0 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 1 ) , U8 ( 1 ) , <nl> B ( Star ) , R ( 3 ) , <nl> - B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 1 ) , U8 ( 1 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetInputOrDebugPos ) , R ( 0 ) , U8 ( 1 ) , <nl> + B ( Star ) , R ( 5 ) , <nl> + B ( InvokeIntrinsic ) , U8 ( Runtime : : k_GeneratorGetResumeMode ) , R ( 0 ) , U8 ( 1 ) , <nl> B ( SwitchOnSmiNoFeedback ) , U8 ( 2 ) , U8 ( 2 ) , I8 ( 0 ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 5 ) , <nl> / * 0 E > * / B ( Throw ) , <nl> - B ( Ldar ) , R ( 3 ) , <nl> + B ( Ldar ) , R ( 5 ) , <nl> / * 45 S > * / B ( Return ) , <nl> - / * 27 S > * / B ( LdaImmutableCurrentContextSlot ) , U8 ( 5 ) , <nl> - B ( Star ) , R ( 4 ) , <nl> - / * 31 E > * / B ( LdaNamedProperty ) , R ( 4 ) , U8 ( 4 ) , U8 ( 0 ) , <nl> - B ( Star ) , R ( 3 ) , <nl> - B ( LdaImmutableCurrentContextSlot ) , U8 ( 5 ) , <nl> + / * 31 S > * / B ( LdaNamedProperty ) , R ( 1 ) , U8 ( 4 ) , U8 ( 0 ) , <nl> B ( Star ) , R ( 5 ) , <nl> - B ( LdaImmutableCurrentContextSlot ) , U8 ( 5 ) , <nl> - B ( Star ) , R ( 6 ) , <nl> - / * 42 E > * / B ( LdaNamedProperty ) , R ( 6 ) , U8 ( 5 ) , U8 ( 2 ) , <nl> - B ( Star ) , R ( 6 ) , <nl> - / * 31 E > * / B ( CallProperty2 ) , R ( 3 ) , R ( 4 ) , R ( 5 ) , R ( 6 ) , U8 ( 4 ) , <nl> - B ( StaCurrentContextSlot ) , U8 ( 6 ) , <nl> - B ( LdaCurrentContextSlot ) , U8 ( 6 ) , <nl> + / * 42 E > * / B ( LdaNamedProperty ) , R ( 1 ) , U8 ( 5 ) , U8 ( 2 ) , <nl> + B ( Star ) , R ( 8 ) , <nl> + / * 31 E > * / B ( CallProperty2 ) , R ( 5 ) , R ( 1 ) , R ( 1 ) , R ( 8 ) , U8 ( 4 ) , <nl> + B ( Star ) , R ( 2 ) , <nl> / * 45 S > * / B ( Return ) , <nl> ] <nl> constant pool : [ <nl> - Smi [ 57 ] , <nl> + Smi [ 55 ] , <nl> FIXED_ARRAY_TYPE , <nl> Smi [ 10 ] , <nl> Smi [ 7 ] , <nl> mmm a / test / cctest / test - parsing . cc <nl> ppp b / test / cctest / test - parsing . cc <nl> TEST ( ModuleParsingInternals ) { <nl> <nl> CHECK ( declarations - > AtForTest ( 8 ) - > proxy ( ) - > raw_name ( ) - > IsOneByteEqualTo ( <nl> " nonexport " ) ) ; <nl> - CHECK ( declarations - > AtForTest ( 8 ) - > proxy ( ) - > var ( ) - > binding_needs_init ( ) ) ; <nl> - CHECK ( declarations - > AtForTest ( 8 ) - > proxy ( ) - > var ( ) - > location ( ) ! = <nl> - i : : VariableLocation : : MODULE ) ; <nl> + CHECK ( ! declarations - > AtForTest ( 8 ) - > proxy ( ) - > var ( ) - > binding_needs_init ( ) ) ; <nl> + CHECK ( declarations - > AtForTest ( 8 ) - > proxy ( ) - > var ( ) - > location ( ) = = <nl> + i : : VariableLocation : : LOCAL ) ; <nl> <nl> CHECK ( <nl> declarations - > AtForTest ( 9 ) - > proxy ( ) - > raw_name ( ) - > IsOneByteEqualTo ( " mm " ) ) ; <nl> mmm a / test / debugger / debug / debug - modules - set - variable - value . js <nl> ppp b / test / debugger / debug / debug - modules - set - variable - value . js <nl> let salad = 12 ; <nl> function listener ( event , exec_state ) { <nl> if ( event = = Debug . DebugEvent . Break ) { <nl> let scope_count = exec_state . frame ( ) . scopeCount ( ) ; <nl> - let module_scope = exec_state . frame ( ) . scope ( 2 ) ; <nl> + let module_scope = exec_state . frame ( ) . scope ( 1 ) ; <nl> assertEquals ( debug . ScopeType . Module , module_scope . scopeType ( ) ) ; <nl> module_scope . setVariableValue ( ' salad ' , 42 ) ; <nl> } <nl> export let ham = 1 ; <nl> function listener ( event , exec_state ) { <nl> if ( event = = Debug . DebugEvent . Break ) { <nl> let scope_count = exec_state . frame ( ) . scopeCount ( ) ; <nl> - let module_scope = exec_state . frame ( ) . scope ( 2 ) ; <nl> + let module_scope = exec_state . frame ( ) . scope ( 1 ) ; <nl> assertEquals ( debug . ScopeType . Module , module_scope . scopeType ( ) ) ; <nl> module_scope . setVariableValue ( ' ham ' , 2 ) ; <nl> } <nl> mmm a / test / debugger / debug / harmony / modules - debug - scopes2 . js <nl> ppp b / test / debugger / debug / harmony / modules - debug - scopes2 . js <nl> listener_delegate = function ( exec_state ) { <nl> debug . ScopeType . Script , <nl> debug . ScopeType . Global ] , exec_state ) ; <nl> CheckScopeContent ( <nl> - { local_var : undefined , exported_var : undefined , imported_var : undefined } , <nl> + { exported_var : undefined , imported_var : undefined } , <nl> 0 , exec_state ) ; <nl> CheckScopeDoesNotHave ( <nl> - [ " doesnotexist " , " local_let " , " exported_let " , " imported_let " ] , <nl> + [ " local_var " , " doesntexist " , " local_let " , " exported_let " , " imported_let " ] , <nl> 0 , exec_state ) ; <nl> } ; <nl> debugger ; <nl> listener_delegate = function ( exec_state ) { <nl> debug . ScopeType . Script , <nl> debug . ScopeType . Global ] , exec_state ) ; <nl> CheckScopeContent ( <nl> - { local_let : 1 , local_var : 2 , exported_let : 3 , exported_var : 4 , <nl> + { exported_let : 3 , exported_var : 4 , <nl> imported_let : 3 , imported_var : 4 } , 0 , exec_state ) ; <nl> + CheckScopeDoesNotHave ( [ " local_var " , " local_let " ] , 0 , exec_state ) ; <nl> } ; <nl> debugger ; <nl> EndTest ( ) ; <nl> listener_delegate = function ( exec_state ) { <nl> debug . ScopeType . Script , <nl> debug . ScopeType . Global ] , exec_state ) ; <nl> CheckScopeContent ( <nl> - { local_let : 11 , local_var : 12 , exported_let : 13 , exported_var : 14 , <nl> + { exported_let : 13 , exported_var : 14 , <nl> imported_let : 13 , imported_var : 14 } , 0 , exec_state ) ; <nl> + CheckScopeDoesNotHave ( [ " local_var " , " local_let " ] , 0 , exec_state ) ; <nl> } ; <nl> debugger ; <nl> EndTest ( ) ; <nl> mmm a / test / inspector / debugger / evaluate - on - call - frame - in - module - expected . txt <nl> ppp b / test / inspector / debugger / evaluate - on - call - frame - in - module - expected . txt <nl> local : foo1 <nl> module <nl> [ <nl> [ 0 ] : a1 = 10 <nl> - [ 1 ] : g1 = 1 <nl> - [ 2 ] : b1 = 11 <nl> - [ 3 ] : foo1 = function foo1 ( ) { let c1 = 12 ; let g1 = 2 ; debugger ; return a1 + b1 + c1 + g1 ; } <nl> + [ 1 ] : b1 = 11 <nl> + [ 2 ] : foo1 = function foo1 ( ) { let c1 = 12 ; let g1 = 2 ; debugger ; return a1 + b1 + c1 + g1 ; } <nl> ] <nl> global <nl> [ <nl> foo2 = <nl> } <nl> module <nl> [ <nl> - [ 0 ] : a3 = 30 <nl> - [ 1 ] : foo2 = function foo2 ( ) { let c2 = 22 ; return foo1 ( ) + a2 + b2 + c2 ; } <nl> - [ 2 ] : b3 = 31 <nl> + [ 0 ] : foo2 = function foo2 ( ) { let c2 = 22 ; return foo1 ( ) + a2 + b2 + c2 ; } <nl> + [ 1 ] : b3 = 31 <nl> ] <nl> global <nl> [ <nl> Array = <nl> objectId : < objectId > <nl> type : function <nl> } <nl> - a3 = <nl> - { <nl> - description : 30 <nl> - type : number <nl> - value : 30 <nl> - } <nl> - Evaluating : + + a3 <nl> - updated a3 = <nl> - { <nl> - description : 31 <nl> - type : number <nl> - value : 31 <nl> - } <nl> - Evaluating : - - a3 <nl> foo2 = <nl> { <nl> className : Function <nl> closure : bar <nl> [ <nl> [ 0 ] : a = 0 <nl> ] <nl> - module <nl> - [ <nl> - [ 0 ] : a = 1 <nl> - [ 1 ] : b = 2 <nl> - [ 2 ] : bar = function bar ( ) { let a = 0 ; ( ( ) = > { a ; debugger ; } ) ( ) ; } <nl> - ] <nl> global <nl> [ <nl> . . . <nl> updated a = <nl> value : 1 <nl> } <nl> Evaluating : - - a <nl> - b = <nl> - { <nl> - description : 2 <nl> - type : number <nl> - value : 2 <nl> - } <nl> - Evaluating : + + b <nl> - updated b = <nl> - { <nl> - description : 3 <nl> - type : number <nl> - value : 3 <nl> - } <nl> - Evaluating : - - b <nl> - bar = <nl> - { <nl> - className : Function <nl> - description : function bar ( ) { let a = 0 ; ( ( ) = > { a ; debugger ; } ) ( ) ; } <nl> - objectId : < objectId > <nl> - type : function <nl> - } <nl> local : bar <nl> [ <nl> [ 0 ] : a = 0 <nl> ] <nl> - module <nl> - [ <nl> - [ 0 ] : a = 1 <nl> - [ 1 ] : b = 2 <nl> - [ 2 ] : bar = function bar ( ) { let a = 0 ; ( ( ) = > { a ; debugger ; } ) ( ) ; } <nl> - ] <nl> global <nl> [ <nl> . . . <nl> updated a = <nl> value : 1 <nl> } <nl> Evaluating : - - a <nl> - b = <nl> - { <nl> - description : 2 <nl> - type : number <nl> - value : 2 <nl> - } <nl> - Evaluating : + + b <nl> - updated b = <nl> - { <nl> - description : 3 <nl> - type : number <nl> - value : 3 <nl> - } <nl> - Evaluating : - - b <nl> - bar = <nl> - { <nl> - className : Function <nl> - description : function bar ( ) { let a = 0 ; ( ( ) = > { a ; debugger ; } ) ( ) ; } <nl> - objectId : < objectId > <nl> - type : function <nl> - } <nl> - module <nl> - [ <nl> - [ 0 ] : a = 1 <nl> - [ 1 ] : b = 2 <nl> - [ 2 ] : bar = function bar ( ) { let a = 0 ; ( ( ) = > { a ; debugger ; } ) ( ) ; } <nl> - ] <nl> global <nl> [ <nl> . . . <nl> Array = <nl> objectId : < objectId > <nl> type : function <nl> } <nl> - a = <nl> - { <nl> - description : 1 <nl> - type : number <nl> - value : 1 <nl> - } <nl> - Evaluating : + + a <nl> - updated a = <nl> - { <nl> - description : 2 <nl> - type : number <nl> - value : 2 <nl> - } <nl> - Evaluating : - - a <nl> - b = <nl> - { <nl> - description : 2 <nl> - type : number <nl> - value : 2 <nl> - } <nl> - Evaluating : + + b <nl> - updated b = <nl> - { <nl> - description : 3 <nl> - type : number <nl> - value : 3 <nl> - } <nl> - Evaluating : - - b <nl> - bar = <nl> - { <nl> - className : Function <nl> - description : function bar ( ) { let a = 0 ; ( ( ) = > { a ; debugger ; } ) ( ) ; } <nl> - objectId : < objectId > <nl> - type : function <nl> - } <nl> <nl> Running test : testDifferentModuleVariables <nl> ( anonymous ) ( module5 : 5 : 0 ) <nl> updated c = <nl> value : 1 <nl> } <nl> Evaluating : - - c <nl> + <nl> + Running test : testCapturedLocalVariable <nl> + ( anonymous ) ( module6 : 2 : 25 ) <nl> + ( anonymous ) ( module6 : 2 : 37 ) <nl> + local <nl> + [ <nl> + [ 0 ] : y = 5 <nl> + ] <nl> + module <nl> + [ <nl> + [ 0 ] : x = 5 <nl> + ] <nl> + global <nl> + [ <nl> + . . . <nl> + ] <nl> + Check variables in frame # 0 <nl> + let x = 5 ; <nl> + ( function ( ) { let y = x ; # debugger ; } ) ( ) <nl> + <nl> + <nl> + Array = <nl> + { <nl> + className : Function <nl> + description : function Array ( ) { [ native code ] } <nl> + objectId : < objectId > <nl> + type : function <nl> + } <nl> + y = <nl> + { <nl> + description : 5 <nl> + type : number <nl> + value : 5 <nl> + } <nl> + Evaluating : + + y <nl> + updated y = <nl> + { <nl> + description : 6 <nl> + type : number <nl> + value : 6 <nl> + } <nl> + Evaluating : - - y <nl> + x = <nl> + { <nl> + description : 5 <nl> + type : number <nl> + value : 5 <nl> + } <nl> + Evaluating : + + x <nl> + updated x = <nl> + { <nl> + description : 6 <nl> + type : number <nl> + value : 6 <nl> + } <nl> + Evaluating : - - x <nl> + module <nl> + [ <nl> + [ 0 ] : x = 5 <nl> + ] <nl> + global <nl> + [ <nl> + . . . <nl> + ] <nl> + Check variables in frame # 1 <nl> + let x = 5 ; <nl> + ( function ( ) { let y = x ; debugger ; } ) # ( ) <nl> + <nl> + <nl> + Array = <nl> + { <nl> + className : Function <nl> + description : function Array ( ) { [ native code ] } <nl> + objectId : < objectId > <nl> + type : function <nl> + } <nl> + x = <nl> + { <nl> + description : 5 <nl> + type : number <nl> + value : 5 <nl> + } <nl> + Evaluating : + + x <nl> + updated x = <nl> + { <nl> + description : 6 <nl> + type : number <nl> + value : 6 <nl> + } <nl> + Evaluating : - - x <nl> + <nl> + Running test : testLocalVariableToplevel <nl> + ( anonymous ) ( module7 : 2 : 0 ) <nl> + global <nl> + [ <nl> + . . . <nl> + ] <nl> + Check variables in frame # 0 <nl> + let x = 5 ; <nl> + # debugger ; <nl> + <nl> + <nl> + Array = <nl> + { <nl> + className : Function <nl> + description : function Array ( ) { [ native code ] } <nl> + objectId : < objectId > <nl> + type : function <nl> + } <nl> mmm a / test / inspector / debugger / evaluate - on - call - frame - in - module . js <nl> ppp b / test / inspector / debugger / evaluate - on - call - frame - in - module . js <nl> export var c = 0 ; <nl> debugger ; <nl> ` ; <nl> <nl> + var module6 = ` <nl> + let x = 5 ; <nl> + ( function ( ) { let y = x ; debugger ; } ) ( ) <nl> + ` ; <nl> + <nl> + var module7 = ` <nl> + let x = 5 ; <nl> + debugger ; <nl> + ` ; <nl> + <nl> InspectorTest . runAsyncTestSuite ( [ <nl> async function testTotal ( ) { <nl> session . setupScriptMap ( ) ; <nl> InspectorTest . runAsyncTestSuite ( [ <nl> await checkFrame ( callFrames [ i ] , i ) ; <nl> } <nl> await Protocol . Debugger . resume ( ) ; <nl> + } , <nl> + <nl> + async function testCapturedLocalVariable ( ) { <nl> + contextGroup . addModule ( module6 , ' module6 ' ) ; <nl> + let { params : { callFrames } } = ( await Protocol . Debugger . oncePaused ( ) ) ; <nl> + session . logCallFrames ( callFrames ) ; <nl> + for ( let i = 0 ; i < callFrames . length ; + + i ) { <nl> + await checkFrame ( callFrames [ i ] , i ) ; <nl> + } <nl> + await Protocol . Debugger . resume ( ) ; <nl> + } , <nl> + <nl> + async function testLocalVariableToplevel ( ) { <nl> + contextGroup . addModule ( module7 , ' module7 ' ) ; <nl> + let { params : { callFrames } } = ( await Protocol . Debugger . oncePaused ( ) ) ; <nl> + session . logCallFrames ( callFrames ) ; <nl> + for ( let i = 0 ; i < callFrames . length ; + + i ) { <nl> + await checkFrame ( callFrames [ i ] , i ) ; <nl> + } <nl> + await Protocol . Debugger . resume ( ) ; <nl> } <nl> ] ) ; <nl> <nl> new file mode 100644 <nl> index 00000000000 . . 9f2748fdad7 <nl> mmm / dev / null <nl> ppp b / test / mjsunit / regress / regress - 791334 . js <nl> <nl> + / / Copyright 2017 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> + / / MODULE <nl> + <nl> + let foo = ( ) = > { return this } ; <nl> + assertEquals ( undefined , foo ( ) ) ; <nl>
Reland " Fix " this " value in lazily - parsed module functions . "
v8/v8
585b39f53a5eb3f4d931c505f3a1bc4288be60ce
2017-12-12T17:23:35Z
mmm a / Marlin / Configuration . h <nl> ppp b / Marlin / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false ; / / set to true to invert the l <nl> / / <nl> / / Print job timer <nl> / / <nl> - / / This options allows you configure if the print job timer should automatically <nl> - / / start and stop counting when a M104 or M109 is received . <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> / / <nl> - / / If disabled you can control the print timer start and stop using the <nl> - / / following G - Code list : <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> / / <nl> / / - M75 - Start the print job timer <nl> / / - M76 - Pause the print job timer <nl> / / - M77 - Stop the print job timer <nl> - # defined PRINTJOB_TIMER_AUTOSTART <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl> mmm a / Marlin / example_configurations / Felix / Configuration . h <nl> ppp b / Marlin / example_configurations / Felix / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false ; / / set to true to invert the l <nl> # define ABS_PREHEAT_HPB_TEMP 100 <nl> # define ABS_PREHEAT_FAN_SPEED 255 / / Insert Value between 0 and 255 <nl> <nl> + / / <nl> + / / Print job timer <nl> + / / <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> + / / <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> + / / <nl> + / / - M75 - Start the print job timer <nl> + / / - M76 - Pause the print job timer <nl> + / / - M77 - Stop the print job timer <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl> mmm a / Marlin / example_configurations / Hephestos / Configuration . h <nl> ppp b / Marlin / example_configurations / Hephestos / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true ; / / set to true to invert the lo <nl> # define ABS_PREHEAT_HPB_TEMP 100 <nl> # define ABS_PREHEAT_FAN_SPEED 255 / / Insert Value between 0 and 255 <nl> <nl> + / / <nl> + / / Print job timer <nl> + / / <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> + / / <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> + / / <nl> + / / - M75 - Start the print job timer <nl> + / / - M76 - Pause the print job timer <nl> + / / - M77 - Stop the print job timer <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl> mmm a / Marlin / example_configurations / Hephestos_2 / Configuration . h <nl> ppp b / Marlin / example_configurations / Hephestos_2 / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false ; / / set to true to invert the l <nl> # define ABS_PREHEAT_HPB_TEMP 110 <nl> # define ABS_PREHEAT_FAN_SPEED 0 / / Insert Value between 0 and 255 <nl> <nl> + / / <nl> + / / Print job timer <nl> + / / <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> + / / <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> + / / <nl> + / / - M75 - Start the print job timer <nl> + / / - M76 - Pause the print job timer <nl> + / / - M77 - Stop the print job timer <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl> mmm a / Marlin / example_configurations / K8200 / Configuration . h <nl> ppp b / Marlin / example_configurations / K8200 / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false ; / / set to true to invert the l <nl> # define ABS_PREHEAT_HPB_TEMP 60 / / K8200 : set back to 110 if you have an upgraded heatbed power supply <nl> # define ABS_PREHEAT_FAN_SPEED 0 / / Insert Value between 0 and 255 <nl> <nl> + / / <nl> + / / Print job timer <nl> + / / <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> + / / <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> + / / <nl> + / / - M75 - Start the print job timer <nl> + / / - M76 - Pause the print job timer <nl> + / / - M77 - Stop the print job timer <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl> mmm a / Marlin / example_configurations / RepRapWorld / Megatronics / Configuration . h <nl> ppp b / Marlin / example_configurations / RepRapWorld / Megatronics / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false ; / / set to true to invert the l <nl> # define ABS_PREHEAT_HPB_TEMP 110 <nl> # define ABS_PREHEAT_FAN_SPEED 0 / / Insert Value between 0 and 255 <nl> <nl> + / / <nl> + / / Print job timer <nl> + / / <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> + / / <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> + / / <nl> + / / - M75 - Start the print job timer <nl> + / / - M76 - Pause the print job timer <nl> + / / - M77 - Stop the print job timer <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl> mmm a / Marlin / example_configurations / RigidBot / Configuration . h <nl> ppp b / Marlin / example_configurations / RigidBot / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false ; / / set to true to invert the l <nl> # define ABS_PREHEAT_HPB_TEMP 110 <nl> # define ABS_PREHEAT_FAN_SPEED 255 / / Insert Value between 0 and 255 <nl> <nl> + / / <nl> + / / Print job timer <nl> + / / <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> + / / <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> + / / <nl> + / / - M75 - Start the print job timer <nl> + / / - M76 - Pause the print job timer <nl> + / / - M77 - Stop the print job timer <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl> mmm a / Marlin / example_configurations / SCARA / Configuration . h <nl> ppp b / Marlin / example_configurations / SCARA / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false ; / / set to true to invert the l <nl> # define ABS_PREHEAT_HPB_TEMP 100 <nl> # define ABS_PREHEAT_FAN_SPEED 255 / / Insert Value between 0 and 255 <nl> <nl> + / / <nl> + / / Print job timer <nl> + / / <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> + / / <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> + / / <nl> + / / - M75 - Start the print job timer <nl> + / / - M76 - Pause the print job timer <nl> + / / - M77 - Stop the print job timer <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl> mmm a / Marlin / example_configurations / TAZ4 / Configuration . h <nl> ppp b / Marlin / example_configurations / TAZ4 / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false ; / / set to true to invert the l <nl> # define ABS_PREHEAT_HPB_TEMP 110 <nl> # define ABS_PREHEAT_FAN_SPEED 0 / / Insert Value between 0 and 255 <nl> <nl> + / / <nl> + / / Print job timer <nl> + / / <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> + / / <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> + / / <nl> + / / - M75 - Start the print job timer <nl> + / / - M76 - Pause the print job timer <nl> + / / - M77 - Stop the print job timer <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl> mmm a / Marlin / example_configurations / WITBOX / Configuration . h <nl> ppp b / Marlin / example_configurations / WITBOX / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true ; / / set to true to invert the lo <nl> # define ABS_PREHEAT_HPB_TEMP 100 <nl> # define ABS_PREHEAT_FAN_SPEED 255 / / Insert Value between 0 and 255 <nl> <nl> + / / <nl> + / / Print job timer <nl> + / / <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> + / / <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> + / / <nl> + / / - M75 - Start the print job timer <nl> + / / - M76 - Pause the print job timer <nl> + / / - M77 - Stop the print job timer <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl> mmm a / Marlin / example_configurations / adafruit / ST7565 / Configuration . h <nl> ppp b / Marlin / example_configurations / adafruit / ST7565 / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false ; / / set to true to invert the l <nl> # define ABS_PREHEAT_HPB_TEMP 110 <nl> # define ABS_PREHEAT_FAN_SPEED 0 / / Insert Value between 0 and 255 <nl> <nl> + / / <nl> + / / Print job timer <nl> + / / <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> + / / <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> + / / <nl> + / / - M75 - Start the print job timer <nl> + / / - M76 - Pause the print job timer <nl> + / / - M77 - Stop the print job timer <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl> mmm a / Marlin / example_configurations / delta / biv2 . 5 / Configuration . h <nl> ppp b / Marlin / example_configurations / delta / biv2 . 5 / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true ; / / set to true to invert the lo <nl> # define ABS_PREHEAT_HPB_TEMP 100 <nl> # define ABS_PREHEAT_FAN_SPEED 255 / / Insert Value between 0 and 255 <nl> <nl> + / / <nl> + / / Print job timer <nl> + / / <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> + / / <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> + / / <nl> + / / - M75 - Start the print job timer <nl> + / / - M76 - Pause the print job timer <nl> + / / - M77 - Stop the print job timer <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl> mmm a / Marlin / example_configurations / delta / generic / Configuration . h <nl> ppp b / Marlin / example_configurations / delta / generic / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true ; / / set to true to invert the lo <nl> # define ABS_PREHEAT_HPB_TEMP 100 <nl> # define ABS_PREHEAT_FAN_SPEED 255 / / Insert Value between 0 and 255 <nl> <nl> + / / <nl> + / / Print job timer <nl> + / / <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> + / / <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> + / / <nl> + / / - M75 - Start the print job timer <nl> + / / - M76 - Pause the print job timer <nl> + / / - M77 - Stop the print job timer <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl> mmm a / Marlin / example_configurations / delta / kossel_mini / Configuration . h <nl> ppp b / Marlin / example_configurations / delta / kossel_mini / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false ; / / set to true to invert the l <nl> # define ABS_PREHEAT_HPB_TEMP 100 <nl> # define ABS_PREHEAT_FAN_SPEED 255 / / Insert Value between 0 and 255 <nl> <nl> + / / <nl> + / / Print job timer <nl> + / / <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> + / / <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> + / / <nl> + / / - M75 - Start the print job timer <nl> + / / - M76 - Pause the print job timer <nl> + / / - M77 - Stop the print job timer <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl> mmm a / Marlin / example_configurations / delta / kossel_pro / Configuration . h <nl> ppp b / Marlin / example_configurations / delta / kossel_pro / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false ; / / set to true to invert the l <nl> # define ABS_PREHEAT_HPB_TEMP 100 <nl> # define ABS_PREHEAT_FAN_SPEED 255 / / Insert Value between 0 and 255 <nl> <nl> + / / <nl> + / / Print job timer <nl> + / / <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> + / / <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> + / / <nl> + / / - M75 - Start the print job timer <nl> + / / - M76 - Pause the print job timer <nl> + / / - M77 - Stop the print job timer <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl> mmm a / Marlin / example_configurations / delta / kossel_xl / Configuration . h <nl> ppp b / Marlin / example_configurations / delta / kossel_xl / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false ; / / set to true to invert the l <nl> # define ABS_PREHEAT_HPB_TEMP 100 <nl> # define ABS_PREHEAT_FAN_SPEED 255 / / Insert Value between 0 and 255 <nl> <nl> + / / <nl> + / / Print job timer <nl> + / / <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> + / / <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> + / / <nl> + / / - M75 - Start the print job timer <nl> + / / - M76 - Pause the print job timer <nl> + / / - M77 - Stop the print job timer <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl> mmm a / Marlin / example_configurations / makibox / Configuration . h <nl> ppp b / Marlin / example_configurations / makibox / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false ; / / set to true to invert the l <nl> # define ABS_PREHEAT_HPB_TEMP 100 <nl> # define ABS_PREHEAT_FAN_SPEED 255 / / Insert Value between 0 and 255 <nl> <nl> + / / <nl> + / / Print job timer <nl> + / / <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> + / / <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> + / / <nl> + / / - M75 - Start the print job timer <nl> + / / - M76 - Pause the print job timer <nl> + / / - M77 - Stop the print job timer <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl> mmm a / Marlin / example_configurations / tvrrug / Round2 / Configuration . h <nl> ppp b / Marlin / example_configurations / tvrrug / Round2 / Configuration . h <nl> const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true ; / / set to true to invert the lo <nl> # define ABS_PREHEAT_HPB_TEMP 100 <nl> # define ABS_PREHEAT_FAN_SPEED 255 / / Insert Value between 0 and 255 <nl> <nl> + / / <nl> + / / Print job timer <nl> + / / <nl> + / / Enable this option to automatically start and stop the <nl> + / / print job timer when M104 and M109 commands are received . <nl> + / / <nl> + / / In all cases the timer can be started and stopped using <nl> + / / the following commands : <nl> + / / <nl> + / / - M75 - Start the print job timer <nl> + / / - M76 - Pause the print job timer <nl> + / / - M77 - Stop the print job timer <nl> + # define PRINTJOB_TIMER_AUTOSTART <nl> <nl> / / <nl> / / Print Counter <nl>
Added PRINTJOB_TIMER_AUTOSTART section to example config files
MarlinFirmware/Marlin
f9a62f6a8ec0e2af27276f66fc016154fc3cbfc7
2016-05-14T22:22:45Z
mmm a / examples / net_speed_benchmark . cpp <nl> ppp b / examples / net_speed_benchmark . cpp <nl> <nl> using namespace caffe ; <nl> <nl> int main ( int argc , char * * argv ) { <nl> - cudaSetDevice ( 0 ) ; <nl> - Caffe : : set_mode ( Caffe : : GPU ) ; <nl> - Caffe : : set_phase ( Caffe : : TRAIN ) ; <nl> - int repeat = 100 ; <nl> <nl> + int total_iter = 50 ; <nl> + <nl> + if ( argc < 2 ) { <nl> + LOG ( ERROR ) < < " net_speed_benchmark net_proto [ iterations = 50 ] [ CPU / GPU ] [ Device_id = 0 ] " ; <nl> + return 0 ; <nl> + } <nl> + <nl> + if ( argc > = 3 ) { <nl> + total_iter = atoi ( argv [ 2 ] ) ; <nl> + } <nl> + <nl> + LOG ( ERROR ) < < " Testing for " < < total_iter < < " Iterations . " ; <nl> + <nl> + if ( argc > = 4 & & strcmp ( argv [ 3 ] , " GPU " ) = = 0 ) { <nl> + LOG ( ERROR ) < < " Using GPU " ; <nl> + uint device_id = 0 ; <nl> + if ( argc > = 5 & & strcmp ( argv [ 3 ] , " GPU " ) = = 0 ) { <nl> + device_id = atoi ( argv [ 4 ] ) ; <nl> + } <nl> + LOG ( ERROR ) < < " Using Device_id = " < < device_id ; <nl> + Caffe : : SetDevice ( device_id ) ; <nl> + Caffe : : set_mode ( Caffe : : GPU ) ; <nl> + } else { <nl> + LOG ( ERROR ) < < " Using CPU " ; <nl> + Caffe : : set_mode ( Caffe : : CPU ) ; <nl> + } <nl> + <nl> + Caffe : : set_phase ( Caffe : : TRAIN ) ; <nl> NetParameter net_param ; <nl> ReadProtoFromTextFile ( argv [ 1 ] , <nl> & net_param ) ; <nl> int main ( int argc , char * * argv ) { <nl> vector < vector < Blob < float > * > > & bottom_vecs = caffe_net . bottom_vecs ( ) ; <nl> vector < vector < Blob < float > * > > & top_vecs = caffe_net . top_vecs ( ) ; <nl> LOG ( ERROR ) < < " * * * Benchmark begins * * * " ; <nl> + clock_t forward_start = clock ( ) ; <nl> for ( int i = 0 ; i < layers . size ( ) ; + + i ) { <nl> const string & layername = layers [ i ] - > layer_param ( ) . name ( ) ; <nl> clock_t start = clock ( ) ; <nl> - for ( int j = 0 ; j < repeat ; + + j ) { <nl> + for ( int j = 0 ; j < total_iter ; + + j ) { <nl> layers [ i ] - > Forward ( bottom_vecs [ i ] , & top_vecs [ i ] ) ; <nl> } <nl> LOG ( ERROR ) < < layername < < " \ tforward : " <nl> < < float ( clock ( ) - start ) / CLOCKS_PER_SEC < < " seconds . " ; <nl> } <nl> + LOG ( ERROR ) < < " Forward pass : " < < float ( clock ( ) - forward_start ) / CLOCKS_PER_SEC < < " seconds . " ; <nl> + clock_t backward_start = clock ( ) ; <nl> for ( int i = layers . size ( ) - 1 ; i > = 0 ; - - i ) { <nl> const string & layername = layers [ i ] - > layer_param ( ) . name ( ) ; <nl> clock_t start = clock ( ) ; <nl> - for ( int j = 0 ; j < repeat ; + + j ) { <nl> + for ( int j = 0 ; j < total_iter ; + + j ) { <nl> layers [ i ] - > Backward ( top_vecs [ i ] , true , & bottom_vecs [ i ] ) ; <nl> } <nl> LOG ( ERROR ) < < layername < < " \ tbackward : " <nl> < < float ( clock ( ) - start ) / CLOCKS_PER_SEC < < " seconds . " ; <nl> } <nl> + LOG ( ERROR ) < < " Backward pass : " < < float ( clock ( ) - backward_start ) / CLOCKS_PER_SEC < < " seconds . " ; <nl> + LOG ( ERROR ) < < " Total Time : " < < float ( clock ( ) - forward_start ) / CLOCKS_PER_SEC < < " seconds . " ; <nl> LOG ( ERROR ) < < " * * * Benchmark ends * * * " ; <nl> return 0 ; <nl> } <nl>
More detailed net_speed_benchmark
BVLC/caffe
9775cc2593120b1e98a05892cf444db59814e967
2014-02-07T17:55:57Z
mmm a / src / Makefile <nl> ppp b / src / Makefile <nl> CUDA_DIR = / usr / local / cuda <nl> CUDA_INCLUDE_DIR = $ ( CUDA_DIR ) / include <nl> CUDA_LIB_DIR = $ ( CUDA_DIR ) / lib64 <nl> <nl> - INCLUDE_DIRS : = . $ ( CUDA_INCLUDE_DIR ) <nl> - LIBRARY_DIRS : = . $ ( CUDA_LIB_DIR ) <nl> + INCLUDE_DIRS : = . / usr / local / include $ ( CUDA_INCLUDE_DIR ) <nl> + LIBRARY_DIRS : = . / usr / local / lib $ ( CUDA_LIB_DIR ) <nl> LIBRARIES : = cuda cudart cublas protobuf glog <nl> WARNINGS : = - Wall <nl> <nl> mmm a / src / caffeine / blob . cpp <nl> ppp b / src / caffeine / blob . cpp <nl> <nl> + # include < cublas_v2 . h > <nl> + <nl> # include " caffeine / blob . hpp " <nl> # include " caffeine / common . hpp " <nl> # include " caffeine / syncedmem . hpp " <nl> namespace caffeine { <nl> template < typename Dtype > <nl> void Blob < Dtype > : : Reshape ( const int num , const int channels , const int height , <nl> const int width ) { <nl> + CHECK_GT ( num , 0 ) ; <nl> + CHECK_GT ( channels , 0 ) ; <nl> + CHECK_GT ( height , 0 ) ; <nl> + CHECK_GT ( width , 0 ) ; <nl> num_ = num ; <nl> channels_ = channels ; <nl> height_ = height ; <nl> void Blob < Dtype > : : Reshape ( const int num , const int channels , const int height , <nl> diff_ . reset ( new SyncedMemory ( count_ * sizeof ( Dtype ) ) ) ; <nl> } <nl> <nl> + template < typename Dtype > <nl> + Blob < Dtype > : : Blob ( const int num , const int channels , const int height , <nl> + const int width ) { <nl> + Reshape ( num , channels , height , width ) ; <nl> + } <nl> + <nl> template < typename Dtype > <nl> const Dtype * Blob < Dtype > : : cpu_data ( ) { <nl> CHECK ( data_ ) ; <nl> Dtype * Blob < Dtype > : : mutable_gpu_diff ( ) { <nl> <nl> template < typename Dtype > <nl> void Blob < Dtype > : : update ( ) { <nl> + / / not implemented yet . <nl> <nl> + <nl> } <nl> <nl> template class Blob < float > ; <nl> mmm a / src / caffeine / blob . hpp <nl> ppp b / src / caffeine / blob . hpp <nl> class Blob { <nl> : num_ ( 0 ) , channels_ ( 0 ) , height_ ( 0 ) , width_ ( 0 ) , count_ ( 0 ) , data_ ( ) , <nl> diff_ ( ) { } ; <nl> explicit Blob ( const int num , const int channels , const int height , <nl> - const int width ) <nl> - : num_ ( num ) , channels_ ( channels ) , height_ ( height ) , width_ ( width ) , <nl> - count_ ( num * channels * height * width ) , <nl> - data_ ( new SyncedMemory ( count_ * sizeof ( Dtype ) ) ) , <nl> - diff_ ( new SyncedMemory ( count_ * sizeof ( Dtype ) ) ) { } ; <nl> + const int width ) ; <nl> virtual ~ Blob ( ) { } ; <nl> void Reshape ( const int num , const int channels , const int height , <nl> const int width ) ; <nl> mmm a / src / caffeine / syncedmem . cpp <nl> ppp b / src / caffeine / syncedmem . cpp <nl> <nl> # include < cstring > <nl> - # include " cuda_runtime . h " <nl> + # include < cuda_runtime . h > <nl> <nl> # include " caffeine / common . hpp " <nl> # include " caffeine / syncedmem . hpp " <nl> mmm a / src / caffeine / test_blob . cpp <nl> ppp b / src / caffeine / test_blob . cpp <nl> TYPED_TEST ( BlobSimpleTest , TestInitialization ) { <nl> } <nl> <nl> TYPED_TEST ( BlobSimpleTest , TestPointers ) { <nl> - EXPECT_TRUE ( this - > blob_preshaped_ - > gpu_data ( ) ! = NULL ) ; <nl> - EXPECT_TRUE ( this - > blob_preshaped_ - > cpu_data ( ) ! = NULL ) ; <nl> - EXPECT_TRUE ( this - > blob_preshaped_ - > mutable_gpu_data ( ) ! = NULL ) ; <nl> - EXPECT_TRUE ( this - > blob_preshaped_ - > mutable_cpu_data ( ) ! = NULL ) ; <nl> + EXPECT_TRUE ( this - > blob_preshaped_ - > gpu_data ( ) ) ; <nl> + EXPECT_TRUE ( this - > blob_preshaped_ - > cpu_data ( ) ) ; <nl> + EXPECT_TRUE ( this - > blob_preshaped_ - > mutable_gpu_data ( ) ) ; <nl> + EXPECT_TRUE ( this - > blob_preshaped_ - > mutable_cpu_data ( ) ) ; <nl> } <nl> <nl> - <nl> TYPED_TEST ( BlobSimpleTest , TestReshape ) { <nl> this - > blob_ - > Reshape ( 2 , 3 , 4 , 5 ) ; <nl> EXPECT_EQ ( this - > blob_ - > num ( ) , 2 ) ; <nl> mmm a / src / caffeine / test_syncedmem . cpp <nl> ppp b / src / caffeine / test_syncedmem . cpp <nl> class SyncedMemoryTest : public : : testing : : Test { } ; <nl> TEST_F ( SyncedMemoryTest , TestInitialization ) { <nl> SyncedMemory mem ( 10 ) ; <nl> EXPECT_EQ ( mem . head ( ) , SyncedMemory : : UNINITIALIZED ) ; <nl> + EXPECT_EQ ( mem . size ( ) , 10 ) ; <nl> + SyncedMemory * p_mem = new SyncedMemory ( 10 * sizeof ( float ) ) ; <nl> + EXPECT_EQ ( p_mem - > size ( ) , 10 * sizeof ( float ) ) ; <nl> + delete p_mem ; <nl> } <nl> <nl> TEST_F ( SyncedMemoryTest , TestAllocation ) { <nl> SyncedMemory mem ( 10 ) ; <nl> - EXPECT_NE ( mem . cpu_data ( ) , ( void * ) NULL ) ; <nl> - EXPECT_NE ( mem . gpu_data ( ) , ( void * ) NULL ) ; <nl> + EXPECT_TRUE ( mem . cpu_data ( ) ) ; <nl> + EXPECT_TRUE ( mem . gpu_data ( ) ) ; <nl> + EXPECT_TRUE ( mem . mutable_cpu_data ( ) ) ; <nl> + EXPECT_TRUE ( mem . mutable_gpu_data ( ) ) ; <nl> } <nl> <nl> TEST_F ( SyncedMemoryTest , TestCPUWrite ) { <nl>
misc update
BVLC/caffe
36f4cde959bf42656fbc7f096204f973493189cb
2013-09-13T23:12:37Z
mmm a / ports / c - ares / CONTROL <nl> ppp b / ports / c - ares / CONTROL <nl> <nl> Source : c - ares <nl> - Version : 1 . 13 . 0 - 1 <nl> + Version : cares - 1_14_0 <nl> Description : A C library for asynchronous DNS requests <nl> Build - Depends : <nl> mmm a / ports / c - ares / portfile . cmake <nl> ppp b / ports / c - ares / portfile . cmake <nl> include ( vcpkg_common_functions ) <nl> vcpkg_from_github ( <nl> OUT_SOURCE_PATH SOURCE_PATH <nl> REPO c - ares / c - ares <nl> - REF cares - 1_13_0 <nl> - SHA512 0ee8a45772c64701d0e860cd84925cef8938a319b3004e02e86af900cbd9e07609940bc474a46bf4252b9b7e3815e1951de8f0eb16718074ec1d39c2105a2abe <nl> + REF cares - 1_14_0 <nl> + SHA512 3ae7938648aec2fae651667bef02139f7eef2e7cd425cc310b7e3d56f409646f6170d37a3c9269aa654bfb1ced0a52b89fe49be9023edf8ff57efd0efaf59052 <nl> HEAD_REF master <nl> ) <nl> <nl>
[ c - ares ] Update
microsoft/vcpkg
8dd968cc6e08f371a98eaf014f42ff44efc5ab84
2018-02-28T10:08:50Z
mmm a / folly / small_vector . h <nl> ppp b / folly / small_vector . h <nl> namespace detail { <nl> ! FOLLY_IS_TRIVIALLY_COPYABLE ( T ) <nl> > : : type <nl> moveToUninitialized ( T * first , T * last , T * out ) { <nl> - auto const count = last - first ; <nl> std : : size_t idx = 0 ; <nl> try { <nl> - for ( ; idx < count ; + + first , + + idx ) { <nl> + for ( ; first ! = last ; + + first , + + idx ) { <nl> new ( & out [ idx ] ) T ( std : : move ( * first ) ) ; <nl> } <nl> } catch ( . . . ) { <nl>
folly / small_vector . h : avoid - Wsign - compare error
facebook/folly
67a4edadf17fc386d11fc26c5c47d0da12c0be48
2015-01-13T19:01:04Z
new file mode 100644 <nl> index 000000000000 . . 6379f1344185 <nl> mmm / dev / null <nl> ppp b / caffe2 / opt / custom / freeze_quantization_params . cc <nl> <nl> + # include < caffe2 / quantization / server / int8_gen_quant_params . h > <nl> + # include < caffe2 / utils / proto_utils . h > <nl> + # include " freeze_quantization_params . h " <nl> + <nl> + namespace caffe2 { <nl> + void freezeQuantizationParams ( NetDef * net , Workspace * ws ) { <nl> + for ( auto & op : * net - > mutable_op ( ) ) { <nl> + if ( ( op . type ( ) = = " Int8Quantize " & & op . input_size ( ) = = 2 ) | | <nl> + ( op . type ( ) = = " Int8FC " & & op . input_size ( ) = = 4 ) ) { <nl> + int lastPos = op . input_size ( ) - 1 ; <nl> + const auto & paramName = op . input ( lastPos ) ; <nl> + auto * b = ws - > GetBlob ( paramName ) ; <nl> + if ( ! b ) { <nl> + LOG ( WARNING ) <nl> + < < " ParamBlob " < < paramName <nl> + < < " does not exist in the workspace . Skip freezing current op . " ; <nl> + continue ; <nl> + } <nl> + if ( ! b - > template IsType < caffe2 : : unique_ptr < Int8QuantParamsBlob > > ( ) ) { <nl> + LOG ( WARNING ) <nl> + < < " ParamBlob " < < paramName <nl> + < < " is not of caffe2 : : unique_ptr < Int8QuantParamsBlob > type . Skip freezing current op . " ; <nl> + continue ; <nl> + } <nl> + <nl> + / / Extract and set scale and zero point for the op <nl> + const auto * param = <nl> + b - > template Get < caffe2 : : unique_ptr < Int8QuantParamsBlob > > ( ) . get ( ) ; <nl> + CAFFE_ENFORCE ( param ) ; <nl> + const float scale = param - > qparam . scale ; <nl> + const int zero_point = param - > qparam . zero_point ; <nl> + bool argSet = false ; <nl> + for ( auto & arg : * op . mutable_arg ( ) ) { <nl> + if ( arg . name ( ) = = " Y_scale " ) { <nl> + arg . set_f ( scale ) ; <nl> + argSet = true ; <nl> + break ; <nl> + } <nl> + } <nl> + if ( ! argSet ) { <nl> + op . add_arg ( ) - > CopyFrom ( MakeArgument < float > ( " Y_scale " , scale ) ) ; <nl> + } <nl> + argSet = false ; <nl> + for ( auto & arg : * op . mutable_arg ( ) ) { <nl> + if ( arg . name ( ) = = " Y_zero_point " ) { <nl> + arg . set_i ( zero_point ) ; <nl> + argSet = true ; <nl> + break ; <nl> + } <nl> + } <nl> + if ( ! argSet ) { <nl> + op . add_arg ( ) - > CopyFrom ( MakeArgument < int > ( " Y_zero_point " , zero_point ) ) ; <nl> + } <nl> + <nl> + / / Remove last input of the op <nl> + op . mutable_input ( ) - > RemoveLast ( ) ; <nl> + } <nl> + } <nl> + } <nl> + } / / namespace caffe2 <nl> new file mode 100644 <nl> index 000000000000 . . 3b2b8d35012e <nl> mmm / dev / null <nl> ppp b / caffe2 / opt / custom / freeze_quantization_params . h <nl> <nl> + # pragma once <nl> + <nl> + # include < caffe2 / core / workspace . h > <nl> + # include < caffe2 / proto / caffe2_pb . h > <nl> + <nl> + namespace caffe2 { <nl> + / / / We have a variant of 2 - input Int8Quantize and 4 - input Int8FC where the last <nl> + / / / input points to a blob which contains the y_scale and y_zero_point . It ' s <nl> + / / / orginated from online snapshot update but is creating complications for <nl> + / / / onnxifi flow . Hence this pass is just to absorb the quantization params into <nl> + / / / the op itself and remove the last input . <nl> + void freezeQuantizationParams ( NetDef * net , Workspace * ws ) ; <nl> + } / / namespace caffe2 <nl> mmm a / caffe2 / opt / custom / glow_net_transform . h <nl> ppp b / caffe2 / opt / custom / glow_net_transform . h <nl> C10_DECLARE_string ( onnxifi_blacklist_ops ) ; <nl> <nl> namespace caffe2 { <nl> namespace glow { <nl> - <nl> - / / Onnxifi transformation on the net and workspace . We also <nl> - / / needed the input data / shape to populate the shape . In addition , we take a \ p <nl> - / / blacklist to control and mask what ops we want to consider in onnxifi <nl> - / / process . We can also set whether to use ONNX proto or C2 proto through <nl> - / / ONNXIFI interface . <nl> + / / / Onnxifi transformation on the net and workspace . We also <nl> + / / / needed the input data / shape to populate the shape . In addition , we take a \ p <nl> + / / / blacklist to control and mask what ops we want to consider in onnxifi <nl> + / / / process . We can also set whether to use ONNX proto or C2 proto through <nl> + / / / ONNXIFI interface . <nl> void onnxifi ( <nl> NetDef * net , <nl> Workspace * ws , <nl> mmm a / caffe2 / quantization / server / pybind . cc <nl> ppp b / caffe2 / quantization / server / pybind . cc <nl> <nl> # include < pybind11 / stl . h > <nl> # include " activation_distribution_observer . h " <nl> # include " caffe2 / opt / custom / fakefp16_transform . h " <nl> + # include " caffe2 / opt / custom / freeze_quantization_params . h " <nl> # include " caffe2 / quantization / server / caffe2_dnnlowp_utils . h " <nl> # include " caffe2 / quantization / server / fbgemm_pack_blob . h " <nl> # include " caffe2 / quantization / server / int8_gen_quant_params . h " <nl> PYBIND11_MODULE ( dnnlowp_pybind11 , m ) { <nl> m . def ( " get_fakefp16_mapping " , [ ] ( bool use_fp16_acc , bool use_nnpi ) { <nl> return caffe2 : : opt : : getFakeFp16OpMapping ( use_fp16_acc , use_nnpi ) ; <nl> } ) ; <nl> + m . def ( " freeze_quantization_params " , <nl> + [ ] ( const pybind11 : : bytes & net_def_bytes ) { <nl> + NetDef def ; <nl> + CAFFE_ENFORCE ( <nl> + ParseProtoFromLargeString ( net_def_bytes . cast < string > ( ) , & def ) ) ; <nl> + string protob ; <nl> + Workspace * gWorkspace = caffe2 : : python : : GetCurrentWorkspace ( ) ; <nl> + CAFFE_ENFORCE ( gWorkspace ) ; <nl> + freezeQuantizationParams ( & def , gWorkspace ) ; <nl> + CAFFE_ENFORCE ( def . SerializeToString ( & protob ) ) ; <nl> + return pybind11 : : bytes ( protob ) ; <nl> + } ) ; <nl> m . def ( <nl> " ChooseStaticQuantizationParams " , <nl> [ ] ( float min , <nl> mmm a / caffe2 / quantization / server / quantize_dnnlowp_op_test . py <nl> ppp b / caffe2 / quantization / server / quantize_dnnlowp_op_test . py <nl> <nl> <nl> <nl> class DNNLowPQuantizeOpTest ( hu . HypothesisTestCase ) : <nl> - @ given ( size = st . integers ( 1024 , 2048 ) , is_empty = st . booleans ( ) , * * hu . gcs_cpu_only ) <nl> - def test_dnnlowp_quantize ( self , size , is_empty , gc , dc ) : <nl> + @ given ( size = st . integers ( 1024 , 2048 ) , <nl> + is_empty = st . booleans ( ) , <nl> + absorb = st . booleans ( ) , <nl> + * * hu . gcs_cpu_only ) <nl> + def test_dnnlowp_quantize ( self , size , is_empty , absorb , gc , dc ) : <nl> if is_empty : <nl> size = 0 <nl> min_ = - 10 . 0 <nl> def test_dnnlowp_quantize ( self , size , is_empty , gc , dc ) : <nl> device_option = gc , <nl> ) <nl> net . Proto ( ) . op . extend ( [ quantize_2 ] ) <nl> - <nl> + if absorb : <nl> + net_str = dnnlowp_pybind11 . freeze_quantization_params ( <nl> + net . Proto ( ) . SerializeToString ( ) ) <nl> + net . Proto ( ) . ParseFromString ( net_str ) <nl> workspace . FeedBlob ( " X " , X , device_option = gc ) <nl> workspace . RunNetOnce ( net ) <nl> X_q = workspace . FetchInt8Blob ( " X_q " ) [ 0 ] <nl>
Freeze dynamic ( re ) quantizaiton ops into standard ones ( )
pytorch/pytorch
5c5d7a9dca20f1bd578d1cb933fae9acef535202
2020-08-05T18:53:09Z
mmm a / Source / CNTK / BrainScript / CNTKCoreLib / CNTK . core . bs <nl> ppp b / Source / CNTK / BrainScript / CNTKCoreLib / CNTK . core . bs <nl> RNNs = <nl> dim = layerDims [ i ] * 2 # output dimension <nl> ] <nl> ] . layers <nl> + <nl> + # GRU - - GRU function with self - stabilization <nl> + # It returns a dictionary with one members : h . <nl> + GRU ( outputDim , x , inputDim = x . dim , prevState , enableSelfStabilization = false ) = <nl> + [ <nl> + S ( x ) = Parameters . Stabilize ( x , enabled = enableSelfStabilization ) <nl> + cellDim = outputDim <nl> + <nl> + _ = [ / / encapsulate the inner workings <nl> + <nl> + dh = prevState . h / / previous value <nl> + dhs = S ( dh ) / / previous value , stabilized <nl> + # note : input does not get a stabilizer here , user is meant to do that outside <nl> + <nl> + / / parameter macros <nl> + # note : each invocation comes with its own set of weights <nl> + B ( ) = Parameters . BiasParam ( cellDim ) <nl> + W ( ) = Parameters . WeightParam ( cellDim , inputDim ) / / input <nl> + H ( ) = Parameters . WeightParam ( cellDim , outputDim ) / / hidden - to - hidden <nl> + <nl> + # projected contribution from input ( s ) <nl> + pin ( ) = B ( ) + W ( ) * x <nl> + <nl> + # update gate z ( t ) <nl> + zt = Sigmoid ( pin ( ) + H ( ) * dhs ) <nl> + <nl> + # reset gate r ( t ) <nl> + rt = Sigmoid ( pin ( ) + H ( ) * dhs ) <nl> + <nl> + # " cell " c <nl> + rs = dhs . * rt <nl> + c = Tanh ( pin ( ) + H ( ) * rs ) <nl> + <nl> + # hidden state ht / output <nl> + ht = ( BS . Constants . OnesTensor ( cellDim ) - zt ) . * c + zt . * dhs <nl> + ] <nl> + <nl> + # our return value <nl> + h = _ . ht / / hidden state <nl> + ] <nl> + <nl> + # this implements a recurrent ( stateful ) GRU with self - stabilization <nl> + # It returns a record ( h ) . To use its output , say . h <nl> + # By default , this is left - to - right . Pass previousHook = BS . RNNs . NextHC for a right - to - left model . <nl> + RecurrentGRU ( outputDim , x , inputDim = x . dim , previousHook = BS . RNNs . PreviousHC , enableSelfStabilization = false ) = <nl> + [ <nl> + enableSelfStabilization1 = enableSelfStabilization <nl> + inputDim1 = inputDim <nl> + <nl> + prevState = previousHook ( gruState , layerIndex = 0 ) <nl> + gruState = BS . RNNs . GRU ( outputDim , x , inputDim = inputDim1 , prevState , enableSelfStabilization = enableSelfStabilization1 ) <nl> + ] . gruState / / that ' s the value we return <nl> ] <nl> <nl> # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl>
added GRU implementation to CNTK . core . bs
microsoft/CNTK
2afa6cdb36ca26343fbd329652eadff9ccb65918
2016-07-12T14:45:29Z
mmm a / packaging / ami / build - ami - files / static - web / wait . html <nl> ppp b / packaging / ami / build - ami - files / static - web / wait . html <nl> <nl> } , 5000 ) <nl> < / script > <nl> < div class = " section " > <nl> - < p id = " waiting " > Initializing instance . . . < / p > <nl> + < p id = " waiting " > Initializing instance , please wait . . . < / p > <nl> < / div > <nl>
AMI changes ( OTS @ mglukhovsky )
rethinkdb/rethinkdb
7122abf56e5e11cefb119dcf417c95d160449e0b
2013-07-19T08:21:31Z
new file mode 100644 <nl> index 0000000000 . . 1c9f1918c8 <nl> mmm / dev / null <nl> ppp b / benchmark / README . md <nl> <nl> + benchncnn can be used to test neural network inference performance <nl> + <nl> + Only the network definition files ( ncnn param ) are required . <nl> + <nl> + The large model binary files ( ncnn bin ) are not loaded but generated randomly for speed test . <nl> + <nl> + More model networks may be added later . <nl> + <nl> + mmm <nl> + <nl> + Usage <nl> + ` ` ` <nl> + # copy all param files to the current directory <nl> + . / benchncnn [ loop count ] [ num threads ] [ powersave ] <nl> + ` ` ` <nl> + <nl> + Typical output ( executed in android adb shell ) <nl> + ` ` ` <nl> + HM2014812 : / data / local / tmp # . / benchncnn 4 4 0 <nl> + loop_count = 4 <nl> + num_threads = 4 <nl> + powersave = 0 <nl> + squeezenet min = 99 . 34 max = 104 . 24 avg = 102 . 83 <nl> + mobilenet min = 171 . 06 max = 177 . 08 avg = 173 . 45 <nl> + shufflenet min = 67 . 80 max = 73 . 63 avg = 69 . 35 <nl> + googlenet min = 337 . 30 max = 341 . 33 avg = 339 . 00 <nl> + resnet18 min = 466 . 41 max = 476 . 33 avg = 472 . 07 <nl> + alexnet min = 397 . 47 max = 421 . 54 avg = 404 . 22 <nl> + vgg16 min = 2338 . 67 max = 2984 . 17 avg = 2557 . 16 <nl> + squeezenet - ssd min = 201 . 43 max = 304 . 06 avg = 236 . 67 <nl> + mobilenet - ssd min = 198 . 93 max = 241 . 33 avg = 214 . 54 <nl> + ` ` ` <nl>
readme for benchncnn
Tencent/ncnn
405faed2abb1e6e6c9fa1fdb43e4c1cbb715da7c
2018-02-16T09:48:28Z
mmm a / src / mongo / db / catalog / index_catalog_entry . h <nl> ppp b / src / mongo / db / catalog / index_catalog_entry . h <nl> class IndexCatalogEntry : public std : : enable_shared_from_this < IndexCatalogEntry > <nl> const KeyStringSet & multikeyMetadataKeys , <nl> const MultikeyPaths & multikeyPaths ) = 0 ; <nl> <nl> - / / if this ready is ready for queries <nl> + / * * <nl> + * Returns whether this index is ready for queries . This is potentially unsafe in that it does <nl> + * not consider whether the index is visible or ready in the currently storage snapshot . For <nl> + * that , use isReadyInMySnapshot ( ) or isPresentInMySnapshot ( ) . <nl> + * / <nl> virtual bool isReady ( OperationContext * const opCtx ) const = 0 ; <nl> <nl> + / * * <nl> + * Safely check whether this index is visible in the durable catalog in the current storage <nl> + * engine snapshot . <nl> + * / <nl> + virtual bool isPresentInMySnapshot ( OperationContext * opCtx ) const = 0 ; <nl> + <nl> + / * * <nl> + * Safely check whether this index is visible and ready in the durable catalog in the current <nl> + * storage engine snapshot . <nl> + * / <nl> + virtual bool isReadyInMySnapshot ( OperationContext * opCtx ) const = 0 ; <nl> + <nl> / * * <nl> * Returns true if this index is not ready , and it is not currently in the process of being <nl> * built either . <nl> mmm a / src / mongo / db / catalog / index_catalog_entry_impl . cpp <nl> ppp b / src / mongo / db / catalog / index_catalog_entry_impl . cpp <nl> IndexCatalogEntryImpl : : IndexCatalogEntryImpl ( OperationContext * const opCtx , <nl> DurableCatalog : : get ( opCtx ) - > getIndexPrefix ( opCtx , _catalogId , _descriptor - > indexName ( ) ) ) { <nl> <nl> _descriptor - > _entry = this ; <nl> - _isReady = _catalogIsReady ( opCtx ) ; <nl> + _isReady = isReadyInMySnapshot ( opCtx ) ; <nl> <nl> { <nl> stdx : : lock_guard < Latch > lk ( _indexMultikeyPathsMutex ) ; <nl> bool IndexCatalogEntryImpl : : isReady ( OperationContext * opCtx ) const { <nl> / / out - of - sync index catalog entries . To fix this , we uassert if we detect that the <nl> / / in - memory catalog is out - of - sync with the on - disk catalog . <nl> if ( opCtx - > inMultiDocumentTransaction ( ) ) { <nl> - if ( ! _catalogIsPresent ( opCtx ) | | _catalogIsReady ( opCtx ) ! = _isReady ) { <nl> + if ( ! isPresentInMySnapshot ( opCtx ) | | isReadyInMySnapshot ( opCtx ) ! = _isReady ) { <nl> uasserted ( ErrorCodes : : SnapshotUnavailable , <nl> str : : stream ( ) < < " Unable to read from a snapshot due to pending collection " <nl> " catalog changes ; please retry the operation . " ) ; <nl> bool IndexCatalogEntryImpl : : isReady ( OperationContext * opCtx ) const { <nl> } <nl> <nl> if ( kDebugBuild ) <nl> - invariant ( _isReady = = _catalogIsReady ( opCtx ) ) ; <nl> + invariant ( _isReady = = isReadyInMySnapshot ( opCtx ) ) ; <nl> return _isReady ; <nl> } <nl> <nl> Status IndexCatalogEntryImpl : : _setMultikeyInMultiDocumentTransaction ( <nl> / / If the index is not visible within the side transaction , the index may have been created , <nl> / / but not committed , in the parent transaction . Therefore , we abandon the side transaction <nl> / / and set the multikey flag in the parent transaction . <nl> - if ( ! _catalogIsPresent ( opCtx ) ) { <nl> + if ( ! isPresentInMySnapshot ( opCtx ) ) { <nl> return { ErrorCodes : : SnapshotUnavailable , " index not visible in side transaction " } ; <nl> } <nl> <nl> NamespaceString IndexCatalogEntryImpl : : getNSSFromCatalog ( OperationContext * opCtx <nl> return DurableCatalog : : get ( opCtx ) - > getEntry ( _catalogId ) . nss ; <nl> } <nl> <nl> - bool IndexCatalogEntryImpl : : _catalogIsReady ( OperationContext * opCtx ) const { <nl> + bool IndexCatalogEntryImpl : : isReadyInMySnapshot ( OperationContext * opCtx ) const { <nl> return DurableCatalog : : get ( opCtx ) - > isIndexReady ( opCtx , _catalogId , _descriptor - > indexName ( ) ) ; <nl> } <nl> <nl> - bool IndexCatalogEntryImpl : : _catalogIsPresent ( OperationContext * opCtx ) const { <nl> + bool IndexCatalogEntryImpl : : isPresentInMySnapshot ( OperationContext * opCtx ) const { <nl> return DurableCatalog : : get ( opCtx ) - > isIndexPresent ( opCtx , _catalogId , _descriptor - > indexName ( ) ) ; <nl> } <nl> <nl> mmm a / src / mongo / db / catalog / index_catalog_entry_impl . h <nl> ppp b / src / mongo / db / catalog / index_catalog_entry_impl . h <nl> class IndexCatalogEntryImpl : public IndexCatalogEntry { <nl> const KeyStringSet & multikeyMetadataKeys , <nl> const MultikeyPaths & multikeyPaths ) final ; <nl> <nl> - / / if this ready is ready for queries <nl> bool isReady ( OperationContext * opCtx ) const final ; <nl> <nl> bool isFrozen ( ) const final ; <nl> <nl> + bool isPresentInMySnapshot ( OperationContext * opCtx ) const final ; <nl> + <nl> + bool isReadyInMySnapshot ( OperationContext * opCtx ) const final ; <nl> + <nl> KVPrefix getPrefix ( ) const final { <nl> return _prefix ; <nl> } <nl> class IndexCatalogEntryImpl : public IndexCatalogEntry { <nl> const CollectionPtr & collection , <nl> const MultikeyPaths & multikeyPaths ) ; <nl> <nl> - bool _catalogIsReady ( OperationContext * opCtx ) const ; <nl> - bool _catalogIsPresent ( OperationContext * opCtx ) const ; <nl> - <nl> / * * <nl> * Retrieves the multikey information associated with this index from ' _collection ' , <nl> * <nl> mmm a / src / mongo / db / commands / dbhash . cpp <nl> ppp b / src / mongo / db / commands / dbhash . cpp <nl> class DBHashCmd : public ErrmsgCommandDeprecated { <nl> invariant ( opCtx - > lockState ( ) - > isDbLockedForMode ( db - > name ( ) , MODE_S ) ) ; <nl> } <nl> <nl> - auto desc = collection - > getIndexCatalog ( ) - > findIdIndex ( opCtx ) ; <nl> + auto indexCatalog = collection - > getIndexCatalog ( ) ; <nl> + <nl> + / / Find the _id index descriptor even if it is not ready . <nl> + auto desc = [ & ] ( ) - > const IndexDescriptor * { <nl> + const bool includeUnfinished = true ; <nl> + auto indexIt = indexCatalog - > getIndexIterator ( opCtx , includeUnfinished ) ; <nl> + while ( indexIt - > more ( ) ) { <nl> + auto indexDesc = indexIt - > next ( ) - > descriptor ( ) ; <nl> + if ( indexDesc - > isIdIndex ( ) ) { <nl> + return indexDesc ; <nl> + } <nl> + } <nl> + return nullptr ; <nl> + } ( ) ; <nl> + <nl> <nl> std : : unique_ptr < PlanExecutor , PlanExecutor : : Deleter > exec ; <nl> if ( desc ) { <nl> + / / The collection minimumVisibleSnapshot does not protect us from reading at timestamps <nl> + / / before index catalog changes . Since we need to use the _id index , we must perform a <nl> + / / check here to force the caller to retry with a different read timestamp when the <nl> + / / index is not visible yet . <nl> + auto entry = indexCatalog - > getEntry ( desc ) ; <nl> + if ( ! entry - > isPresentInMySnapshot ( opCtx ) | | ! entry - > isReadyInMySnapshot ( opCtx ) ) { <nl> + uasserted ( ErrorCodes : : SnapshotUnavailable , <nl> + str : : stream ( ) <nl> + < < " Unable to read from a snapshot due pending catalog changes on " <nl> + " the _id index ; please retry the operation . " ) ; <nl> + } <nl> exec = InternalPlanner : : indexScan ( opCtx , <nl> collection , <nl> desc , <nl>
SERVER - 51228 dbHash should return SnapshotUnavailable if the _id index is not visible or ready
mongodb/mongo
00cc67fc18f2ef81a2d08d962eca1f2907e3b51e
2020-10-01T22:07:02Z
mmm a / TODO . txt <nl> ppp b / TODO . txt <nl> For next release <nl> This button should apply a color curve to the whole sprite to remap <nl> old indexes to the new positions . <nl> + Move launcher . cpp to base / lib adding an extension point for " gui " lib . <nl> - + Remove src / dialogs / repo , playfli , drawtext . <nl> + Move src / dialogs / aniedit , filesel to src / widgets ( remove dialogs / directory ) . <nl> + Merge everything related to configuration / settings in one class <nl> ( allow configuration per document ) . Use cfg . cpp and settings / dir . <nl> mmm a / src / CMakeLists . txt <nl> ppp b / src / CMakeLists . txt <nl> add_library ( aseprite - library <nl> commands / filters / filter_window . cpp <nl> commands / filters / filter_worker . cpp <nl> dialogs / aniedit . cpp <nl> - dialogs / drawtext . cpp <nl> dialogs / filesel . cpp <nl> dialogs / maskcol . cpp <nl> - dialogs / playfli . cpp <nl> - dialogs / repo . cpp <nl> file / ase_format . cpp <nl> file / bmp_format . cpp <nl> file / file . cpp <nl> deleted file mode 100644 <nl> index 7d99ef668 . . 000000000 <nl> mmm a / src / dialogs / drawtext . cpp <nl> ppp / dev / null <nl> <nl> - / * ASEPRITE <nl> - * Copyright ( C ) 2001 - 2012 David Capello <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 2 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 , write to the Free Software <nl> - * Foundation , Inc . , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA <nl> - * / <nl> - <nl> - # include " config . h " <nl> - <nl> - # include < allegro . h > <nl> - <nl> - # include " gui / gui . h " <nl> - <nl> - # include " app . h " <nl> - # include " app / color . h " <nl> - # include " console . h " <nl> - # include " dialogs / filesel . h " <nl> - # include " ini_file . h " <nl> - # include " modules / gui . h " <nl> - # include " modules / palettes . h " <nl> - # include " raster / blend . h " <nl> - # include " raster / image . h " <nl> - # include " raster / sprite . h " <nl> - # include " resource_finder . h " <nl> - # include " util / clipboard . h " <nl> - # include " util / misc . h " <nl> - # include " widgets / color_bar . h " <nl> - # include " widgets / color_button . h " <nl> - <nl> - static JWidget font_button ; <nl> - <nl> - static Image * render_text ( Sprite * sprite , FONT * f , const char * text , int color ) ; <nl> - <nl> - static FONT * my_load_font ( const char * filename ) ; <nl> - static void button_font_command ( JWidget widget ) ; <nl> - static void update_button_text ( ) ; <nl> - <nl> - void dialogs_draw_text ( Sprite * sprite ) <nl> - { <nl> - # if 0 <nl> - Image * image , * dest_image ; <nl> - JWidget button_ok , color_box , color_but ; <nl> - JWidget entry_size , entry_text ; <nl> - char buf [ 256 ] ; <nl> - <nl> - if ( ! App : : instance ( ) - > isGui ( ) | | ! sprite ) <nl> - return ; <nl> - <nl> - dest_image = GetImage ( sprite ) ; <nl> - if ( ! dest_image ) <nl> - return ; <nl> - <nl> - JWidgetPtr window = load_widget ( " draw_text . xml " , " drawtext_window " ) ; <nl> - <nl> - if ( ! get_widgets ( window , <nl> - " font " , & font_button , <nl> - " text " , & entry_text , <nl> - " size " , & entry_size , <nl> - " color_box " , & color_box , <nl> - " ok " , & button_ok , NULL ) ) { <nl> - return ; <nl> - } <nl> - <nl> - / * font button * / <nl> - jbutton_add_command ( font_button , button_font_command ) ; <nl> - update_button_text ( ) ; <nl> - <nl> - / * color button * / <nl> - color_but = colorbutton_new <nl> - ( get_config_color ( " DrawText " , " Color " , <nl> - colorbar_get_fg_color ( app_get_colorbar ( ) ) ) , <nl> - sprite - > imgtype ) ; <nl> - <nl> - color_box - > addChild ( color_but ) ; <nl> - <nl> - / * entries * / <nl> - usprintf ( buf , " % d " , get_config_int ( " DrawText " , " Size " , 8 ) ) ; <nl> - jwidget_set_text ( entry_size , buf ) ; <nl> - jwidget_set_text ( entry_text , <nl> - get_config_string ( " DrawText " , " Text " , " ABCabc " ) ) ; <nl> - <nl> - / * window * / <nl> - window - > remap_window ( ) ; <nl> - window - > center_window ( ) ; <nl> - window - > open_window_fg ( ) ; <nl> - <nl> - if ( window - > get_killer ( ) = = button_ok ) { <nl> - Color color_with_type = colorbutton_get_color ( color_but ) ; <nl> - const char * text = jwidget_get_text ( entry_text ) ; <nl> - const char * size_str = jwidget_get_text ( entry_size ) ; <nl> - const char * font_str = get_config_string ( " DrawText " , " Font " , <nl> - " allegro . pcx " ) ; <nl> - int color ; <nl> - int size ; <nl> - FONT * f ; <nl> - <nl> - / * size * / <nl> - size = ustrtol ( size_str , NULL , 10 ) ; <nl> - size = MID ( 1 , size , 256 ) ; <nl> - <nl> - / * load the font * / <nl> - f = my_load_font ( font_str ) ; <nl> - <nl> - / * error loading font * / <nl> - if ( ! f ) { <nl> - console_printf ( _ ( " Error loading font . \ n " ) ) ; <nl> - } <nl> - / * the font was loaded * / <nl> - else { <nl> - / * set font size * / <nl> - ji_font_set_size ( f , size ) ; <nl> - <nl> - / * setup color * / <nl> - color = color_utils : : color_for_image ( color_with_type , sprite - > imgtype ) ; <nl> - <nl> - / * update configuration * / <nl> - set_config_color ( " DrawText " , " Color " , color_with_type ) ; <nl> - set_config_string ( " DrawText " , " Text " , text ) ; <nl> - set_config_int ( " DrawText " , " Size " , size ) ; <nl> - <nl> - / * render text * / <nl> - image = render_text ( sprite , f , text , color ) ; <nl> - if ( image ) { <nl> - clipboard : : copy_image ( image , sprite_get_palette ( sprite , sprite - > frame ) ) ; <nl> - clipboard : : paste ( sprite ) ; <nl> - } <nl> - else <nl> - console_printf ( _ ( " Error rendering text . \ n " ) ) ; <nl> - <nl> - / * free the font * / <nl> - destroy_font ( f ) ; <nl> - } <nl> - } <nl> - # endif <nl> - } <nl> - <nl> - Image * RenderText ( Sprite * sprite , const char * fontname , int size , int color , const char * text ) <nl> - { <nl> - Image * render ; <nl> - FONT * f ; <nl> - <nl> - f = my_load_font ( fontname ) ; <nl> - if ( ! f ) <nl> - return NULL ; <nl> - <nl> - ji_font_set_size ( f , size ) ; <nl> - <nl> - render = render_text ( sprite , f , text , color ) ; <nl> - <nl> - destroy_font ( f ) ; <nl> - <nl> - return render ; <nl> - } <nl> - <nl> - static Image * render_text ( Sprite * sprite , FONT * f , const char * text , int color ) <nl> - { <nl> - / * TODO warning this uses Image - > dat and not Image - > line * / <nl> - # define DO ( type , colfunc ) \ <nl> - { \ <nl> - register int c ; \ <nl> - uint32_t * src = ( uint32_t * ) bmp - > dat ; \ <nl> - type * dst = ( type * ) image - > dat ; \ <nl> - for ( i = 0 ; i < pixels ; i + + ) { \ <nl> - c = * src ; \ <nl> - * dst = colfunc ; \ <nl> - src + + ; \ <nl> - dst + + ; \ <nl> - } \ <nl> - } <nl> - <nl> - int i , pixels , w , h ; <nl> - Image * image ; <nl> - BITMAP * bmp ; <nl> - <nl> - w = text_length ( f , text ) ; <nl> - h = text_height ( f ) ; <nl> - pixels = w * h ; <nl> - if ( ! pixels ) <nl> - return NULL ; <nl> - <nl> - bmp = create_bitmap_ex ( 32 , w , h ) ; <nl> - if ( ! bmp ) <nl> - return NULL ; <nl> - <nl> - ji_font_set_aa_mode ( f , - 1 ) ; <nl> - <nl> - clear_to_color ( bmp , makecol32 ( 255 , 0 , 255 ) ) ; <nl> - textout_ex ( bmp , f , text , 0 , 0 , makecol32 ( 255 , 255 , 255 ) , - 1 ) ; <nl> - <nl> - image = Image : : create ( sprite - > getPixelFormat ( ) , w , h ) ; <nl> - if ( ! image ) { <nl> - destroy_bitmap ( bmp ) ; <nl> - return NULL ; <nl> - } <nl> - <nl> - image_clear ( image , 0 ) ; <nl> - acquire_bitmap ( bmp ) ; <nl> - <nl> - switch ( image - > getPixelFormat ( ) ) { <nl> - <nl> - case IMAGE_RGB : <nl> - DO ( uint32_t , _rgba ( _rgba_getr ( color ) , <nl> - _rgba_getg ( color ) , <nl> - _rgba_getb ( color ) , getg32 ( c ) ) ) ; <nl> - break ; <nl> - <nl> - case IMAGE_GRAYSCALE : <nl> - DO ( uint16_t , _graya ( _graya_getv ( color ) , getg32 ( c ) ) ) ; <nl> - break ; <nl> - <nl> - case IMAGE_INDEXED : <nl> - DO ( uint8_t , c = = makecol32 ( 255 , 0 , 255 ) ? 0 : color ) ; <nl> - break ; <nl> - } <nl> - <nl> - release_bitmap ( bmp ) ; <nl> - destroy_bitmap ( bmp ) ; <nl> - return image ; <nl> - } <nl> - <nl> - static FONT * my_load_font ( const char * filename ) <nl> - { <nl> - FONT * f = NULL ; <nl> - char buf [ 256 ] ; <nl> - <nl> - / / Directories to search <nl> - ResourceFinder rf ; <nl> - <nl> - rf . addPath ( filename ) ; <nl> - <nl> - usprintf ( buf , " fonts / % s " , filename ) ; <nl> - rf . findInDataDir ( buf ) ; <nl> - <nl> - usprintf ( buf , " fonts / % s " , get_filename ( filename ) ) ; <nl> - rf . findInDataDir ( buf ) ; <nl> - <nl> - / / Search the font <nl> - while ( const char * path = rf . next ( ) ) { <nl> - / / Load the font <nl> - f = ji_font_load ( path ) ; <nl> - if ( f ) <nl> - break ; <nl> - else { <nl> - if ( exists ( path ) ) <nl> - PRINTF ( " Unknown font format \ " % s \ " \ n " , path ) ; <nl> - } <nl> - } <nl> - <nl> - / / Error loading font <nl> - if ( ! f ) { <nl> - Console console ; <nl> - console . printf ( " Error loading font . \ n " ) ; <nl> - } <nl> - <nl> - return f ; <nl> - } <nl> - <nl> - static void button_font_command ( JWidget widget ) <nl> - { <nl> - base : : string filename = <nl> - ase_file_selector ( " Open Font ( TTF or Allegro bitmap format ) " , <nl> - get_config_string ( " DrawText " , " Font " , " " ) , <nl> - " pcx , bmp , tga , lbm , ttf " ) ; <nl> - <nl> - if ( ! filename . empty ( ) ) { <nl> - set_config_string ( " DrawText " , " Font " , filename . c_str ( ) ) ; <nl> - update_button_text ( ) ; <nl> - } <nl> - } <nl> - <nl> - static void update_button_text ( ) <nl> - { <nl> - const char * font_str = get_config_string ( " DrawText " , " Font " , " allegro . pcx " ) ; <nl> - <nl> - font_button - > setText ( get_filename ( font_str ) ) ; <nl> - } <nl> deleted file mode 100644 <nl> index 24fdbe643 . . 000000000 <nl> mmm a / src / dialogs / drawtext . h <nl> ppp / dev / null <nl> <nl> - / * ASEPRITE <nl> - * Copyright ( C ) 2001 - 2012 David Capello <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 2 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 , write to the Free Software <nl> - * Foundation , Inc . , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA <nl> - * / <nl> - <nl> - # ifndef DIALOGS_DRAWTEXT_H_INCLUDED <nl> - # define DIALOGS_DRAWTEXT_H_INCLUDED <nl> - <nl> - class Image ; <nl> - class Sprite ; <nl> - <nl> - void dialogs_draw_text ( Sprite * sprite ) ; <nl> - <nl> - Image * RenderText ( Sprite * sprite , const char * fontname , int size , int color , const char * text ) ; <nl> - <nl> - # endif <nl> deleted file mode 100644 <nl> index e0a0f7d20 . . 000000000 <nl> mmm a / src / dialogs / playfli . cpp <nl> ppp / dev / null <nl> <nl> - / * ASEPRITE <nl> - * Copyright ( C ) 2001 - 2012 David Capello <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 2 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 , write to the Free Software <nl> - * Foundation , Inc . , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA <nl> - * / <nl> - <nl> - # include " config . h " <nl> - <nl> - # include < allegro . h > <nl> - # include < stdio . h > <nl> - # include < string . h > <nl> - <nl> - # include " gui / manager . h " <nl> - # include " gui / system . h " <nl> - <nl> - # include " app . h " <nl> - # include " file / fli / fli . h " <nl> - # include " modules / gui . h " <nl> - <nl> - static bool my_callback ( ) ; <nl> - static void my_play_fli ( const char * filename , bool loop , bool fullscreen , <nl> - bool ( * callback ) ( ) ) ; <nl> - <nl> - void play_fli_animation ( const char * filename , bool loop , bool fullscreen ) <nl> - { <nl> - if ( App : : instance ( ) - > isGui ( ) ) { <nl> - PALETTE backup ; <nl> - <nl> - jmanager_free_mouse ( ) ; <nl> - <nl> - / * hide the mouse * / <nl> - jmouse_hide ( ) ; <nl> - <nl> - / * get the current color palette * / <nl> - get_palette ( backup ) ; <nl> - <nl> - / * clear the screen * / <nl> - clear ( ji_screen ) ; <nl> - <nl> - / * clear the keyboard buffer * / <nl> - clear_keybuf ( ) ; <nl> - <nl> - / * play the fli * / <nl> - my_play_fli ( filename , loop , fullscreen , my_callback ) ; <nl> - / * play_fli ( filename , ji_screen , loop , my_callback ) ; * / <nl> - <nl> - / * clear the screen * / <nl> - clear ( ji_screen ) ; <nl> - <nl> - / * restore the color palette * / <nl> - set_palette ( backup ) ; <nl> - <nl> - / * show the mouse cursor * / <nl> - jmouse_show ( ) ; <nl> - <nl> - / * wait while the user has pushed some mouse button * / <nl> - do { <nl> - jmouse_poll ( ) ; <nl> - } while ( jmouse_b ( 0 ) ) ; <nl> - <nl> - / * clear again the keyboard buffer * / <nl> - clear_keybuf ( ) ; <nl> - <nl> - jmanager_refresh_screen ( ) ; <nl> - } <nl> - } <nl> - <nl> - static bool my_callback ( ) <nl> - { <nl> - jmouse_poll ( ) ; <nl> - <nl> - return ( keypressed ( ) | | jmouse_b ( 0 ) ) ; <nl> - } <nl> - <nl> - / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> - / * my_play_fli * / <nl> - <nl> - static int speed_timer ; <nl> - <nl> - static void speed_timer_callback ( ) <nl> - { <nl> - speed_timer + + ; <nl> - } <nl> - <nl> - END_OF_STATIC_FUNCTION ( speed_timer_callback ) ; <nl> - <nl> - static void my_play_fli ( const char * filename , bool loop , bool fullscreen , <nl> - bool ( * callback ) ( ) ) <nl> - { <nl> - unsigned char cmap [ 768 ] ; <nl> - unsigned char omap [ 768 ] ; <nl> - s_fli_header fli_header ; <nl> - BITMAP * bmp , * old ; <nl> - int x , y , w , h ; <nl> - PALETTE pal ; <nl> - int frpos ; <nl> - int done ; <nl> - int c , i ; <nl> - FILE * f ; <nl> - <nl> - / * open the file to read in binary mode * / <nl> - f = fopen ( filename , " rb " ) ; <nl> - if ( ! f ) <nl> - return ; <nl> - <nl> - / * read the header * / <nl> - fli_read_header ( f , & fli_header ) ; <nl> - fseek ( f , 128 , SEEK_SET ) ; <nl> - <nl> - bmp = create_bitmap_ex ( 8 , fli_header . width , fli_header . height ) ; <nl> - old = create_bitmap_ex ( 8 , fli_header . width , fli_header . height ) ; <nl> - <nl> - / * stretch routine doesn ' t support bitmaps of different color depths * / <nl> - if ( bitmap_color_depth ( ji_screen ) ! = 8 ) <nl> - fullscreen = false ; <nl> - <nl> - w = fli_header . width ; <nl> - h = fli_header . height ; <nl> - <nl> - if ( fullscreen ) { <nl> - double scale ; <nl> - <nl> - if ( JI_SCREEN_W - bmp - > w > JI_SCREEN_H - bmp - > h ) <nl> - scale = ( double ) JI_SCREEN_W / ( double ) w ; <nl> - else <nl> - scale = ( double ) JI_SCREEN_H / ( double ) h ; <nl> - <nl> - w = ( double ) w * ( double ) scale ; <nl> - h = ( double ) h * ( double ) scale ; <nl> - } <nl> - <nl> - x = JI_SCREEN_W / 2 - w / 2 ; <nl> - y = JI_SCREEN_H / 2 - h / 2 ; <nl> - <nl> - LOCK_VARIABLE ( speed_timer ) ; <nl> - LOCK_FUNCTION ( speed_timer_callback ) ; <nl> - <nl> - speed_timer = 0 ; <nl> - install_int_ex ( speed_timer_callback , MSEC_TO_TIMER ( fli_header . speed ) ) ; <nl> - <nl> - frpos = 0 ; <nl> - done = false ; <nl> - <nl> - while ( ! done ) { <nl> - / * read the frame * / <nl> - fli_read_frame ( f , & fli_header , <nl> - ( unsigned char * ) old - > dat , omap , <nl> - ( unsigned char * ) bmp - > dat , cmap ) ; <nl> - <nl> - if ( ( ! frpos ) | | ( memcmp ( omap , cmap , 768 ) ! = 0 ) ) { <nl> - for ( c = i = 0 ; c < 256 ; c + + ) { <nl> - pal [ c ] . r = cmap [ i + + ] > > 2 ; <nl> - pal [ c ] . g = cmap [ i + + ] > > 2 ; <nl> - pal [ c ] . b = cmap [ i + + ] > > 2 ; <nl> - } <nl> - set_palette ( pal ) ; <nl> - memcpy ( omap , cmap , 768 ) ; <nl> - } <nl> - <nl> - if ( fullscreen ) <nl> - stretch_blit ( bmp , ji_screen , <nl> - 0 , 0 , fli_header . width , fli_header . height , x , y , w , h ) ; <nl> - else <nl> - blit ( bmp , ji_screen , 0 , 0 , x , y , w , h ) ; <nl> - <nl> - jmanager_refresh_screen ( ) ; <nl> - gui_feedback ( ) ; <nl> - <nl> - do { <nl> - if ( ( * callback ) ( ) ) { <nl> - done = true ; <nl> - break ; <nl> - } <nl> - } while ( speed_timer < = 0 ) ; <nl> - <nl> - if ( ( + + frpos ) > = fli_header . frames ) { <nl> - if ( ! loop ) <nl> - break ; <nl> - else { <nl> - fseek ( f , 128 , SEEK_SET ) ; <nl> - frpos = 0 ; <nl> - } <nl> - } <nl> - <nl> - blit ( bmp , old , 0 , 0 , 0 , 0 , fli_header . width , fli_header . height ) ; <nl> - speed_timer - - ; <nl> - } <nl> - <nl> - destroy_bitmap ( bmp ) ; <nl> - destroy_bitmap ( old ) ; <nl> - <nl> - fclose ( f ) ; <nl> - } <nl> deleted file mode 100644 <nl> index 706624bf3 . . 000000000 <nl> mmm a / src / dialogs / playfli . h <nl> ppp / dev / null <nl> <nl> - / * ASEPRITE <nl> - * Copyright ( C ) 2001 - 2012 David Capello <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 2 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 , write to the Free Software <nl> - * Foundation , Inc . , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA <nl> - * / <nl> - <nl> - # ifndef DIALOGS_PLAYFLI_H_INCLUDED <nl> - # define DIALOGS_PLAYFLI_H_INCLUDED <nl> - <nl> - # include " gui / base . h " <nl> - <nl> - void play_fli_animation ( const char * filename , bool loop , bool fullscreen ) ; <nl> - <nl> - # endif <nl> deleted file mode 100644 <nl> index dde9a58c6 . . 000000000 <nl> mmm a / src / dialogs / repo . cpp <nl> ppp / dev / null <nl> <nl> - / * ASEPRITE <nl> - * Copyright ( C ) 2001 - 2012 David Capello <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 2 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 , write to the Free Software <nl> - * Foundation , Inc . , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA <nl> - * / <nl> - <nl> - # include " config . h " <nl> - <nl> - # include < allegro / gfx . h > <nl> - # include < allegro / unicode . h > <nl> - <nl> - # include " base / bind . h " <nl> - # include " gui / gui . h " <nl> - <nl> - # include " dialogs / repo . h " <nl> - # include " ini_file . h " <nl> - # include " modules / gui . h " <nl> - <nl> - static void fill_listbox ( RepoDlg * repo_dlg ) ; <nl> - static void kill_listbox ( RepoDlg * repo_dlg ) ; <nl> - <nl> - static int repo_listbox_type ( ) ; <nl> - static bool repo_listbox_msg_proc ( JWidget widget , Message * msg ) ; <nl> - <nl> - static void use_command ( Button * widget , RepoDlg * repo_dlg ) ; <nl> - static void add_command ( Button * widget , RepoDlg * repo_dlg ) ; <nl> - static void delete_command ( Button * widget , RepoDlg * repo_dlg ) ; <nl> - <nl> - void ji_show_repo_dlg ( RepoDlg * repo_dlg ) <nl> - { <nl> - Frame * window = new Frame ( false , repo_dlg - > title ) ; <nl> - Box * box1 = new Box ( JI_HORIZONTAL ) ; <nl> - Box * box2 = new Box ( JI_VERTICAL ) ; <nl> - View * view = new View ( ) ; <nl> - repo_dlg - > listbox = jlistbox_new ( ) ; <nl> - repo_dlg - > button_use = new Button ( repo_dlg - > use_text ) ; <nl> - repo_dlg - > button_add = new Button ( " & Add " ) ; <nl> - repo_dlg - > button_delete = new Button ( " & Delete " ) ; <nl> - Button * button_close = new Button ( " & Close " ) ; <nl> - <nl> - jwidget_add_hook ( repo_dlg - > listbox , repo_listbox_type ( ) , <nl> - repo_listbox_msg_proc , repo_dlg ) ; <nl> - <nl> - repo_dlg - > button_use - > Click . connect ( Bind < void > ( & use_command , repo_dlg - > button_use , repo_dlg ) ) ; <nl> - repo_dlg - > button_add - > Click . connect ( Bind < void > ( & add_command , repo_dlg - > button_add , repo_dlg ) ) ; <nl> - repo_dlg - > button_delete - > Click . connect ( Bind < void > ( & delete_command , repo_dlg - > button_delete , repo_dlg ) ) ; <nl> - button_close - > Click . connect ( Bind < void > ( & Frame : : closeWindow , window , button_close ) ) ; <nl> - <nl> - jwidget_magnetic ( repo_dlg - > button_use , true ) ; <nl> - <nl> - jwidget_expansive ( view , true ) ; <nl> - view - > attachToView ( repo_dlg - > listbox ) ; <nl> - jwidget_set_min_size ( view , JI_SCREEN_W * 25 / 100 , JI_SCREEN_H * 25 / 100 ) ; <nl> - <nl> - / * fill the list * / <nl> - fill_listbox ( repo_dlg ) ; <nl> - jlistbox_select_index ( repo_dlg - > listbox , 0 ) ; <nl> - <nl> - / * no items ? * / <nl> - if ( jlistbox_get_selected_index ( repo_dlg - > listbox ) ! = 0 ) { <nl> - repo_dlg - > button_use - > setEnabled ( false ) ; <nl> - repo_dlg - > button_delete - > setEnabled ( false ) ; <nl> - } <nl> - <nl> - / * hierarchy * / <nl> - box2 - > addChild ( repo_dlg - > button_use ) ; <nl> - box2 - > addChild ( repo_dlg - > button_add ) ; <nl> - box2 - > addChild ( repo_dlg - > button_delete ) ; <nl> - box2 - > addChild ( button_close ) ; <nl> - box1 - > addChild ( box2 ) ; <nl> - box1 - > addChild ( view ) ; <nl> - window - > addChild ( box1 ) ; <nl> - <nl> - / * default position * / <nl> - window - > remap_window ( ) ; <nl> - window - > center_window ( ) ; <nl> - <nl> - / * load window configuration * / <nl> - load_window_pos ( window , repo_dlg - > config_section ) ; <nl> - <nl> - / * open window * / <nl> - window - > open_window_fg ( ) ; <nl> - <nl> - / * kill the list * / <nl> - kill_listbox ( repo_dlg ) ; <nl> - <nl> - / * save window configuration * / <nl> - save_window_pos ( window , repo_dlg - > config_section ) ; <nl> - <nl> - jwidget_free ( window ) ; <nl> - } <nl> - <nl> - static void fill_listbox ( RepoDlg * repo_dlg ) <nl> - { <nl> - / * no item selected ( ID = 0 ) * / <nl> - repo_dlg - > listitem = 0 ; <nl> - <nl> - / * load the entries * / <nl> - if ( repo_dlg - > load_listbox ) <nl> - ( * repo_dlg - > load_listbox ) ( repo_dlg ) ; <nl> - <nl> - View : : getView ( repo_dlg - > listbox ) - > updateView ( ) ; <nl> - } <nl> - <nl> - static void kill_listbox ( RepoDlg * repo_dlg ) <nl> - { <nl> - JWidget listbox = repo_dlg - > listbox ; <nl> - JWidget listitem ; <nl> - JLink link , next ; <nl> - <nl> - / * save the entries * / <nl> - if ( repo_dlg - > save_listbox ) <nl> - ( * repo_dlg - > save_listbox ) ( repo_dlg ) ; <nl> - <nl> - / * remove all items * / <nl> - JI_LIST_FOR_EACH_SAFE ( listbox - > children , link , next ) { <nl> - listitem = reinterpret_cast < JWidget > ( link - > data ) ; <nl> - <nl> - repo_dlg - > listbox - > removeChild ( listitem ) ; <nl> - <nl> - if ( repo_dlg - > free_listitem ) { <nl> - repo_dlg - > listitem = listitem ; <nl> - ( * repo_dlg - > free_listitem ) ( repo_dlg ) ; <nl> - } <nl> - <nl> - jwidget_free ( listitem ) ; <nl> - } <nl> - } <nl> - <nl> - static int repo_listbox_type ( ) <nl> - { <nl> - static int type = 0 ; <nl> - if ( ! type ) <nl> - type = ji_register_widget_type ( ) ; <nl> - return type ; <nl> - } <nl> - <nl> - static bool repo_listbox_msg_proc ( JWidget widget , Message * msg ) <nl> - { <nl> - RepoDlg * repo_dlg = reinterpret_cast < RepoDlg * > ( jwidget_get_data ( widget , repo_listbox_type ( ) ) ) ; <nl> - <nl> - switch ( msg - > type ) { <nl> - <nl> - case JM_DESTROY : <nl> - / * do nothing ( don ' t free repo_dlg ) * / <nl> - break ; <nl> - <nl> - case JM_SIGNAL : <nl> - switch ( msg - > signal . num ) { <nl> - <nl> - case JI_SIGNAL_LISTBOX_CHANGE : <nl> - repo_dlg - > listitem = jlistbox_get_selected_child ( widget ) ; <nl> - <nl> - repo_dlg - > button_use - > setEnabled ( true ) ; <nl> - repo_dlg - > button_delete - > setEnabled ( true ) ; <nl> - break ; <nl> - <nl> - case JI_SIGNAL_LISTBOX_SELECT : <nl> - if ( repo_dlg - > use_listitem ) <nl> - if ( ! ( * repo_dlg - > use_listitem ) ( repo_dlg ) ) <nl> - widget - > closeWindow ( ) ; <nl> - break ; <nl> - } <nl> - break ; <nl> - } <nl> - <nl> - return false ; <nl> - } <nl> - <nl> - static void use_command ( Button * widget , RepoDlg * repo_dlg ) <nl> - { <nl> - if ( repo_dlg - > use_listitem ) { <nl> - if ( ! ( * repo_dlg - > use_listitem ) ( repo_dlg ) ) <nl> - widget - > closeWindow ( ) ; <nl> - } <nl> - } <nl> - <nl> - static void add_command ( Button * widget , RepoDlg * repo_dlg ) <nl> - { <nl> - int ret , added ; <nl> - <nl> - if ( repo_dlg - > add_listitem ) { <nl> - added = false ; <nl> - ret = ( * repo_dlg - > add_listitem ) ( repo_dlg , & added ) ; <nl> - <nl> - if ( added ) { <nl> - / * update the list - box * / <nl> - View : : getView ( repo_dlg - > listbox ) - > updateView ( ) ; <nl> - <nl> - / * select the last item * / <nl> - jlistbox_select_index ( repo_dlg - > listbox , <nl> - jlist_length ( repo_dlg - > listbox - > children ) - 1 ) ; <nl> - } <nl> - <nl> - if ( ! ret ) <nl> - widget - > closeWindow ( ) ; <nl> - } <nl> - } <nl> - <nl> - static void delete_command ( Button * widget , RepoDlg * repo_dlg ) <nl> - { <nl> - int ret , kill , index , last ; <nl> - <nl> - if ( repo_dlg - > delete_listitem ) { <nl> - kill = false ; <nl> - ret = ( * repo_dlg - > delete_listitem ) ( repo_dlg , & kill ) ; <nl> - <nl> - if ( kill ) { <nl> - index = jlistbox_get_selected_index ( repo_dlg - > listbox ) ; <nl> - <nl> - / * delete " repo_dlg - > listitem " * / <nl> - repo_dlg - > listbox - > removeChild ( repo_dlg - > listitem ) ; <nl> - <nl> - if ( repo_dlg - > free_listitem ) <nl> - ( * repo_dlg - > free_listitem ) ( repo_dlg ) ; <nl> - <nl> - jwidget_free ( repo_dlg - > listitem ) ; <nl> - <nl> - / * disable buttons * / <nl> - if ( ! repo_dlg - > listbox - > children ) { <nl> - repo_dlg - > button_use - > setEnabled ( false ) ; <nl> - repo_dlg - > button_delete - > setEnabled ( false ) ; <nl> - } <nl> - / * select other item * / <nl> - else { <nl> - last = jlist_length ( repo_dlg - > listbox - > children ) - 1 ; <nl> - <nl> - jlistbox_select_index ( repo_dlg - > listbox , <nl> - index > last ? last : index ) ; <nl> - } <nl> - <nl> - / * update the list - box * / <nl> - View : : getView ( repo_dlg - > listbox ) - > updateView ( ) ; <nl> - } <nl> - <nl> - if ( ! ret ) <nl> - widget - > closeWindow ( ) ; <nl> - } <nl> - } <nl> deleted file mode 100644 <nl> index ec5bf24d0 . . 000000000 <nl> mmm a / src / dialogs / repo . h <nl> ppp / dev / null <nl> <nl> - / * ASEPRITE <nl> - * Copyright ( C ) 2001 - 2012 David Capello <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 2 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 , write to the Free Software <nl> - * Foundation , Inc . , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA <nl> - * / <nl> - <nl> - # ifndef DIALOGS_REPO_H_INCLUDED <nl> - # define DIALOGS_REPO_H_INCLUDED <nl> - <nl> - # include " gui / base . h " <nl> - <nl> - class Button ; <nl> - <nl> - typedef struct RepoDlg { / * a window to shows repositories <nl> - ( used for mask / paths repositories , <nl> - and the bookmarks ) * / <nl> - <nl> - / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> - / * from user * / <nl> - <nl> - const char * config_section ; <nl> - const char * title ; <nl> - const char * use_text ; <nl> - <nl> - / * fill the list box ( you should add items to " repo_dlg - > listbox " ) * / <nl> - void ( * load_listbox ) ( struct RepoDlg * repo_dlg ) ; <nl> - <nl> - / * when the dialog is closed ( you should save the modified entries ) * / <nl> - void ( * save_listbox ) ( struct RepoDlg * repo_dlg ) ; <nl> - <nl> - / * free the " user_data " of " repo_dlg - > listitem " , don ' t call <nl> - jwidget_free ( ) , it ' s called automatically * / <nl> - void ( * free_listitem ) ( struct RepoDlg * repo_dlg ) ; <nl> - <nl> - / * return false if to close the window , true to continue ( use the <nl> - " repo_dlg - > listitem " ) * / <nl> - bool ( * use_listitem ) ( struct RepoDlg * repo_dlg ) ; <nl> - bool ( * add_listitem ) ( struct RepoDlg * repo_dlg , int * added ) ; <nl> - bool ( * delete_listitem ) ( struct RepoDlg * repo_dlg , int * kill ) ; <nl> - <nl> - void * user_data [ 4 ] ; <nl> - <nl> - / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> - / * for the user * / <nl> - <nl> - JWidget listbox ; / * list box * / <nl> - JWidget listitem ; / * selected list item * / <nl> - Button * button_use ; / * button for usage the selected item * / <nl> - Button * button_add ; / * " Add " button * / <nl> - Button * button_delete ; / * " Delete " button * / <nl> - } RepoDlg ; <nl> - <nl> - void ji_show_repo_dlg ( RepoDlg * repo_dlg ) ; <nl> - <nl> - # endif <nl>
Remove deprecated dialogs : drawtext . cpp , playfli . cpp , repo . cpp .
aseprite/aseprite
a27d1d3eeb018b994b9220c34a6fcd2aecc72851
2012-03-20T16:23:59Z
mmm a / Marlin / SanityCheck . h <nl> ppp b / Marlin / SanityCheck . h <nl> <nl> # error ULTIPANEL requires some kind of encoder . <nl> # endif <nl> <nl> + # if ENCODER_PULSES_PER_STEP < 0 <nl> + # error ENCODER_PULSES_PER_STEP should not be negative , use REVERSE_MENU_DIRECTION instead <nl> + # endif <nl> + <nl> / * * <nl> * Delta has limited bed leveling options <nl> * / <nl>
Merge pull request from jbrazio / bugfix / followup - 3485
MarlinFirmware/Marlin
9e95f30de052b9dc2c080b31bc6c9a43f07fa8db
2016-04-14T23:56:36Z
mmm a / src / common / page_table . cpp <nl> ppp b / src / common / page_table . cpp <nl> <nl> <nl> namespace Common { <nl> <nl> - PageTable : : PageTable ( std : : size_t page_size_in_bits ) : page_size_in_bits { page_size_in_bits } { } <nl> + PageTable : : PageTable ( ) = default ; <nl> <nl> PageTable : : ~ PageTable ( ) = default ; <nl> <nl> - void PageTable : : Resize ( std : : size_t address_space_width_in_bits ) { <nl> - const std : : size_t num_page_table_entries = 1ULL <nl> - < < ( address_space_width_in_bits - page_size_in_bits ) ; <nl> - <nl> + void PageTable : : Resize ( std : : size_t address_space_width_in_bits , std : : size_t page_size_in_bits , <nl> + bool has_attribute ) { <nl> + const std : : size_t num_page_table_entries { 1ULL <nl> + < < ( address_space_width_in_bits - page_size_in_bits ) } ; <nl> pointers . resize ( num_page_table_entries ) ; <nl> - attributes . resize ( num_page_table_entries ) ; <nl> - <nl> - / / The default is a 39 - bit address space , which causes an initial 1GB allocation size . If the <nl> - / / vector size is subsequently decreased ( via resize ) , the vector might not automatically <nl> - / / actually reallocate / resize its underlying allocation , which wastes up to ~ 800 MB for <nl> - / / 36 - bit titles . Call shrink_to_fit to reduce capacity to what ' s actually in use . <nl> - <nl> - pointers . shrink_to_fit ( ) ; <nl> - attributes . shrink_to_fit ( ) ; <nl> - } <nl> - <nl> - BackingPageTable : : BackingPageTable ( std : : size_t page_size_in_bits ) : PageTable { page_size_in_bits } { } <nl> - <nl> - BackingPageTable : : ~ BackingPageTable ( ) = default ; <nl> - <nl> - void BackingPageTable : : Resize ( std : : size_t address_space_width_in_bits ) { <nl> - PageTable : : Resize ( address_space_width_in_bits ) ; <nl> - const std : : size_t num_page_table_entries = 1ULL <nl> - < < ( address_space_width_in_bits - page_size_in_bits ) ; <nl> backing_addr . resize ( num_page_table_entries ) ; <nl> - backing_addr . shrink_to_fit ( ) ; <nl> + <nl> + if ( has_attribute ) { <nl> + attributes . resize ( num_page_table_entries ) ; <nl> + } <nl> } <nl> <nl> } / / namespace Common <nl> mmm a / src / common / page_table . h <nl> ppp b / src / common / page_table . h <nl> <nl> # pragma once <nl> <nl> # include < vector > <nl> + <nl> # include < boost / icl / interval_map . hpp > <nl> + <nl> # include " common / common_types . h " <nl> # include " common / memory_hook . h " <nl> + # include " common / virtual_buffer . h " <nl> <nl> namespace Common { <nl> <nl> struct SpecialRegion { <nl> * mimics the way a real CPU page table works . <nl> * / <nl> struct PageTable { <nl> - explicit PageTable ( std : : size_t page_size_in_bits ) ; <nl> + PageTable ( ) ; <nl> ~ PageTable ( ) ; <nl> <nl> / * * <nl> struct PageTable { <nl> * <nl> * @ param address_space_width_in_bits The address size width in bits . <nl> * / <nl> - void Resize ( std : : size_t address_space_width_in_bits ) ; <nl> + void Resize ( std : : size_t address_space_width_in_bits , std : : size_t page_size_in_bits , <nl> + bool has_attribute ) ; <nl> <nl> / * * <nl> * Vector of memory pointers backing each page . An entry can only be non - null if the <nl> * corresponding entry in the ` attributes ` vector is of type ` Memory ` . <nl> * / <nl> - std : : vector < u8 * > pointers ; <nl> - <nl> - / * * <nl> - * Contains MMIO handlers that back memory regions whose entries in the ` attribute ` vector is <nl> - * of type ` Special ` . <nl> - * / <nl> - boost : : icl : : interval_map < u64 , std : : set < SpecialRegion > > special_regions ; <nl> - <nl> - / * * <nl> - * Vector of fine grained page attributes . If it is set to any value other than ` Memory ` , then <nl> - * the corresponding entry in ` pointers ` MUST be set to null . <nl> - * / <nl> - std : : vector < PageType > attributes ; <nl> - <nl> - const std : : size_t page_size_in_bits { } ; <nl> - } ; <nl> - <nl> - / * * <nl> - * A more advanced Page Table with the ability to save a backing address when using it <nl> - * depends on another MMU . <nl> - * / <nl> - struct BackingPageTable : PageTable { <nl> - explicit BackingPageTable ( std : : size_t page_size_in_bits ) ; <nl> - ~ BackingPageTable ( ) ; <nl> + VirtualBuffer < u8 * > pointers ; <nl> <nl> - void Resize ( std : : size_t address_space_width_in_bits ) ; <nl> + VirtualBuffer < u64 > backing_addr ; <nl> <nl> - std : : vector < u64 > backing_addr ; <nl> + VirtualBuffer < PageType > attributes ; <nl> } ; <nl> <nl> } / / namespace Common <nl>
common : page_table : Update to use VirtualBuffer and simplify .
yuzu-emu/yuzu
4c1812ae37bef16ff9031e603bec66b31ac60692
2020-04-17T04:59:34Z
mmm a / modules / gapi / include / opencv2 / gapi / streaming / format . hpp <nl> ppp b / modules / gapi / include / opencv2 / gapi / streaming / format . hpp <nl> namespace cv { <nl> namespace gapi { <nl> namespace streaming { <nl> <nl> - cv : : gapi : : GKernelPackage kernels ( ) ; <nl> - cv : : gapi : : GBackend backend ( ) ; <nl> + GAPI_EXPORTS cv : : gapi : : GKernelPackage kernels ( ) ; <nl> <nl> / / FIXME : Make a generic kernel <nl> G_API_OP ( GCopy , < GFrame ( GFrame ) > , " org . opencv . streaming . copy " ) <nl> mmm a / modules / gapi / src / backends / common / gbackend . hpp <nl> ppp b / modules / gapi / src / backends / common / gbackend . hpp <nl> namespace gimpl { <nl> struct Data ; <nl> struct RcDesc ; <nl> <nl> + struct GAPI_EXPORTS RMatMediaAdapterBGR final : public cv : : RMat : : Adapter <nl> + { <nl> + explicit RMatMediaAdapterBGR ( const cv : : MediaFrame & frame ) : m_frame ( frame ) { } ; <nl> + <nl> + virtual cv : : RMat : : View access ( cv : : RMat : : Access a ) override <nl> + { <nl> + auto view = m_frame . access ( a = = cv : : RMat : : Access : : W ? cv : : MediaFrame : : Access : : W <nl> + : cv : : MediaFrame : : Access : : R ) ; <nl> + auto ptr = reinterpret_cast < uchar * > ( view . ptr [ 0 ] ) ; <nl> + auto stride = view . stride [ 0 ] ; <nl> + <nl> + std : : shared_ptr < cv : : MediaFrame : : View > view_ptr = <nl> + std : : make_shared < cv : : MediaFrame : : View > ( std : : move ( view ) ) ; <nl> + auto callback = [ view_ptr ] ( ) mutable { view_ptr . reset ( ) ; } ; <nl> + <nl> + return cv : : RMat : : View ( desc ( ) , ptr , stride , callback ) ; <nl> + } <nl> + <nl> + virtual cv : : GMatDesc desc ( ) const override <nl> + { <nl> + const auto & desc = m_frame . desc ( ) ; <nl> + GAPI_Assert ( desc . fmt = = cv : : MediaFormat : : BGR ) ; <nl> + return cv : : GMatDesc { CV_8U , 3 , desc . size } ; <nl> + } <nl> + <nl> + cv : : MediaFrame m_frame ; <nl> + } ; <nl> + <nl> + <nl> namespace magazine { <nl> template < typename . . . Ts > struct Class <nl> { <nl> mmm a / modules / gapi / src / backends / streaming / gstreamingbackend . cpp <nl> ppp b / modules / gapi / src / backends / streaming / gstreamingbackend . cpp <nl> class GStreamingIntrinExecutable final : public cv : : gimpl : : GIslandExecutable <nl> <nl> public : <nl> GStreamingIntrinExecutable ( const ade : : Graph & , <nl> + const cv : : GCompileArgs & , <nl> const std : : vector < ade : : NodeHandle > & ) ; <nl> <nl> const ade : : Graph & m_g ; <nl> class GStreamingBackendImpl final : public cv : : gapi : : GBackend : : Priv <nl> } <nl> <nl> virtual EPtr compile ( const ade : : Graph & graph , <nl> - const cv : : GCompileArgs & , <nl> + const cv : : GCompileArgs & args , <nl> const std : : vector < ade : : NodeHandle > & nodes ) const override <nl> { <nl> - return EPtr { new GStreamingIntrinExecutable ( graph , nodes ) } ; <nl> + return EPtr { new GStreamingIntrinExecutable ( graph , args , nodes ) } ; <nl> } <nl> <nl> virtual bool controlsMerge ( ) const override <nl> class GStreamingBackendImpl final : public cv : : gapi : : GBackend : : Priv <nl> } ; <nl> <nl> GStreamingIntrinExecutable : : GStreamingIntrinExecutable ( const ade : : Graph & g , <nl> + const cv : : GCompileArgs & args , <nl> const std : : vector < ade : : NodeHandle > & nodes ) <nl> : m_g ( g ) , m_gm ( m_g ) <nl> { <nl> GStreamingIntrinExecutable : : GStreamingIntrinExecutable ( const ade : : Graph & g , <nl> GAPI_Assert ( it ! = nodes . end ( ) & & " No operators found for this island ? ! " ) ; <nl> <nl> ConstStreamingGraph cag ( m_g ) ; <nl> - m_actor = cag . metadata ( * it ) . get < StreamingCreateFunction > ( ) . createActorFunction ( ) ; <nl> + m_actor = cag . metadata ( * it ) . get < StreamingCreateFunction > ( ) . createActorFunction ( args ) ; <nl> <nl> / / Ensure this the only op in the graph <nl> if ( std : : any_of ( it + 1 , nodes . end ( ) , is_op ) ) <nl> cv : : gapi : : GKernelPackage cv : : gapi : : streaming : : kernels ( ) <nl> void cv : : gimpl : : Copy : : Actor : : run ( cv : : gimpl : : GIslandExecutable : : IInput & in , <nl> cv : : gimpl : : GIslandExecutable : : IOutput & out ) <nl> { <nl> - while ( true ) <nl> + const auto in_msg = in . get ( ) ; <nl> + if ( cv : : util : : holds_alternative < cv : : gimpl : : EndOfStream > ( in_msg ) ) <nl> { <nl> - const auto in_msg = in . get ( ) ; <nl> - if ( cv : : util : : holds_alternative < cv : : gimpl : : EndOfStream > ( in_msg ) ) <nl> - { <nl> - out . post ( cv : : gimpl : : EndOfStream { } ) ; <nl> - return ; <nl> - } <nl> - <nl> - const cv : : GRunArgs & in_args = cv : : util : : get < cv : : GRunArgs > ( in_msg ) ; <nl> - GAPI_Assert ( in_args . size ( ) = = 1u ) ; <nl> - <nl> - cv : : GRunArgP out_arg = out . get ( 0 ) ; <nl> - * cv : : util : : get < cv : : MediaFrame * > ( out_arg ) = cv : : util : : get < cv : : MediaFrame > ( in_args [ 0 ] ) ; <nl> - out . post ( std : : move ( out_arg ) ) ; <nl> + out . post ( cv : : gimpl : : EndOfStream { } ) ; <nl> + return ; <nl> } <nl> + <nl> + const cv : : GRunArgs & in_args = cv : : util : : get < cv : : GRunArgs > ( in_msg ) ; <nl> + GAPI_Assert ( in_args . size ( ) = = 1u ) ; <nl> + <nl> + cv : : GRunArgP out_arg = out . get ( 0 ) ; <nl> + * cv : : util : : get < cv : : MediaFrame * > ( out_arg ) = cv : : util : : get < cv : : MediaFrame > ( in_args [ 0 ] ) ; <nl> + out . post ( std : : move ( out_arg ) ) ; <nl> } <nl> <nl> void cv : : gimpl : : BGR : : Actor : : run ( cv : : gimpl : : GIslandExecutable : : IInput & in , <nl> cv : : gimpl : : GIslandExecutable : : IOutput & out ) <nl> { <nl> - while ( true ) <nl> + const auto in_msg = in . get ( ) ; <nl> + if ( cv : : util : : holds_alternative < cv : : gimpl : : EndOfStream > ( in_msg ) ) <nl> { <nl> - const auto in_msg = in . get ( ) ; <nl> - if ( cv : : util : : holds_alternative < cv : : gimpl : : EndOfStream > ( in_msg ) ) <nl> - { <nl> - out . post ( cv : : gimpl : : EndOfStream { } ) ; <nl> - return ; <nl> - } <nl> - <nl> - const cv : : GRunArgs & in_args = cv : : util : : get < cv : : GRunArgs > ( in_msg ) ; <nl> - GAPI_Assert ( in_args . size ( ) = = 1u ) ; <nl> - <nl> - cv : : GRunArgP out_arg = out . get ( 0 ) ; <nl> - auto frame = cv : : util : : get < cv : : MediaFrame > ( in_args [ 0 ] ) ; <nl> - const auto & desc = frame . desc ( ) ; <nl> - <nl> - auto & rmat = * cv : : util : : get < cv : : RMat * > ( out_arg ) ; <nl> - switch ( desc . fmt ) <nl> - { <nl> - case cv : : MediaFormat : : BGR : <nl> - rmat = cv : : make_rmat < cv : : gimpl : : RMatMediaBGRAdapter > ( frame ) ; <nl> - break ; <nl> - case cv : : MediaFormat : : NV12 : <nl> + out . post ( cv : : gimpl : : EndOfStream { } ) ; <nl> + return ; <nl> + } <nl> + <nl> + const cv : : GRunArgs & in_args = cv : : util : : get < cv : : GRunArgs > ( in_msg ) ; <nl> + GAPI_Assert ( in_args . size ( ) = = 1u ) ; <nl> + <nl> + cv : : GRunArgP out_arg = out . get ( 0 ) ; <nl> + auto frame = cv : : util : : get < cv : : MediaFrame > ( in_args [ 0 ] ) ; <nl> + const auto & desc = frame . desc ( ) ; <nl> + <nl> + auto & rmat = * cv : : util : : get < cv : : RMat * > ( out_arg ) ; <nl> + switch ( desc . fmt ) <nl> + { <nl> + case cv : : MediaFormat : : BGR : <nl> + rmat = cv : : make_rmat < cv : : gimpl : : RMatMediaAdapterBGR > ( frame ) ; <nl> + break ; <nl> + case cv : : MediaFormat : : NV12 : <nl> { <nl> cv : : Mat bgr ; <nl> auto view = frame . access ( cv : : MediaFrame : : Access : : R ) ; <nl> - cv : : Mat y_plane ( desc . size , CV_8UC1 , view . ptr [ 0 ] ) ; <nl> - cv : : Mat uv_plane ( desc . size / 2 , CV_8UC2 , view . ptr [ 1 ] ) ; <nl> + cv : : Mat y_plane ( desc . size , CV_8UC1 , view . ptr [ 0 ] , view . stride [ 0 ] ) ; <nl> + cv : : Mat uv_plane ( desc . size / 2 , CV_8UC2 , view . ptr [ 1 ] , view . stride [ 1 ] ) ; <nl> cv : : cvtColorTwoPlane ( y_plane , uv_plane , bgr , cv : : COLOR_YUV2BGR_NV12 ) ; <nl> rmat = cv : : make_rmat < cv : : gimpl : : RMatAdapter > ( bgr ) ; <nl> break ; <nl> } <nl> - default : <nl> - cv : : util : : throw_error ( <nl> - std : : logic_error ( " Unsupported MediaFormat for cv : : gapi : : streaming : : BGR " ) ) ; <nl> - } <nl> - out . post ( std : : move ( out_arg ) ) ; <nl> + default : <nl> + cv : : util : : throw_error ( <nl> + std : : logic_error ( " Unsupported MediaFormat for cv : : gapi : : streaming : : BGR " ) ) ; <nl> } <nl> + out . post ( std : : move ( out_arg ) ) ; <nl> } <nl> mmm a / modules / gapi / src / backends / streaming / gstreamingbackend . hpp <nl> ppp b / modules / gapi / src / backends / streaming / gstreamingbackend . hpp <nl> <nl> namespace cv { <nl> namespace gimpl { <nl> <nl> - struct RMatMediaBGRAdapter final : public cv : : RMat : : Adapter <nl> - { <nl> - RMatMediaBGRAdapter ( cv : : MediaFrame frame ) : m_frame ( frame ) { } ; <nl> - <nl> - virtual cv : : RMat : : View access ( cv : : RMat : : Access a ) override <nl> - { <nl> - auto view = m_frame . access ( a = = cv : : RMat : : Access : : W ? cv : : MediaFrame : : Access : : W <nl> - : cv : : MediaFrame : : Access : : R ) ; <nl> - auto ptr = reinterpret_cast < uchar * > ( view . ptr [ 0 ] ) ; <nl> - auto stride = view . stride [ 0 ] ; <nl> - <nl> - std : : shared_ptr < cv : : MediaFrame : : View > view_ptr = <nl> - std : : make_shared < cv : : MediaFrame : : View > ( std : : move ( view ) ) ; <nl> - auto callback = [ view_ptr ] ( ) mutable { view_ptr . reset ( ) ; } ; <nl> - <nl> - return cv : : RMat : : View ( desc ( ) , ptr , stride , callback ) ; <nl> - } <nl> - <nl> - virtual cv : : GMatDesc desc ( ) const override <nl> - { <nl> - const auto & desc = m_frame . desc ( ) ; <nl> - GAPI_Assert ( desc . fmt = = cv : : MediaFormat : : BGR ) ; <nl> - return cv : : GMatDesc { CV_8U , 3 , desc . size } ; <nl> - } <nl> - <nl> - cv : : MediaFrame m_frame ; <nl> - } ; <nl> - <nl> struct Copy : public cv : : detail : : KernelTag <nl> { <nl> using API = cv : : gapi : : streaming : : GCopy ; <nl> struct Copy : public cv : : detail : : KernelTag <nl> class Actor final : public cv : : gapi : : streaming : : IActor <nl> { <nl> public : <nl> - explicit Actor ( ) { } <nl> + explicit Actor ( const cv : : GCompileArgs & ) { } <nl> virtual void run ( cv : : gimpl : : GIslandExecutable : : IInput & in , <nl> cv : : gimpl : : GIslandExecutable : : IOutput & out ) override ; <nl> } ; <nl> <nl> - static cv : : gapi : : streaming : : IActor : : Ptr create ( ) <nl> + static cv : : gapi : : streaming : : IActor : : Ptr create ( const cv : : GCompileArgs & args ) <nl> { <nl> - return cv : : gapi : : streaming : : IActor : : Ptr ( new Actor ( ) ) ; <nl> + return cv : : gapi : : streaming : : IActor : : Ptr ( new Actor ( args ) ) ; <nl> } <nl> <nl> static cv : : gapi : : streaming : : GStreamingKernel kernel ( ) { return { & create } ; } ; <nl> struct BGR : public cv : : detail : : KernelTag <nl> <nl> class Actor final : public cv : : gapi : : streaming : : IActor { <nl> public : <nl> - explicit Actor ( ) { } <nl> + explicit Actor ( const cv : : GCompileArgs & ) { } <nl> virtual void run ( cv : : gimpl : : GIslandExecutable : : IInput & in , <nl> cv : : gimpl : : GIslandExecutable : : IOutput & out ) override ; <nl> } ; <nl> <nl> - static cv : : gapi : : streaming : : IActor : : Ptr create ( ) <nl> + static cv : : gapi : : streaming : : IActor : : Ptr create ( const cv : : GCompileArgs & args ) <nl> { <nl> - return cv : : gapi : : streaming : : IActor : : Ptr ( new Actor ( ) ) ; <nl> + return cv : : gapi : : streaming : : IActor : : Ptr ( new Actor ( args ) ) ; <nl> } <nl> static cv : : gapi : : streaming : : GStreamingKernel kernel ( ) { return { & create } ; } ; <nl> } ; <nl> mmm a / modules / gapi / src / backends / streaming / gstreamingkernel . hpp <nl> ppp b / modules / gapi / src / backends / streaming / gstreamingkernel . hpp <nl> namespace cv { <nl> namespace gapi { <nl> namespace streaming { <nl> <nl> + GAPI_EXPORTS cv : : gapi : : GBackend backend ( ) ; <nl> + <nl> class IActor { <nl> public : <nl> using Ptr = std : : shared_ptr < IActor > ; <nl> class IActor { <nl> virtual ~ IActor ( ) = default ; <nl> } ; <nl> <nl> - using CreateActorFunction = std : : function < IActor : : Ptr ( ) > ; <nl> + using CreateActorFunction = std : : function < IActor : : Ptr ( const cv : : GCompileArgs & ) > ; <nl> struct GStreamingKernel <nl> { <nl> CreateActorFunction createActorFunction ; <nl>
Merge pull request from TolyaTalamanov : at / hotfix - gstreamingbackend
opencv/opencv
50baf76cc20389a9ab82d031e56182c4b3f61854
2020-12-15T18:05:26Z
mmm a / include / c11log / details / blocking_queue . h <nl> ppp b / include / c11log / details / blocking_queue . h <nl> class blocking_queue { <nl> if ( ! item_pushed_cond_ . wait_until ( ul , clock : : now ( ) + timeout , [ this ] ( ) { return ! this - > q_ . empty ( ) ; } ) ) <nl> return false ; <nl> } <nl> - item = q_ . front ( ) ; <nl> + item = std : : move ( q_ . front ( ) ) ; <nl> q_ . pop ( ) ; <nl> if ( q_ . size ( ) > = max_size_ - 1 ) <nl> { <nl> mmm a / src / test . cpp <nl> ppp b / src / test . cpp <nl> <nl> std : : atomic < uint64_t > push_count , pop_count ; <nl> std : : atomic < bool > active ; <nl> <nl> - using Q = c11log : : details : : blocking_queue < std : : string > ; <nl> + <nl> + <nl> + class A <nl> + { <nl> + public : <nl> + A ( ) <nl> + { <nl> + std : : cout < < " Regular ctor \ n " ; <nl> + } <nl> + A ( const A & ) <nl> + { <nl> + std : : cout < < " Copy ctor \ n " ; <nl> + } <nl> + A & operator = ( const A & ) <nl> + { <nl> + std : : cout < < " operator = \ n " ; <nl> + return * this ; <nl> + } <nl> + <nl> + A & operator = ( A & & ) <nl> + { <nl> + std : : cout < < " operator = & & \ n " ; <nl> + return * this ; <nl> + } <nl> + <nl> + A ( A & & a ) <nl> + { <nl> + std : : cout < < " Move ctor \ n " ; <nl> + } <nl> + ~ A ( ) <nl> + { <nl> + / / std : : cout < < " Dtor \ n " ; <nl> + } <nl> + <nl> + } ; <nl> + <nl> + using std : : string ; <nl> using std : : chrono : : seconds ; <nl> + using Q = c11log : : details : : blocking_queue < string > ; <nl> <nl> void pusher ( Q * q ) <nl> { <nl> + string a = " Hello " ; <nl> while ( active ) <nl> { <nl> - / / if ( q - > push ( " Hello " , seconds ( 10 ) ) ) <nl> - q - > push ( " hello " ) ; <nl> + q - > push ( a ) ; <nl> + + push_count ; <nl> } <nl> <nl> } <nl> void popper ( Q * q ) <nl> { <nl> - std : : string output ; <nl> + string output ; <nl> while ( active ) <nl> - { <nl> - / / if ( q - > pop ( output , seconds ( 10 ) ) ) <nl> - q - > pop ( output ) ; <nl> + { <nl> + q - > pop ( output ) ; <nl> + + pop_count ; <nl> } <nl> } <nl> void testq ( int size , int pushers , int poppers ) <nl> <nl> active = true ; <nl> Q q { static_cast < Q : : size_type > ( size ) } ; <nl> - <nl> + / * <nl> + A a ; <nl> + q . push ( a ) ; <nl> + std : : cout < < " Befor pop . . \ n " ; <nl> + q . pop ( a ) ; <nl> + return ; <nl> + * / <nl> + <nl> for ( int i = 0 ; i < poppers ; i + + ) <nl> new std : : thread ( std : : bind ( popper , & q ) ) ; <nl> <nl> void testq ( int size , int pushers , int poppers ) <nl> cout < < " mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm " < < endl ; <nl> } <nl> <nl> - <nl> } <nl> + <nl> + <nl> int main ( int argc , char * argv [ ] ) <nl> { <nl> + <nl> if ( argc ! = 4 ) <nl> { <nl> std : : cerr < < " Usage : " < < argv [ 0 ] < < " qsize , pushers , poppers " < < std : : endl ; <nl>
added move support to pop queque
gabime/spdlog
65e8349c6005ea0241def09d01887f12f357834f
2014-01-31T23:47:37Z
mmm a / modules / features2d / src / matchers . cpp <nl> ppp b / modules / features2d / src / matchers . cpp <nl> void BFMatcher : : radiusMatchImpl ( InputArray _queryDescriptors , std : : vector < std : : <nl> Mat dist , distf ; <nl> <nl> int iIdx , imgCount = ( int ) trainDescCollection . size ( ) ; <nl> - int dtype = normType = = NORM_HAMMING | | <nl> + int dtype = normType = = NORM_HAMMING | | normType = = NORM_HAMMING2 | | <nl> ( normType = = NORM_L1 & & queryDescriptors . type ( ) = = CV_8U ) ? CV_32S : CV_32F ; <nl> <nl> for ( iIdx = 0 ; iIdx < imgCount ; iIdx + + ) <nl>
features2d : fix BFMatcher . radiusMatch with HAMMING2
opencv/opencv
da208216ee660b9eb66f75f2005ccb16dd0f6c33
2017-08-31T15:24:02Z
mmm a / hphp / hack / test / integration / symbol_index_test . ml <nl> ppp b / hphp / hack / test / integration / symbol_index_test . ml <nl> let run_hh_check <nl> ( repo_path : string ) : unit = <nl> let hh_client_process = Process . exec <nl> hh_client_path <nl> - [ " check " ; repo_path ] <nl> + [ " check " ; repo_path ; " - - config " ; " symbolindex_search_provider = SqliteIndex " ] <nl> in <nl> let open Process_types in <nl> match Process . read_and_wait_pid ~ timeout : 75 <nl> let run_autocomplete <nl> ( context : string ) : string = <nl> let hh_client_process = Process . exec <nl> hh_client_path ~ input : context <nl> - [ repo_path ; " - - auto - complete " ] <nl> + [ repo_path ; " - - auto - complete " ; " - - config " ; " symbolindex_search_provider = SqliteIndex " ] <nl> in <nl> let open Process_types in <nl> let results = match Process . read_and_wait_pid ~ timeout : 75 <nl>
Force the symbol index test to sqlite
facebook/hhvm
47eb9219c25465f90dc15620dfb0496a44463410
2019-05-25T00:04:07Z
mmm a / Tests / EndToEndTests / Speech / DNN / Parallel1BitQuantization / baseline . windows . cpu . txt <nl> ppp b / Tests / EndToEndTests / Speech / DNN / Parallel1BitQuantization / baseline . windows . cpu . txt <nl> MPI Rank 0 : Epoch [ 1 of 3 ] - Minibatch [ 281 - 290 of 320 ] : * 640 ; CrossEntropyWith <nl> MPI Rank 0 : Epoch [ 1 of 3 ] - Minibatch [ 291 - 300 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 15885172 ; EvalErrorPrediction = 0 . 58281250 ; TotalTime = 0 . 50737s ; TotalTimePerSample = 0 . 79276ms ; SamplesPerSecond = 1261 <nl> MPI Rank 0 : Epoch [ 1 of 3 ] - Minibatch [ 301 - 310 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 22712855 ; EvalErrorPrediction = 0 . 59218750 ; TotalTime = 0 . 52187s ; TotalTimePerSample = 0 . 81542ms ; SamplesPerSecond = 1226 <nl> MPI Rank 0 : Epoch [ 1 of 3 ] - Minibatch [ 311 - 320 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 25604782 ; EvalErrorPrediction = 0 . 60625000 ; TotalTime = 0 . 53861s ; TotalTimePerSample = 0 . 84158ms ; SamplesPerSecond = 1188 <nl> - MPI Rank 0 : Finished Epoch [ 1 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 0070483 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 19 . 360161 <nl> + MPI Rank 0 : Finished Epoch [ 1 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 00704835 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 19 . 360161 <nl> MPI Rank 0 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 <nl> MPI Rank 0 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 0 of 3 , with 1 datapasses <nl> MPI Rank 0 : <nl> MPI Rank 0 : Epoch [ 2 of 3 ] - Minibatch [ 41 - 50 of 80 ] : * 2560 ; CrossEntropyWith <nl> MPI Rank 0 : Epoch [ 2 of 3 ] - Minibatch [ 51 - 60 of 80 ] : * 2560 ; CrossEntropyWithSoftmax = 1 . 94695921 ; EvalErrorPrediction = 0 . 54648438 ; TotalTime = 2 . 69169s ; TotalTimePerSample = 1 . 05144ms ; SamplesPerSecond = 951 <nl> MPI Rank 0 : Epoch [ 2 of 3 ] - Minibatch [ 61 - 70 of 80 ] : * 2560 ; CrossEntropyWithSoftmax = 1 . 94673081 ; EvalErrorPrediction = 0 . 53867188 ; TotalTime = 2 . 91287s ; TotalTimePerSample = 1 . 13784ms ; SamplesPerSecond = 878 <nl> MPI Rank 0 : Epoch [ 2 of 3 ] - Minibatch [ 71 - 80 of 80 ] : * 2560 ; CrossEntropyWithSoftmax = 1 . 91211204 ; EvalErrorPrediction = 0 . 53945312 ; TotalTime = 4 . 71405s ; TotalTimePerSample = 1 . 84142ms ; SamplesPerSecond = 543 <nl> - MPI Rank 0 : Finished Epoch [ 2 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 9837605 ; EvalErrorPrediction = 0 . 5465332 ; learningRatePerSample = 0 . 001953125 ; EpochTime = 26 . 79512 <nl> + MPI Rank 0 : Finished Epoch [ 2 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 98376045 ; EvalErrorPrediction = 0 . 5465332 ; learningRatePerSample = 0 . 001953125 ; EpochTime = 26 . 79512 <nl> MPI Rank 0 : Starting Epoch 3 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 <nl> MPI Rank 0 : minibatchiterator : epoch 2 : frames [ 40960 . . 61440 ] ( first utterance at frame 40960 ) , data subset 0 of 3 , with 1 datapasses <nl> MPI Rank 0 : <nl> MPI Rank 0 : Starting minibatch loop , DataParallelSGD training ( MyRank = 0 , NumNodes = 3 , NumGradientBits = 1 ) , distributed reading is ENABLED . <nl> MPI Rank 0 : Epoch [ 3 of 3 ] - Minibatch [ 1 - 10 of 20 ] : * 10240 ; CrossEntropyWithSoftmax = 1 . 92705928 ; EvalErrorPrediction = 0 . 54765625 ; TotalTime = 5 . 30804s ; TotalTimePerSample = 0 . 51836ms ; SamplesPerSecond = 1929 <nl> MPI Rank 0 : Epoch [ 3 of 3 ] - Minibatch [ 11 - 20 of 20 ] : * 10240 ; CrossEntropyWithSoftmax = 1 . 90745194 ; EvalErrorPrediction = 0 . 52822266 ; TotalTime = 5 . 33597s ; TotalTimePerSample = 0 . 52109ms ; SamplesPerSecond = 1919 <nl> - MPI Rank 0 : Finished Epoch [ 3 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 9172556 ; EvalErrorPrediction = 0 . 53793945 ; learningRatePerSample = 9 . 765625146e - 005 ; EpochTime = 10 . 70695 <nl> + MPI Rank 0 : Finished Epoch [ 3 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 91725561 ; EvalErrorPrediction = 0 . 53793945 ; learningRatePerSample = 9 . 765625146e - 005 ; EpochTime = 10 . 70695 <nl> MPI Rank 0 : CNTKCommandTrainEnd : speechTrain <nl> MPI Rank 0 : __COMPLETED__ <nl> MPI Rank 0 : ~ MPIWrapper <nl> MPI Rank 1 : Epoch [ 1 of 3 ] - Minibatch [ 281 - 290 of 320 ] : * 640 ; CrossEntropyWith <nl> MPI Rank 1 : Epoch [ 1 of 3 ] - Minibatch [ 291 - 300 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 15885172 ; EvalErrorPrediction = 0 . 58281250 ; TotalTime = 0 . 59372s ; TotalTimePerSample = 0 . 92769ms ; SamplesPerSecond = 1077 <nl> MPI Rank 1 : Epoch [ 1 of 3 ] - Minibatch [ 301 - 310 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 22712855 ; EvalErrorPrediction = 0 . 59218750 ; TotalTime = 0 . 46207s ; TotalTimePerSample = 0 . 72198ms ; SamplesPerSecond = 1385 <nl> MPI Rank 1 : Epoch [ 1 of 3 ] - Minibatch [ 311 - 320 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 25604782 ; EvalErrorPrediction = 0 . 60625000 ; TotalTime = 0 . 38769s ; TotalTimePerSample = 0 . 60577ms ; SamplesPerSecond = 1650 <nl> - MPI Rank 1 : Finished Epoch [ 1 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 0070483 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 19 . 954493 <nl> + MPI Rank 1 : Finished Epoch [ 1 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 00704835 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 19 . 954493 <nl> MPI Rank 1 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 <nl> MPI Rank 1 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 1 of 3 , with 1 datapasses <nl> MPI Rank 1 : <nl> MPI Rank 1 : Epoch [ 2 of 3 ] - Minibatch [ 41 - 50 of 80 ] : * 2560 ; CrossEntropyWith <nl> MPI Rank 1 : Epoch [ 2 of 3 ] - Minibatch [ 51 - 60 of 80 ] : * 2560 ; CrossEntropyWithSoftmax = 1 . 94695921 ; EvalErrorPrediction = 0 . 54648438 ; TotalTime = 2 . 69166s ; TotalTimePerSample = 1 . 05143ms ; SamplesPerSecond = 951 <nl> MPI Rank 1 : Epoch [ 2 of 3 ] - Minibatch [ 61 - 70 of 80 ] : * 2560 ; CrossEntropyWithSoftmax = 1 . 94673081 ; EvalErrorPrediction = 0 . 53867188 ; TotalTime = 2 . 91281s ; TotalTimePerSample = 1 . 13782ms ; SamplesPerSecond = 878 <nl> MPI Rank 1 : Epoch [ 2 of 3 ] - Minibatch [ 71 - 80 of 80 ] : * 2560 ; CrossEntropyWithSoftmax = 1 . 91211204 ; EvalErrorPrediction = 0 . 53945312 ; TotalTime = 4 . 71421s ; TotalTimePerSample = 1 . 84149ms ; SamplesPerSecond = 543 <nl> - MPI Rank 1 : Finished Epoch [ 2 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 9837605 ; EvalErrorPrediction = 0 . 5465332 ; learningRatePerSample = 0 . 001953125 ; EpochTime = 26 . 795095 <nl> + MPI Rank 1 : Finished Epoch [ 2 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 98376045 ; EvalErrorPrediction = 0 . 5465332 ; learningRatePerSample = 0 . 001953125 ; EpochTime = 26 . 795095 <nl> MPI Rank 1 : Starting Epoch 3 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 <nl> MPI Rank 1 : minibatchiterator : epoch 2 : frames [ 40960 . . 61440 ] ( first utterance at frame 40960 ) , data subset 1 of 3 , with 1 datapasses <nl> MPI Rank 1 : <nl> MPI Rank 1 : Starting minibatch loop , DataParallelSGD training ( MyRank = 1 , NumNodes = 3 , NumGradientBits = 1 ) , distributed reading is ENABLED . <nl> MPI Rank 1 : Epoch [ 3 of 3 ] - Minibatch [ 1 - 10 of 20 ] : * 10240 ; CrossEntropyWithSoftmax = 1 . 92705928 ; EvalErrorPrediction = 0 . 54765625 ; TotalTime = 5 . 31338s ; TotalTimePerSample = 0 . 51888ms ; SamplesPerSecond = 1927 <nl> MPI Rank 1 : Epoch [ 3 of 3 ] - Minibatch [ 11 - 20 of 20 ] : * 10240 ; CrossEntropyWithSoftmax = 1 . 90745194 ; EvalErrorPrediction = 0 . 52822266 ; TotalTime = 5 . 33601s ; TotalTimePerSample = 0 . 52110ms ; SamplesPerSecond = 1919 <nl> - MPI Rank 1 : Finished Epoch [ 3 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 9172556 ; EvalErrorPrediction = 0 . 53793945 ; learningRatePerSample = 9 . 765625146e - 005 ; EpochTime = 10 . 706864 <nl> + MPI Rank 1 : Finished Epoch [ 3 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 91725561 ; EvalErrorPrediction = 0 . 53793945 ; learningRatePerSample = 9 . 765625146e - 005 ; EpochTime = 10 . 706864 <nl> MPI Rank 1 : CNTKCommandTrainEnd : speechTrain <nl> MPI Rank 1 : __COMPLETED__ <nl> MPI Rank 1 : ~ MPIWrapper <nl> MPI Rank 2 : Epoch [ 1 of 3 ] - Minibatch [ 281 - 290 of 320 ] : * 640 ; CrossEntropyWith <nl> MPI Rank 2 : Epoch [ 1 of 3 ] - Minibatch [ 291 - 300 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 15885172 ; EvalErrorPrediction = 0 . 58281250 ; TotalTime = 0 . 25995s ; TotalTimePerSample = 0 . 40618ms ; SamplesPerSecond = 2461 <nl> MPI Rank 2 : Epoch [ 1 of 3 ] - Minibatch [ 301 - 310 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 22712855 ; EvalErrorPrediction = 0 . 59218750 ; TotalTime = 0 . 25464s ; TotalTimePerSample = 0 . 39788ms ; SamplesPerSecond = 2513 <nl> MPI Rank 2 : Epoch [ 1 of 3 ] - Minibatch [ 311 - 320 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 25604782 ; EvalErrorPrediction = 0 . 60625000 ; TotalTime = 0 . 24944s ; TotalTimePerSample = 0 . 38974ms ; SamplesPerSecond = 2565 <nl> - MPI Rank 2 : Finished Epoch [ 1 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 0070483 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 21 . 919183 <nl> + MPI Rank 2 : Finished Epoch [ 1 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 00704835 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 21 . 919183 <nl> MPI Rank 2 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 <nl> MPI Rank 2 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 2 of 3 , with 1 datapasses <nl> MPI Rank 2 : <nl> MPI Rank 2 : Epoch [ 2 of 3 ] - Minibatch [ 41 - 50 of 80 ] : * 2560 ; CrossEntropyWith <nl> MPI Rank 2 : Epoch [ 2 of 3 ] - Minibatch [ 51 - 60 of 80 ] : * 2560 ; CrossEntropyWithSoftmax = 1 . 94695921 ; EvalErrorPrediction = 0 . 54648438 ; TotalTime = 2 . 69245s ; TotalTimePerSample = 1 . 05174ms ; SamplesPerSecond = 950 <nl> MPI Rank 2 : Epoch [ 2 of 3 ] - Minibatch [ 61 - 70 of 80 ] : * 2560 ; CrossEntropyWithSoftmax = 1 . 94673081 ; EvalErrorPrediction = 0 . 53867188 ; TotalTime = 2 . 91239s ; TotalTimePerSample = 1 . 13765ms ; SamplesPerSecond = 879 <nl> MPI Rank 2 : Epoch [ 2 of 3 ] - Minibatch [ 71 - 80 of 80 ] : * 2560 ; CrossEntropyWithSoftmax = 1 . 91211204 ; EvalErrorPrediction = 0 . 53945312 ; TotalTime = 4 . 71988s ; TotalTimePerSample = 1 . 84370ms ; SamplesPerSecond = 542 <nl> - MPI Rank 2 : Finished Epoch [ 2 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 9837605 ; EvalErrorPrediction = 0 . 5465332 ; learningRatePerSample = 0 . 001953125 ; EpochTime = 26 . 800757 <nl> + MPI Rank 2 : Finished Epoch [ 2 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 98376045 ; EvalErrorPrediction = 0 . 5465332 ; learningRatePerSample = 0 . 001953125 ; EpochTime = 26 . 800757 <nl> MPI Rank 2 : Starting Epoch 3 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 <nl> MPI Rank 2 : minibatchiterator : epoch 2 : frames [ 40960 . . 61440 ] ( first utterance at frame 40960 ) , data subset 2 of 3 , with 1 datapasses <nl> MPI Rank 2 : <nl> MPI Rank 2 : Starting minibatch loop , DataParallelSGD training ( MyRank = 2 , NumNodes = 3 , NumGradientBits = 1 ) , distributed reading is ENABLED . <nl> MPI Rank 2 : Epoch [ 3 of 3 ] - Minibatch [ 1 - 10 of 20 ] : * 10240 ; CrossEntropyWithSoftmax = 1 . 92705928 ; EvalErrorPrediction = 0 . 54765625 ; TotalTime = 5 . 32871s ; TotalTimePerSample = 0 . 52038ms ; SamplesPerSecond = 1921 <nl> MPI Rank 2 : Epoch [ 3 of 3 ] - Minibatch [ 11 - 20 of 20 ] : * 10240 ; CrossEntropyWithSoftmax = 1 . 90745194 ; EvalErrorPrediction = 0 . 52822266 ; TotalTime = 5 . 33578s ; TotalTimePerSample = 0 . 52107ms ; SamplesPerSecond = 1919 <nl> - MPI Rank 2 : Finished Epoch [ 3 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 9172556 ; EvalErrorPrediction = 0 . 53793945 ; learningRatePerSample = 9 . 765625146e - 005 ; EpochTime = 10 . 706562 <nl> + MPI Rank 2 : Finished Epoch [ 3 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 91725561 ; EvalErrorPrediction = 0 . 53793945 ; learningRatePerSample = 9 . 765625146e - 005 ; EpochTime = 10 . 706562 <nl> MPI Rank 2 : CNTKCommandTrainEnd : speechTrain <nl> MPI Rank 2 : __COMPLETED__ <nl> MPI Rank 2 : ~ MPIWrapper <nl> mmm a / Tests / EndToEndTests / Speech / DNN / ParallelBufferedAsyncGradientAggregation / baseline . windows . cpu . txt <nl> ppp b / Tests / EndToEndTests / Speech / DNN / ParallelBufferedAsyncGradientAggregation / baseline . windows . cpu . txt <nl> MPI Rank 0 : Epoch [ 1 of 4 ] - Minibatch [ 281 - 290 of 320 ] : * 640 ; CrossEntropyWith <nl> MPI Rank 0 : Epoch [ 1 of 4 ] - Minibatch [ 291 - 300 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 15885172 ; EvalErrorPrediction = 0 . 58281250 ; TotalTime = 2 . 45019s ; TotalTimePerSample = 3 . 82842ms ; SamplesPerSecond = 261 <nl> MPI Rank 0 : Epoch [ 1 of 4 ] - Minibatch [ 301 - 310 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 22712855 ; EvalErrorPrediction = 0 . 59218750 ; TotalTime = 2 . 02733s ; TotalTimePerSample = 3 . 16770ms ; SamplesPerSecond = 315 <nl> MPI Rank 0 : Epoch [ 1 of 4 ] - Minibatch [ 311 - 320 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 25604782 ; EvalErrorPrediction = 0 . 60625000 ; TotalTime = 2 . 02734s ; TotalTimePerSample = 3 . 16772ms ; SamplesPerSecond = 315 <nl> - MPI Rank 0 : Finished Epoch [ 1 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 0070483 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 193 . 39289 <nl> + MPI Rank 0 : Finished Epoch [ 1 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 00704835 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 193 . 39289 <nl> MPI Rank 0 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 <nl> MPI Rank 0 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 0 of 3 , with 1 datapasses <nl> MPI Rank 0 : <nl> MPI Rank 0 : <nl> MPI Rank 0 : Starting minibatch loop , DataParallelSGD training ( MyRank = 0 , NumNodes = 3 , NumGradientBits = 1 ) , BufferedAsyncGradientAggregation is ENABLED , distributed reading is ENABLED . <nl> MPI Rank 0 : Epoch [ 3 of 4 ] - Minibatch [ 1 - 10 of 20 ] : * 9216 ; CrossEntropyWithSoftmax = 2 . 04504148 ; EvalErrorPrediction = 0 . 55772569 ; TotalTime = 9 . 39820s ; TotalTimePerSample = 1 . 01977ms ; SamplesPerSecond = 980 <nl> MPI Rank 0 : Epoch [ 3 of 4 ] - Minibatch [ 11 - 20 of 20 ] : * 10240 ; CrossEntropyWithSoftmax = 2 . 02126122 ; EvalErrorPrediction = 0 . 56220703 ; TotalTime = 9 . 88302s ; TotalTimePerSample = 0 . 96514ms ; SamplesPerSecond = 1036 <nl> - MPI Rank 0 : Finished Epoch [ 3 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 2 . 0287034 ; EvalErrorPrediction = 0 . 55952148 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 19 . 630745 <nl> + MPI Rank 0 : Finished Epoch [ 3 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 2 . 02870336 ; EvalErrorPrediction = 0 . 55952148 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 19 . 630745 <nl> MPI Rank 0 : Starting Epoch 4 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 <nl> MPI Rank 0 : minibatchiterator : epoch 3 : frames [ 61440 . . 81920 ] ( first utterance at frame 61440 ) , data subset 0 of 3 , with 1 datapasses <nl> MPI Rank 0 : <nl> MPI Rank 1 : Epoch [ 1 of 4 ] - Minibatch [ 281 - 290 of 320 ] : * 640 ; CrossEntropyWith <nl> MPI Rank 1 : Epoch [ 1 of 4 ] - Minibatch [ 291 - 300 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 15885172 ; EvalErrorPrediction = 0 . 58281250 ; TotalTime = 5 . 77072s ; TotalTimePerSample = 9 . 01675ms ; SamplesPerSecond = 110 <nl> MPI Rank 1 : Epoch [ 1 of 4 ] - Minibatch [ 301 - 310 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 22712855 ; EvalErrorPrediction = 0 . 59218750 ; TotalTime = 6 . 17208s ; TotalTimePerSample = 9 . 64387ms ; SamplesPerSecond = 103 <nl> MPI Rank 1 : Epoch [ 1 of 4 ] - Minibatch [ 311 - 320 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 25604782 ; EvalErrorPrediction = 0 . 60625000 ; TotalTime = 5 . 09985s ; TotalTimePerSample = 7 . 96852ms ; SamplesPerSecond = 125 <nl> - MPI Rank 1 : Finished Epoch [ 1 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 0070483 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 187 . 18621 <nl> + MPI Rank 1 : Finished Epoch [ 1 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 00704835 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 187 . 18621 <nl> MPI Rank 1 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 <nl> MPI Rank 1 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 1 of 3 , with 1 datapasses <nl> MPI Rank 1 : <nl> MPI Rank 1 : <nl> MPI Rank 1 : Starting minibatch loop , DataParallelSGD training ( MyRank = 1 , NumNodes = 3 , NumGradientBits = 1 ) , BufferedAsyncGradientAggregation is ENABLED , distributed reading is ENABLED . <nl> MPI Rank 1 : Epoch [ 3 of 4 ] - Minibatch [ 1 - 10 of 20 ] : * 9216 ; CrossEntropyWithSoftmax = 2 . 04504148 ; EvalErrorPrediction = 0 . 55772569 ; TotalTime = 9 . 33898s ; TotalTimePerSample = 1 . 01334ms ; SamplesPerSecond = 986 <nl> MPI Rank 1 : Epoch [ 3 of 4 ] - Minibatch [ 11 - 20 of 20 ] : * 10240 ; CrossEntropyWithSoftmax = 2 . 02126122 ; EvalErrorPrediction = 0 . 56220703 ; TotalTime = 9 . 89586s ; TotalTimePerSample = 0 . 96639ms ; SamplesPerSecond = 1034 <nl> - MPI Rank 1 : Finished Epoch [ 3 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 2 . 0287034 ; EvalErrorPrediction = 0 . 55952148 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 19 . 630699 <nl> + MPI Rank 1 : Finished Epoch [ 3 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 2 . 02870336 ; EvalErrorPrediction = 0 . 55952148 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 19 . 630699 <nl> MPI Rank 1 : Starting Epoch 4 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 <nl> MPI Rank 1 : minibatchiterator : epoch 3 : frames [ 61440 . . 81920 ] ( first utterance at frame 61440 ) , data subset 1 of 3 , with 1 datapasses <nl> MPI Rank 1 : <nl> MPI Rank 2 : Epoch [ 1 of 4 ] - Minibatch [ 281 - 290 of 320 ] : * 640 ; CrossEntropyWith <nl> MPI Rank 2 : Epoch [ 1 of 4 ] - Minibatch [ 291 - 300 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 15885172 ; EvalErrorPrediction = 0 . 58281250 ; TotalTime = 4 . 75844s ; TotalTimePerSample = 7 . 43507ms ; SamplesPerSecond = 134 <nl> MPI Rank 2 : Epoch [ 1 of 4 ] - Minibatch [ 301 - 310 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 22712855 ; EvalErrorPrediction = 0 . 59218750 ; TotalTime = 4 . 59292s ; TotalTimePerSample = 7 . 17644ms ; SamplesPerSecond = 139 <nl> MPI Rank 2 : Epoch [ 1 of 4 ] - Minibatch [ 311 - 320 of 320 ] : * 640 ; CrossEntropyWithSoftmax = 2 . 25604782 ; EvalErrorPrediction = 0 . 60625000 ; TotalTime = 5 . 49564s ; TotalTimePerSample = 8 . 58693ms ; SamplesPerSecond = 116 <nl> - MPI Rank 2 : Finished Epoch [ 1 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 0070483 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 179 . 99776 <nl> + MPI Rank 2 : Finished Epoch [ 1 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 00704835 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 179 . 99776 <nl> MPI Rank 2 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 <nl> MPI Rank 2 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 2 of 3 , with 1 datapasses <nl> MPI Rank 2 : <nl> MPI Rank 2 : <nl> MPI Rank 2 : Starting minibatch loop , DataParallelSGD training ( MyRank = 2 , NumNodes = 3 , NumGradientBits = 1 ) , BufferedAsyncGradientAggregation is ENABLED , distributed reading is ENABLED . <nl> MPI Rank 2 : Epoch [ 3 of 4 ] - Minibatch [ 1 - 10 of 20 ] : * 9216 ; CrossEntropyWithSoftmax = 2 . 04504148 ; EvalErrorPrediction = 0 . 55772569 ; TotalTime = 8 . 99696s ; TotalTimePerSample = 0 . 97623ms ; SamplesPerSecond = 1024 <nl> MPI Rank 2 : Epoch [ 3 of 4 ] - Minibatch [ 11 - 20 of 20 ] : * 10240 ; CrossEntropyWithSoftmax = 2 . 02126122 ; EvalErrorPrediction = 0 . 56220703 ; TotalTime = 9 . 94059s ; TotalTimePerSample = 0 . 97076ms ; SamplesPerSecond = 1030 <nl> - MPI Rank 2 : Finished Epoch [ 3 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 2 . 0287034 ; EvalErrorPrediction = 0 . 55952148 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 19 . 63073 <nl> + MPI Rank 2 : Finished Epoch [ 3 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 2 . 02870336 ; EvalErrorPrediction = 0 . 55952148 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 19 . 63073 <nl> MPI Rank 2 : Starting Epoch 4 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 <nl> MPI Rank 2 : minibatchiterator : epoch 3 : frames [ 61440 . . 81920 ] ( first utterance at frame 61440 ) , data subset 2 of 3 , with 1 datapasses <nl> MPI Rank 2 : <nl> mmm a / Tests / EndToEndTests / Speech / DNN / ParallelCrossValidation / baseline . windows . cpu . txt <nl> ppp b / Tests / EndToEndTests / Speech / DNN / ParallelCrossValidation / baseline . windows . cpu . txt <nl> MPI Rank 0 : Epoch [ 1 of 3 ] - Minibatch [ 281 - 290 , 90 . 63 % ] : * 640 ; CrossEntropyWit <nl> MPI Rank 0 : Epoch [ 1 of 3 ] - Minibatch [ 291 - 300 , 93 . 75 % ] : * 640 ; CrossEntropyWithSoftmax = 2 . 15885172 ; EvalErrorPrediction = 0 . 58281250 ; TotalTime = 2 . 0545s ; SamplesPerSecond = 311 . 5 <nl> MPI Rank 0 : Epoch [ 1 of 3 ] - Minibatch [ 301 - 310 , 96 . 88 % ] : * 640 ; CrossEntropyWithSoftmax = 2 . 22712855 ; EvalErrorPrediction = 0 . 59218750 ; TotalTime = 2 . 0151s ; SamplesPerSecond = 317 . 6 <nl> MPI Rank 0 : Epoch [ 1 of 3 ] - Minibatch [ 311 - 320 , 100 . 00 % ] : * 640 ; CrossEntropyWithSoftmax = 2 . 25604782 ; EvalErrorPrediction = 0 . 60625000 ; TotalTime = 1 . 9242s ; SamplesPerSecond = 332 . 6 <nl> - MPI Rank 0 : Finished Epoch [ 1 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 0070483 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 65 . 6342 <nl> + MPI Rank 0 : Finished Epoch [ 1 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 00704835 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 65 . 6342 <nl> MPI Rank 0 : <nl> MPI Rank 0 : <nl> MPI Rank 0 : Allocating matrices for forward and / or backward propagation . <nl> MPI Rank 1 : Epoch [ 1 of 3 ] - Minibatch [ 281 - 290 , 90 . 63 % ] : * 640 ; CrossEntropyWit <nl> MPI Rank 1 : Epoch [ 1 of 3 ] - Minibatch [ 291 - 300 , 93 . 75 % ] : * 640 ; CrossEntropyWithSoftmax = 2 . 15885172 ; EvalErrorPrediction = 0 . 58281250 ; TotalTime = 2 . 0554s ; SamplesPerSecond = 311 . 4 <nl> MPI Rank 1 : Epoch [ 1 of 3 ] - Minibatch [ 301 - 310 , 96 . 88 % ] : * 640 ; CrossEntropyWithSoftmax = 2 . 22712855 ; EvalErrorPrediction = 0 . 59218750 ; TotalTime = 2 . 0182s ; SamplesPerSecond = 317 . 1 <nl> MPI Rank 1 : Epoch [ 1 of 3 ] - Minibatch [ 311 - 320 , 100 . 00 % ] : * 640 ; CrossEntropyWithSoftmax = 2 . 25604782 ; EvalErrorPrediction = 0 . 60625000 ; TotalTime = 1 . 9190s ; SamplesPerSecond = 333 . 5 <nl> - MPI Rank 1 : Finished Epoch [ 1 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 0070483 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 65 . 6342 <nl> + MPI Rank 1 : Finished Epoch [ 1 of 3 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 00704835 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 65 . 6342 <nl> MPI Rank 1 : <nl> MPI Rank 1 : <nl> MPI Rank 1 : Allocating matrices for forward and / or backward propagation . <nl> mmm a / Tests / EndToEndTests / Speech / DNN / ParallelNoQuantizationBufferedAsyncGradientAggregation / baseline . windows . cpu . txt <nl> ppp b / Tests / EndToEndTests / Speech / DNN / ParallelNoQuantizationBufferedAsyncGradientAggregation / baseline . windows . cpu . txt <nl> MPI Rank 0 : Epoch [ 1 of 4 ] - Minibatch [ 281 - 290 , 90 . 63 % ] : * 640 ; CrossEntropyWit <nl> MPI Rank 0 : Epoch [ 1 of 4 ] - Minibatch [ 291 - 300 , 93 . 75 % ] : * 640 ; CrossEntropyWithSoftmax = 2 . 15885172 ; EvalErrorPrediction = 0 . 58281250 ; TotalTime = 4 . 4403s ; SamplesPerSecond = 144 . 1 <nl> MPI Rank 0 : Epoch [ 1 of 4 ] - Minibatch [ 301 - 310 , 96 . 88 % ] : * 640 ; CrossEntropyWithSoftmax = 2 . 22712855 ; EvalErrorPrediction = 0 . 59218750 ; TotalTime = 5 . 0005s ; SamplesPerSecond = 128 . 0 <nl> MPI Rank 0 : Epoch [ 1 of 4 ] - Minibatch [ 311 - 320 , 100 . 00 % ] : * 640 ; CrossEntropyWithSoftmax = 2 . 25604782 ; EvalErrorPrediction = 0 . 60625000 ; TotalTime = 5 . 5427s ; SamplesPerSecond = 115 . 5 <nl> - MPI Rank 0 : Finished Epoch [ 1 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 0070483 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 227 . 265 <nl> + MPI Rank 0 : Finished Epoch [ 1 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 00704835 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 227 . 265 <nl> MPI Rank 0 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 momentum as time constant = 607 . 5 samples <nl> MPI Rank 0 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 0 of 3 , with 1 datapasses <nl> MPI Rank 0 : <nl> MPI Rank 0 : Actual gradient aggregation time : 0 . 595437 <nl> MPI Rank 0 : Epoch [ 2 of 4 ] - Minibatch [ 71 - 80 , 100 . 00 % ] : * 2560 ; CrossEntropyWithSoftmax = 2 . 06473750 ; EvalErrorPrediction = 0 . 56953125 ; TotalTime = 6 . 1891s ; SamplesPerSecond = 413 . 6 <nl> MPI Rank 0 : Async gradient aggregation wait time : 0 . 189996 <nl> MPI Rank 0 : Actual gradient aggregation time : 0 . 121157 <nl> - MPI Rank 0 : Finished Epoch [ 2 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 2 . 1036702 ; EvalErrorPrediction = 0 . 57451172 ; learningRatePerSample = 0 . 001953125 ; EpochTime = 49 . 0094 <nl> + MPI Rank 0 : Finished Epoch [ 2 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 2 . 10367019 ; EvalErrorPrediction = 0 . 57451172 ; learningRatePerSample = 0 . 001953125 ; EpochTime = 49 . 0094 <nl> MPI Rank 0 : Starting Epoch 3 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 momentum as time constant = 2429 . 9 samples <nl> MPI Rank 0 : minibatchiterator : epoch 2 : frames [ 40960 . . 61440 ] ( first utterance at frame 40960 ) , data subset 0 of 3 , with 1 datapasses <nl> MPI Rank 0 : <nl> MPI Rank 0 : Actual gradient aggregation time : 1 . 0346 <nl> MPI Rank 0 : Async gradient aggregation wait time : 1 . 1e - 005 <nl> MPI Rank 0 : Actual gradient aggregation time : 0 . 773221 <nl> MPI Rank 0 : Epoch [ 3 of 4 ] - Minibatch [ 11 - 20 , 100 . 00 % ] : * 10240 ; CrossEntropyWithSoftmax = 1 . 94811890 ; EvalErrorPrediction = 0 . 52695313 ; TotalTime = 11 . 2428s ; SamplesPerSecond = 910 . 8 <nl> - MPI Rank 0 : Finished Epoch [ 3 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 989734 ; EvalErrorPrediction = 0 . 53388672 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 23 . 4389 <nl> + MPI Rank 0 : Finished Epoch [ 3 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 98973403 ; EvalErrorPrediction = 0 . 53388672 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 23 . 4389 <nl> MPI Rank 0 : Starting Epoch 4 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 momentum as time constant = 2429 . 9 samples <nl> MPI Rank 0 : minibatchiterator : epoch 3 : frames [ 61440 . . 81920 ] ( first utterance at frame 61440 ) , data subset 0 of 3 , with 1 datapasses <nl> MPI Rank 0 : <nl> MPI Rank 0 : Async gradient aggregation wait time : 1 . 1e - 005 <nl> MPI Rank 0 : Actual gradient aggregation time : 0 . 697183 <nl> MPI Rank 0 : Epoch [ 4 of 4 ] - Minibatch [ 11 - 20 , 100 . 00 % ] : * 10240 ; CrossEntropyWithSoftmax = 1 . 88234725 ; EvalErrorPrediction = 0 . 51093750 ; TotalTime = 11 . 2251s ; SamplesPerSecond = 912 . 2 <nl> MPI Rank 0 : Async gradient aggregation wait time : 9e - 006 <nl> - MPI Rank 0 : Finished Epoch [ 4 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 8894112 ; EvalErrorPrediction = 0 . 51376953 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 22 . 561 <nl> + MPI Rank 0 : Finished Epoch [ 4 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 88941123 ; EvalErrorPrediction = 0 . 51376953 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 22 . 561 <nl> MPI Rank 0 : CNTKCommandTrainEnd : speechTrain <nl> MPI Rank 0 : __COMPLETED__ <nl> MPI Rank 0 : ~ MPIWrapper <nl> MPI Rank 1 : Epoch [ 1 of 4 ] - Minibatch [ 281 - 290 , 90 . 63 % ] : * 640 ; CrossEntropyWit <nl> MPI Rank 1 : Epoch [ 1 of 4 ] - Minibatch [ 291 - 300 , 93 . 75 % ] : * 640 ; CrossEntropyWithSoftmax = 2 . 15885172 ; EvalErrorPrediction = 0 . 58281250 ; TotalTime = 2 . 5137s ; SamplesPerSecond = 254 . 6 <nl> MPI Rank 1 : Epoch [ 1 of 4 ] - Minibatch [ 301 - 310 , 96 . 88 % ] : * 640 ; CrossEntropyWithSoftmax = 2 . 22712855 ; EvalErrorPrediction = 0 . 59218750 ; TotalTime = 2 . 5769s ; SamplesPerSecond = 248 . 4 <nl> MPI Rank 1 : Epoch [ 1 of 4 ] - Minibatch [ 311 - 320 , 100 . 00 % ] : * 640 ; CrossEntropyWithSoftmax = 2 . 25604782 ; EvalErrorPrediction = 0 . 60625000 ; TotalTime = 2 . 5871s ; SamplesPerSecond = 247 . 4 <nl> - MPI Rank 1 : Finished Epoch [ 1 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 0070483 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 238 . 763 <nl> + MPI Rank 1 : Finished Epoch [ 1 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 00704835 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 238 . 763 <nl> MPI Rank 1 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 momentum as time constant = 607 . 5 samples <nl> MPI Rank 1 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 1 of 3 , with 1 datapasses <nl> MPI Rank 1 : <nl> MPI Rank 1 : Actual gradient aggregation time : 0 . 010844 <nl> MPI Rank 1 : Epoch [ 2 of 4 ] - Minibatch [ 71 - 80 , 100 . 00 % ] : * 2560 ; CrossEntropyWithSoftmax = 2 . 06473750 ; EvalErrorPrediction = 0 . 56953125 ; TotalTime = 6 . 0960s ; SamplesPerSecond = 420 . 0 <nl> MPI Rank 1 : Async gradient aggregation wait time : 9e - 006 <nl> MPI Rank 1 : Actual gradient aggregation time : 0 . 010067 <nl> - MPI Rank 1 : Finished Epoch [ 2 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 2 . 1036702 ; EvalErrorPrediction = 0 . 57451172 ; learningRatePerSample = 0 . 001953125 ; EpochTime = 48 . 8836 <nl> + MPI Rank 1 : Finished Epoch [ 2 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 2 . 10367019 ; EvalErrorPrediction = 0 . 57451172 ; learningRatePerSample = 0 . 001953125 ; EpochTime = 48 . 8836 <nl> MPI Rank 1 : Starting Epoch 3 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 momentum as time constant = 2429 . 9 samples <nl> MPI Rank 1 : minibatchiterator : epoch 2 : frames [ 40960 . . 61440 ] ( first utterance at frame 40960 ) , data subset 1 of 3 , with 1 datapasses <nl> MPI Rank 1 : <nl> MPI Rank 1 : Actual gradient aggregation time : 0 . 010333 <nl> MPI Rank 1 : Async gradient aggregation wait time : 1e - 005 <nl> MPI Rank 1 : Actual gradient aggregation time : 0 . 011117 <nl> MPI Rank 1 : Epoch [ 3 of 4 ] - Minibatch [ 11 - 20 , 100 . 00 % ] : * 10240 ; CrossEntropyWithSoftmax = 1 . 94811890 ; EvalErrorPrediction = 0 . 52695313 ; TotalTime = 10 . 9177s ; SamplesPerSecond = 937 . 9 <nl> - MPI Rank 1 : Finished Epoch [ 3 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 989734 ; EvalErrorPrediction = 0 . 53388672 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 23 . 3529 <nl> + MPI Rank 1 : Finished Epoch [ 3 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 98973403 ; EvalErrorPrediction = 0 . 53388672 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 23 . 3529 <nl> MPI Rank 1 : Starting Epoch 4 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 momentum as time constant = 2429 . 9 samples <nl> MPI Rank 1 : minibatchiterator : epoch 3 : frames [ 61440 . . 81920 ] ( first utterance at frame 61440 ) , data subset 1 of 3 , with 1 datapasses <nl> MPI Rank 1 : <nl> MPI Rank 1 : Async gradient aggregation wait time : 1e - 005 <nl> MPI Rank 1 : Actual gradient aggregation time : 0 . 009609 <nl> MPI Rank 1 : Epoch [ 4 of 4 ] - Minibatch [ 11 - 20 , 100 . 00 % ] : * 10240 ; CrossEntropyWithSoftmax = 1 . 88234725 ; EvalErrorPrediction = 0 . 51093750 ; TotalTime = 10 . 8320s ; SamplesPerSecond = 945 . 3 <nl> MPI Rank 1 : Async gradient aggregation wait time : 8e - 006 <nl> - MPI Rank 1 : Finished Epoch [ 4 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 8894112 ; EvalErrorPrediction = 0 . 51376953 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 22 . 7997 <nl> + MPI Rank 1 : Finished Epoch [ 4 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 88941123 ; EvalErrorPrediction = 0 . 51376953 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 22 . 7997 <nl> MPI Rank 1 : CNTKCommandTrainEnd : speechTrain <nl> MPI Rank 1 : __COMPLETED__ <nl> MPI Rank 1 : ~ MPIWrapper <nl> MPI Rank 2 : Epoch [ 1 of 4 ] - Minibatch [ 281 - 290 , 90 . 63 % ] : * 640 ; CrossEntropyWit <nl> MPI Rank 2 : Epoch [ 1 of 4 ] - Minibatch [ 291 - 300 , 93 . 75 % ] : * 640 ; CrossEntropyWithSoftmax = 2 . 15885172 ; EvalErrorPrediction = 0 . 58281250 ; TotalTime = 5 . 7989s ; SamplesPerSecond = 110 . 4 <nl> MPI Rank 2 : Epoch [ 1 of 4 ] - Minibatch [ 301 - 310 , 96 . 88 % ] : * 640 ; CrossEntropyWithSoftmax = 2 . 22712855 ; EvalErrorPrediction = 0 . 59218750 ; TotalTime = 6 . 7104s ; SamplesPerSecond = 95 . 4 <nl> MPI Rank 2 : Epoch [ 1 of 4 ] - Minibatch [ 311 - 320 , 100 . 00 % ] : * 640 ; CrossEntropyWithSoftmax = 2 . 25604782 ; EvalErrorPrediction = 0 . 60625000 ; TotalTime = 5 . 8360s ; SamplesPerSecond = 109 . 7 <nl> - MPI Rank 2 : Finished Epoch [ 1 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 0070483 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 190 . 644 <nl> + MPI Rank 2 : Finished Epoch [ 1 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 3 . 00704835 ; EvalErrorPrediction = 0 . 72827148 ; learningRatePerSample = 0 . 015625 ; EpochTime = 190 . 644 <nl> MPI Rank 2 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 momentum as time constant = 607 . 5 samples <nl> MPI Rank 2 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 2 of 3 , with 1 datapasses <nl> MPI Rank 2 : <nl> MPI Rank 2 : Actual gradient aggregation time : 0 . 600061 <nl> MPI Rank 2 : Epoch [ 2 of 4 ] - Minibatch [ 71 - 80 , 100 . 00 % ] : * 2560 ; CrossEntropyWithSoftmax = 2 . 06473750 ; EvalErrorPrediction = 0 . 56953125 ; TotalTime = 6 . 1917s ; SamplesPerSecond = 413 . 5 <nl> MPI Rank 2 : Async gradient aggregation wait time : 0 . 290116 <nl> MPI Rank 2 : Actual gradient aggregation time : 0 . 216052 <nl> - MPI Rank 2 : Finished Epoch [ 2 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 2 . 1036702 ; EvalErrorPrediction = 0 . 57451172 ; learningRatePerSample = 0 . 001953125 ; EpochTime = 48 . 7417 <nl> + MPI Rank 2 : Finished Epoch [ 2 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 2 . 10367019 ; EvalErrorPrediction = 0 . 57451172 ; learningRatePerSample = 0 . 001953125 ; EpochTime = 48 . 7417 <nl> MPI Rank 2 : Starting Epoch 3 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 momentum as time constant = 2429 . 9 samples <nl> MPI Rank 2 : minibatchiterator : epoch 2 : frames [ 40960 . . 61440 ] ( first utterance at frame 40960 ) , data subset 2 of 3 , with 1 datapasses <nl> MPI Rank 2 : <nl> MPI Rank 2 : Actual gradient aggregation time : 1 . 15827 <nl> MPI Rank 2 : Async gradient aggregation wait time : 0 . 325056 <nl> MPI Rank 2 : Actual gradient aggregation time : 1 . 09008 <nl> MPI Rank 2 : Epoch [ 3 of 4 ] - Minibatch [ 11 - 20 , 100 . 00 % ] : * 10240 ; CrossEntropyWithSoftmax = 1 . 94811890 ; EvalErrorPrediction = 0 . 52695313 ; TotalTime = 11 . 4067s ; SamplesPerSecond = 897 . 7 <nl> - MPI Rank 2 : Finished Epoch [ 3 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 989734 ; EvalErrorPrediction = 0 . 53388672 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 23 . 2 <nl> + MPI Rank 2 : Finished Epoch [ 3 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 98973403 ; EvalErrorPrediction = 0 . 53388672 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 23 . 2 <nl> MPI Rank 2 : Starting Epoch 4 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 momentum as time constant = 2429 . 9 samples <nl> MPI Rank 2 : minibatchiterator : epoch 3 : frames [ 61440 . . 81920 ] ( first utterance at frame 61440 ) , data subset 2 of 3 , with 1 datapasses <nl> MPI Rank 2 : <nl> MPI Rank 2 : Async gradient aggregation wait time : 0 . 411096 <nl> MPI Rank 2 : Actual gradient aggregation time : 1 . 07429 <nl> MPI Rank 2 : Epoch [ 4 of 4 ] - Minibatch [ 11 - 20 , 100 . 00 % ] : * 10240 ; CrossEntropyWithSoftmax = 1 . 88234725 ; EvalErrorPrediction = 0 . 51093750 ; TotalTime = 11 . 3444s ; SamplesPerSecond = 902 . 7 <nl> MPI Rank 2 : Async gradient aggregation wait time : 0 . 00373 <nl> - MPI Rank 2 : Finished Epoch [ 4 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 8894112 ; EvalErrorPrediction = 0 . 51376953 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 22 . 5056 <nl> + MPI Rank 2 : Finished Epoch [ 4 of 4 ] : [ Training ] CrossEntropyWithSoftmax = 1 . 88941123 ; EvalErrorPrediction = 0 . 51376953 ; learningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 22 . 5056 <nl> MPI Rank 2 : CNTKCommandTrainEnd : speechTrain <nl> MPI Rank 2 : __COMPLETED__ <nl> MPI Rank 2 : ~ MPIWrapper <nl> mmm a / Tests / EndToEndTests / Speech / ExperimentalHtkmlfReader / DNN / Parallel1BitQuantization / baseline . windows . cpu . txt <nl> ppp b / Tests / EndToEndTests / Speech / ExperimentalHtkmlfReader / DNN / Parallel1BitQuantization / baseline . windows . cpu . txt <nl> MPI Rank 0 : Epoch [ 1 of 3 ] - Minibatch [ 281 - 290 of 320 ] : SamplesSeen = 640 ; Trai <nl> MPI Rank 0 : Epoch [ 1 of 3 ] - Minibatch [ 291 - 300 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 15885172 ; EvalErr [ 0 ] PerSample = 0 . 58281250 ; TotalTime = 0 . 50737s ; TotalTimePerSample = 0 . 79276ms ; SamplesPerSecond = 1261 <nl> MPI Rank 0 : Epoch [ 1 of 3 ] - Minibatch [ 301 - 310 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 22712855 ; EvalErr [ 0 ] PerSample = 0 . 59218750 ; TotalTime = 0 . 52187s ; TotalTimePerSample = 0 . 81542ms ; SamplesPerSecond = 1226 <nl> MPI Rank 0 : Epoch [ 1 of 3 ] - Minibatch [ 311 - 320 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 25604782 ; EvalErr [ 0 ] PerSample = 0 . 60625000 ; TotalTime = 0 . 53861s ; TotalTimePerSample = 0 . 84158ms ; SamplesPerSecond = 1188 <nl> - MPI Rank 0 : Finished Epoch [ 1 of 3 ] : [ Training ] TrainLossPerSample = 3 . 0070483 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 19 . 360161 <nl> + MPI Rank 0 : Finished Epoch [ 1 of 3 ] : [ Training ] TrainLossPerSample = 3 . 00704835 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 19 . 360161 <nl> MPI Rank 0 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 <nl> MPI Rank 0 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 0 of 3 , with 1 datapasses <nl> MPI Rank 0 : <nl> MPI Rank 0 : Epoch [ 2 of 3 ] - Minibatch [ 41 - 50 of 80 ] : SamplesSeen = 2560 ; Trai <nl> MPI Rank 0 : Epoch [ 2 of 3 ] - Minibatch [ 51 - 60 of 80 ] : SamplesSeen = 2560 ; TrainLossPerSample = 1 . 94695921 ; EvalErr [ 0 ] PerSample = 0 . 54648438 ; TotalTime = 2 . 69169s ; TotalTimePerSample = 1 . 05144ms ; SamplesPerSecond = 951 <nl> MPI Rank 0 : Epoch [ 2 of 3 ] - Minibatch [ 61 - 70 of 80 ] : SamplesSeen = 2560 ; TrainLossPerSample = 1 . 94673081 ; EvalErr [ 0 ] PerSample = 0 . 53867188 ; TotalTime = 2 . 91287s ; TotalTimePerSample = 1 . 13784ms ; SamplesPerSecond = 878 <nl> MPI Rank 0 : Epoch [ 2 of 3 ] - Minibatch [ 71 - 80 of 80 ] : SamplesSeen = 2560 ; TrainLossPerSample = 1 . 91211204 ; EvalErr [ 0 ] PerSample = 0 . 53945312 ; TotalTime = 4 . 71405s ; TotalTimePerSample = 1 . 84142ms ; SamplesPerSecond = 543 <nl> - MPI Rank 0 : Finished Epoch [ 2 of 3 ] : [ Training ] TrainLossPerSample = 1 . 9837605 ; EvalErrPerSample = 0 . 5465332 ; AvgLearningRatePerSample = 0 . 001953125 ; EpochTime = 26 . 79512 <nl> + MPI Rank 0 : Finished Epoch [ 2 of 3 ] : [ Training ] TrainLossPerSample = 1 . 98376045 ; EvalErrPerSample = 0 . 5465332 ; AvgLearningRatePerSample = 0 . 001953125 ; EpochTime = 26 . 79512 <nl> MPI Rank 0 : Starting Epoch 3 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 <nl> MPI Rank 0 : minibatchiterator : epoch 2 : frames [ 40960 . . 61440 ] ( first utterance at frame 40960 ) , data subset 0 of 3 , with 1 datapasses <nl> MPI Rank 0 : <nl> MPI Rank 0 : Starting minibatch loop , DataParallelSGD training ( MyRank = 0 , NumNodes = 3 , NumGradientBits = 1 ) , distributed reading is ENABLED . <nl> MPI Rank 0 : Epoch [ 3 of 3 ] - Minibatch [ 1 - 10 of 20 ] : SamplesSeen = 10240 ; TrainLossPerSample = 1 . 92705928 ; EvalErr [ 0 ] PerSample = 0 . 54765625 ; TotalTime = 5 . 30804s ; TotalTimePerSample = 0 . 51836ms ; SamplesPerSecond = 1929 <nl> MPI Rank 0 : Epoch [ 3 of 3 ] - Minibatch [ 11 - 20 of 20 ] : SamplesSeen = 10240 ; TrainLossPerSample = 1 . 90745194 ; EvalErr [ 0 ] PerSample = 0 . 52822266 ; TotalTime = 5 . 33597s ; TotalTimePerSample = 0 . 52109ms ; SamplesPerSecond = 1919 <nl> - MPI Rank 0 : Finished Epoch [ 3 of 3 ] : [ Training ] TrainLossPerSample = 1 . 9172556 ; EvalErrPerSample = 0 . 53793945 ; AvgLearningRatePerSample = 9 . 765625146e - 005 ; EpochTime = 10 . 70695 <nl> + MPI Rank 0 : Finished Epoch [ 3 of 3 ] : [ Training ] TrainLossPerSample = 1 . 91725561 ; EvalErrPerSample = 0 . 53793945 ; AvgLearningRatePerSample = 9 . 765625146e - 005 ; EpochTime = 10 . 70695 <nl> MPI Rank 0 : CNTKCommandTrainEnd : speechTrain <nl> MPI Rank 0 : __COMPLETED__ <nl> MPI Rank 0 : ~ MPIWrapper <nl> MPI Rank 1 : Epoch [ 1 of 3 ] - Minibatch [ 281 - 290 of 320 ] : SamplesSeen = 640 ; Trai <nl> MPI Rank 1 : Epoch [ 1 of 3 ] - Minibatch [ 291 - 300 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 15885172 ; EvalErr [ 0 ] PerSample = 0 . 58281250 ; TotalTime = 0 . 59372s ; TotalTimePerSample = 0 . 92769ms ; SamplesPerSecond = 1077 <nl> MPI Rank 1 : Epoch [ 1 of 3 ] - Minibatch [ 301 - 310 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 22712855 ; EvalErr [ 0 ] PerSample = 0 . 59218750 ; TotalTime = 0 . 46207s ; TotalTimePerSample = 0 . 72198ms ; SamplesPerSecond = 1385 <nl> MPI Rank 1 : Epoch [ 1 of 3 ] - Minibatch [ 311 - 320 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 25604782 ; EvalErr [ 0 ] PerSample = 0 . 60625000 ; TotalTime = 0 . 38769s ; TotalTimePerSample = 0 . 60577ms ; SamplesPerSecond = 1650 <nl> - MPI Rank 1 : Finished Epoch [ 1 of 3 ] : [ Training ] TrainLossPerSample = 3 . 0070483 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 19 . 954493 <nl> + MPI Rank 1 : Finished Epoch [ 1 of 3 ] : [ Training ] TrainLossPerSample = 3 . 00704835 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 19 . 954493 <nl> MPI Rank 1 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 <nl> MPI Rank 1 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 1 of 3 , with 1 datapasses <nl> MPI Rank 1 : <nl> MPI Rank 1 : Epoch [ 2 of 3 ] - Minibatch [ 41 - 50 of 80 ] : SamplesSeen = 2560 ; Trai <nl> MPI Rank 1 : Epoch [ 2 of 3 ] - Minibatch [ 51 - 60 of 80 ] : SamplesSeen = 2560 ; TrainLossPerSample = 1 . 94695921 ; EvalErr [ 0 ] PerSample = 0 . 54648438 ; TotalTime = 2 . 69166s ; TotalTimePerSample = 1 . 05143ms ; SamplesPerSecond = 951 <nl> MPI Rank 1 : Epoch [ 2 of 3 ] - Minibatch [ 61 - 70 of 80 ] : SamplesSeen = 2560 ; TrainLossPerSample = 1 . 94673081 ; EvalErr [ 0 ] PerSample = 0 . 53867188 ; TotalTime = 2 . 91281s ; TotalTimePerSample = 1 . 13782ms ; SamplesPerSecond = 878 <nl> MPI Rank 1 : Epoch [ 2 of 3 ] - Minibatch [ 71 - 80 of 80 ] : SamplesSeen = 2560 ; TrainLossPerSample = 1 . 91211204 ; EvalErr [ 0 ] PerSample = 0 . 53945312 ; TotalTime = 4 . 71421s ; TotalTimePerSample = 1 . 84149ms ; SamplesPerSecond = 543 <nl> - MPI Rank 1 : Finished Epoch [ 2 of 3 ] : [ Training ] TrainLossPerSample = 1 . 9837605 ; EvalErrPerSample = 0 . 5465332 ; AvgLearningRatePerSample = 0 . 001953125 ; EpochTime = 26 . 795095 <nl> + MPI Rank 1 : Finished Epoch [ 2 of 3 ] : [ Training ] TrainLossPerSample = 1 . 98376045 ; EvalErrPerSample = 0 . 5465332 ; AvgLearningRatePerSample = 0 . 001953125 ; EpochTime = 26 . 795095 <nl> MPI Rank 1 : Starting Epoch 3 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 <nl> MPI Rank 1 : minibatchiterator : epoch 2 : frames [ 40960 . . 61440 ] ( first utterance at frame 40960 ) , data subset 1 of 3 , with 1 datapasses <nl> MPI Rank 1 : <nl> MPI Rank 1 : Starting minibatch loop , DataParallelSGD training ( MyRank = 1 , NumNodes = 3 , NumGradientBits = 1 ) , distributed reading is ENABLED . <nl> MPI Rank 1 : Epoch [ 3 of 3 ] - Minibatch [ 1 - 10 of 20 ] : SamplesSeen = 10240 ; TrainLossPerSample = 1 . 92705928 ; EvalErr [ 0 ] PerSample = 0 . 54765625 ; TotalTime = 5 . 31338s ; TotalTimePerSample = 0 . 51888ms ; SamplesPerSecond = 1927 <nl> MPI Rank 1 : Epoch [ 3 of 3 ] - Minibatch [ 11 - 20 of 20 ] : SamplesSeen = 10240 ; TrainLossPerSample = 1 . 90745194 ; EvalErr [ 0 ] PerSample = 0 . 52822266 ; TotalTime = 5 . 33601s ; TotalTimePerSample = 0 . 52110ms ; SamplesPerSecond = 1919 <nl> - MPI Rank 1 : Finished Epoch [ 3 of 3 ] : [ Training ] TrainLossPerSample = 1 . 9172556 ; EvalErrPerSample = 0 . 53793945 ; AvgLearningRatePerSample = 9 . 765625146e - 005 ; EpochTime = 10 . 706864 <nl> + MPI Rank 1 : Finished Epoch [ 3 of 3 ] : [ Training ] TrainLossPerSample = 1 . 91725561 ; EvalErrPerSample = 0 . 53793945 ; AvgLearningRatePerSample = 9 . 765625146e - 005 ; EpochTime = 10 . 706864 <nl> MPI Rank 1 : CNTKCommandTrainEnd : speechTrain <nl> MPI Rank 1 : __COMPLETED__ <nl> MPI Rank 1 : ~ MPIWrapper <nl> MPI Rank 2 : Epoch [ 1 of 3 ] - Minibatch [ 281 - 290 of 320 ] : SamplesSeen = 640 ; Trai <nl> MPI Rank 2 : Epoch [ 1 of 3 ] - Minibatch [ 291 - 300 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 15885172 ; EvalErr [ 0 ] PerSample = 0 . 58281250 ; TotalTime = 0 . 25995s ; TotalTimePerSample = 0 . 40618ms ; SamplesPerSecond = 2461 <nl> MPI Rank 2 : Epoch [ 1 of 3 ] - Minibatch [ 301 - 310 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 22712855 ; EvalErr [ 0 ] PerSample = 0 . 59218750 ; TotalTime = 0 . 25464s ; TotalTimePerSample = 0 . 39788ms ; SamplesPerSecond = 2513 <nl> MPI Rank 2 : Epoch [ 1 of 3 ] - Minibatch [ 311 - 320 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 25604782 ; EvalErr [ 0 ] PerSample = 0 . 60625000 ; TotalTime = 0 . 24944s ; TotalTimePerSample = 0 . 38974ms ; SamplesPerSecond = 2565 <nl> - MPI Rank 2 : Finished Epoch [ 1 of 3 ] : [ Training ] TrainLossPerSample = 3 . 0070483 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 21 . 919183 <nl> + MPI Rank 2 : Finished Epoch [ 1 of 3 ] : [ Training ] TrainLossPerSample = 3 . 00704835 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 21 . 919183 <nl> MPI Rank 2 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 <nl> MPI Rank 2 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 2 of 3 , with 1 datapasses <nl> MPI Rank 2 : <nl> MPI Rank 2 : Epoch [ 2 of 3 ] - Minibatch [ 41 - 50 of 80 ] : SamplesSeen = 2560 ; Trai <nl> MPI Rank 2 : Epoch [ 2 of 3 ] - Minibatch [ 51 - 60 of 80 ] : SamplesSeen = 2560 ; TrainLossPerSample = 1 . 94695921 ; EvalErr [ 0 ] PerSample = 0 . 54648438 ; TotalTime = 2 . 69245s ; TotalTimePerSample = 1 . 05174ms ; SamplesPerSecond = 950 <nl> MPI Rank 2 : Epoch [ 2 of 3 ] - Minibatch [ 61 - 70 of 80 ] : SamplesSeen = 2560 ; TrainLossPerSample = 1 . 94673081 ; EvalErr [ 0 ] PerSample = 0 . 53867188 ; TotalTime = 2 . 91239s ; TotalTimePerSample = 1 . 13765ms ; SamplesPerSecond = 879 <nl> MPI Rank 2 : Epoch [ 2 of 3 ] - Minibatch [ 71 - 80 of 80 ] : SamplesSeen = 2560 ; TrainLossPerSample = 1 . 91211204 ; EvalErr [ 0 ] PerSample = 0 . 53945312 ; TotalTime = 4 . 71988s ; TotalTimePerSample = 1 . 84370ms ; SamplesPerSecond = 542 <nl> - MPI Rank 2 : Finished Epoch [ 2 of 3 ] : [ Training ] TrainLossPerSample = 1 . 9837605 ; EvalErrPerSample = 0 . 5465332 ; AvgLearningRatePerSample = 0 . 001953125 ; EpochTime = 26 . 800757 <nl> + MPI Rank 2 : Finished Epoch [ 2 of 3 ] : [ Training ] TrainLossPerSample = 1 . 98376045 ; EvalErrPerSample = 0 . 5465332 ; AvgLearningRatePerSample = 0 . 001953125 ; EpochTime = 26 . 800757 <nl> MPI Rank 2 : Starting Epoch 3 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 <nl> MPI Rank 2 : minibatchiterator : epoch 2 : frames [ 40960 . . 61440 ] ( first utterance at frame 40960 ) , data subset 2 of 3 , with 1 datapasses <nl> MPI Rank 2 : <nl> MPI Rank 2 : Starting minibatch loop , DataParallelSGD training ( MyRank = 2 , NumNodes = 3 , NumGradientBits = 1 ) , distributed reading is ENABLED . <nl> MPI Rank 2 : Epoch [ 3 of 3 ] - Minibatch [ 1 - 10 of 20 ] : SamplesSeen = 10240 ; TrainLossPerSample = 1 . 92705928 ; EvalErr [ 0 ] PerSample = 0 . 54765625 ; TotalTime = 5 . 32871s ; TotalTimePerSample = 0 . 52038ms ; SamplesPerSecond = 1921 <nl> MPI Rank 2 : Epoch [ 3 of 3 ] - Minibatch [ 11 - 20 of 20 ] : SamplesSeen = 10240 ; TrainLossPerSample = 1 . 90745194 ; EvalErr [ 0 ] PerSample = 0 . 52822266 ; TotalTime = 5 . 33578s ; TotalTimePerSample = 0 . 52107ms ; SamplesPerSecond = 1919 <nl> - MPI Rank 2 : Finished Epoch [ 3 of 3 ] : [ Training ] TrainLossPerSample = 1 . 9172556 ; EvalErrPerSample = 0 . 53793945 ; AvgLearningRatePerSample = 9 . 765625146e - 005 ; EpochTime = 10 . 706562 <nl> + MPI Rank 2 : Finished Epoch [ 3 of 3 ] : [ Training ] TrainLossPerSample = 1 . 91725561 ; EvalErrPerSample = 0 . 53793945 ; AvgLearningRatePerSample = 9 . 765625146e - 005 ; EpochTime = 10 . 706562 <nl> MPI Rank 2 : CNTKCommandTrainEnd : speechTrain <nl> MPI Rank 2 : __COMPLETED__ <nl> MPI Rank 2 : ~ MPIWrapper <nl> mmm a / Tests / EndToEndTests / Speech / ExperimentalHtkmlfReader / DNN / ParallelBufferedAsyncGradientAggregation / baseline . windows . cpu . txt <nl> ppp b / Tests / EndToEndTests / Speech / ExperimentalHtkmlfReader / DNN / ParallelBufferedAsyncGradientAggregation / baseline . windows . cpu . txt <nl> MPI Rank 0 : Epoch [ 1 of 4 ] - Minibatch [ 281 - 290 of 320 ] : SamplesSeen = 640 ; Trai <nl> MPI Rank 0 : Epoch [ 1 of 4 ] - Minibatch [ 291 - 300 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 15885172 ; EvalErr [ 0 ] PerSample = 0 . 58281250 ; TotalTime = 2 . 45019s ; TotalTimePerSample = 3 . 82842ms ; SamplesPerSecond = 261 <nl> MPI Rank 0 : Epoch [ 1 of 4 ] - Minibatch [ 301 - 310 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 22712855 ; EvalErr [ 0 ] PerSample = 0 . 59218750 ; TotalTime = 2 . 02733s ; TotalTimePerSample = 3 . 16770ms ; SamplesPerSecond = 315 <nl> MPI Rank 0 : Epoch [ 1 of 4 ] - Minibatch [ 311 - 320 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 25604782 ; EvalErr [ 0 ] PerSample = 0 . 60625000 ; TotalTime = 2 . 02734s ; TotalTimePerSample = 3 . 16772ms ; SamplesPerSecond = 315 <nl> - MPI Rank 0 : Finished Epoch [ 1 of 4 ] : [ Training ] TrainLossPerSample = 3 . 0070483 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 193 . 39289 <nl> + MPI Rank 0 : Finished Epoch [ 1 of 4 ] : [ Training ] TrainLossPerSample = 3 . 00704835 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 193 . 39289 <nl> MPI Rank 0 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 <nl> MPI Rank 0 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 0 of 3 , with 1 datapasses <nl> MPI Rank 0 : <nl> MPI Rank 0 : <nl> MPI Rank 0 : Starting minibatch loop , DataParallelSGD training ( MyRank = 0 , NumNodes = 3 , NumGradientBits = 1 ) , BufferedAsyncGradientAggregation is ENABLED , distributed reading is ENABLED . <nl> MPI Rank 0 : Epoch [ 3 of 4 ] - Minibatch [ 1 - 10 of 20 ] : SamplesSeen = 9216 ; TrainLossPerSample = 2 . 04504148 ; EvalErr [ 0 ] PerSample = 0 . 55772569 ; TotalTime = 9 . 39820s ; TotalTimePerSample = 1 . 01977ms ; SamplesPerSecond = 980 <nl> MPI Rank 0 : Epoch [ 3 of 4 ] - Minibatch [ 11 - 20 of 20 ] : SamplesSeen = 10240 ; TrainLossPerSample = 2 . 02126122 ; EvalErr [ 0 ] PerSample = 0 . 56220703 ; TotalTime = 9 . 88302s ; TotalTimePerSample = 0 . 96514ms ; SamplesPerSecond = 1036 <nl> - MPI Rank 0 : Finished Epoch [ 3 of 4 ] : [ Training ] TrainLossPerSample = 2 . 0287034 ; EvalErrPerSample = 0 . 55952148 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 19 . 630745 <nl> + MPI Rank 0 : Finished Epoch [ 3 of 4 ] : [ Training ] TrainLossPerSample = 2 . 02870336 ; EvalErrPerSample = 0 . 55952148 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 19 . 630745 <nl> MPI Rank 0 : Starting Epoch 4 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 <nl> MPI Rank 0 : minibatchiterator : epoch 3 : frames [ 61440 . . 81920 ] ( first utterance at frame 61440 ) , data subset 0 of 3 , with 1 datapasses <nl> MPI Rank 0 : <nl> MPI Rank 1 : Epoch [ 1 of 4 ] - Minibatch [ 281 - 290 of 320 ] : SamplesSeen = 640 ; Trai <nl> MPI Rank 1 : Epoch [ 1 of 4 ] - Minibatch [ 291 - 300 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 15885172 ; EvalErr [ 0 ] PerSample = 0 . 58281250 ; TotalTime = 5 . 77072s ; TotalTimePerSample = 9 . 01675ms ; SamplesPerSecond = 110 <nl> MPI Rank 1 : Epoch [ 1 of 4 ] - Minibatch [ 301 - 310 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 22712855 ; EvalErr [ 0 ] PerSample = 0 . 59218750 ; TotalTime = 6 . 17208s ; TotalTimePerSample = 9 . 64387ms ; SamplesPerSecond = 103 <nl> MPI Rank 1 : Epoch [ 1 of 4 ] - Minibatch [ 311 - 320 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 25604782 ; EvalErr [ 0 ] PerSample = 0 . 60625000 ; TotalTime = 5 . 09985s ; TotalTimePerSample = 7 . 96852ms ; SamplesPerSecond = 125 <nl> - MPI Rank 1 : Finished Epoch [ 1 of 4 ] : [ Training ] TrainLossPerSample = 3 . 0070483 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 187 . 18621 <nl> + MPI Rank 1 : Finished Epoch [ 1 of 4 ] : [ Training ] TrainLossPerSample = 3 . 00704835 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 187 . 18621 <nl> MPI Rank 1 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 <nl> MPI Rank 1 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 1 of 3 , with 1 datapasses <nl> MPI Rank 1 : <nl> MPI Rank 1 : <nl> MPI Rank 1 : Starting minibatch loop , DataParallelSGD training ( MyRank = 1 , NumNodes = 3 , NumGradientBits = 1 ) , BufferedAsyncGradientAggregation is ENABLED , distributed reading is ENABLED . <nl> MPI Rank 1 : Epoch [ 3 of 4 ] - Minibatch [ 1 - 10 of 20 ] : SamplesSeen = 9216 ; TrainLossPerSample = 2 . 04504148 ; EvalErr [ 0 ] PerSample = 0 . 55772569 ; TotalTime = 9 . 33898s ; TotalTimePerSample = 1 . 01334ms ; SamplesPerSecond = 986 <nl> MPI Rank 1 : Epoch [ 3 of 4 ] - Minibatch [ 11 - 20 of 20 ] : SamplesSeen = 10240 ; TrainLossPerSample = 2 . 02126122 ; EvalErr [ 0 ] PerSample = 0 . 56220703 ; TotalTime = 9 . 89586s ; TotalTimePerSample = 0 . 96639ms ; SamplesPerSecond = 1034 <nl> - MPI Rank 1 : Finished Epoch [ 3 of 4 ] : [ Training ] TrainLossPerSample = 2 . 0287034 ; EvalErrPerSample = 0 . 55952148 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 19 . 630699 <nl> + MPI Rank 1 : Finished Epoch [ 3 of 4 ] : [ Training ] TrainLossPerSample = 2 . 02870336 ; EvalErrPerSample = 0 . 55952148 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 19 . 630699 <nl> MPI Rank 1 : Starting Epoch 4 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 <nl> MPI Rank 1 : minibatchiterator : epoch 3 : frames [ 61440 . . 81920 ] ( first utterance at frame 61440 ) , data subset 1 of 3 , with 1 datapasses <nl> MPI Rank 1 : <nl> MPI Rank 2 : Epoch [ 1 of 4 ] - Minibatch [ 281 - 290 of 320 ] : SamplesSeen = 640 ; Trai <nl> MPI Rank 2 : Epoch [ 1 of 4 ] - Minibatch [ 291 - 300 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 15885172 ; EvalErr [ 0 ] PerSample = 0 . 58281250 ; TotalTime = 4 . 75844s ; TotalTimePerSample = 7 . 43507ms ; SamplesPerSecond = 134 <nl> MPI Rank 2 : Epoch [ 1 of 4 ] - Minibatch [ 301 - 310 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 22712855 ; EvalErr [ 0 ] PerSample = 0 . 59218750 ; TotalTime = 4 . 59292s ; TotalTimePerSample = 7 . 17644ms ; SamplesPerSecond = 139 <nl> MPI Rank 2 : Epoch [ 1 of 4 ] - Minibatch [ 311 - 320 of 320 ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 25604782 ; EvalErr [ 0 ] PerSample = 0 . 60625000 ; TotalTime = 5 . 49564s ; TotalTimePerSample = 8 . 58693ms ; SamplesPerSecond = 116 <nl> - MPI Rank 2 : Finished Epoch [ 1 of 4 ] : [ Training ] TrainLossPerSample = 3 . 0070483 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 179 . 99776 <nl> + MPI Rank 2 : Finished Epoch [ 1 of 4 ] : [ Training ] TrainLossPerSample = 3 . 00704835 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 179 . 99776 <nl> MPI Rank 2 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 <nl> MPI Rank 2 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 2 of 3 , with 1 datapasses <nl> MPI Rank 2 : <nl> MPI Rank 2 : <nl> MPI Rank 2 : Starting minibatch loop , DataParallelSGD training ( MyRank = 2 , NumNodes = 3 , NumGradientBits = 1 ) , BufferedAsyncGradientAggregation is ENABLED , distributed reading is ENABLED . <nl> MPI Rank 2 : Epoch [ 3 of 4 ] - Minibatch [ 1 - 10 of 20 ] : SamplesSeen = 9216 ; TrainLossPerSample = 2 . 04504148 ; EvalErr [ 0 ] PerSample = 0 . 55772569 ; TotalTime = 8 . 99696s ; TotalTimePerSample = 0 . 97623ms ; SamplesPerSecond = 1024 <nl> MPI Rank 2 : Epoch [ 3 of 4 ] - Minibatch [ 11 - 20 of 20 ] : SamplesSeen = 10240 ; TrainLossPerSample = 2 . 02126122 ; EvalErr [ 0 ] PerSample = 0 . 56220703 ; TotalTime = 9 . 94059s ; TotalTimePerSample = 0 . 97076ms ; SamplesPerSecond = 1030 <nl> - MPI Rank 2 : Finished Epoch [ 3 of 4 ] : [ Training ] TrainLossPerSample = 2 . 0287034 ; EvalErrPerSample = 0 . 55952148 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 19 . 63073 <nl> + MPI Rank 2 : Finished Epoch [ 3 of 4 ] : [ Training ] TrainLossPerSample = 2 . 02870336 ; EvalErrPerSample = 0 . 55952148 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 19 . 63073 <nl> MPI Rank 2 : Starting Epoch 4 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 <nl> MPI Rank 2 : minibatchiterator : epoch 3 : frames [ 61440 . . 81920 ] ( first utterance at frame 61440 ) , data subset 2 of 3 , with 1 datapasses <nl> MPI Rank 2 : <nl> mmm a / Tests / EndToEndTests / Speech / ExperimentalHtkmlfReader / DNN / ParallelNoQuantizationBufferedAsyncGradientAggregation / baseline . windows . cpu . txt <nl> ppp b / Tests / EndToEndTests / Speech / ExperimentalHtkmlfReader / DNN / ParallelNoQuantizationBufferedAsyncGradientAggregation / baseline . windows . cpu . txt <nl> MPI Rank 0 : Epoch [ 1 of 4 ] - Minibatch [ 281 - 290 , 90 . 63 % ] : SamplesSeen = 640 ; Tra <nl> MPI Rank 0 : Epoch [ 1 of 4 ] - Minibatch [ 291 - 300 , 93 . 75 % ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 15885172 ; EvalErr [ 0 ] PerSample = 0 . 58281250 ; TotalTime = 4 . 4403s ; SamplesPerSecond = 144 . 1 <nl> MPI Rank 0 : Epoch [ 1 of 4 ] - Minibatch [ 301 - 310 , 96 . 88 % ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 22712855 ; EvalErr [ 0 ] PerSample = 0 . 59218750 ; TotalTime = 5 . 0005s ; SamplesPerSecond = 128 . 0 <nl> MPI Rank 0 : Epoch [ 1 of 4 ] - Minibatch [ 311 - 320 , 100 . 00 % ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 25604782 ; EvalErr [ 0 ] PerSample = 0 . 60625000 ; TotalTime = 5 . 5427s ; SamplesPerSecond = 115 . 5 <nl> - MPI Rank 0 : Finished Epoch [ 1 of 4 ] : [ Training ] TrainLossPerSample = 3 . 0070483 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 227 . 265 <nl> + MPI Rank 0 : Finished Epoch [ 1 of 4 ] : [ Training ] TrainLossPerSample = 3 . 00704835 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 227 . 265 <nl> MPI Rank 0 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 momentum as time constant = 607 . 5 samples <nl> MPI Rank 0 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 0 of 3 , with 1 datapasses <nl> MPI Rank 0 : <nl> MPI Rank 0 : Actual gradient aggregation time : 0 . 595437 <nl> MPI Rank 0 : Epoch [ 2 of 4 ] - Minibatch [ 71 - 80 , 100 . 00 % ] : SamplesSeen = 2560 ; TrainLossPerSample = 2 . 06473750 ; EvalErr [ 0 ] PerSample = 0 . 56953125 ; TotalTime = 6 . 1891s ; SamplesPerSecond = 413 . 6 <nl> MPI Rank 0 : Async gradient aggregation wait time : 0 . 189996 <nl> MPI Rank 0 : Actual gradient aggregation time : 0 . 121157 <nl> - MPI Rank 0 : Finished Epoch [ 2 of 4 ] : [ Training ] TrainLossPerSample = 2 . 1036702 ; EvalErrPerSample = 0 . 57451172 ; AvgLearningRatePerSample = 0 . 001953125 ; EpochTime = 49 . 0094 <nl> + MPI Rank 0 : Finished Epoch [ 2 of 4 ] : [ Training ] TrainLossPerSample = 2 . 10367019 ; EvalErrPerSample = 0 . 57451172 ; AvgLearningRatePerSample = 0 . 001953125 ; EpochTime = 49 . 0094 <nl> MPI Rank 0 : Starting Epoch 3 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 momentum as time constant = 2429 . 9 samples <nl> MPI Rank 0 : minibatchiterator : epoch 2 : frames [ 40960 . . 61440 ] ( first utterance at frame 40960 ) , data subset 0 of 3 , with 1 datapasses <nl> MPI Rank 0 : <nl> MPI Rank 0 : Actual gradient aggregation time : 1 . 0346 <nl> MPI Rank 0 : Async gradient aggregation wait time : 1 . 1e - 005 <nl> MPI Rank 0 : Actual gradient aggregation time : 0 . 773221 <nl> MPI Rank 0 : Epoch [ 3 of 4 ] - Minibatch [ 11 - 20 , 100 . 00 % ] : SamplesSeen = 10240 ; TrainLossPerSample = 1 . 94811890 ; EvalErr [ 0 ] PerSample = 0 . 52695313 ; TotalTime = 11 . 2428s ; SamplesPerSecond = 910 . 8 <nl> - MPI Rank 0 : Finished Epoch [ 3 of 4 ] : [ Training ] TrainLossPerSample = 1 . 989734 ; EvalErrPerSample = 0 . 53388672 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 23 . 4389 <nl> + MPI Rank 0 : Finished Epoch [ 3 of 4 ] : [ Training ] TrainLossPerSample = 1 . 98973403 ; EvalErrPerSample = 0 . 53388672 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 23 . 4389 <nl> MPI Rank 0 : Starting Epoch 4 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 momentum as time constant = 2429 . 9 samples <nl> MPI Rank 0 : minibatchiterator : epoch 3 : frames [ 61440 . . 81920 ] ( first utterance at frame 61440 ) , data subset 0 of 3 , with 1 datapasses <nl> MPI Rank 0 : <nl> MPI Rank 0 : Async gradient aggregation wait time : 1 . 1e - 005 <nl> MPI Rank 0 : Actual gradient aggregation time : 0 . 697183 <nl> MPI Rank 0 : Epoch [ 4 of 4 ] - Minibatch [ 11 - 20 , 100 . 00 % ] : SamplesSeen = 10240 ; TrainLossPerSample = 1 . 88234725 ; EvalErr [ 0 ] PerSample = 0 . 51093750 ; TotalTime = 11 . 2251s ; SamplesPerSecond = 912 . 2 <nl> MPI Rank 0 : Async gradient aggregation wait time : 9e - 006 <nl> - MPI Rank 0 : Finished Epoch [ 4 of 4 ] : [ Training ] TrainLossPerSample = 1 . 8894112 ; EvalErrPerSample = 0 . 51376953 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 22 . 561 <nl> + MPI Rank 0 : Finished Epoch [ 4 of 4 ] : [ Training ] TrainLossPerSample = 1 . 88941123 ; EvalErrPerSample = 0 . 51376953 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 22 . 561 <nl> MPI Rank 0 : CNTKCommandTrainEnd : speechTrain <nl> MPI Rank 0 : __COMPLETED__ <nl> MPI Rank 0 : ~ MPIWrapper <nl> MPI Rank 1 : Epoch [ 1 of 4 ] - Minibatch [ 281 - 290 , 90 . 63 % ] : SamplesSeen = 640 ; Tra <nl> MPI Rank 1 : Epoch [ 1 of 4 ] - Minibatch [ 291 - 300 , 93 . 75 % ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 15885172 ; EvalErr [ 0 ] PerSample = 0 . 58281250 ; TotalTime = 2 . 5137s ; SamplesPerSecond = 254 . 6 <nl> MPI Rank 1 : Epoch [ 1 of 4 ] - Minibatch [ 301 - 310 , 96 . 88 % ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 22712855 ; EvalErr [ 0 ] PerSample = 0 . 59218750 ; TotalTime = 2 . 5769s ; SamplesPerSecond = 248 . 4 <nl> MPI Rank 1 : Epoch [ 1 of 4 ] - Minibatch [ 311 - 320 , 100 . 00 % ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 25604782 ; EvalErr [ 0 ] PerSample = 0 . 60625000 ; TotalTime = 2 . 5871s ; SamplesPerSecond = 247 . 4 <nl> - MPI Rank 1 : Finished Epoch [ 1 of 4 ] : [ Training ] TrainLossPerSample = 3 . 0070483 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 238 . 763 <nl> + MPI Rank 1 : Finished Epoch [ 1 of 4 ] : [ Training ] TrainLossPerSample = 3 . 00704835 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 238 . 763 <nl> MPI Rank 1 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 momentum as time constant = 607 . 5 samples <nl> MPI Rank 1 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 1 of 3 , with 1 datapasses <nl> MPI Rank 1 : <nl> MPI Rank 1 : Actual gradient aggregation time : 0 . 010844 <nl> MPI Rank 1 : Epoch [ 2 of 4 ] - Minibatch [ 71 - 80 , 100 . 00 % ] : SamplesSeen = 2560 ; TrainLossPerSample = 2 . 06473750 ; EvalErr [ 0 ] PerSample = 0 . 56953125 ; TotalTime = 6 . 0960s ; SamplesPerSecond = 420 . 0 <nl> MPI Rank 1 : Async gradient aggregation wait time : 9e - 006 <nl> MPI Rank 1 : Actual gradient aggregation time : 0 . 010067 <nl> - MPI Rank 1 : Finished Epoch [ 2 of 4 ] : [ Training ] TrainLossPerSample = 2 . 1036702 ; EvalErrPerSample = 0 . 57451172 ; AvgLearningRatePerSample = 0 . 001953125 ; EpochTime = 48 . 8836 <nl> + MPI Rank 1 : Finished Epoch [ 2 of 4 ] : [ Training ] TrainLossPerSample = 2 . 10367019 ; EvalErrPerSample = 0 . 57451172 ; AvgLearningRatePerSample = 0 . 001953125 ; EpochTime = 48 . 8836 <nl> MPI Rank 1 : Starting Epoch 3 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 momentum as time constant = 2429 . 9 samples <nl> MPI Rank 1 : minibatchiterator : epoch 2 : frames [ 40960 . . 61440 ] ( first utterance at frame 40960 ) , data subset 1 of 3 , with 1 datapasses <nl> MPI Rank 1 : <nl> MPI Rank 1 : Actual gradient aggregation time : 0 . 010333 <nl> MPI Rank 1 : Async gradient aggregation wait time : 1e - 005 <nl> MPI Rank 1 : Actual gradient aggregation time : 0 . 011117 <nl> MPI Rank 1 : Epoch [ 3 of 4 ] - Minibatch [ 11 - 20 , 100 . 00 % ] : SamplesSeen = 10240 ; TrainLossPerSample = 1 . 94811890 ; EvalErr [ 0 ] PerSample = 0 . 52695313 ; TotalTime = 10 . 9177s ; SamplesPerSecond = 937 . 9 <nl> - MPI Rank 1 : Finished Epoch [ 3 of 4 ] : [ Training ] TrainLossPerSample = 1 . 989734 ; EvalErrPerSample = 0 . 53388672 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 23 . 3529 <nl> + MPI Rank 1 : Finished Epoch [ 3 of 4 ] : [ Training ] TrainLossPerSample = 1 . 98973403 ; EvalErrPerSample = 0 . 53388672 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 23 . 3529 <nl> MPI Rank 1 : Starting Epoch 4 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 momentum as time constant = 2429 . 9 samples <nl> MPI Rank 1 : minibatchiterator : epoch 3 : frames [ 61440 . . 81920 ] ( first utterance at frame 61440 ) , data subset 1 of 3 , with 1 datapasses <nl> MPI Rank 1 : <nl> MPI Rank 1 : Async gradient aggregation wait time : 1e - 005 <nl> MPI Rank 1 : Actual gradient aggregation time : 0 . 009609 <nl> MPI Rank 1 : Epoch [ 4 of 4 ] - Minibatch [ 11 - 20 , 100 . 00 % ] : SamplesSeen = 10240 ; TrainLossPerSample = 1 . 88234725 ; EvalErr [ 0 ] PerSample = 0 . 51093750 ; TotalTime = 10 . 8320s ; SamplesPerSecond = 945 . 3 <nl> MPI Rank 1 : Async gradient aggregation wait time : 8e - 006 <nl> - MPI Rank 1 : Finished Epoch [ 4 of 4 ] : [ Training ] TrainLossPerSample = 1 . 8894112 ; EvalErrPerSample = 0 . 51376953 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 22 . 7997 <nl> + MPI Rank 1 : Finished Epoch [ 4 of 4 ] : [ Training ] TrainLossPerSample = 1 . 88941123 ; EvalErrPerSample = 0 . 51376953 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 22 . 7997 <nl> MPI Rank 1 : CNTKCommandTrainEnd : speechTrain <nl> MPI Rank 1 : __COMPLETED__ <nl> MPI Rank 1 : ~ MPIWrapper <nl> MPI Rank 2 : Epoch [ 1 of 4 ] - Minibatch [ 281 - 290 , 90 . 63 % ] : SamplesSeen = 640 ; Tra <nl> MPI Rank 2 : Epoch [ 1 of 4 ] - Minibatch [ 291 - 300 , 93 . 75 % ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 15885172 ; EvalErr [ 0 ] PerSample = 0 . 58281250 ; TotalTime = 5 . 7989s ; SamplesPerSecond = 110 . 4 <nl> MPI Rank 2 : Epoch [ 1 of 4 ] - Minibatch [ 301 - 310 , 96 . 88 % ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 22712855 ; EvalErr [ 0 ] PerSample = 0 . 59218750 ; TotalTime = 6 . 7104s ; SamplesPerSecond = 95 . 4 <nl> MPI Rank 2 : Epoch [ 1 of 4 ] - Minibatch [ 311 - 320 , 100 . 00 % ] : SamplesSeen = 640 ; TrainLossPerSample = 2 . 25604782 ; EvalErr [ 0 ] PerSample = 0 . 60625000 ; TotalTime = 5 . 8360s ; SamplesPerSecond = 109 . 7 <nl> - MPI Rank 2 : Finished Epoch [ 1 of 4 ] : [ Training ] TrainLossPerSample = 3 . 0070483 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 190 . 644 <nl> + MPI Rank 2 : Finished Epoch [ 1 of 4 ] : [ Training ] TrainLossPerSample = 3 . 00704835 ; EvalErrPerSample = 0 . 72827148 ; AvgLearningRatePerSample = 0 . 015625 ; EpochTime = 190 . 644 <nl> MPI Rank 2 : Starting Epoch 2 : learning rate per sample = 0 . 001953 effective momentum = 0 . 656119 momentum as time constant = 607 . 5 samples <nl> MPI Rank 2 : minibatchiterator : epoch 1 : frames [ 20480 . . 40960 ] ( first utterance at frame 20480 ) , data subset 2 of 3 , with 1 datapasses <nl> MPI Rank 2 : <nl> MPI Rank 2 : Actual gradient aggregation time : 0 . 600061 <nl> MPI Rank 2 : Epoch [ 2 of 4 ] - Minibatch [ 71 - 80 , 100 . 00 % ] : SamplesSeen = 2560 ; TrainLossPerSample = 2 . 06473750 ; EvalErr [ 0 ] PerSample = 0 . 56953125 ; TotalTime = 6 . 1917s ; SamplesPerSecond = 413 . 5 <nl> MPI Rank 2 : Async gradient aggregation wait time : 0 . 290116 <nl> MPI Rank 2 : Actual gradient aggregation time : 0 . 216052 <nl> - MPI Rank 2 : Finished Epoch [ 2 of 4 ] : [ Training ] TrainLossPerSample = 2 . 1036702 ; EvalErrPerSample = 0 . 57451172 ; AvgLearningRatePerSample = 0 . 001953125 ; EpochTime = 48 . 7417 <nl> + MPI Rank 2 : Finished Epoch [ 2 of 4 ] : [ Training ] TrainLossPerSample = 2 . 10367019 ; EvalErrPerSample = 0 . 57451172 ; AvgLearningRatePerSample = 0 . 001953125 ; EpochTime = 48 . 7417 <nl> MPI Rank 2 : Starting Epoch 3 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 momentum as time constant = 2429 . 9 samples <nl> MPI Rank 2 : minibatchiterator : epoch 2 : frames [ 40960 . . 61440 ] ( first utterance at frame 40960 ) , data subset 2 of 3 , with 1 datapasses <nl> MPI Rank 2 : <nl> MPI Rank 2 : Actual gradient aggregation time : 1 . 15827 <nl> MPI Rank 2 : Async gradient aggregation wait time : 0 . 325056 <nl> MPI Rank 2 : Actual gradient aggregation time : 1 . 09008 <nl> MPI Rank 2 : Epoch [ 3 of 4 ] - Minibatch [ 11 - 20 , 100 . 00 % ] : SamplesSeen = 10240 ; TrainLossPerSample = 1 . 94811890 ; EvalErr [ 0 ] PerSample = 0 . 52695313 ; TotalTime = 11 . 4067s ; SamplesPerSecond = 897 . 7 <nl> - MPI Rank 2 : Finished Epoch [ 3 of 4 ] : [ Training ] TrainLossPerSample = 1 . 989734 ; EvalErrPerSample = 0 . 53388672 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 23 . 2 <nl> + MPI Rank 2 : Finished Epoch [ 3 of 4 ] : [ Training ] TrainLossPerSample = 1 . 98973403 ; EvalErrPerSample = 0 . 53388672 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 23 . 2 <nl> MPI Rank 2 : Starting Epoch 4 : learning rate per sample = 0 . 000098 effective momentum = 0 . 656119 momentum as time constant = 2429 . 9 samples <nl> MPI Rank 2 : minibatchiterator : epoch 3 : frames [ 61440 . . 81920 ] ( first utterance at frame 61440 ) , data subset 2 of 3 , with 1 datapasses <nl> MPI Rank 2 : <nl> MPI Rank 2 : Async gradient aggregation wait time : 0 . 411096 <nl> MPI Rank 2 : Actual gradient aggregation time : 1 . 07429 <nl> MPI Rank 2 : Epoch [ 4 of 4 ] - Minibatch [ 11 - 20 , 100 . 00 % ] : SamplesSeen = 10240 ; TrainLossPerSample = 1 . 88234725 ; EvalErr [ 0 ] PerSample = 0 . 51093750 ; TotalTime = 11 . 3444s ; SamplesPerSecond = 902 . 7 <nl> MPI Rank 2 : Async gradient aggregation wait time : 0 . 00373 <nl> - MPI Rank 2 : Finished Epoch [ 4 of 4 ] : [ Training ] TrainLossPerSample = 1 . 8894112 ; EvalErrPerSample = 0 . 51376953 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 22 . 5056 <nl> + MPI Rank 2 : Finished Epoch [ 4 of 4 ] : [ Training ] TrainLossPerSample = 1 . 88941123 ; EvalErrPerSample = 0 . 51376953 ; AvgLearningRatePerSample = 9 . 7656251e - 005 ; EpochTime = 22 . 5056 <nl> MPI Rank 2 : CNTKCommandTrainEnd : speechTrain <nl> MPI Rank 2 : __COMPLETED__ <nl> MPI Rank 2 : ~ MPIWrapper <nl>
increased precision of some criterion numbers in baselines
microsoft/CNTK
b3b0d7e9273b6fe7a8359b1ef1bb691db398e974
2016-04-29T22:22:31Z
mmm a / docs / LangRef . html <nl> ppp b / docs / LangRef . html <nl> < h3 id = " decl - struct " > struct Declarations < / h3 > <nl> decl - struct : : = ' struct ' < a href = " # attribute - list " > attribute - list < / a > < a href = " # identifier " > identifier < / a > { decl - struct - body } <nl> decl - struct - body : : = < a href = " # type - tuple " > type - tuple - body < / a > ? decl - struct - member * <nl> decl - struct - member : : = < a href = " # decl - func " > decl - func < / a > <nl> + decl - struct - member : : = < a href = " # decl - typealias " > decl - typealias < / a > <nl> < / pre > <nl> <nl> < p > A struct declaration is syntactic sugar for a oneof declaration of a single <nl> < h3 id = " decl - struct " > struct Declarations < / h3 > <nl> struct Rect { <nl> origin : Point , <nl> size : Size <nl> + <nl> + typealias CoordinateType : int <nl> + <nl> func area ( ) - > int { return size . width * size . height } <nl> } <nl> <nl> mmm a / lib / Parse / ParseDecl . cpp <nl> ppp b / lib / Parse / ParseDecl . cpp <nl> bool Parser : : parseDeclStruct ( SmallVectorImpl < ExprStmtOrDecl > & Decls ) { <nl> Type ( ) ) ; <nl> Type StructTy = TAD - > getAliasType ( ) ; <nl> <nl> - Type BodyTy ; <nl> - SmallVector < ValueDecl * , 8 > MemberDecls ; <nl> - <nl> / / Parse elements of the body as a tuple body . <nl> + Type BodyTy ; <nl> if ( parseTypeTupleBody ( LBLoc , BodyTy ) ) <nl> return true ; <nl> assert ( isa < TupleType > ( BodyTy . getPointer ( ) ) ) ; <nl> bool Parser : : parseDeclStruct ( SmallVectorImpl < ExprStmtOrDecl > & Decls ) { <nl> <nl> <nl> / / Parse the body as a series of decls . <nl> - SmallVector < TupleTypeElt , 8 > TupleElts ; <nl> + SmallVector < Decl * , 8 > MemberDecls ; <nl> do { <nl> switch ( Tok . getKind ( ) ) { <nl> default : <nl> bool Parser : : parseDeclStruct ( SmallVectorImpl < ExprStmtOrDecl > & Decls ) { <nl> MemberDecls . push_back ( FD ) ; <nl> break ; <nl> } <nl> + <nl> + case tok : : kw_typealias : <nl> + if ( TypeAliasDecl * TAD = parseDeclTypeAlias ( ) ) <nl> + MemberDecls . push_back ( TAD ) ; <nl> + else <nl> + return true ; <nl> + break ; <nl> } <nl> } while ( Tok . isNot ( tok : : r_brace ) ) ; <nl> <nl> bool Parser : : parseDeclStruct ( SmallVectorImpl < ExprStmtOrDecl > & Decls ) { <nl> OneOfType * OneOfTy = actOnOneOfType ( StructLoc , Attributes , ElementInfo , TAD ) ; <nl> assert ( OneOfTy - > hasSingleElement ( ) & & " Somehow isn ' t a struct ? " ) ; <nl> <nl> + / / Install all of the members of protocol into the protocol ' s DeclContext . <nl> + for ( Decl * D : MemberDecls ) <nl> + D - > Context = OneOfTy ; <nl> + <nl> / / In addition to defining the oneof declaration , structs also inject their <nl> / / constructor into the global scope . <nl> assert ( OneOfTy - > Elements . size ( ) = = 1 & & " Struct has exactly one element " ) ; <nl>
allow typealias ' s in structs , inject struct members into the proper declcontext .
apple/swift
45bcd19f5809ff1a10c6a98710d2baf7be9c7217
2011-11-07T23:47:20Z
mmm a / spec / api - app - spec . js <nl> ppp b / spec / api - app - spec . js <nl> describe ( ' app module ' , function ( ) { <nl> <nl> it ( ' fetches large icons ' , function ( done ) { <nl> if ( process . platform = = = ' darwin ' ) { <nl> - done ( ) / / macOS does not support large icons <nl> + return this . skip ( ) / / macOS does not support large icons <nl> } <nl> app . getFileIcon ( iconPath , { size : ' normal ' } , function ( err , icon ) { <nl> const size = icon . getSize ( ) <nl>
Properly skip large size test on macOS
electron/electron
c36cdb858025836938702e85b1dbcc8525b07cd5
2017-02-07T17:54:22Z
mmm a / arangod / Aql / AqlValue . cpp <nl> ppp b / arangod / Aql / AqlValue . cpp <nl> Json AqlValue : : extractArrayMember ( triagens : : arango : : AqlTransaction * trx , <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ brief extract a value from a list AqlValue <nl> / / / this will return null if the value is not a list <nl> + / / / depending on the last parameter , the return value will either contain a <nl> + / / / copy of the original value in the list or a reference to it ( which must <nl> + / / / not be freed ) <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> Json AqlValue : : extractListMember ( triagens : : arango : : AqlTransaction * trx , <nl> TRI_document_collection_t const * document , <nl> - int64_t position ) const { <nl> + int64_t position , <nl> + bool copy ) const { <nl> switch ( _type ) { <nl> case JSON : { <nl> TRI_ASSERT ( _json ! = nullptr ) ; <nl> Json AqlValue : : extractListMember ( triagens : : arango : : AqlTransaction * trx , <nl> TRI_json_t const * found = TRI_LookupListJson ( json , static_cast < size_t > ( position ) ) ; <nl> <nl> if ( found ! = nullptr ) { <nl> - return Json ( TRI_UNKNOWN_MEM_ZONE , TRI_CopyJson ( TRI_UNKNOWN_MEM_ZONE , found ) ) ; <nl> + if ( copy ) { <nl> + / / return a copy of the value <nl> + return Json ( TRI_UNKNOWN_MEM_ZONE , TRI_CopyJson ( TRI_UNKNOWN_MEM_ZONE , found ) , triagens : : basics : : Json : : AUTOFREE ) ; <nl> + } <nl> + <nl> + / / return a pointer to the original value , without asking for its ownership <nl> + return Json ( TRI_UNKNOWN_MEM_ZONE , found , triagens : : basics : : Json : : NOFREE ) ; <nl> } <nl> } <nl> } <nl> mmm a / arangod / Aql / AqlValue . h <nl> ppp b / arangod / Aql / AqlValue . h <nl> namespace triagens { <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ brief extract a value from a list AqlValue <nl> / / / this will return null if the value is not a list <nl> + / / / depending on the last parameter , the return value will either contain a <nl> + / / / copy of the original value in the list or a reference to it ( which must <nl> + / / / not be freed ) <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> triagens : : basics : : Json extractListMember ( triagens : : arango : : AqlTransaction * , <nl> TRI_document_collection_t const * , <nl> - int64_t ) const ; <nl> + int64_t , <nl> + bool ) const ; <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ brief create an AqlValue from a vector of AqlItemBlock * s <nl> mmm a / arangod / Aql / Expression . cpp <nl> ppp b / arangod / Aql / Expression . cpp <nl> AqlValue Expression : : executeSimpleExpression ( AstNode const * node , <nl> <nl> if ( result . isList ( ) ) { <nl> if ( index - > isNumericValue ( ) ) { <nl> - auto j = result . extractListMember ( trx , myCollection , index - > getIntValue ( ) ) ; <nl> + auto j = result . extractListMember ( trx , myCollection , index - > getIntValue ( ) , true ) ; <nl> result . destroy ( ) ; <nl> return AqlValue ( new Json ( TRI_UNKNOWN_MEM_ZONE , j . steal ( ) ) ) ; <nl> } <nl> AqlValue Expression : : executeSimpleExpression ( AstNode const * node , <nl> try { <nl> / / stoll ( ) might throw an exception if the string is not a number <nl> int64_t position = static_cast < int64_t > ( std : : stoll ( p ) ) ; <nl> - auto j = result . extractListMember ( trx , myCollection , position ) ; <nl> + auto j = result . extractListMember ( trx , myCollection , position , true ) ; <nl> result . destroy ( ) ; <nl> return AqlValue ( new Json ( TRI_UNKNOWN_MEM_ZONE , j . steal ( ) ) ) ; <nl> } <nl> AqlValue Expression : : executeSimpleExpression ( AstNode const * node , <nl> size_t const n = right . listSize ( ) ; <nl> <nl> for ( size_t i = 0 ; i < n ; + + i ) { <nl> - auto listItem = right . extractListMember ( trx , rightCollection , i ) ; <nl> + / / do not copy the list element we ' re looking at <nl> + auto listItem = right . extractListMember ( trx , rightCollection , i , false ) ; <nl> AqlValue listItemValue ( & listItem ) ; <nl> <nl> int compareResult = AqlValue : : Compare ( trx , left , leftCollection , listItemValue , nullptr ) ; <nl> mmm a / arangod / Aql / Functions . cpp <nl> ppp b / arangod / Aql / Functions . cpp <nl> using Json = triagens : : basics : : Json ; <nl> AqlValue Functions : : IsNull ( triagens : : arango : : AqlTransaction * trx , <nl> TRI_document_collection_t const * collection , <nl> AqlValue const parameters ) { <nl> - Json j ( parameters . extractListMember ( trx , collection , 0 ) ) ; <nl> + Json j ( parameters . extractListMember ( trx , collection , 0 , false ) ) ; <nl> return AqlValue ( new Json ( j . isNull ( ) ) ) ; <nl> } <nl> <nl> AqlValue Functions : : IsNull ( triagens : : arango : : AqlTransaction * trx , <nl> AqlValue Functions : : IsBool ( triagens : : arango : : AqlTransaction * trx , <nl> TRI_document_collection_t const * collection , <nl> AqlValue const parameters ) { <nl> - Json j ( parameters . extractListMember ( trx , collection , 0 ) ) ; <nl> + Json j ( parameters . extractListMember ( trx , collection , 0 , false ) ) ; <nl> return AqlValue ( new Json ( j . isBoolean ( ) ) ) ; <nl> } <nl> <nl> AqlValue Functions : : IsBool ( triagens : : arango : : AqlTransaction * trx , <nl> AqlValue Functions : : IsNumber ( triagens : : arango : : AqlTransaction * trx , <nl> TRI_document_collection_t const * collection , <nl> AqlValue const parameters ) { <nl> - Json j ( parameters . extractListMember ( trx , collection , 0 ) ) ; <nl> + Json j ( parameters . extractListMember ( trx , collection , 0 , false ) ) ; <nl> return AqlValue ( new Json ( j . isNumber ( ) ) ) ; <nl> } <nl> <nl> AqlValue Functions : : IsNumber ( triagens : : arango : : AqlTransaction * trx , <nl> AqlValue Functions : : IsString ( triagens : : arango : : AqlTransaction * trx , <nl> TRI_document_collection_t const * collection , <nl> AqlValue const parameters ) { <nl> - Json j ( parameters . extractListMember ( trx , collection , 0 ) ) ; <nl> + Json j ( parameters . extractListMember ( trx , collection , 0 , false ) ) ; <nl> return AqlValue ( new Json ( j . isString ( ) ) ) ; <nl> } <nl> <nl> AqlValue Functions : : IsString ( triagens : : arango : : AqlTransaction * trx , <nl> AqlValue Functions : : IsList ( triagens : : arango : : AqlTransaction * trx , <nl> TRI_document_collection_t const * collection , <nl> AqlValue const parameters ) { <nl> - Json j ( parameters . extractListMember ( trx , collection , 0 ) ) ; <nl> + Json j ( parameters . extractListMember ( trx , collection , 0 , false ) ) ; <nl> return AqlValue ( new Json ( j . isList ( ) ) ) ; <nl> } <nl> <nl> AqlValue Functions : : IsList ( triagens : : arango : : AqlTransaction * trx , <nl> AqlValue Functions : : IsDocument ( triagens : : arango : : AqlTransaction * trx , <nl> TRI_document_collection_t const * collection , <nl> AqlValue const parameters ) { <nl> - Json j ( parameters . extractListMember ( trx , collection , 0 ) ) ; <nl> + Json j ( parameters . extractListMember ( trx , collection , 0 , false ) ) ; <nl> return AqlValue ( new Json ( j . isArray ( ) ) ) ; <nl> } <nl> <nl>
a bit less copying
arangodb/arangodb
2e9100619a59673cdf84c87835fd73fe9f8babdd
2014-10-28T17:10:23Z
mmm a / emcc <nl> ppp b / emcc <nl> try : <nl> if DEBUG : save_intermediate ( ' closure ' ) <nl> <nl> if js_opts : <nl> - if shared . Settings . OUTLINING_LIMIT > 0 : <nl> + if shared . Settings . OUTLINING_LIMIT > 0 and shared . Settings . ASM_JS : <nl> js_optimizer_queue + = [ ' outline ' ] <nl> js_optimizer_extra_info [ ' sizeToOutline ' ] = shared . Settings . OUTLINING_LIMIT <nl> <nl>
only outline in asm . js mode , where it is supported
emscripten-core/emscripten
ab506b38dbb9acb2db4f1a1b8c1608cc57409a6b
2013-08-21T22:13:43Z
mmm a / Source / CNTKv2LibraryDll / proto / onnx / Operators . cpp <nl> ppp b / Source / CNTKv2LibraryDll / proto / onnx / Operators . cpp <nl> namespace ONNX <nl> { L " Alias " , { { <nl> { L " Alias " , " Identity " } , <nl> } } } , <nl> + { L " StopGradient " , { { <nl> + { L " StopGradient " , " Identity " } , <nl> + } } } , <nl> { L " Gemm " , { { <nl> { L " Gemm " , " Gemm " } , <nl> } } } , <nl>
Adding support for StopGradient as a no - op .
microsoft/CNTK
e98b00d4f258493ffb7d89790a18baa40a63a897
2018-07-27T23:21:46Z
mmm a / dbms / src / Core / Defines . h <nl> ppp b / dbms / src / Core / Defines . h <nl> <nl> / / / The boundary on which the blocks for asynchronous file operations should be aligned . <nl> # define DEFAULT_AIO_FILE_BLOCK_SIZE 4096 <nl> <nl> - # define DEFAULT_QUERY_LOG_FLUSH_INTERVAL_MILLISECONDS 7500 <nl> - <nl> # define DEFAULT_HTTP_READ_BUFFER_TIMEOUT 1800 <nl> # define DEFAULT_HTTP_READ_BUFFER_CONNECTION_TIMEOUT 1 <nl> / / / Maximum namber of http - connections between two endpoints <nl> mmm a / dbms / src / Interpreters / Settings . h <nl> ppp b / dbms / src / Interpreters / Settings . h <nl> struct Settings <nl> M ( SettingBool , insert_distributed_sync , false , " If setting is enabled , insert query into distributed waits until data will be sent to all nodes in cluster . " ) \ <nl> M ( SettingUInt64 , insert_distributed_timeout , 0 , " Timeout for insert query into distributed . Setting is used only with insert_distributed_sync enabled . Zero value means no timeout . " ) \ <nl> M ( SettingInt64 , distributed_ddl_task_timeout , 180 , " Timeout for DDL query responses from all hosts in cluster . Negative value means infinite . " ) \ <nl> - M ( SettingMilliseconds , stream_flush_interval_ms , DEFAULT_QUERY_LOG_FLUSH_INTERVAL_MILLISECONDS , " Timeout for flushing data from streaming storages . " ) \ <nl> + M ( SettingMilliseconds , stream_flush_interval_ms , 7500 , " Timeout for flushing data from streaming storages . " ) \ <nl> M ( SettingString , format_schema , " " , " Schema identifier ( used by schema - based formats ) " ) \ <nl> M ( SettingBool , insert_allow_materialized_columns , 0 , " If setting is enabled , Allow materialized columns in INSERT . " ) \ <nl> M ( SettingSeconds , http_connection_timeout , DEFAULT_HTTP_READ_BUFFER_CONNECTION_TIMEOUT , " HTTP connection timeout . " ) \ <nl> mmm a / dbms / src / Interpreters / SystemLog . h <nl> ppp b / dbms / src / Interpreters / SystemLog . h <nl> std : : unique_ptr < TSystemLog > createDefaultSystemLog ( <nl> const Poco : : Util : : AbstractConfiguration & config , <nl> const String & config_prefix ) <nl> { <nl> + static constexpr size_t DEFAULT_SYSTEM_LOG_FLUSH_INTERVAL_MILLISECONDS = 7500 ; <nl> + <nl> String database = config . getString ( config_prefix + " . database " , default_database_name ) ; <nl> String table = config . getString ( config_prefix + " . table " , default_table_name ) ; <nl> String partition_by = config . getString ( config_prefix + " . partition_by " , " toYYYYMM ( event_date ) " ) ; <nl> String engine = " ENGINE = MergeTree PARTITION BY ( " + partition_by + " ) ORDER BY ( event_date , event_time ) SETTINGS index_granularity = 1024 " ; <nl> <nl> - size_t flush_interval_milliseconds = config . getUInt64 ( config_prefix + " . flush_interval_milliseconds " , DEFAULT_QUERY_LOG_FLUSH_INTERVAL_MILLISECONDS ) ; <nl> + size_t flush_interval_milliseconds = config . getUInt64 ( config_prefix + " . flush_interval_milliseconds " , DEFAULT_SYSTEM_LOG_FLUSH_INTERVAL_MILLISECONDS ) ; <nl> <nl> return std : : make_unique < TSystemLog > ( context , database , table , engine , flush_interval_milliseconds ) ; <nl> } <nl>
Preparations
ClickHouse/ClickHouse
9e6d835137f3f811d4f2e7ed6fd3739fd5903a3f
2018-12-14T16:17:09Z
mmm a / src / objects / js - objects - inl . h <nl> ppp b / src / objects / js - objects - inl . h <nl> <nl> # ifndef V8_OBJECTS_JS_OBJECTS_INL_H_ <nl> # define V8_OBJECTS_JS_OBJECTS_INL_H_ <nl> <nl> + # include " src / common / globals . h " <nl> # include " src / heap / heap - write - barrier . h " <nl> # include " src / objects / elements . h " <nl> # include " src / objects / embedder - data - slot - inl . h " <nl> DEF_GETTER ( JSReceiver , HasFastProperties , bool ) { <nl> DEF_GETTER ( JSReceiver , property_dictionary , NameDictionary ) { <nl> DCHECK ( ! IsJSGlobalObject ( isolate ) ) ; <nl> DCHECK ( ! HasFastProperties ( isolate ) ) ; <nl> + DCHECK ( ! V8_DICT_MODE_PROTOTYPES_BOOL ) ; <nl> + <nl> / / Can ' t use ReadOnlyRoots ( isolate ) as this isolate could be produced by <nl> / / i : : GetIsolateForPtrCompr ( HeapObject ) . <nl> Object prop = raw_properties_or_hash ( isolate ) ; <nl> DEF_GETTER ( JSReceiver , property_dictionary , NameDictionary ) { <nl> return NameDictionary : : cast ( prop ) ; <nl> } <nl> <nl> + DEF_GETTER ( JSReceiver , property_dictionary_ordered , OrderedNameDictionary ) { <nl> + DCHECK ( ! IsJSGlobalObject ( isolate ) ) ; <nl> + DCHECK ( ! HasFastProperties ( isolate ) ) ; <nl> + DCHECK ( V8_DICT_MODE_PROTOTYPES_BOOL ) ; <nl> + <nl> + / / Can ' t use ReadOnlyRoots ( isolate ) as this isolate could be produced by <nl> + / / i : : GetIsolateForPtrCompr ( HeapObject ) . <nl> + Object prop = raw_properties_or_hash ( isolate ) ; <nl> + if ( prop . IsSmi ( ) ) { <nl> + return GetReadOnlyRoots ( isolate ) . empty_ordered_property_dictionary ( ) ; <nl> + } <nl> + return OrderedNameDictionary : : cast ( prop ) ; <nl> + } <nl> + <nl> / / TODO ( gsathya ) : Pass isolate directly to this function and access <nl> / / the heap from this . <nl> DEF_GETTER ( JSReceiver , property_array , PropertyArray ) { <nl> mmm a / src / objects / js - objects . h <nl> ppp b / src / objects / js - objects . h <nl> class JSReceiver : public HeapObject { <nl> / / map . <nl> DECL_GETTER ( property_array , PropertyArray ) <nl> <nl> - / / Gets slow properties for non - global objects . <nl> + / / Gets slow properties for non - global objects ( if v8_dict_mode_prototypes is <nl> + / / not set ) . <nl> DECL_GETTER ( property_dictionary , NameDictionary ) <nl> <nl> + / / Gets slow properties for non - global objects ( if v8_dict_mode_prototypes is <nl> + / / set ) . <nl> + DECL_GETTER ( property_dictionary_ordered , OrderedNameDictionary ) <nl> + <nl> / / Sets the properties backing store and makes sure any existing hash is moved <nl> / / to the new properties store . To clear out the properties store , pass in the <nl> / / empty_fixed_array ( ) , the hash will be maintained in this case as well . <nl>
[ dict - proto ] getter for ordered property dicts
v8/v8
e5c6b69d1ae07b40ac4c16ad276fcfb5c3f5dfe7
2020-10-19T15:27:20Z
mmm a / tensorflow / python / eager / core_test . py <nl> ppp b / tensorflow / python / eager / core_test . py <nl> class TFETest ( test_util . TensorFlowTestCase ) : <nl> <nl> def setUp ( self ) : <nl> super ( TFETest , self ) . setUp ( ) <nl> - ops . device ( None ) . __enter__ ( ) <nl> context . _reset_context ( ) <nl> configure_virtual_cpus ( ) <nl> <nl> def _recv ( self , dtype , tensor_name , from_device ) : <nl> <nl> def setUp ( self ) : <nl> super ( SendRecvTest , self ) . setUp ( ) <nl> - ops . device ( None ) . __enter__ ( ) <nl> context . _reset_context ( ) <nl> configure_virtual_cpus ( ) <nl> <nl> class EagerTensorCacheTest ( test_util . TensorFlowTestCase ) : <nl> <nl> def setUp ( self ) : <nl> super ( EagerTensorCacheTest , self ) . setUp ( ) <nl> - ops . device ( None ) . __enter__ ( ) <nl> context . _reset_context ( ) <nl> configure_virtual_cpus ( ) <nl> <nl>
Remove ops . device ( None ) . __enter__ from eager : core_test .
tensorflow/tensorflow
a7953a19d25f85e7e7a389e87409a4adb9d890ae
2020-02-25T20:53:56Z
mmm a / lib / Sema / CSDiag . cpp <nl> ppp b / lib / Sema / CSDiag . cpp <nl> static bool isCastToTypedPointer ( ASTContext & Ctx , const Expr * Fn , <nl> if ( InitType . isNull ( ) | | ArgType . isNull ( ) ) <nl> return false ; <nl> <nl> + / / unwrap one level of Optional <nl> + if ( auto ArgOptType = ArgType - > getOptionalObjectType ( ) ) <nl> + ArgType = ArgOptType ; <nl> + <nl> auto * InitNom = InitType - > getAnyNominal ( ) ; <nl> if ( ! InitNom ) <nl> return false ; <nl> mmm a / test / 1_stdlib / UnsafePointerDiagnostics . swift <nl> ppp b / test / 1_stdlib / UnsafePointerDiagnostics . swift <nl> func unsafePointerConversionAvailability ( <nl> umps : UnsafeMutablePointer < String > , <nl> ups : UnsafePointer < String > ) { <nl> <nl> + let omrp : UnsafeMutableRawPointer ? = mrp <nl> + let orp : UnsafeRawPointer ? = rp <nl> + let oumpv : UnsafeMutablePointer < Void > = umpv / / expected - warning { { UnsafeMutablePointer < Void > has been replaced by UnsafeMutableRawPointer } } <nl> + let oupv : UnsafePointer < Void > ? = upv / / expected - warning { { UnsafePointer < Void > has been replaced by UnsafeRawPointer } } <nl> + let oumpi : UnsafeMutablePointer < Int > ? = umpi <nl> + let oupi : UnsafePointer < Int > ? = upi <nl> + let oumps : UnsafeMutablePointer < String > ? = umps <nl> + let oups : UnsafePointer < String > ? = ups <nl> + <nl> _ = UnsafeMutableRawPointer ( mrp ) <nl> _ = UnsafeMutableRawPointer ( rp ) / / expected - error { { ' init ' has been renamed to ' init ( mutating : ) ' } } <nl> _ = UnsafeMutableRawPointer ( umpv ) <nl> func unsafePointerConversionAvailability ( <nl> _ = UnsafeMutableRawPointer ( upi ) / / expected - error { { ' init ' has been renamed to ' init ( mutating : ) ' } } <nl> _ = UnsafeMutableRawPointer ( umps ) <nl> _ = UnsafeMutableRawPointer ( ups ) / / expected - error { { ' init ' has been renamed to ' init ( mutating : ) ' } } <nl> + _ = UnsafeMutableRawPointer ( omrp ) <nl> + _ = UnsafeMutableRawPointer ( orp ) / / expected - error { { ' init ' has been renamed to ' init ( mutating : ) ' } } <nl> + _ = UnsafeMutableRawPointer ( oumpv ) <nl> + _ = UnsafeMutableRawPointer ( oupv ) / / expected - error { { ' init ' has been renamed to ' init ( mutating : ) ' } } <nl> + _ = UnsafeMutableRawPointer ( oumpi ) <nl> + _ = UnsafeMutableRawPointer ( oupi ) / / expected - error { { ' init ' has been renamed to ' init ( mutating : ) ' } } <nl> + _ = UnsafeMutableRawPointer ( oumps ) <nl> + _ = UnsafeMutableRawPointer ( oups ) / / expected - error { { ' init ' has been renamed to ' init ( mutating : ) ' } } <nl> <nl> / / These all correctly pass with no error . <nl> _ = UnsafeRawPointer ( mrp ) <nl> func unsafePointerConversionAvailability ( <nl> _ = UnsafeRawPointer ( upi ) <nl> _ = UnsafeRawPointer ( umps ) <nl> _ = UnsafeRawPointer ( ups ) <nl> + _ = UnsafeRawPointer ( omrp ) <nl> + _ = UnsafeRawPointer ( orp ) <nl> + _ = UnsafeRawPointer ( oumpv ) <nl> + _ = UnsafeRawPointer ( oupv ) <nl> + _ = UnsafeRawPointer ( oumpi ) <nl> + _ = UnsafeRawPointer ( oupi ) <nl> + _ = UnsafeRawPointer ( oumps ) <nl> + _ = UnsafeRawPointer ( oups ) <nl> <nl> - / / UnsafeMutablePointer < Void > to UnsafeMutableRawPointer ( umpv ) <nl> _ = UnsafeMutablePointer < Void > ( rp ) / / expected - warning 3 { { UnsafeMutablePointer < Void > has been replaced by UnsafeMutableRawPointer } } expected - error { { cannot invoke initializer for type ' UnsafeMutablePointer < Void > ' with an argument list of type ' ( UnsafeRawPointer ) ' } } expected - note { { overloads for ' UnsafeMutablePointer < Void > ' exist with these partially matching parameter lists : ( RawPointer ) , ( OpaquePointer ) , ( OpaquePointer ? ) , ( UnsafeMutablePointer < Pointee > ) , ( UnsafeMutablePointer < Pointee > ? ) } } expected - note { { Pointer conversion restricted : use ' . assumingMemoryBound ( to : ) ' or ' . bindMemory ( to : capacity : ) ' to view memory as a type } } <nl> _ = UnsafeMutablePointer < Void > ( mrp ) / / expected - error { { cannot invoke initializer for type ' UnsafeMutablePointer < Void > ' with an argument list of type ' ( UnsafeMutableRawPointer ) ' } } expected - note { { } } expected - warning 3 { { UnsafeMutablePointer < Void > has been replaced by UnsafeMutableRawPointer } } expected - note { { overloads for ' UnsafeMutablePointer < Void > ' exist with these partially matching parameter lists : ( RawPointer ) , ( OpaquePointer ) , ( OpaquePointer ? ) , ( UnsafeMutablePointer < Pointee > ) , ( UnsafeMutablePointer < Pointee > ? ) } } <nl> _ = UnsafeMutablePointer < Void > ( umpv ) / / expected - warning { { UnsafeMutablePointer < Void > has been replaced by UnsafeMutableRawPointer } } <nl> func unsafePointerConversionAvailability ( <nl> _ = UnsafeMutablePointer < Void > ( umps ) / / expected - warning { { UnsafeMutablePointer < Void > has been replaced by UnsafeMutableRawPointer } } <nl> _ = UnsafeMutablePointer < Void > ( ups ) / / expected - error { { ' init ' has been renamed to ' init ( mutating : ) ' } } expected - warning { { UnsafeMutablePointer < Void > has been replaced by UnsafeMutableRawPointer } } <nl> <nl> - / / UnsafePointer < Void > to UnsafeRawPointer ( umpv ) <nl> _ = UnsafePointer < Void > ( rp ) / / expected - error { { cannot invoke initializer for type ' UnsafePointer < Void > ' with an argument list of type ' ( UnsafeRawPointer ) ' } } expected - note { { } } expected - warning 3 { { UnsafePointer < Void > has been replaced by UnsafeRawPointer } } expected - note { { overloads for ' UnsafePointer < Void > ' exist with these partially matching parameter lists : ( RawPointer ) , ( OpaquePointer ) , ( OpaquePointer ? ) , ( UnsafePointer < Pointee > ) , ( UnsafePointer < Pointee > ? ) , ( UnsafeMutablePointer < Pointee > ) , ( UnsafeMutablePointer < Pointee > ? ) } } <nl> _ = UnsafePointer < Void > ( mrp ) / / expected - error { { cannot invoke initializer for type ' UnsafePointer < Void > ' with an argument list of type ' ( UnsafeMutableRawPointer ) ' } } expected - note { { } } expected - warning 3 { { UnsafePointer < Void > has been replaced by UnsafeRawPointer } } expected - note { { overloads for ' UnsafePointer < Void > ' exist with these partially matching parameter lists : ( RawPointer ) , ( OpaquePointer ) , ( OpaquePointer ? ) , ( UnsafePointer < Pointee > ) , ( UnsafePointer < Pointee > ? ) , ( UnsafeMutablePointer < Pointee > ) , ( UnsafeMutablePointer < Pointee > ? ) } } <nl> _ = UnsafePointer < Void > ( umpv ) / / expected - warning { { UnsafePointer < Void > has been replaced by UnsafeRawPointer } } <nl> func unsafePointerConversionAvailability ( <nl> _ = UnsafeMutablePointer < Int > ( upi ) / / expected - error { { ' init ' has been renamed to ' init ( mutating : ) ' } } <nl> _ = UnsafeMutablePointer < Int > ( umps ) / / expected - error { { ' init ' is unavailable : use ' withMemoryRebound ( to : capacity : _ ) ' to temporarily view memory as another layout - compatible type . } } <nl> _ = UnsafeMutablePointer < Int > ( ups ) / / expected - error { { ' init ' is unavailable : use ' withMemoryRebound ( to : capacity : _ ) ' to temporarily view memory as another layout - compatible type . } } <nl> + _ = UnsafeMutablePointer < Int > ( orp ) / / expected - error { { cannot invoke initializer for type ' UnsafeMutablePointer < Int > ' with an argument list of type ' ( UnsafeRawPointer ? ) ' } } expected - note { { Pointer conversion restricted : use ' . assumingMemoryBound ( to : ) ' or ' . bindMemory ( to : capacity : ) ' to view memory as a type . } } expected - note { { } } <nl> + _ = UnsafeMutablePointer < Int > ( omrp ) / / expected - error { { cannot invoke initializer for type ' UnsafeMutablePointer < Int > ' with an argument list of type ' ( UnsafeMutableRawPointer ? ) ' } } expected - note { { Pointer conversion restricted : use ' . assumingMemoryBound ( to : ) ' or ' . bindMemory ( to : capacity : ) ' to view memory as a type . } } expected - note { { } } <nl> + _ = UnsafeMutablePointer < Int > ( oumpv ) / / expected - error { { ' init ' is unavailable : use ' withMemoryRebound ( to : capacity : _ ) ' to temporarily view memory as another layout - compatible type . } } <nl> + _ = UnsafeMutablePointer < Int > ( oupv ) / / expected - error { { ' init ' is unavailable : use ' withMemoryRebound ( to : capacity : _ ) ' to temporarily view memory as another layout - compatible type . } } <nl> + _ = UnsafeMutablePointer < Int > ( oumpi ) <nl> + _ = UnsafeMutablePointer < Int > ( oupi ) / / expected - error { { ' init ' has been renamed to ' init ( mutating : ) ' } } <nl> + _ = UnsafeMutablePointer < Int > ( oumps ) / / expected - error { { ' init ' is unavailable : use ' withMemoryRebound ( to : capacity : _ ) ' to temporarily view memory as another layout - compatible type . } } <nl> + _ = UnsafeMutablePointer < Int > ( oups ) / / expected - error { { ' init ' is unavailable : use ' withMemoryRebound ( to : capacity : _ ) ' to temporarily view memory as another layout - compatible type . } } <nl> <nl> _ = UnsafePointer < Int > ( rp ) / / expected - error { { cannot invoke initializer for type ' UnsafePointer < Int > ' with an argument list of type ' ( UnsafeRawPointer ) ' } } expected - note { { Pointer conversion restricted : use ' . assumingMemoryBound ( to : ) ' or ' . bindMemory ( to : capacity : ) ' to view memory as a type . } } expected - note { { } } <nl> _ = UnsafePointer < Int > ( mrp ) / / expected - error { { cannot invoke initializer for type ' UnsafePointer < Int > ' with an argument list of type ' ( UnsafeMutableRawPointer ) ' } } expected - note { { Pointer conversion restricted : use ' . assumingMemoryBound ( to : ) ' or ' . bindMemory ( to : capacity : ) ' to view memory as a type . } } expected - note { { } } <nl> func unsafePointerConversionAvailability ( <nl> _ = UnsafePointer < Int > ( upi ) <nl> _ = UnsafePointer < Int > ( umps ) / / expected - error { { ' init ' is unavailable : use ' withMemoryRebound ( to : capacity : _ ) ' to temporarily view memory as another layout - compatible type . } } <nl> _ = UnsafePointer < Int > ( ups ) / / expected - error { { ' init ' is unavailable : use ' withMemoryRebound ( to : capacity : _ ) ' to temporarily view memory as another layout - compatible type . } } <nl> + _ = UnsafePointer < Int > ( orp ) / / expected - error { { cannot invoke initializer for type ' UnsafePointer < Int > ' with an argument list of type ' ( UnsafeRawPointer ? ) ' } } expected - note { { Pointer conversion restricted : use ' . assumingMemoryBound ( to : ) ' or ' . bindMemory ( to : capacity : ) ' to view memory as a type . } } expected - note { { } } <nl> + _ = UnsafePointer < Int > ( omrp ) / / expected - error { { cannot invoke initializer for type ' UnsafePointer < Int > ' with an argument list of type ' ( UnsafeMutableRawPointer ? ) ' } } expected - note { { Pointer conversion restricted : use ' . assumingMemoryBound ( to : ) ' or ' . bindMemory ( to : capacity : ) ' to view memory as a type . } } expected - note { { } } <nl> + _ = UnsafePointer < Int > ( oumpv ) / / expected - error { { ' init ' is unavailable : use ' withMemoryRebound ( to : capacity : _ ) ' to temporarily view memory as another layout - compatible type . } } <nl> + _ = UnsafePointer < Int > ( oupv ) / / expected - error { { ' init ' is unavailable : use ' withMemoryRebound ( to : capacity : _ ) ' to temporarily view memory as another layout - compatible type . } } <nl> + _ = UnsafePointer < Int > ( oumpi ) <nl> + _ = UnsafePointer < Int > ( oupi ) <nl> + _ = UnsafePointer < Int > ( oumps ) / / expected - error { { ' init ' is unavailable : use ' withMemoryRebound ( to : capacity : _ ) ' to temporarily view memory as another layout - compatible type . } } <nl> + _ = UnsafePointer < Int > ( oups ) / / expected - error { { ' init ' is unavailable : use ' withMemoryRebound ( to : capacity : _ ) ' to temporarily view memory as another layout - compatible type . } } <nl> } <nl>
[ diagnostics ] Emit a a note for optional conversion of raw pointers . ( )
apple/swift
580372b98b17e9dc51b99a70b31e4eb1e7f82a07
2016-08-21T04:11:50Z
mmm a / modules / videostab / include / opencv2 / videostab / deblurring . hpp <nl> ppp b / modules / videostab / include / opencv2 / videostab / deblurring . hpp <nl> CV_EXPORTS float calcBlurriness ( const Mat & frame ) ; <nl> class CV_EXPORTS DeblurerBase <nl> { <nl> public : <nl> - DeblurerBase ( ) : radius_ ( 0 ) , frames_ ( 0 ) , motions_ ( 0 ) { } <nl> + DeblurerBase ( ) : radius_ ( 0 ) , frames_ ( 0 ) , motions_ ( 0 ) , blurrinessRates_ ( 0 ) { } <nl> <nl> virtual ~ DeblurerBase ( ) { } <nl> <nl> virtual void setRadius ( int val ) { radius_ = val ; } <nl> virtual int radius ( ) const { return radius_ ; } <nl> <nl> + virtual void deblur ( int idx , Mat & frame ) = 0 ; <nl> + <nl> + <nl> + / / data from stabilizer <nl> + <nl> virtual void setFrames ( const std : : vector < Mat > & val ) { frames_ = & val ; } <nl> virtual const std : : vector < Mat > & frames ( ) const { return * frames_ ; } <nl> <nl> class CV_EXPORTS DeblurerBase <nl> virtual void setBlurrinessRates ( const std : : vector < float > & val ) { blurrinessRates_ = & val ; } <nl> virtual const std : : vector < float > & blurrinessRates ( ) const { return * blurrinessRates_ ; } <nl> <nl> - virtual void deblur ( int idx , Mat & frame ) = 0 ; <nl> - <nl> protected : <nl> int radius_ ; <nl> const std : : vector < Mat > * frames_ ; <nl> mmm a / modules / videostab / include / opencv2 / videostab / global_motion . hpp <nl> ppp b / modules / videostab / include / opencv2 / videostab / global_motion . hpp <nl> <nl> # define __OPENCV_VIDEOSTAB_GLOBAL_MOTION_HPP__ <nl> <nl> # include < vector > <nl> + # include < string > <nl> + # include < fstream > <nl> # include " opencv2 / core / core . hpp " <nl> # include " opencv2 / features2d / features2d . hpp " <nl> # include " opencv2 / videostab / optical_flow . hpp " <nl> class CV_EXPORTS GlobalMotionEstimatorBase <nl> MotionModel motionModel_ ; <nl> } ; <nl> <nl> - class CV_EXPORTS EyeMotionEstimator : public GlobalMotionEstimatorBase <nl> + class CV_EXPORTS FromFileMotionReader : public GlobalMotionEstimatorBase <nl> { <nl> public : <nl> - virtual Mat estimate ( const Mat & / * frame0 * / , const Mat & / * frame1 * / ) <nl> - { <nl> - return Mat : : eye ( 3 , 3 , CV_32F ) ; <nl> - } <nl> + FromFileMotionReader ( const std : : string & path ) ; <nl> + virtual Mat estimate ( const Mat & frame0 , const Mat & frame1 ) ; <nl> + <nl> + private : <nl> + std : : ifstream file_ ; <nl> + } ; <nl> + <nl> + class CV_EXPORTS ToFileMotionWriter : public GlobalMotionEstimatorBase <nl> + { <nl> + public : <nl> + ToFileMotionWriter ( const std : : string & path , Ptr < GlobalMotionEstimatorBase > estimator ) ; <nl> + virtual Mat estimate ( const Mat & frame0 , const Mat & frame1 ) ; <nl> + <nl> + private : <nl> + std : : ofstream file_ ; <nl> + Ptr < GlobalMotionEstimatorBase > estimator_ ; <nl> } ; <nl> <nl> class CV_EXPORTS PyrLkRobustMotionEstimator : public GlobalMotionEstimatorBase <nl> mmm a / modules / videostab / include / opencv2 / videostab / inpainting . hpp <nl> ppp b / modules / videostab / include / opencv2 / videostab / inpainting . hpp <nl> class CV_EXPORTS InpainterBase <nl> { <nl> public : <nl> InpainterBase ( ) <nl> - : radius_ ( 0 ) , frames_ ( 0 ) , motions_ ( 0 ) , <nl> + : radius_ ( 0 ) , motionModel_ ( UNKNOWN ) , frames_ ( 0 ) , motions_ ( 0 ) , <nl> stabilizedFrames_ ( 0 ) , stabilizationMotions_ ( 0 ) { } <nl> <nl> virtual ~ InpainterBase ( ) { } <nl> class CV_EXPORTS InpainterBase <nl> virtual void setMotionModel ( MotionModel val ) { motionModel_ = val ; } <nl> virtual MotionModel motionModel ( ) const { return motionModel_ ; } <nl> <nl> + virtual void inpaint ( int idx , Mat & frame , Mat & mask ) = 0 ; <nl> + <nl> + <nl> + / / data from stabilizer <nl> + <nl> virtual void setFrames ( const std : : vector < Mat > & val ) { frames_ = & val ; } <nl> virtual const std : : vector < Mat > & frames ( ) const { return * frames_ ; } <nl> <nl> class CV_EXPORTS InpainterBase <nl> virtual void setStabilizationMotions ( const std : : vector < Mat > & val ) { stabilizationMotions_ = & val ; } <nl> virtual const std : : vector < Mat > & stabilizationMotions ( ) const { return * stabilizationMotions_ ; } <nl> <nl> - virtual void inpaint ( int idx , Mat & frame , Mat & mask ) = 0 ; <nl> - <nl> protected : <nl> int radius_ ; <nl> MotionModel motionModel_ ; <nl> mmm a / modules / videostab / include / opencv2 / videostab / stabilizer . hpp <nl> ppp b / modules / videostab / include / opencv2 / videostab / stabilizer . hpp <nl> class CV_EXPORTS TwoPassStabilizer : public StabilizerBase , public IFrameSource <nl> <nl> int frameCount_ ; <nl> bool isPrePassDone_ ; <nl> + bool doWobbleSuppression_ ; <nl> + std : : vector < Mat > motions2_ ; <nl> Mat suppressedFrame_ ; <nl> } ; <nl> <nl> mmm a / modules / videostab / include / opencv2 / videostab / wobble_suppression . hpp <nl> ppp b / modules / videostab / include / opencv2 / videostab / wobble_suppression . hpp <nl> <nl> # include < vector > <nl> # include " opencv2 / core / core . hpp " <nl> # include " opencv2 / videostab / global_motion . hpp " <nl> + # include " opencv2 / videostab / log . hpp " <nl> <nl> namespace cv <nl> { <nl> namespace videostab <nl> class CV_EXPORTS WobbleSuppressorBase <nl> { <nl> public : <nl> + WobbleSuppressorBase ( ) ; <nl> + <nl> virtual ~ WobbleSuppressorBase ( ) { } <nl> <nl> - virtual void setFrames ( const std : : vector < Mat > & val ) { frames_ = & val ; } <nl> - virtual const std : : vector < Mat > & frames ( ) const { return * frames_ ; } <nl> + void setMotionEstimator ( Ptr < GlobalMotionEstimatorBase > val ) { motionEstimator_ = val ; } <nl> + Ptr < GlobalMotionEstimatorBase > motionEstimator ( ) const { return motionEstimator_ ; } <nl> + <nl> + virtual void suppress ( int idx , const Mat & frame , Mat & result ) = 0 ; <nl> + <nl> + <nl> + / / data from stabilizer <nl> + <nl> + virtual void setFrameCount ( int val ) { frameCount_ = val ; } <nl> + virtual int frameCount ( ) const { return frameCount_ ; } <nl> <nl> virtual void setMotions ( const std : : vector < Mat > & val ) { motions_ = & val ; } <nl> virtual const std : : vector < Mat > & motions ( ) const { return * motions_ ; } <nl> <nl> - virtual void setStabilizedFrames ( const std : : vector < Mat > & val ) { stabilizedFrames_ = & val ; } <nl> - virtual const std : : vector < Mat > & stabilizedFrames ( ) const { return * stabilizedFrames_ ; } <nl> + virtual void setMotions2 ( const std : : vector < Mat > & val ) { motions2_ = & val ; } <nl> + virtual const std : : vector < Mat > & motions2 ( ) const { return * motions2_ ; } <nl> <nl> virtual void setStabilizationMotions ( const std : : vector < Mat > & val ) { stabilizationMotions_ = & val ; } <nl> virtual const std : : vector < Mat > & stabilizationMotions ( ) const { return * stabilizationMotions_ ; } <nl> <nl> - virtual void suppress ( int idx , Mat & frame ) = 0 ; <nl> - <nl> protected : <nl> - const std : : vector < Mat > * frames_ ; <nl> + Ptr < GlobalMotionEstimatorBase > motionEstimator_ ; <nl> + int frameCount_ ; <nl> const std : : vector < Mat > * motions_ ; <nl> - const std : : vector < Mat > * stabilizedFrames_ ; <nl> + const std : : vector < Mat > * motions2_ ; <nl> const std : : vector < Mat > * stabilizationMotions_ ; <nl> } ; <nl> <nl> class CV_EXPORTS NullWobbleSuppressor : public WobbleSuppressorBase <nl> { <nl> public : <nl> - virtual void suppress ( int idx , Mat & result ) ; <nl> + virtual void suppress ( int idx , const Mat & frame , Mat & result ) ; <nl> + } ; <nl> + <nl> + class CV_EXPORTS MoreAccurateMotionWobbleSuppressor : public WobbleSuppressorBase <nl> + { <nl> + public : <nl> + virtual void suppress ( int idx , const Mat & frame , Mat & result ) ; <nl> } ; <nl> <nl> } / / namespace videostab <nl> mmm a / modules / videostab / src / global_motion . cpp <nl> ppp b / modules / videostab / src / global_motion . cpp <nl> Mat estimateGlobalMotionRobust ( <nl> } <nl> <nl> <nl> + FromFileMotionReader : : FromFileMotionReader ( const string & path ) <nl> + { <nl> + file_ . open ( path . c_str ( ) ) ; <nl> + CV_Assert ( file_ . is_open ( ) ) ; <nl> + } <nl> + <nl> + <nl> + Mat FromFileMotionReader : : estimate ( const Mat & / * frame0 * / , const Mat & / * frame1 * / ) <nl> + { <nl> + Mat_ < float > M ( 3 , 3 ) ; <nl> + file_ > > M ( 0 , 0 ) > > M ( 0 , 1 ) > > M ( 0 , 2 ) <nl> + > > M ( 1 , 0 ) > > M ( 1 , 1 ) > > M ( 1 , 2 ) <nl> + > > M ( 2 , 0 ) > > M ( 2 , 1 ) > > M ( 2 , 2 ) ; <nl> + return M ; <nl> + } <nl> + <nl> + <nl> + ToFileMotionWriter : : ToFileMotionWriter ( const string & path , Ptr < GlobalMotionEstimatorBase > estimator ) <nl> + { <nl> + file_ . open ( path . c_str ( ) ) ; <nl> + CV_Assert ( file_ . is_open ( ) ) ; <nl> + estimator_ = estimator ; <nl> + } <nl> + <nl> + <nl> + Mat ToFileMotionWriter : : estimate ( const Mat & frame0 , const Mat & frame1 ) <nl> + { <nl> + Mat_ < float > M = estimator_ - > estimate ( frame0 , frame1 ) ; <nl> + file_ < < M ( 0 , 0 ) < < " " < < M ( 0 , 1 ) < < " " < < M ( 0 , 2 ) < < " " <nl> + < < M ( 1 , 0 ) < < " " < < M ( 1 , 1 ) < < " " < < M ( 1 , 2 ) < < " " <nl> + < < M ( 2 , 0 ) < < " " < < M ( 2 , 1 ) < < " " < < M ( 2 , 2 ) < < endl ; <nl> + return M ; <nl> + } <nl> + <nl> + <nl> PyrLkRobustMotionEstimator : : PyrLkRobustMotionEstimator ( ) <nl> : ransacParams_ ( RansacParams : : affine2dMotionStd ( ) ) <nl> { <nl> mmm a / modules / videostab / src / stabilizer . cpp <nl> ppp b / modules / videostab / src / stabilizer . cpp <nl> namespace videostab <nl> <nl> StabilizerBase : : StabilizerBase ( ) <nl> { <nl> - setLog ( new NullLog ( ) ) ; <nl> + setLog ( new LogToStdout ( ) ) ; <nl> setFrameSource ( new NullFrameSource ( ) ) ; <nl> setMotionEstimator ( new PyrLkRobustMotionEstimator ( ) ) ; <nl> setDeblurer ( new NullDeblurer ( ) ) ; <nl> void TwoPassStabilizer : : reset ( ) <nl> StabilizerBase : : reset ( ) ; <nl> frameCount_ = 0 ; <nl> isPrePassDone_ = false ; <nl> + doWobbleSuppression_ = false ; <nl> + motions2_ . clear ( ) ; <nl> suppressedFrame_ = Mat ( ) ; <nl> } <nl> <nl> void TwoPassStabilizer : : runPrePassIfNecessary ( ) <nl> <nl> Mat prevFrame , frame ; <nl> <nl> + WobbleSuppressorBase * wobbleSuppressor = static_cast < WobbleSuppressorBase * > ( wobbleSuppressor_ ) ; <nl> + doWobbleSuppression_ = dynamic_cast < NullWobbleSuppressor * > ( wobbleSuppressor ) = = 0 ; <nl> + <nl> while ( ! ( frame = frameSource_ - > nextFrame ( ) ) . empty ( ) ) <nl> { <nl> if ( frameCount_ > 0 ) <nl> + { <nl> motions_ . push_back ( motionEstimator_ - > estimate ( prevFrame , frame ) ) ; <nl> + if ( doWobbleSuppression_ ) <nl> + { <nl> + motions2_ . push_back ( <nl> + wobbleSuppressor_ - > motionEstimator ( ) - > estimate ( prevFrame , frame ) ) ; <nl> + } <nl> + } <nl> else <nl> { <nl> frameSize_ = frame . size ( ) ; <nl> void TwoPassStabilizer : : setUp ( const Mat & firstFrame ) <nl> for ( int i = - radius_ ; i < = 0 ; + + i ) <nl> at ( i , frames_ ) = firstFrame ; <nl> <nl> - wobbleSuppressor_ - > setFrames ( frames_ ) ; <nl> - wobbleSuppressor_ - > setMotions ( motions_ ) ; <nl> - wobbleSuppressor_ - > setStabilizedFrames ( stabilizedFrames_ ) ; <nl> - wobbleSuppressor_ - > setStabilizationMotions ( stabilizationMotions_ ) ; <nl> + WobbleSuppressorBase * wobbleSuppressor = static_cast < WobbleSuppressorBase * > ( wobbleSuppressor_ ) ; <nl> + doWobbleSuppression_ = dynamic_cast < NullWobbleSuppressor * > ( wobbleSuppressor ) = = 0 ; <nl> + if ( doWobbleSuppression_ ) <nl> + { <nl> + wobbleSuppressor_ - > setFrameCount ( frameCount_ ) ; <nl> + wobbleSuppressor_ - > setMotions ( motions_ ) ; <nl> + wobbleSuppressor_ - > setMotions2 ( motions2_ ) ; <nl> + wobbleSuppressor_ - > setStabilizationMotions ( stabilizationMotions_ ) ; <nl> + } <nl> <nl> StabilizerBase : : setUp ( firstFrame ) ; <nl> } <nl> Mat TwoPassStabilizer : : estimateStabilizationMotion ( ) <nl> } <nl> <nl> <nl> - Mat TwoPassStabilizer : : postProcessFrame ( const Mat & / * frame * / ) <nl> + Mat TwoPassStabilizer : : postProcessFrame ( const Mat & frame ) <nl> { <nl> - wobbleSuppressor_ - > suppress ( curStabilizedPos_ , suppressedFrame_ ) ; <nl> + wobbleSuppressor_ - > suppress ( curStabilizedPos_ , frame , suppressedFrame_ ) ; <nl> return StabilizerBase : : postProcessFrame ( suppressedFrame_ ) ; <nl> } <nl> <nl> mmm a / modules / videostab / src / wobble_suppression . cpp <nl> ppp b / modules / videostab / src / wobble_suppression . cpp <nl> namespace cv <nl> namespace videostab <nl> { <nl> <nl> - void NullWobbleSuppressor : : suppress ( int idx , Mat & result ) <nl> + WobbleSuppressorBase : : WobbleSuppressorBase ( ) <nl> + : motions_ ( 0 ) , stabilizationMotions_ ( 0 ) <nl> { <nl> - result = at ( idx , * stabilizedFrames_ ) ; <nl> + PyrLkRobustMotionEstimator * est = new PyrLkRobustMotionEstimator ( ) ; <nl> + est - > setMotionModel ( HOMOGRAPHY ) ; <nl> + est - > setRansacParams ( RansacParams : : homography2dMotionStd ( ) ) ; <nl> + setMotionEstimator ( est ) ; <nl> + } <nl> + <nl> + <nl> + void NullWobbleSuppressor : : suppress ( int / * idx * / , const Mat & frame , Mat & result ) <nl> + { <nl> + result = frame ; <nl> + } <nl> + <nl> + <nl> + void MoreAccurateMotionWobbleSuppressor : : suppress ( int idx , const Mat & frame , Mat & result ) <nl> + { <nl> + CV_Assert ( motions_ & & stabilizationMotions_ ) ; <nl> + <nl> + / / TODO implement <nl> + CV_Error ( CV_StsNotImplemented , " MoreAccurateMotionWobbleSuppressor " ) ; <nl> + <nl> + result = frame ; <nl> } <nl> <nl> } / / namespace videostab <nl> mmm a / samples / cpp / videostab . cpp <nl> ppp b / samples / cpp / videostab . cpp <nl> void run ( ) ; <nl> void saveMotionsIfNecessary ( ) ; <nl> void printHelp ( ) ; <nl> <nl> - class GlobalMotionReader : public GlobalMotionEstimatorBase <nl> - { <nl> - public : <nl> - GlobalMotionReader ( string path ) <nl> - { <nl> - ifstream f ( path . c_str ( ) ) ; <nl> - if ( ! f . is_open ( ) ) <nl> - throw runtime_error ( " can ' t open motions file : " + path ) ; <nl> - int size ; f > > size ; <nl> - motions_ . resize ( size ) ; <nl> - for ( int i = 0 ; i < size ; + + i ) <nl> - { <nl> - Mat_ < float > M ( 3 , 3 ) ; <nl> - for ( int l = 0 ; l < 3 ; + + l ) <nl> - for ( int s = 0 ; s < 3 ; + + s ) <nl> - f > > M ( l , s ) ; <nl> - motions_ [ i ] = M ; <nl> - } <nl> - pos_ = 0 ; <nl> - } <nl> - <nl> - virtual Mat estimate ( const Mat & / * frame0 * / , const Mat & / * frame1 * / ) <nl> - { <nl> - if ( pos_ > = motions_ . size ( ) ) <nl> - { <nl> - stringstream text ; <nl> - text < < " can ' t load motion between frames " < < pos_ < < " and " < < pos_ + 1 ; <nl> - throw runtime_error ( text . str ( ) ) ; <nl> - } <nl> - return motions_ [ pos_ + + ] ; <nl> - } <nl> - <nl> - private : <nl> - vector < Mat > motions_ ; <nl> - size_t pos_ ; <nl> - } ; <nl> - <nl> <nl> void run ( ) <nl> { <nl> void run ( ) <nl> while ( ! ( stabilizedFrame = stabilizedFrames - > nextFrame ( ) ) . empty ( ) ) <nl> { <nl> nframes + + ; <nl> - if ( ! saveMotionsPath . empty ( ) ) <nl> - saveMotionsIfNecessary ( ) ; <nl> if ( ! outputPath . empty ( ) ) <nl> { <nl> if ( ! writer . isOpened ( ) ) <nl> void run ( ) <nl> } <nl> <nl> <nl> - void saveMotionsIfNecessary ( ) <nl> - { <nl> - static bool areMotionsSaved = false ; <nl> - if ( ! areMotionsSaved ) <nl> - { <nl> - IFrameSource * frameSource = static_cast < IFrameSource * > ( stabilizedFrames ) ; <nl> - TwoPassStabilizer * twoPassStabilizer = dynamic_cast < TwoPassStabilizer * > ( frameSource ) ; <nl> - if ( twoPassStabilizer ) <nl> - { <nl> - ofstream f ( saveMotionsPath . c_str ( ) ) ; <nl> - const vector < Mat > & motions = twoPassStabilizer - > motions ( ) ; <nl> - f < < motions . size ( ) < < endl ; <nl> - for ( size_t i = 0 ; i < motions . size ( ) ; + + i ) <nl> - { <nl> - Mat_ < float > M = motions [ i ] ; <nl> - for ( int l = 0 , k = 0 ; l < 3 ; + + l ) <nl> - for ( int s = 0 ; s < 3 ; + + s , + + k ) <nl> - f < < M ( l , s ) < < " " ; <nl> - f < < endl ; <nl> - } <nl> - } <nl> - areMotionsSaved = true ; <nl> - cout < < " motions are saved " ; <nl> - } <nl> - } <nl> - <nl> - <nl> void printHelp ( ) <nl> { <nl> cout < < " OpenCV video stabilizer . \ n " <nl> void printHelp ( ) <nl> " - - color - inpaint - radius = < float_number > \ n " <nl> " Set color inpainting radius ( for ns and telea options only ) . \ n " <nl> " The default is 2 . 0 \ n \ n " <nl> + " - - wobble - suppress = ( yes | no ) \ n " <nl> + " Perform wobble suppression . The default is no . \ n \ n " <nl> " - o , - - output = ( no | < file_path > ) \ n " <nl> " Set output file path explicitely . The default is stabilized . avi . \ n " <nl> " - - fps = ( < int_number > | auto ) \ n " <nl> int main ( int argc , const char * * argv ) <nl> " { | dist - thresh | 5 . 0 | } " <nl> " { | color - inpaint | no | } " <nl> " { | color - inpaint - radius | 2 | } " <nl> + " { | wobble - suppress | no | } " <nl> " { o | output | stabilized . avi | } " <nl> " { | fps | auto | } " <nl> " { q | quiet | false | } " <nl> int main ( int argc , const char * * argv ) <nl> <nl> StabilizerBase * stabilizer ; <nl> <nl> - bool isTwoPass = arg ( " est - trim " ) = = " yes " | | arg ( " save - motions " ) ! = " no " ; <nl> + bool isTwoPass = <nl> + arg ( " est - trim " ) = = " yes " | | arg ( " wobble - suppress " ) = = " yes " ; <nl> + <nl> if ( isTwoPass ) <nl> { <nl> TwoPassStabilizer * twoPassStabilizer = new TwoPassStabilizer ( ) ; <nl> int main ( int argc , const char * * argv ) <nl> twoPassStabilizer - > setMotionStabilizer ( new GaussianMotionFilter ( argi ( " radius " ) ) ) ; <nl> else <nl> twoPassStabilizer - > setMotionStabilizer ( new GaussianMotionFilter ( argi ( " radius " ) , argf ( " stdev " ) ) ) ; <nl> + if ( arg ( " wobble - suppress " ) = = " yes " ) <nl> + { <nl> + twoPassStabilizer - > setWobbleSuppressor ( new MoreAccurateMotionWobbleSuppressor ( ) ) ; <nl> + if ( arg ( " load - motions " ) ! = " no " ) <nl> + twoPassStabilizer - > wobbleSuppressor ( ) - > setMotionEstimator ( <nl> + new FromFileMotionReader ( " motions2 . " + arg ( " load - motions " ) ) ) ; <nl> + if ( arg ( " save - motions " ) ! = " no " ) <nl> + { <nl> + Ptr < GlobalMotionEstimatorBase > est = twoPassStabilizer - > wobbleSuppressor ( ) - > motionEstimator ( ) ; <nl> + twoPassStabilizer - > wobbleSuppressor ( ) - > setMotionEstimator ( <nl> + new ToFileMotionWriter ( " motions2 . " + arg ( " save - motions " ) , est ) ) ; <nl> + } <nl> + } <nl> } <nl> else <nl> { <nl> int main ( int argc , const char * * argv ) <nl> stabilizer - > setMotionEstimator ( est_ ) ; <nl> } <nl> else <nl> - stabilizer - > setMotionEstimator ( new GlobalMotionReader ( arg ( " load - motions " ) ) ) ; <nl> + stabilizer - > setMotionEstimator ( new FromFileMotionReader ( " motions . " + arg ( " load - motions " ) ) ) ; <nl> <nl> if ( arg ( " save - motions " ) ! = " no " ) <nl> - saveMotionsPath = arg ( " save - motions " ) ; <nl> + stabilizer - > setMotionEstimator ( <nl> + new ToFileMotionWriter ( " motions . " + arg ( " save - motions " ) , stabilizer - > motionEstimator ( ) ) ) ; <nl> <nl> stabilizer - > setRadius ( argi ( " radius " ) ) ; <nl> if ( arg ( " deblur " ) = = " yes " ) <nl> int main ( int argc , const char * * argv ) <nl> { <nl> inpainters - > setRadius ( argi ( " radius " ) ) ; <nl> stabilizer - > setInpainter ( inpainters_ ) ; <nl> - } <nl> - <nl> - stabilizer - > setLog ( new LogToStdout ( ) ) ; <nl> + } <nl> <nl> if ( arg ( " output " ) ! = " no " ) <nl> outputPath = arg ( " output " ) ; <nl>
Refactored videostab module . Added MoreAccurateMotionWobbleSuppressor class
opencv/opencv
fa09f3d12197183398410101165a091fcdb4874f
2012-04-05T13:23:42Z
mmm a / modules / core / src / opencl / copyset . cl <nl> ppp b / modules / core / src / opencl / copyset . cl <nl> <nl> # ifdef COPY_TO_MASK <nl> <nl> # define DEFINE_DATA \ <nl> - int src_index = mad24 ( y , src_step , mad24 ( x , ( int ) sizeof ( T ) * scn , src_offset ) ) ; \ <nl> - int dst_index = mad24 ( y , dst_step , mad24 ( x , ( int ) sizeof ( T ) * scn , dst_offset ) ) ; \ <nl> + int src_index = mad24 ( y , src_step , mad24 ( x , ( int ) sizeof ( T1 ) * scn , src_offset ) ) ; \ <nl> + int dst_index = mad24 ( y , dst_step , mad24 ( x , ( int ) sizeof ( T1 ) * scn , dst_offset ) ) ; \ <nl> \ <nl> - __global const T * src = ( __global const T * ) ( srcptr + src_index ) ; \ <nl> - __global T * dst = ( __global T * ) ( dstptr + dst_index ) <nl> + __global const T1 * src = ( __global const T1 * ) ( srcptr + src_index ) ; \ <nl> + __global T1 * dst = ( __global T1 * ) ( dstptr + dst_index ) <nl> <nl> __kernel void copyToMask ( __global const uchar * srcptr , int src_step , int src_offset , <nl> - __global const uchar * maskptr , int mask_step , int mask_offset , <nl> + __global const uchar * mask , int mask_step , int mask_offset , <nl> __global uchar * dstptr , int dst_step , int dst_offset , <nl> int dst_rows , int dst_cols ) <nl> { <nl> __kernel void copyToMask ( __global const uchar * srcptr , int src_step , int src_of <nl> <nl> if ( x < dst_cols & & y < dst_rows ) <nl> { <nl> - int mask_index = mad24 ( y , mask_step , mad24 ( x , mcn , mask_offset ) ) ; <nl> - __global const uchar * mask = ( __global const uchar * ) ( maskptr + mask_index ) ; <nl> + mask + = mad24 ( y , mask_step , mad24 ( x , mcn , mask_offset ) ) ; <nl> <nl> # if mcn = = 1 <nl> if ( mask [ 0 ] ) <nl> __kernel void copyToMask ( __global const uchar * srcptr , int src_step , int src_of <nl> for ( int c = 0 ; c < scn ; + + c ) <nl> dst [ c ] = src [ c ] ; <nl> } <nl> + # ifdef HAVE_DST_UNINIT <nl> + else <nl> + { <nl> + DEFINE_DATA ; <nl> + <nl> + # pragma unroll <nl> + for ( int c = 0 ; c < scn ; + + c ) <nl> + dst [ c ] = ( T1 ) ( 0 ) ; <nl> + } <nl> + # endif <nl> # elif scn = = mcn <nl> DEFINE_DATA ; <nl> <nl> __kernel void copyToMask ( __global const uchar * srcptr , int src_step , int src_of <nl> for ( int c = 0 ; c < scn ; + + c ) <nl> if ( mask [ c ] ) <nl> dst [ c ] = src [ c ] ; <nl> + # ifdef HAVE_DST_UNINIT <nl> + else <nl> + dst [ c ] = ( T1 ) ( 0 ) ; <nl> + # endif <nl> # else <nl> # error " ( mcn = = 1 | | mcn = = scn ) should be true " <nl> # endif <nl> mmm a / modules / core / src / umatrix . cpp <nl> ppp b / modules / core / src / umatrix . cpp <nl> void UMat : : copyTo ( OutputArray _dst , InputArray _mask ) const <nl> <nl> UMat dst = _dst . getUMat ( ) ; <nl> <nl> + bool haveDstUninit = false ; <nl> if ( prevu ! = dst . u ) / / do not leave dst uninitialized <nl> - dst = Scalar ( 0 ) ; <nl> + haveDstUninit = true ; <nl> <nl> - ocl : : Kernel k ( " copyToMask " , ocl : : core : : copyset_oclsrc , <nl> - format ( " - D COPY_TO_MASK - D T = % s - D scn = % d - D mcn = % d " , <nl> - ocl : : memopTypeToStr ( depth ( ) ) , cn , mcn ) ) ; <nl> + String opts = format ( " - D COPY_TO_MASK - D T1 = % s - D scn = % d - D mcn = % d % s " , <nl> + ocl : : memopTypeToStr ( depth ( ) ) , cn , mcn , <nl> + haveDstUninit ? " - D HAVE_DST_UNINIT " : " " ) ; <nl> + <nl> + ocl : : Kernel k ( " copyToMask " , ocl : : core : : copyset_oclsrc , opts ) ; <nl> if ( ! k . empty ( ) ) <nl> { <nl> - k . args ( ocl : : KernelArg : : ReadOnlyNoSize ( * this ) , ocl : : KernelArg : : ReadOnlyNoSize ( _mask . getUMat ( ) ) , <nl> - ocl : : KernelArg : : WriteOnly ( dst ) ) ; <nl> + k . args ( ocl : : KernelArg : : ReadOnlyNoSize ( * this ) , <nl> + ocl : : KernelArg : : ReadOnlyNoSize ( _mask . getUMat ( ) ) , <nl> + haveDstUninit ? ocl : : KernelArg : : WriteOnly ( dst ) : <nl> + ocl : : KernelArg : : ReadWrite ( dst ) ) ; <nl> <nl> size_t globalsize [ 2 ] = { cols , rows } ; <nl> if ( k . run ( 2 , globalsize , NULL , false ) ) <nl>
optimized UMat : : copyTo with mask
opencv/opencv
7f818e9bc3f24f7c9452a3ba4fb0791709fb9a66
2014-05-30T14:27:55Z