diff
stringlengths 41
2.03M
| msg
stringlengths 1
1.5k
⌀ | repo
stringlengths 5
40
| sha
stringlengths 40
40
| time
stringlengths 20
20
|
---|---|---|---|---|
mmm a / include / swift / AST / DeclContext . h <nl> ppp b / include / swift / AST / DeclContext . h <nl> enum class LocalDeclContextKind : uint8_t { <nl> / / / kinds supersede later conformance kinds , possibly with a <nl> / / / diagnostic ( e . g . , if an inherited conformance supersedes an <nl> / / / explicit conformance ) . <nl> + / / / <nl> + / / / This ordering is also used in diagnostics , so make sure to check <nl> + / / / DiagnosticsSema if you need to update it . <nl> enum class ConformanceEntryKind : unsigned { <nl> / / / Inherited from a superclass conformance . <nl> Inherited , <nl> enum class ConformanceEntryKind : unsigned { <nl> / / / Explicitly specified . <nl> Explicit , <nl> <nl> - / / / Implied by an explicitly - specified conformance . <nl> - Implied , <nl> - <nl> / / / Implicitly synthesized . <nl> Synthesized , <nl> + <nl> + / / / Implied by an explicitly - specified conformance . <nl> + Implied , <nl> } ; <nl> <nl> / / / Describes the kind of conformance lookup desired . <nl> mmm a / include / swift / AST / DiagnosticsSema . def <nl> ppp b / include / swift / AST / DiagnosticsSema . def <nl> NOTE ( protocol_conformance_here , sema_tcd , none , <nl> NOTE ( declared_protocol_conformance_here , sema_tcd , 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> + " % 0 implicitly conforms to protocol % 2 | " <nl> + " % 0 implicitly conforms to protocol % 2 ( via conformance to % 3 ) } 1 here " , <nl> + ( Type , enum ConformanceEntryKind , DeclName , DeclName ) ) <nl> <nl> ERROR ( redundant_conformance , sema_tcd , none , <nl> " redundant conformance of % 0 to protocol % 1 " , ( Type , DeclName ) ) <nl> mmm a / lib / AST / ProtocolConformance . cpp <nl> ppp b / lib / AST / ProtocolConformance . cpp <nl> bool ConformanceLookupTable : : addProtocol ( NominalTypeDecl * nominal , <nl> return false ; <nl> <nl> case ConformanceEntryKind : : Implied : <nl> - / / An implied conformance is better than a synthesized one . <nl> - if ( kind = = ConformanceEntryKind : : Synthesized ) <nl> - return false ; <nl> break ; <nl> <nl> case ConformanceEntryKind : : Synthesized : <nl> + / / A synthesized conformance is better than an implied one . <nl> + if ( kind = = ConformanceEntryKind : : Implied ) <nl> + return false ; <nl> break ; <nl> } <nl> } <nl> mmm a / lib / Sema / TypeCheckDecl . cpp <nl> ppp b / lib / Sema / TypeCheckDecl . cpp <nl> class DeclChecker : public DeclVisitor < DeclChecker > { <nl> <nl> TC . diagnose ( existingDecl , diag : : declared_protocol_conformance_here , <nl> D - > getDeclaredTypeInContext ( ) , <nl> - static_cast < unsigned > ( diag . ExistingKind ) , <nl> + diag . ExistingKind , <nl> diag . Protocol - > getName ( ) , <nl> diag . ExistingExplicitProtocol - > getName ( ) ) ; <nl> } <nl> mmm a / test / decl / protocol / conforms / placement . swift <nl> ppp b / test / decl / protocol / conforms / placement . swift <nl> class ImplicitSub1 : ImplicitSuper1 { } <nl> <nl> extension ImplicitSub1 : P4 { } / / okay , introduces new conformance to P4 ; the rest are superseded <nl> <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> + / / Implicit conformances superseded by synthesized conformances <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> + <nl> + enum Suit { case Spades , Hearts , Clubs , Diamonds } <nl> + func < ( lhs : Suit , rhs : Suit ) - > Bool { return false } <nl> + extension Suit : Comparable { } / / okay , synthesized conformance to Equatable from before is preferred <nl> + <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / Explicit conformances conflicting with inherited conformances <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl>
|
Prefer compiler - provided conformances to those required by other protocols .
|
apple/swift
|
1ad7651e19b3558499a5395bd07bee952b6e4fef
|
2015-05-20T20:48:04Z
|
mmm a / lib / Parse / ParseExpr . cpp <nl> ppp b / lib / Parse / ParseExpr . cpp <nl> ParserResult < Expr > Parser : : parseExprPostfix ( Diag < > ID , bool isExprBasic ) { <nl> case tok : : code_complete : <nl> Result = makeParserResult ( new ( Context ) CodeCompletionExpr ( Tok . getRange ( ) ) ) ; <nl> Result . setHasCodeCompletion ( ) ; <nl> - if ( CodeCompletion ) <nl> + if ( CodeCompletion & & <nl> + / / We cannot code complete anything after var / let . <nl> + ( ! InVarOrLetPattern | | InVarOrLetPattern = = IVOLP_InMatchingPattern ) ) <nl> CodeCompletion - > completePostfixExprBeginning ( dyn_cast < CodeCompletionExpr > ( <nl> Result . get ( ) ) ) ; <nl> consumeToken ( tok : : code_complete ) ; <nl> mmm a / test / IDE / complete_pattern . swift <nl> ppp b / test / IDE / complete_pattern . swift <nl> <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_ATOM_1 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_ATOM_2 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_ATOM_3 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_ATOM_4 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_ATOM_5 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_ATOM_6 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_ATOM_7 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_ATOM_8 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_ATOM_9 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_ATOM_10 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_ATOM_11 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_ATOM_12 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_IF_CASE_1 | % FileCheck % s - check - prefix = GLOBAL <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_IF_CASE_2 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_INFUNC_ATOM_1 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_INFUNC_ATOM_2 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_INFUNC_ATOM_3 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_INFUNC_ATOM_4 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_INFUNC_ATOM_5 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_INFUNC_ATOM_6 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_INFUNC_ATOM_7 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_INFUNC_ATOM_8 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_INFUNC_ATOM_9 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_INFUNC_ATOM_10 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_INFUNC_ATOM_11 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_INFUNC_ATOM_12 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_INFUNC_IF_CASE_1 | % FileCheck % s - check - prefix = GLOBAL <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_INFUNC_IF_CASE_2 | % FileCheck % s - check - prefix = NO_COMPLETIONS <nl> <nl> + / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_IS_1 > % t . types . txt <nl> + / / RUN : % FileCheck % s - check - prefix = GLOBAL_NEGATIVE < % t . types . txt <nl> <nl> / / RUN : % target - swift - ide - test - code - completion - source - filename % s - code - completion - token = PATTERN_IS_1 > % t . types . txt <nl> / / RUN : % FileCheck % s - check - prefix = GLOBAL_NEGATIVE < % t . types . txt <nl> protocol BarProtocol { <nl> <nl> typealias FooTypealias = Int <nl> <nl> + / / GLOBAL : Begin completions <nl> + / / GLOBAL - DAG : fooObject <nl> + / / GLOBAL - DAG : fooFunc <nl> + / / GLOBAL - DAG : FooTypealias <nl> + / / GLOBAL - DAG : FooProtocol <nl> + / / GLOBAL - DAG : FooClass <nl> + / / GLOBAL : End completions <nl> + <nl> / / GLOBAL_NEGATIVE - NOT : fooObject <nl> / / GLOBAL_NEGATIVE - NOT : fooFunc <nl> <nl> typealias FooTypealias = Int <nl> / / = = = mmm Test that we don ' t try to suggest anything where pattern - atom is expected . <nl> / / = = = mmm <nl> <nl> - var # ^ PATTERN_ATOM_1 ^ # <nl> - var ( # ^ PATTERN_ATOM_2 ^ # <nl> - var ( a , # ^ PATTERN_ATOM_3 ^ # <nl> - var ( a # ^ PATTERN_ATOM_4 ^ # <nl> - var ( ( # ^ PATTERN_ATOM_5 ^ # <nl> - var ( ( a , b ) , # ^ PATTERN_ATOM_6 ^ # <nl> + / / NO_COMPLETIONS - NOT : Begin completions <nl> + <nl> + / / Use do { } to reset the parser after broken syntax . <nl> + do { var # ^ PATTERN_ATOM_1 ^ # } <nl> + do { var ( # ^ PATTERN_ATOM_2 ^ # } <nl> + do { var ( a , # ^ PATTERN_ATOM_3 ^ # } <nl> + do { var ( a # ^ PATTERN_ATOM_4 ^ # } <nl> + do { var ( ( # ^ PATTERN_ATOM_5 ^ # } <nl> + do { var ( ( a , b ) , # ^ PATTERN_ATOM_6 ^ # } <nl> + do { guard var # ^ PATTERN_ATOM_7 ^ # } <nl> + do { guard var # ^ PATTERN_ATOM_8 ^ # else { fatalError ( ) } } <nl> + do { guard let # ^ PATTERN_ATOM_9 ^ # else { fatalError ( ) } } <nl> + do { guard let a = Optional ( 1 ) , let # ^ PATTERN_ATOM_10 ^ # else { fatalError ( ) } } <nl> + do { if let # ^ PATTERN_ATOM_11 ^ # { } } <nl> + do { if let a = Optional ( 1 ) , let # ^ PATTERN_ATOM_12 ^ # { } } <nl> + do { if case # ^ PATTERN_IF_CASE_1 ^ # { } } <nl> + do { if case let # ^ PATTERN_IF_CASE_2 ^ # { } } <nl> + <nl> + func inFunc ( ) { <nl> + do { var # ^ PATTERN_INFUNC_ATOM_1 ^ # } <nl> + do { var ( # ^ PATTERN_INFUNC_ATOM_2 ^ # } <nl> + do { var ( a , # ^ PATTERN_INFUNC_ATOM_3 ^ # } <nl> + do { var ( a # ^ PATTERN_INFUNC_ATOM_4 ^ # } <nl> + do { var ( ( # ^ PATTERN_INFUNC_ATOM_5 ^ # } <nl> + do { var ( ( a , b ) , # ^ PATTERN_INFUNC_ATOM_6 ^ # } <nl> + do { guard var # ^ PATTERN_INFUNC_ATOM_7 ^ # } <nl> + do { guard var # ^ PATTERN_INFUNC_ATOM_8 ^ # else { fatalError ( ) } } <nl> + do { guard let # ^ PATTERN_INFUNC_ATOM_9 ^ # else { fatalError ( ) } } <nl> + do { guard let a = Optional ( 1 ) , let # ^ PATTERN_INFUNC_ATOM_10 ^ # else { fatalError ( ) } } <nl> + do { if let # ^ PATTERN_INFUNC_ATOM_11 ^ # { } } <nl> + do { if let a = Optional ( 1 ) , let # ^ PATTERN_INFUNC_ATOM_12 ^ # { } } <nl> + do { if case # ^ PATTERN_INFUNC_IF_CASE_1 ^ # { } } <nl> + do { if case let # ^ PATTERN_INFUNC_IF_CASE_2 ^ # { } } <nl> + } <nl> <nl> / / = = = mmm <nl> / / = = = mmm Test that we complete the type in ' is ' pattern . <nl>
|
Merge pull request from benlangmuir / cc - after - varlet
|
apple/swift
|
d2ff82c2b284f1bf656b7791d5ec34c910965835
|
2016-11-09T22:14:49Z
|
mmm a / Code / CryEngine / Cry3DEngine / RenderMeshUtils . cpp <nl> ppp b / Code / CryEngine / Cry3DEngine / RenderMeshUtils . cpp <nl> bool SIntersectionData : : Init ( IRenderMesh * param_pRenderMesh , SRayHitInfo * param_ <nl> pMtl = param_pMtl ; <nl> bDecalPlacementTestRequested = param_bRequestDecalPlacementTest ; <nl> <nl> - bool bAllDMeshData = pHitInfo - > bGetVertColorAndTC ; <nl> - <nl> nVerts = pRenderMesh - > GetVerticesCount ( ) ; <nl> nInds = pRenderMesh - > GetIndicesCount ( ) ; <nl> <nl> bool SIntersectionData : : Init ( IRenderMesh * param_pRenderMesh , SRayHitInfo * param_ <nl> if ( ! pPos | | ! pInds ) <nl> return false ; <nl> <nl> - if ( bAllDMeshData ) <nl> + # if defined ( FEATURE_SVO_GI ) <nl> + if ( pHitInfo - > bGetVertColorAndTC ) <nl> { <nl> pUV = ( uint8 * ) pRenderMesh - > GetUVPtr ( nUVStride , FSL_READ ) ; <nl> pCol = ( uint8 * ) pRenderMesh - > GetColorPtr ( nColStride , FSL_READ ) ; <nl> - <nl> pTangs = pRenderMesh - > GetTangentPtr ( nTangsStride , FSL_READ ) ; <nl> } <nl> + # endif <nl> <nl> return true ; <nl> } <nl> void CRenderMeshUtils : : RayIntersectionAsync ( SIntersectionData * pIntersectionRMDa <nl> <nl> bool CRenderMeshUtils : : RayIntersectionImpl ( SIntersectionData * pIntersectionRMData , SRayHitInfo * phitInfo , IMaterial * pMtl , bool bAsync ) <nl> { <nl> + # if defined ( FEATURE_SVO_GI ) <nl> IF ( phitInfo - > bGetVertColorAndTC , 0 ) <nl> return RayIntersectionFastImpl ( * pIntersectionRMData , * phitInfo , pMtl , bAsync ) ; <nl> + # endif <nl> <nl> SIntersectionData & rIntersectionRMData = * pIntersectionRMData ; <nl> SRayHitInfo & hitInfo = * phitInfo ; <nl> bool CRenderMeshUtils : : RayIntersectionImpl ( SIntersectionData * pIntersectionRMDat <nl> / / CTimeValue t1 = gEnv - > pTimer - > GetAsyncTime ( ) ; <nl> / / CryLogAlways ( " TestTime : % . 2f " , ( t1 - t0 ) . GetMilliSeconds ( ) ) ; <nl> / / static int nCount = 0 ; CryLogAlways ( " Cached Hit % d " , + + nCount ) ; <nl> - hitInfo . pRenderMesh = rIntersectionRMData . pRenderMesh ; <nl> rIntersectionRMData . bResult = true ; <nl> return true ; <nl> } <nl> bool CRenderMeshUtils : : RayIntersectionImpl ( SIntersectionData * pIntersectionRMDat <nl> AnyHit : <nl> if ( bAnyHit ) <nl> { <nl> - hitInfo . pRenderMesh = rIntersectionRMData . pRenderMesh ; <nl> - <nl> / / return closest to the shooter <nl> hitInfo . fDistance = ( float ) sqrt_tpl ( fMinDistance2 ) ; <nl> hitInfo . vHitNormal = ( tri [ 1 ] - tri [ 0 ] ) . Cross ( tri [ 2 ] - tri [ 0 ] ) . GetNormalized ( ) ; <nl> bool CRenderMeshUtils : : RayIntersectionFastImpl ( SIntersectionData & rIntersectionR <nl> int nPosStride = rIntersectionRMData . nPosStride ; <nl> uint8 * pPos = rIntersectionRMData . pPos ; <nl> <nl> + # if defined ( FEATURE_SVO_GI ) <nl> int nUVStride = rIntersectionRMData . nUVStride ; <nl> uint8 * pUV = rIntersectionRMData . pUV ; <nl> <nl> bool CRenderMeshUtils : : RayIntersectionFastImpl ( SIntersectionData & rIntersectionR <nl> <nl> int nTangsStride = rIntersectionRMData . nTangsStride ; <nl> byte * pTangs = rIntersectionRMData . pTangs ; <nl> + # endif <nl> <nl> / / get indices <nl> vtx_idx * pInds = rIntersectionRMData . pInds ; <nl> bool CRenderMeshUtils : : RayIntersectionFastImpl ( SIntersectionData & rIntersectionR <nl> <nl> Line inLine ( inRay . origin , inRay . direction ) ; <nl> <nl> - if ( ! inRay . direction . IsZero ( ) & & hitInfo . nHitTriID > = 0 ) <nl> + if ( hitInfo . nHitTriID > = 0 ) <nl> { <nl> if ( hitInfo . nHitTriID + 2 > = nInds ) <nl> return false ; <nl> bool CRenderMeshUtils : : RayIntersectionFastImpl ( SIntersectionData & rIntersectionR <nl> <nl> if ( hitInfo . nHitTriID = = HIT_UNKNOWN ) <nl> { <nl> - if ( inRay . direction . IsZero ( ) ) <nl> + # if defined ( FEATURE_SVO_GI ) <nl> + if ( hitInfo . useBoxIntersection ) <nl> { <nl> ProcessBoxIntersection ( inRay , hitInfo , rIntersectionRMData , pMtl , pInds , nVerts , pPos , nPosStride , pUV , nUVStride , pCol , nColStride , pTangs , nTangsStride , nInds , bAnyHit , fBestDist , vHitPos , tri ) ; <nl> } <nl> else <nl> + # endif <nl> { <nl> if ( const PodArray < std : : pair < int , int > > * pTris = rIntersectionRMData . pRenderMesh - > GetTrisForPosition ( inRay . origin + inRay . direction * 0 . 5f , pMtl ) ) <nl> { <nl> bool CRenderMeshUtils : : RayIntersectionFastImpl ( SIntersectionData & rIntersectionR <nl> <nl> if ( bAnyHit ) <nl> { <nl> - hitInfo . pRenderMesh = rIntersectionRMData . pRenderMesh ; <nl> - <nl> / / return closest to the shooter <nl> hitInfo . fDistance = fBestDist ; <nl> hitInfo . vHitNormal = ( tri [ 1 ] - tri [ 0 ] ) . Cross ( tri [ 2 ] - tri [ 0 ] ) . GetNormalized ( ) ; <nl> bool CRenderMeshUtils : : RayIntersectionFastImpl ( SIntersectionData & rIntersectionR <nl> hitInfo . nHitSurfaceID = pMtl - > GetSurfaceTypeId ( ) ; <nl> } <nl> <nl> + # if defined ( FEATURE_SVO_GI ) <nl> if ( hitInfo . bGetVertColorAndTC & & hitInfo . nHitTriID > = 0 & & ! inRay . direction . IsZero ( ) ) <nl> { <nl> int I0 = pInds [ hitInfo . nHitTriID + 0 ] ; <nl> bool CRenderMeshUtils : : RayIntersectionFastImpl ( SIntersectionData & rIntersectionR <nl> hitInfo . vHitColor = ( c0 * arrVertWeight [ 0 ] + c1 * arrVertWeight [ 1 ] + c2 * arrVertWeight [ 2 ] ) / 255 . f ; <nl> } <nl> } <nl> + # endif <nl> } <nl> <nl> / / CTimeValue t1 = gEnv - > pTimer - > GetAsyncTime ( ) ; <nl> bool CRenderMeshUtils : : RayIntersectionFastImpl ( SIntersectionData & rIntersectionR <nl> return bAnyHit ; <nl> } <nl> <nl> + # if defined ( FEATURE_SVO_GI ) <nl> + <nl> / / used for CPU voxelization <nl> bool CRenderMeshUtils : : ProcessBoxIntersection ( Ray & inRay , SRayHitInfo & hitInfo , SIntersectionData & rIntersectionRMData , IMaterial * pMtl , vtx_idx * pInds , int nVerts , uint8 * pPos , int nPosStride , uint8 * pUV , int nUVStride , uint8 * pCol , int nColStride , byte * pTangs , int nTangsStride , int nInds , bool & bAnyHit , float & fBestDist , Vec3 & vHitPos , Vec3 * tri ) <nl> { <nl> bool CRenderMeshUtils : : ProcessBoxIntersection ( Ray & inRay , SRayHitInfo & hitInfo , <nl> voxBox . min = inRay . origin - Vec3 ( hitInfo . fMaxHitDistance ) ; <nl> voxBox . max = inRay . origin + Vec3 ( hitInfo . fMaxHitDistance ) ; <nl> <nl> + assert ( hitInfo . pHitTris ) ; <nl> + <nl> if ( hitInfo . pHitTris ) <nl> { <nl> / / just collect tris <nl> bool CRenderMeshUtils : : ProcessBoxIntersection ( Ray & inRay , SRayHitInfo & hitInfo , <nl> b2Sided = true ; <nl> <nl> float fOpacity = shaderItem . m_pShaderResources - > GetStrengthValue ( EFTT_OPACITY ) * shaderItem . m_pShaderResources - > GetVoxelCoverage ( ) ; <nl> - if ( fOpacity < hitInfo . fMinHitOpacity ) <nl> - continue ; <nl> - <nl> - / / ColorB colEm = shaderItem . m_pShaderResources - > GetEmissiveColor ( ) ; <nl> - / / if ( ! colEm . r & & ! colEm . g & & ! colEm . b ) <nl> - / / colEm = Col_DarkGray ; <nl> <nl> / / make line triangle intersection <nl> for ( uint ii = pChunk - > nFirstIndexId ; ii < pChunk - > nFirstIndexId + pChunk - > nNumIndices ; ii + = 3 ) <nl> bool CRenderMeshUtils : : ProcessBoxIntersection ( Ray & inRay , SRayHitInfo & hitInfo , <nl> <nl> ht . nOpacity = SATURATEB ( int ( fOpacity * 255 . f ) ) ; <nl> <nl> - # if defined ( FEATURE_SVO_GI ) <nl> - if ( GetCVars ( ) - > e_svoTI_RT_Active ) <nl> - { <nl> - / / store and validate vertex normals <nl> - bool bValid = true ; <nl> - <nl> - const int arrId [ 3 ] = { I0 , I1 , I2 } ; <nl> + / / store and validate vertex normals <nl> + bool bValid = true ; <nl> <nl> - for ( int ii = 0 ; ii < 3 ; ii + + ) <nl> - { <nl> - ht . vn [ ii ] = ( ( SPipTangents * ) & pTangs [ nTangsStride * arrId [ ii ] ] ) - > GetN ( ) . GetNormalized ( ) ; <nl> + const int arrId [ 3 ] = { I0 , I1 , I2 } ; <nl> <nl> - if ( ht . vn [ ii ] . IsZero ( ) ) <nl> - bValid = false ; <nl> - } <nl> + for ( int ii = 0 ; ii < 3 ; ii + + ) <nl> + { <nl> + ht . vn [ ii ] = ( ( SPipTangents * ) & pTangs [ nTangsStride * arrId [ ii ] ] ) - > GetN ( ) . GetNormalized ( ) ; <nl> <nl> - if ( ! bValid ) <nl> - continue ; <nl> + if ( ht . vn [ ii ] . IsZero ( ) ) <nl> + bValid = false ; <nl> } <nl> - # endif <nl> - <nl> - hitInfo . pHitTris - > Add ( ht ) ; <nl> - } <nl> - } <nl> - } <nl> - } <nl> - } <nl> - else if ( const PodArray < std : : pair < int , int > > * pTris = rIntersectionRMData . pRenderMesh - > GetTrisForPosition ( inRay . origin , pMtl ) ) <nl> - { <nl> - for ( int nId = 0 ; nId < pTris - > Count ( ) ; + + nId ) <nl> - { <nl> - std : : pair < int , int > & t = pTris - > GetAt ( nId ) ; <nl> <nl> - if ( t . first + 2 > = nInds ) <nl> - return false ; <nl> - <nl> - int I0 = pInds [ t . first + 0 ] ; <nl> - int I1 = pInds [ t . first + 1 ] ; <nl> - int I2 = pInds [ t . first + 2 ] ; <nl> - <nl> - if ( I0 > = nVerts | | I1 > = nVerts | | I2 > = nVerts ) <nl> - return false ; <nl> - <nl> - / / get tri vertices <nl> - Vec3 & tv0 = * ( ( Vec3 * ) & pPos [ nPosStride * I0 ] ) ; <nl> - Vec3 & tv1 = * ( ( Vec3 * ) & pPos [ nPosStride * I1 ] ) ; <nl> - Vec3 & tv2 = * ( ( Vec3 * ) & pPos [ nPosStride * I2 ] ) ; <nl> - <nl> - if ( Overlap : : AABB_Triangle ( voxBox , tv0 , tv2 , tv1 ) ) <nl> - { <nl> - { <nl> - IMaterial * pSubMtl = pMtl - > GetSafeSubMtl ( t . second ) ; <nl> - if ( pSubMtl ) <nl> - { <nl> - if ( ! pSubMtl - > GetShaderItem ( ) . IsZWrite ( ) ) <nl> - continue ; <nl> - if ( ! pSubMtl - > GetShaderItem ( ) . m_pShader ) <nl> - continue ; <nl> - if ( pSubMtl - > GetShaderItem ( ) . m_pShader - > GetShaderType ( ) ! = eST_Metal & & pSubMtl - > GetShaderItem ( ) . m_pShader - > GetShaderType ( ) ! = eST_General ) <nl> + if ( ! bValid ) <nl> continue ; <nl> + <nl> + hitInfo . pHitTris - > Add ( ht ) ; <nl> } <nl> } <nl> - <nl> - bAnyHit = true ; <nl> - fBestDist = 0 ; <nl> - vHitPos = voxBox . GetCenter ( ) ; <nl> - tri [ 0 ] = tv0 ; <nl> - tri [ 1 ] = tv1 ; <nl> - tri [ 2 ] = tv2 ; <nl> - hitInfo . nHitMatID = t . second ; <nl> - hitInfo . nHitTriID = t . first ; <nl> - <nl> - break ; <nl> } <nl> } <nl> } <nl> <nl> return bAnyHit ; <nl> } <nl> + <nl> + # endif <nl> mmm a / Code / CryEngine / Cry3DEngine / RenderMeshUtils . h <nl> ppp b / Code / CryEngine / Cry3DEngine / RenderMeshUtils . h <nl> class CRenderMeshUtils : public Cry3DEngineBase <nl> / / functions implementing the logic for RayIntersection <nl> static bool RayIntersectionImpl ( SIntersectionData * pIntersectionRMData , SRayHitInfo * phitInfo , IMaterial * pCustomMtl , bool bAsync ) ; <nl> static bool RayIntersectionFastImpl ( SIntersectionData & rIntersectionRMData , SRayHitInfo & hitInfo , IMaterial * pCustomMtl , bool bAsync ) ; <nl> + # if defined ( FEATURE_SVO_GI ) <nl> static bool ProcessBoxIntersection ( Ray & inRay , SRayHitInfo & hitInfo , SIntersectionData & rIntersectionRMData , IMaterial * pMtl , vtx_idx * pInds , int nVerts , uint8 * pPos , int nPosStride , uint8 * pUV , int nUVStride , uint8 * pCol , int nColStride , byte * pTangs , int nTangsStride , int nInds , bool & bAnyHit , float & fBestDist , Vec3 & vHitPos , Vec3 * tri ) ; <nl> + # endif <nl> } ; <nl> <nl> / / struct to collect parameters for the wrapped RayInterseciton functions <nl> struct SIntersectionData <nl> SIntersectionData ( ) : <nl> pRenderMesh ( NULL ) , nVerts ( 0 ) , nInds ( 0 ) , <nl> nPosStride ( 0 ) , pPos ( NULL ) , pInds ( NULL ) , <nl> + # if defined ( FEATURE_SVO_GI ) <nl> nUVStride ( 0 ) , pUV ( NULL ) , <nl> nColStride ( 0 ) , pCol ( NULL ) , <nl> nTangsStride ( 0 ) , pTangs ( NULL ) , <nl> + # endif <nl> bResult ( false ) , bNeedFallback ( false ) , <nl> fDecalPlacementTestMaxSize ( 1000 . f ) , bDecalPlacementTestRequested ( false ) , <nl> pHitInfo ( 0 ) , pMtl ( 0 ) <nl> struct SIntersectionData <nl> uint8 * pPos ; <nl> vtx_idx * pInds ; <nl> <nl> + # if defined ( FEATURE_SVO_GI ) <nl> int nUVStride ; <nl> uint8 * pUV ; <nl> <nl> struct SIntersectionData <nl> <nl> int nTangsStride ; <nl> byte * pTangs ; <nl> + # endif <nl> <nl> bool bResult ; <nl> float fDecalPlacementTestMaxSize ; / / decal will look acceptable in this place <nl> mmm a / Code / CryEngine / Cry3DEngine / SVO / VoxelSegment . cpp <nl> ppp b / Code / CryEngine / Cry3DEngine / SVO / VoxelSegment . cpp <nl> void CVoxelSegment : : FindTrianglesForVoxelization ( PodArray < int > * & rpNodeTrisXYZ ) <nl> <nl> arrTris . Clear ( ) ; <nl> nodeHitInfo . pHitTris = & arrTris ; <nl> + nodeHitInfo . useBoxIntersection = true ; <nl> <nl> - nodeHitInfo . fMinHitOpacity = GetCVars ( ) - > e_svoTI_MinVoxelOpacity ; <nl> int minVoxelOpacity = ( int ) ( GetCVars ( ) - > e_svoTI_MinVoxelOpacity * 255 . f ) ; <nl> <nl> float timeRayIntersection = Cry3DEngineBase : : GetTimer ( ) - > GetAsyncCurTime ( ) ; <nl> mmm a / Code / CryEngine / Cry3DEngine / StatObjConstr . cpp <nl> ppp b / Code / CryEngine / Cry3DEngine / StatObjConstr . cpp <nl> bool CStatObj : : RayIntersection ( SRayHitInfo & hitInfo , IMaterial * pCustomMtl ) <nl> hit . inRay . origin = invertedTM . TransformPoint ( hit . inRay . origin ) ; <nl> hit . inRay . direction = invertedTM . TransformVector ( hit . inRay . direction ) ; <nl> <nl> - int nFirstTriangleId = hit . pHitTris ? hit . pHitTris - > Count ( ) : 0 ; <nl> - <nl> if ( ( ( CStatObj * ) m_subObjects [ i ] . pStatObj ) - > RayIntersection ( hit , pCustomMtl ) ) <nl> { <nl> if ( hit . fDistance < fMinDistance ) <nl> { <nl> - hitInfo . pStatObj = m_subObjects [ i ] . pStatObj ; <nl> bAnyHit = true ; <nl> hitOut = hit ; <nl> } <nl> } <nl> <nl> + # if defined ( FEATURE_SVO_GI ) <nl> + int nFirstTriangleId = hit . pHitTris ? hit . pHitTris - > Count ( ) : 0 ; <nl> + <nl> / / transform collected triangles from sub - object space into object space <nl> if ( hit . pHitTris ) <nl> { <nl> bool CStatObj : : RayIntersection ( SRayHitInfo & hitInfo , IMaterial * pCustomMtl ) <nl> ht . v [ c ] = m_subObjects [ i ] . tm . TransformPoint ( ht . v [ c ] ) ; <nl> } <nl> } <nl> + # endif <nl> } <nl> } <nl> if ( bAnyHit ) <nl> bool CStatObj : : RayIntersection ( SRayHitInfo & hitInfo , IMaterial * pCustomMtl ) <nl> if ( pRenderMesh ) <nl> { <nl> bool bRes = CRenderMeshUtils : : RayIntersection ( pRenderMesh , hitInfo , pCustomMtl ) ; <nl> - if ( bRes ) <nl> - { <nl> - hitInfo . pStatObj = this ; <nl> - hitInfo . pRenderMesh = pRenderMesh ; <nl> - } <nl> return bRes ; <nl> } <nl> } <nl> mmm a / Code / CryEngine / Cry3DEngine / cvars . cpp <nl> ppp b / Code / CryEngine / Cry3DEngine / cvars . cpp <nl> void CVars : : Init ( ) <nl> <nl> REGISTER_CVAR ( e_Lods , 1 , VF_NULL , <nl> " Load and use LOD models for static geometry " ) ; <nl> - DefineConstIntCVar ( e_LodFaceArea , 1 , VF_NULL , <nl> + REGISTER_CVAR ( e_LodFaceArea , 1 , VF_NULL , <nl> " Use geometric mean of faces area to compute LOD " ) ; <nl> DefineConstIntCVar ( e_LodsForceUse , 1 , VF_NULL , <nl> " Force using LODs even if triangle count do not suit " ) ; <nl> mmm a / Code / CryEngine / Cry3DEngine / cvars . h <nl> ppp b / Code / CryEngine / Cry3DEngine / cvars . h <nl> struct CVars : public Cry3DEngineBase <nl> float e_ShadowsCastViewDistRatioLights ; <nl> int e_ShadowsUpdateViewDistRatio ; <nl> int e_Lods ; <nl> - DeclareConstIntCVar ( e_LodFaceArea , 1 ) ; <nl> + int e_LodFaceArea ; <nl> float e_ShadowsConstBias ; <nl> int e_ParticlesCollisions ; <nl> int e_ParticlesObjectCollisions ; <nl> mmm a / Code / CryEngine / CryCommon / Cry3DEngine / IStatObj . h <nl> ppp b / Code / CryEngine / CryCommon / Cry3DEngine / IStatObj . h <nl> struct SRayHitInfo <nl> , inRetTriangle ( false ) <nl> , bUseCache ( false ) <nl> , bOnlyZWrite ( false ) <nl> + # if defined ( FEATURE_SVO_GI ) <nl> , bGetVertColorAndTC ( false ) <nl> + , useBoxIntersection ( false ) <nl> + , pHitTris ( nullptr ) <nl> + , vHitTC ( 0 . 0f ) <nl> + , vHitColor ( 0 . 0f ) <nl> + , vHitTangent ( 0 . 0f ) <nl> + , vHitBitangent ( 0 . 0f ) <nl> + # endif <nl> , fMaxHitDistance ( false ) <nl> , vTri0 ( 0 . 0f ) <nl> , vTri1 ( 0 . 0f ) <nl> , vTri2 ( 0 . 0f ) <nl> - , fMinHitOpacity ( 0 . 0f ) <nl> , fDistance ( 0 . 0f ) <nl> , vHitPos ( 0 . 0f ) <nl> , vHitNormal ( 0 . 0f ) <nl> , nHitMatID ( 0 ) <nl> , nHitTriID ( HIT_UNKNOWN ) <nl> , nHitSurfaceID ( 0 ) <nl> - , pRenderMesh ( nullptr ) <nl> - , pStatObj ( nullptr ) <nl> - , vHitTC ( 0 . 0f ) <nl> - , vHitColor ( 0 . 0f ) <nl> - , vHitTangent ( 0 . 0f ) <nl> - , vHitBitangent ( 0 . 0f ) <nl> - , pHitTris ( nullptr ) <nl> { <nl> } <nl> <nl> struct SRayHitInfo <nl> bool inRetTriangle ; <nl> bool bUseCache ; <nl> bool bOnlyZWrite ; <nl> + # if defined ( FEATURE_SVO_GI ) <nl> bool bGetVertColorAndTC ; <nl> + bool useBoxIntersection ; / / ! < Collect triangles overlapping specified area <nl> + PodArray < SRayHitTriangle > * pHitTris ; / / ! < Pre - allocated array for found triangles <nl> + Vec2 vHitTC ; <nl> + Vec4 vHitColor ; <nl> + Vec4 vHitTangent ; <nl> + Vec4 vHitBitangent ; <nl> + # endif <nl> float fMaxHitDistance ; / / ! < When not 0 , only hits with closer distance will be registered . <nl> Vec3 vTri0 ; <nl> Vec3 vTri1 ; <nl> Vec3 vTri2 ; <nl> - float fMinHitOpacity ; <nl> <nl> / / Output parameters . <nl> float fDistance ; / / ! < Distance from reference point . <nl> struct SRayHitInfo <nl> int nHitMatID ; / / ! < Material Id that was hit . <nl> int nHitTriID ; / / ! < Triangle Id that was hit . <nl> int nHitSurfaceID ; / / ! < Material Id that was hit . <nl> - struct IRenderMesh * pRenderMesh ; <nl> - struct IStatObj * pStatObj ; <nl> - Vec2 vHitTC ; <nl> - Vec4 vHitColor ; <nl> - Vec4 vHitTangent ; <nl> - Vec4 vHitBitangent ; <nl> - PodArray < SRayHitTriangle > * pHitTris ; <nl> } ; <nl> <nl> enum EFileStreamingStatus <nl> mmm a / Code / Sandbox / EditorQt / GameExporter . cpp <nl> ppp b / Code / Sandbox / EditorQt / GameExporter . cpp <nl> bool CGameExporter : : ExportSvogiData ( ) <nl> <nl> CLogFile : : WriteLine ( " Exporting SVO . . . " ) ; <nl> <nl> - I3DEngine * p3DEngine = GetIEditorImpl ( ) - > Get3DEngine ( ) ; <nl> - <nl> - if ( p3DEngine - > GetSvoCompiledData ( m_SvogiDataPak . m_pakFile . GetArchive ( ) ) ) <nl> + # if defined ( FEATURE_SVO_GI ) <nl> + if ( GetIEditorImpl ( ) - > Get3DEngine ( ) - > GetSvoCompiledData ( m_SvogiDataPak . m_pakFile . GetArchive ( ) ) ) <nl> { <nl> CLogFile : : WriteLine ( " SVO exported successfully " ) ; <nl> } <nl> else <nl> + # endif <nl> { <nl> CLogFile : : WriteLine ( " SVO export disabled or nothing to export " ) ; <nl> } <nl>
|
! B ( CE - 20233 ) Fixed geometry is not taken into account by svogi
|
CRYTEK/CRYENGINE
|
678fe896245b7dfdbd2099bea92f8493d7732fc4
|
2019-05-21T14:42:40Z
|
mmm a / src / buffer_cache / page_map / array . hpp <nl> ppp b / src / buffer_cache / page_map / array . hpp <nl> struct array_map_t { <nl> } <nl> <nl> private : <nl> - two_level_array_t < buf_t , MAX_SANE_MEMORY_SIZE / BTREE_BLOCK_SIZE , BUFFERS_PER_CHUNK > array ; <nl> + two_level_array_t < buf_t * , MAX_SANE_MEMORY_SIZE / BTREE_BLOCK_SIZE , BUFFERS_PER_CHUNK > array ; <nl> } ; <nl> <nl> # endif / / __BUFFER_CACHE_PAGE_MAP_ARRAY_HPP__ <nl> mmm a / src / buffer_cache / page_repl / page_repl_random . hpp <nl> ppp b / src / buffer_cache / page_repl / page_repl_random . hpp <nl> struct page_repl_random_t { <nl> private : <nl> unsigned int unload_threshold ; <nl> cache_t * cache ; <nl> - two_level_array_t < buf_t , PAGE_REPL_MAX_SANE_MEMORY_SIZE / BTREE_BLOCK_SIZE , PAGE_REPL_BUFFERS_PER_CHUNK > array ; <nl> + two_level_array_t < buf_t * , PAGE_REPL_MAX_SANE_MEMORY_SIZE / BTREE_BLOCK_SIZE , PAGE_REPL_BUFFERS_PER_CHUNK > array ; <nl> } ; <nl> <nl> # endif / / __PAGE_REPL_RANDOM_HPP__ <nl> mmm a / src / containers / two_level_array . hpp <nl> ppp b / src / containers / two_level_array . hpp <nl> <nl> similar to that of an array , but it neither allocates all of its memory at once nor needs to <nl> realloc ( ) as it grows . <nl> <nl> - It is parameterized on a value_t ; note that it actually stores " value_t * " . It is also parameterized <nl> - at compile - time on the total number of elements in the array and on the size of the chunks to use . <nl> + It is parameterized on a value type , ' value_t ' . It makes the following assumptions about value_t : <nl> + 1 . value_t has a default constructor value_t ( ) that has no side effects , and its destructor has no <nl> + side effects . <nl> + 2 . value_t supports conversion to bool <nl> + 3 . bool ( value_t ( ) ) = = false <nl> + 4 . bool ( any other instance of value_t ) = = true <nl> + Pointer types work well for value_t . <nl> + <nl> + If a get ( ) is called on an index in the array that set ( ) has never been called for , the result will <nl> + be value_t ( ) . <nl> + <nl> + It is also parameterized at compile - time on the maximum number of elements in the array and on the <nl> + size of the chunks to use . <nl> * / <nl> <nl> template < class value_t , int max_size , int chunk_size > <nl> class two_level_array_t { <nl> unsigned int count ; <nl> <nl> struct chunk_t : public alloc_mixin_t < tls_small_obj_alloc_accessor < alloc_t > , chunk_t > { <nl> - chunk_t ( ) : count ( 0 ) { <nl> - bzero ( values , sizeof ( value_t * ) * chunk_size ) ; <nl> - } <nl> + chunk_t ( ) <nl> + : count ( 0 ) , values ( ) / / default - initialize each value in values <nl> + { } <nl> unsigned int count ; <nl> - value_t * values [ chunk_size ] ; <nl> + value_t values [ chunk_size ] ; <nl> } ; <nl> chunk_t * chunks [ num_chunks ] ; <nl> <nl> class two_level_array_t { <nl> } <nl> <nl> public : <nl> - two_level_array_t ( ) : count ( 0 ) { <nl> - bzero ( chunks , sizeof ( chunk_t * ) * num_chunks ) ; <nl> - } <nl> + two_level_array_t ( ) : count ( 0 ) , chunks ( ) { } <nl> ~ two_level_array_t ( ) { <nl> for ( unsigned int i = 0 ; i < num_chunks ; i + + ) { <nl> if ( chunks [ i ] ) delete chunks [ i ] ; <nl> } <nl> } <nl> <nl> - value_t * get ( key_t key ) const { <nl> + value_t get ( key_t key ) const { <nl> unsigned int chunk_id = chunk_for_key ( key ) ; <nl> if ( chunks [ chunk_id ] ) { <nl> return chunks [ chunk_id ] - > values [ index_for_key ( key ) ] ; <nl> } else { <nl> - return NULL ; <nl> + return value_t ( ) ; <nl> } <nl> } <nl> <nl> - void set ( key_t key , value_t * value ) { <nl> + void set ( key_t key , value_t value ) { <nl> unsigned int chunk_id = chunk_for_key ( key ) ; <nl> chunk_t * chunk = chunks [ chunk_id ] ; <nl> <nl> + if ( ! bool ( value ) & & ! chunk ) { <nl> + / * If the user is inserting a zero value into an already - empty chunk , exit early so we <nl> + don ' t create a new empty chunk * / <nl> + return ; <nl> + } <nl> + <nl> if ( ! chunk ) chunk = chunks [ chunk_id ] = new chunk_t ; <nl> <nl> - if ( chunk - > values [ index_for_key ( key ) ] ! = NULL ) { <nl> + if ( bool ( chunk - > values [ index_for_key ( key ) ] ) ) { <nl> chunk - > count - - ; <nl> count - - ; <nl> } <nl> chunk - > values [ index_for_key ( key ) ] = value ; <nl> - if ( value ! = NULL ) { <nl> + if ( bool ( value ) ) { <nl> chunk - > count + + ; <nl> count + + ; <nl> } <nl>
|
Changed an idiosyncracy in how two_level_array_t was defined . Previously it was parameterized on a type value_t but it stored value_t * ; now it stores value_t but expects value_t to behave something like a pointer .
|
rethinkdb/rethinkdb
|
55bed1db725cf2e368ad20b38ddc27284bc7af3f
|
2010-07-15T18:21:08Z
|
mmm a / dbms / src / DataStreams / AggregatingSortedBlockInputStream . cpp <nl> ppp b / dbms / src / DataStreams / AggregatingSortedBlockInputStream . cpp <nl> <nl> # include < Common / Arena . h > <nl> # include < DataTypes / DataTypeAggregateFunction . h > <nl> # include < DataTypes / DataTypeCustomSimpleAggregateFunction . h > <nl> + # include < DataTypes / DataTypeLowCardinality . h > <nl> <nl> <nl> namespace DB <nl> namespace ErrorCodes <nl> } <nl> <nl> <nl> + class RemovingLowCardinalityBlockInputStream : public IBlockInputStream <nl> + { <nl> + public : <nl> + RemovingLowCardinalityBlockInputStream ( BlockInputStreamPtr input_ , ColumnNumbers positions_ ) <nl> + : input ( std : : move ( input_ ) ) , positions ( std : : move ( positions_ ) ) <nl> + { <nl> + header = transform ( input_ - > getHeader ( ) ) ; <nl> + } <nl> + <nl> + Block transform ( Block block ) <nl> + { <nl> + if ( block ) <nl> + { <nl> + for ( auto & pos : positions ) <nl> + { <nl> + auto & col = block . safeGetByPosition ( pos ) ; <nl> + col . column = recursiveRemoveLowCardinality ( col . column ) ; <nl> + col . type = recursiveRemoveLowCardinality ( col . type ) ; <nl> + } <nl> + } <nl> + <nl> + return block ; <nl> + } <nl> + <nl> + String getName ( ) const override { return " RemovingLowCardinality " ; } <nl> + Block getHeader ( ) const override { return header ; } <nl> + const BlockMissingValues & getMissingValues ( ) const override { return input - > getMissingValues ( ) ; } <nl> + bool isSortedOutput ( ) const override { return input - > isSortedOutput ( ) ; } <nl> + const SortDescription & getSortDescription ( ) const override { return input - > getSortDescription ( ) ; } <nl> + <nl> + protected : <nl> + Block readImpl ( ) override { return transform ( input - > read ( ) ) ; } <nl> + <nl> + private : <nl> + Block header ; <nl> + BlockInputStreamPtr input ; <nl> + ColumnNumbers positions ; <nl> + } ; <nl> + <nl> + <nl> AggregatingSortedBlockInputStream : : AggregatingSortedBlockInputStream ( <nl> const BlockInputStreams & inputs_ , const SortDescription & description_ , size_t max_block_size_ ) <nl> : MergingSortedBlockInputStream ( inputs_ , description_ , max_block_size_ ) <nl> { <nl> + ColumnNumbers positions ; <nl> + <nl> / / / Fill in the column numbers that need to be aggregated . <nl> for ( size_t i = 0 ; i < num_columns ; + + i ) <nl> { <nl> ColumnWithTypeAndName & column = header . safeGetByPosition ( i ) ; <nl> <nl> / / / We leave only states of aggregate functions . <nl> - if ( ! dynamic_cast < const DataTypeAggregateFunction * > ( column . type . get ( ) ) & & ! dynamic_cast < const DataTypeCustomSimpleAggregateFunction * > ( column . type - > getCustomName ( ) ) ) <nl> + if ( ! dynamic_cast < const DataTypeAggregateFunction * > ( column . type . get ( ) ) & & ! dynamic_cast < const DataTypeCusgit pulltomSimpleAggregateFunction * > ( column . type - > getCustomName ( ) ) ) <nl> { <nl> column_numbers_not_to_aggregate . push_back ( i ) ; <nl> continue ; <nl> AggregatingSortedBlockInputStream : : AggregatingSortedBlockInputStream ( <nl> allocatesMemoryInArena = true ; <nl> <nl> columns_to_simple_aggregate . emplace_back ( std : : move ( desc ) ) ; <nl> + <nl> + if ( recursiveRemoveLowCardinality ( column . type ) . get ( ) ! = column . type . get ( ) ) <nl> + positions . emplace_back ( i ) ; <nl> } <nl> else <nl> { <nl> AggregatingSortedBlockInputStream : : AggregatingSortedBlockInputStream ( <nl> column_numbers_to_aggregate . push_back ( i ) ; <nl> } <nl> } <nl> + <nl> + if ( ! positions . empty ( ) ) <nl> + { <nl> + for ( auto & input : children ) <nl> + input = std : : make_shared < RemovingLowCardinalityBlockInputStream > ( input , positions ) ; <nl> + <nl> + header = children . at ( 0 ) - > getHeader ( ) ; <nl> + } <nl> } <nl> <nl> <nl>
|
Remove LowCardinality in AggregatingSortedBlockInputStream .
|
ClickHouse/ClickHouse
|
f71ce27a702cc171682bb33e1b08ae00efa06a49
|
2019-08-02T10:49:52Z
|
mmm a / cocos2dx / platform / platform . h <nl> ppp b / cocos2dx / platform / platform . h <nl> THE SOFTWARE . <nl> # ifndef __PLATFORM_PLATFORM_H__ <nl> # define __PLATFORM_PLATFORM_H__ <nl> <nl> + # if defined ( _UPHONE ) <nl> + # include " uphone / platform_uphone . h " <nl> + # endif / / _UPHONE <nl> + <nl> # endif / / __PLATFORM_PLATFORM_H__ <nl> mmm a / cocos2dx / platform / uphone / platform_uphone . h <nl> ppp b / cocos2dx / platform / uphone / platform_uphone . h <nl> THE SOFTWARE . <nl> # ifndef __PLATFORM_PLATFORM_UPHONE_H__ <nl> # define __PLATFORM_PLATFORM_UPHONE_H__ <nl> <nl> + # include " Cocos2dTypes . h " <nl> + <nl> + struct timeval <nl> + { <nl> + long tv_sec ; / / seconds <nl> + long tv_usec ; / / microSeconds <nl> + } ; <nl> + <nl> # endif / / __PLATFORM_PLATFORM_UPHONE_H__ <nl>
|
issue : add needed header file to platform . h
|
cocos2d/cocos2d-x
|
e8be24e1bd3023830db511a34466503d8407213f
|
2010-07-08T03:56:17Z
|
mmm a / src / library . js <nl> ppp b / src / library . js <nl> LibraryManager . library = { <nl> __strtok_state : 0 , <nl> strtok__deps : [ ' __strtok_state ' , ' strtok_r ' ] , <nl> strtok : function ( s , delim ) { <nl> + if ( ! ___strtok_state ) { <nl> + ___strtok_state = _malloc ( 4 ) ; <nl> + } <nl> return _strtok_r ( s , delim , ___strtok_state ) ; <nl> } , <nl> <nl>
|
fix strtok temp state ; fixes
|
emscripten-core/emscripten
|
fc3be9c914d3922e9892069ca10ca9e8b63219b4
|
2012-10-22T19:12:56Z
|
mmm a / modules / videoio / src / cap_images . cpp <nl> ppp b / modules / videoio / src / cap_images . cpp <nl> class CvVideoWriter_Images : public CvVideoWriter <nl> <nl> virtual bool open ( const char * _filename ) ; <nl> virtual void close ( ) ; <nl> + virtual bool setProperty ( int , double ) ; <nl> virtual bool writeFrame ( const IplImage * ) ; <nl> <nl> protected : <nl> char * filename ; <nl> unsigned currentframe ; <nl> + std : : vector < int > params ; <nl> } ; <nl> <nl> bool CvVideoWriter_Images : : writeFrame ( const IplImage * image ) <nl> { <nl> char str [ _MAX_PATH ] ; <nl> sprintf ( str , filename , currentframe ) ; <nl> - int ret = cvSaveImage ( str , image ) ; <nl> + int ret = cvSaveImage ( str , image , & params [ 0 ] ) ; <nl> <nl> currentframe + + ; <nl> <nl> void CvVideoWriter_Images : : close ( ) <nl> filename = 0 ; <nl> } <nl> currentframe = 0 ; <nl> + params . clear ( ) ; <nl> } <nl> <nl> <nl> bool CvVideoWriter_Images : : open ( const char * _filename ) <nl> } <nl> <nl> currentframe = offset ; <nl> + params . clear ( ) ; <nl> + return true ; <nl> + } <nl> + <nl> + <nl> + bool CvVideoWriter_Images : : setProperty ( int id , double value ) <nl> + { <nl> + params . push_back ( id ) ; <nl> + params . push_back ( static_cast < int > ( value ) ) ; <nl> return true ; <nl> } <nl> <nl>
|
Add support image save parameters in VideoWriter
|
opencv/opencv
|
e4985f604a411eb3e953182a0f72030654de3329
|
2016-11-30T15:55:00Z
|
mmm a / Protobuf . podspec <nl> ppp b / Protobuf . podspec <nl> Pod : : Spec . new do | s | <nl> s . summary = ' Protocol Buffers v . 3 runtime library for Objective - C . ' <nl> s . homepage = ' https : / / github . com / google / protobuf ' <nl> s . license = ' New BSD ' <nl> - s . authors = { ' The Protocol Buffers contributors ' = > ' protobuf @ googlegroups . com ' } <nl> + s . authors = { ' The Protocol Buffers contributors ' = > ' protobuf @ googlegroups . com ' } <nl> <nl> s . source_files = ' objectivec / * . { h , m } ' , ' objectivec / google / protobuf / * . pbobjc . h ' , ' objectivec / google / protobuf / Descriptor . pbobjc . m ' <nl> - s . public_header_files = ' objectivec / * . h ' , ' objectivec / google / protobuf / * . pbobjc . h ' <nl> + s . private_header_files = ' objectivec / * _PackagePrivate . h ' <nl> # The following is a . m umbrella file , and would cause duplicate symbol <nl> # definitions : <nl> s . exclude_files = ' objectivec / GPBProtocolBuffers . m ' <nl>
|
Makes _PackagePrivate . h files private
|
protocolbuffers/protobuf
|
592c44f3ea9e3b7b836d28d5bb2226bd94b2c822
|
2015-05-14T21:16:40Z
|
mmm a / hphp / runtime / vm / jit / hhbc - translator . cpp <nl> ppp b / hphp / runtime / vm / jit / hhbc - translator . cpp <nl> void HhbcTranslator : : emitStaticLoc ( uint32_t locId , uint32_t litStrId ) { <nl> } <nl> <nl> template < class Lambda > <nl> - SSATmp * HhbcTranslator : : emitIterInitCommon ( int offset , JmpFlags jmpFlags , <nl> + void HhbcTranslator : : emitIterInitCommon ( int offset , JmpFlags jmpFlags , <nl> Lambda genFunc , <nl> bool invertCond ) { <nl> auto const src = popC ( ) ; <nl> auto const type = src - > type ( ) ; <nl> if ( ! type . subtypeOfAny ( Type : : Arr , Type : : Obj ) ) PUNT ( IterInit ) ; <nl> auto const res = genFunc ( src ) ; <nl> - return emitJmpCondHelper ( offset , ! invertCond , jmpFlags , res ) ; <nl> + emitJmpCondHelper ( offset , ! invertCond , jmpFlags , res ) ; <nl> } <nl> <nl> template < class Lambda > <nl> - SSATmp * HhbcTranslator : : emitMIterInitCommon ( int offset , JmpFlags jmpFlags , <nl> + void HhbcTranslator : : emitMIterInitCommon ( int offset , JmpFlags jmpFlags , <nl> Lambda genFunc ) { <nl> auto exit = makeExit ( ) ; <nl> <nl> SSATmp * HhbcTranslator : : emitMIterInitCommon ( int offset , JmpFlags jmpFlags , <nl> SSATmp * res = genFunc ( src ) ; <nl> SSATmp * out = popV ( ) ; <nl> gen ( DecRef , out ) ; <nl> - return emitJmpCondHelper ( offset , true , jmpFlags , res ) ; <nl> + emitJmpCondHelper ( offset , true , jmpFlags , res ) ; <nl> } <nl> <nl> void HhbcTranslator : : emitIterInit ( uint32_t iterId , <nl> void HhbcTranslator : : emitJmp ( int32_t offset , JmpFlags flags ) { <nl> flags & JmpFlagSurprise ? makeCatch ( ) : nullptr ) ; <nl> } <nl> <nl> - SSATmp * HhbcTranslator : : emitJmpCondHelper ( int32_t taken , <nl> - bool negate , <nl> - JmpFlags flags , <nl> - SSATmp * src ) { <nl> + void HhbcTranslator : : emitJmpCondHelper ( int32_t taken , <nl> + bool negate , <nl> + JmpFlags flags , <nl> + SSATmp * src ) { <nl> if ( flags & JmpFlagBreakTracelet ) { <nl> spillStack ( ) ; <nl> } <nl> SSATmp * HhbcTranslator : : emitJmpCondHelper ( int32_t taken , <nl> assert ( target ! = nullptr ) ; <nl> auto const boolSrc = gen ( ConvCellToBool , src ) ; <nl> gen ( DecRef , src ) ; <nl> - return gen ( negate ? JmpZero : JmpNZero , target , boolSrc ) ; <nl> + gen ( negate ? JmpZero : JmpNZero , target , boolSrc ) ; <nl> } <nl> <nl> void HhbcTranslator : : emitJmpZ ( Offset taken , JmpFlags flags ) { <nl> mmm a / hphp / runtime / vm / jit / hhbc - translator . h <nl> ppp b / hphp / runtime / vm / jit / hhbc - translator . h <nl> struct HhbcTranslator { <nl> void emitDecRefLocalsInline ( ) ; <nl> void emitRet ( Type type , bool freeInline ) ; <nl> void emitCmp ( Opcode opc ) ; <nl> - SSATmp * emitJmpCondHelper ( int32_t taken , bool negate , JmpFlags , SSATmp * src ) ; <nl> + void emitJmpCondHelper ( int32_t taken , bool negate , JmpFlags , SSATmp * src ) ; <nl> SSATmp * emitIncDec ( bool pre , bool inc , bool over , SSATmp * src ) ; <nl> template < class Lambda > <nl> - SSATmp * emitIterInitCommon ( int offset , JmpFlags jmpFlags , Lambda genFunc , <nl> - bool invertCond ) ; <nl> + void emitIterInitCommon ( int offset , JmpFlags jmpFlags , Lambda genFunc , <nl> + bool invertCond ) ; <nl> BCMarker makeMarker ( Offset bcOff ) ; <nl> void updateMarker ( ) ; <nl> template < class Lambda > <nl> - SSATmp * emitMIterInitCommon ( int offset , JmpFlags jmpFlags , Lambda genFunc ) ; <nl> + void emitMIterInitCommon ( int offset , JmpFlags jmpFlags , Lambda genFunc ) ; <nl> SSATmp * staticTVCns ( const TypedValue * ) ; <nl> void emitJmpSurpriseCheck ( Block * catchBlock ) ; <nl> void emitRetSurpriseCheck ( SSATmp * fp , SSATmp * retVal , Block * catchBlock , <nl>
|
Remove unused return type from jmpcond helpers
|
facebook/hhvm
|
9192a2b39634b34a896c2d761d1d82b92a99ee25
|
2014-07-26T16:00:20Z
|
new file mode 100644 <nl> index 0000000000 . . 3d07e80752 <nl> mmm / dev / null <nl> ppp b / tests / swoole_coroutine_util / task_worker . phpt <nl> <nl> + - - TEST - - <nl> + swoole_coroutine_util : sleep in Task - Worker <nl> + - - SKIPIF - - <nl> + < ? php require __DIR__ . ' / . . / include / skipif . inc ' ; ? > <nl> + - - FILE - - <nl> + < ? php <nl> + require __DIR__ . ' / . . / include / bootstrap . php ' ; <nl> + $ port = 9508 ; <nl> + <nl> + $ pm = new ProcessManager ; <nl> + $ pm - > parentFunc = function ( $ pid ) use ( $ port , $ pm ) <nl> + { <nl> + $ cli = new swoole_client ( SWOOLE_SOCK_TCP , SWOOLE_SOCK_SYNC ) ; <nl> + $ cli - > set ( [ ' open_eof_check ' = > true , " package_eof " = > " \ r \ n \ r \ n " ] ) ; <nl> + $ cli - > connect ( " 127 . 0 . 0 . 1 " , $ port , 5 ) or die ( " ERROR " ) ; <nl> + $ cli - > send ( " task - 01 " ) or die ( " ERROR " ) ; <nl> + echo trim ( $ cli - > recv ( ) ) . " \ n " ; <nl> + $ pm - > kill ( ) ; <nl> + } ; <nl> + <nl> + $ pm - > childFunc = function ( ) use ( $ pm , $ port ) <nl> + { <nl> + ini_set ( ' swoole . display_errors ' , ' Off ' ) ; <nl> + $ serv = new swoole_server ( " 127 . 0 . 0 . 1 " , $ port ) ; <nl> + $ serv - > set ( array ( <nl> + " worker_num " = > 1 , <nl> + ' task_worker_num ' = > 2 , <nl> + ' log_file ' = > ' / dev / null ' , <nl> + ) ) ; <nl> + $ serv - > on ( " WorkerStart " , function ( \ swoole_server $ serv ) use ( $ pm ) <nl> + { <nl> + $ pm - > wakeup ( ) ; <nl> + } ) ; <nl> + $ serv - > on ( ' receive ' , function ( swoole_server $ serv , $ fd , $ rid , $ data ) { <nl> + $ serv - > task ( [ $ fd , ' sleep ' ] ) ; <nl> + } ) ; <nl> + <nl> + $ serv - > on ( ' task ' , function ( swoole_server $ serv , $ task_id , $ worker_id , $ data ) { <nl> + list ( $ fd ) = $ data ; <nl> + go ( function ( ) use ( $ fd , $ serv ) { <nl> + co : : sleep ( 0 . 2 ) ; <nl> + $ serv - > send ( $ fd , " sleep \ r \ n \ r \ n " ) ; <nl> + } ) ; <nl> + } ) ; <nl> + <nl> + $ serv - > on ( ' finish ' , function ( swoole_server $ serv , $ fd , $ rid , $ data ) <nl> + { <nl> + <nl> + } ) ; <nl> + $ serv - > start ( ) ; <nl> + } ; <nl> + <nl> + $ pm - > childFirst ( ) ; <nl> + $ pm - > run ( ) ; <nl> + ? > <nl> + - - EXPECT - - <nl> + sleep <nl> \ No newline at end of file <nl>
|
added test
|
swoole/swoole-src
|
682f61a9bbd68d8665b53197f907e0e7b402ce04
|
2018-10-12T04:24:42Z
|
mmm a / src / counters . h <nl> ppp b / src / counters . h <nl> class RuntimeCallTimerScope { <nl> HM ( wasm_decode_module_peak_memory_bytes , V8 . WasmDecodeModulePeakMemoryBytes ) \ <nl> HM ( wasm_compile_function_peak_memory_bytes , \ <nl> V8 . WasmCompileFunctionPeakMemoryBytes ) \ <nl> - HM ( wasm_min_mem_pages_count , V8 . WasmMinMemPagesCount ) \ <nl> + / * TODO ( karlschimpf ) Update chrome flags to reflect asm / wasm split . * / \ <nl> + HM ( wasm_asm_min_mem_pages_count , V8 . WasmMinMemPagesCount ) \ <nl> + HM ( wasm_wasm_min_mem_pages_count , V8 . WasmMinMemPagesCount ) \ <nl> HM ( wasm_max_mem_pages_count , V8 . WasmMaxMemPagesCount ) \ <nl> HM ( wasm_function_size_bytes , V8 . WasmFunctionSizeBytes ) \ <nl> HM ( wasm_module_size_bytes , V8 . WasmModuleSizeBytes ) <nl> mmm a / src / wasm / wasm - module . cc <nl> ppp b / src / wasm / wasm - module . cc <nl> class InstantiationHelper { <nl> MaybeHandle < JSArrayBuffer > old_memory ; <nl> <nl> uint32_t min_mem_pages = module_ - > min_mem_pages ; <nl> - isolate_ - > counters ( ) - > wasm_min_mem_pages_count ( ) - > AddSample ( min_mem_pages ) ; <nl> + ( module_ - > is_wasm ( ) ? isolate_ - > counters ( ) - > wasm_wasm_min_mem_pages_count ( ) <nl> + : isolate_ - > counters ( ) - > wasm_asm_min_mem_pages_count ( ) ) <nl> + - > AddSample ( min_mem_pages ) ; <nl> <nl> if ( ! memory_ . is_null ( ) ) { <nl> / / Set externally passed ArrayBuffer non neuterable . <nl>
|
Separate module min memory pages counter for asm . js / WASM .
|
v8/v8
|
1d4821280b2e09292e80d873dfff816939809c69
|
2017-03-28T18:14:12Z
|
mmm a / stdlib / public / SwiftShims / RuntimeShims . h <nl> ppp b / stdlib / public / SwiftShims / RuntimeShims . h <nl> void * _swift_objCMirrorSummary ( const void * nsObject ) ; <nl> / / / types so we can operate on Float80 . Return NULL on overflow . <nl> const char * _swift_stdlib_strtold_clocale ( const char * nptr , void * outResult ) ; <nl> / / / Call strtod_l with the C locale , swapping argument and return <nl> - / / / types so we can operate constistently on Float80 . Return NULL on <nl> + / / / types so we can operate consistently on Float80 . Return NULL on <nl> / / / overflow . <nl> const char * _swift_stdlib_strtod_clocale ( const char * nptr , double * outResult ) ; <nl> / / / Call strtof_l with the C locale , swapping argument and return <nl> - / / / types so we can operate constistently on Float80 . Return NULL on <nl> + / / / types so we can operate consistently on Float80 . Return NULL on <nl> / / / overflow . <nl> const char * _swift_stdlib_strtof_clocale ( const char * nptr , float * outResult ) ; <nl> <nl>
|
fix typos
|
apple/swift
|
ed59a58872b3963d220d6d46115db171b3cd9d02
|
2015-12-12T08:13:41Z
|
mmm a / src / python / grpcio / grpc / _cython / _cygrpc / aio / callback_common . pyx . pxi <nl> ppp b / src / python / grpcio / grpc / _cython / _cygrpc / aio / callback_common . pyx . pxi <nl> cdef class CallbackWrapper : <nl> cdef CallbackFailureHandler CQ_SHUTDOWN_FAILURE_HANDLER = CallbackFailureHandler ( <nl> ' grpc_completion_queue_shutdown ' , <nl> ' Unknown ' , <nl> - RuntimeError ) <nl> + InternalError ) <nl> <nl> <nl> cdef class CallbackCompletionQueue : <nl> mmm a / src / python / grpcio / grpc / _cython / _cygrpc / aio / channel . pyx . pxi <nl> ppp b / src / python / grpcio / grpc / _cython / _cygrpc / aio / channel . pyx . pxi <nl> cdef class AioChannel : <nl> other design of API if necessary . <nl> " " " <nl> if self . _status in ( AIO_CHANNEL_STATUS_DESTROYED , AIO_CHANNEL_STATUS_CLOSING ) : <nl> - # TODO ( lidiz ) switch to UsageError <nl> - raise RuntimeError ( ' Channel is closed . ' ) <nl> + raise UsageError ( ' Channel is closed . ' ) <nl> <nl> cdef gpr_timespec c_deadline = _timespec_from_time ( deadline ) <nl> <nl> cdef class AioChannel : <nl> The _AioCall object . <nl> " " " <nl> if self . closed ( ) : <nl> - # TODO ( lidiz ) switch to UsageError <nl> - raise RuntimeError ( ' Channel is closed . ' ) <nl> + raise UsageError ( ' Channel is closed . ' ) <nl> <nl> cdef CallCredentials cython_call_credentials <nl> if python_call_credentials is not None : <nl> mmm a / src / python / grpcio / grpc / _cython / _cygrpc / aio / common . pyx . pxi <nl> ppp b / src / python / grpcio / grpc / _cython / _cygrpc / aio / common . pyx . pxi <nl> _COMPRESSION_METADATA_STRING_MAPPING = { <nl> CompressionAlgorithm . deflate : ' deflate ' , <nl> CompressionAlgorithm . gzip : ' gzip ' , <nl> } <nl> + <nl> + class BaseError ( Exception ) : <nl> + " " " The base class for all exceptions generated by gRPC framework . " " " <nl> + <nl> + <nl> + class UsageError ( BaseError ) : <nl> + " " " Raised when the usage might lead to undefined behavior . " " " <nl> + <nl> + <nl> + # TODO ( lidiz ) inherit this from Python level ` AioRpcStatus ` , we need to improve <nl> + # current code structure to make it happen . <nl> + class AbortError ( BaseError ) : <nl> + " " " Raised when calling abort in servicer methods . <nl> + <nl> + This exception should not be suppressed . Applications may catch it to <nl> + perform certain clean - up logic , and then re - raise it . <nl> + " " " <nl> + <nl> + <nl> + class InternalError ( BaseError ) : <nl> + " " " Raised when unexpected error returned by Core . " " " <nl> mmm a / src / python / grpcio / grpc / _cython / _cygrpc / aio / server . pyx . pxi <nl> ppp b / src / python / grpcio / grpc / _cython / _cygrpc / aio / server . pyx . pxi <nl> cdef class _HandlerCallDetails : <nl> self . invocation_metadata = invocation_metadata <nl> <nl> <nl> - class _ServerStoppedError ( RuntimeError ) : <nl> + class _ServerStoppedError ( BaseError ) : <nl> " " " Raised if the server is stopped . " " " <nl> <nl> <nl> cdef class RPCState : <nl> if self . abort_exception is not None : <nl> raise self . abort_exception <nl> if self . status_sent : <nl> - raise RuntimeError ( _RPC_FINISHED_DETAILS ) <nl> + raise UsageError ( _RPC_FINISHED_DETAILS ) <nl> if self . server . _status = = AIO_SERVER_STATUS_STOPPED : <nl> raise _ServerStoppedError ( _SERVER_STOPPED_DETAILS ) <nl> <nl> cdef class RPCState : <nl> grpc_call_unref ( self . call ) <nl> <nl> <nl> - # TODO ( lidiz ) inherit this from Python level ` AioRpcStatus ` , we need to improve <nl> - # current code structure to make it happen . <nl> - class AbortError ( Exception ) : pass <nl> - <nl> - <nl> cdef class _ServicerContext : <nl> cdef RPCState _rpc_state <nl> cdef object _loop <nl> cdef class _ServicerContext : <nl> self . _rpc_state . raise_for_termination ( ) <nl> <nl> if self . _rpc_state . metadata_sent : <nl> - raise RuntimeError ( ' Send initial metadata failed : already sent ' ) <nl> + raise UsageError ( ' Send initial metadata failed : already sent ' ) <nl> else : <nl> await _send_initial_metadata ( <nl> self . _rpc_state , <nl> cdef class _ServicerContext : <nl> str details = ' ' , <nl> tuple trailing_metadata = _IMMUTABLE_EMPTY_METADATA ) : <nl> if self . _rpc_state . abort_exception is not None : <nl> - raise RuntimeError ( ' Abort already called ! ' ) <nl> + raise UsageError ( ' Abort already called ! ' ) <nl> else : <nl> # Keeps track of the exception object . After abort happen , the RPC <nl> # should stop execution . However , if users decided to suppress it , it <nl> cdef CallbackFailureHandler REQUEST_CALL_FAILURE_HANDLER = CallbackFailureHandle <nl> cdef CallbackFailureHandler SERVER_SHUTDOWN_FAILURE_HANDLER = CallbackFailureHandler ( <nl> ' grpc_server_shutdown_and_notify ' , <nl> None , <nl> - RuntimeError ) <nl> + InternalError ) <nl> <nl> <nl> cdef class AioServer : <nl> cdef class AioServer : <nl> wrapper . c_functor ( ) <nl> ) <nl> if error ! = GRPC_CALL_OK : <nl> - raise RuntimeError ( " Error in grpc_server_request_call : % s " % error ) <nl> + raise InternalError ( " Error in grpc_server_request_call : % s " % error ) <nl> <nl> await future <nl> return rpc_state <nl> cdef class AioServer : <nl> if self . _status = = AIO_SERVER_STATUS_RUNNING : <nl> return <nl> elif self . _status ! = AIO_SERVER_STATUS_READY : <nl> - raise RuntimeError ( ' Server not in ready state ' ) <nl> + raise UsageError ( ' Server not in ready state ' ) <nl> <nl> self . _status = AIO_SERVER_STATUS_RUNNING <nl> cdef object server_started = self . _loop . create_future ( ) <nl> cdef class AioServer : <nl> return True <nl> <nl> def __dealloc__ ( self ) : <nl> - " " " Deallocation of Core objects are ensured by Python grpc . aio . Server . <nl> - <nl> - If the Cython representation is deallocated without underlying objects <nl> - freed , raise an RuntimeError . <nl> - " " " <nl> + " " " Deallocation of Core objects are ensured by Python layer . " " " <nl> # TODO ( lidiz ) if users create server , and then dealloc it immediately . <nl> # There is a potential memory leak of created Core server . <nl> if self . _status ! = AIO_SERVER_STATUS_STOPPED : <nl> mmm a / src / python / grpcio / grpc / _cython / _cygrpc / server . pyx . pxi <nl> ppp b / src / python / grpcio / grpc / _cython / _cygrpc / server . pyx . pxi <nl> cdef class Server : <nl> <nl> def cancel_all_calls ( self ) : <nl> if not self . is_shutting_down : <nl> - raise RuntimeError ( " the server must be shutting down to cancel all calls " ) <nl> + raise UsageError ( " the server must be shutting down to cancel all calls " ) <nl> elif self . is_shutdown : <nl> return <nl> else : <nl> cdef class Server : <nl> pass <nl> elif not self . is_shutting_down : <nl> if self . backup_shutdown_queue is None : <nl> - raise RuntimeError ( ' Server shutdown failed : no completion queue . ' ) <nl> + raise InternalError ( ' Server shutdown failed : no completion queue . ' ) <nl> else : <nl> # the user didn ' t call shutdown - use our backup queue <nl> self . _c_shutdown ( self . backup_shutdown_queue , None ) <nl> mmm a / src / python / grpcio / grpc / experimental / aio / __init__ . py <nl> ppp b / src / python / grpcio / grpc / experimental / aio / __init__ . py <nl> <nl> created . AsyncIO doesn ' t provide thread safety for most of its APIs . <nl> " " " <nl> <nl> - import abc <nl> from typing import Any , Optional , Sequence , Text , Tuple <nl> - import six <nl> <nl> import grpc <nl> - from grpc . _cython . cygrpc import EOF , AbortError , init_grpc_aio <nl> + from grpc . _cython . cygrpc import ( EOF , AbortError , BaseError , UsageError , <nl> + init_grpc_aio ) <nl> <nl> from . _base_call import Call , RpcContext , UnaryStreamCall , UnaryUnaryCall <nl> from . _call import AioRpcError <nl> def secure_channel ( <nl> ' UnaryUnaryMultiCallable ' , ' ClientCallDetails ' , <nl> ' UnaryUnaryClientInterceptor ' , ' InterceptedUnaryUnaryCall ' , <nl> ' insecure_channel ' , ' server ' , ' Server ' , ' EOF ' , ' secure_channel ' , <nl> - ' AbortError ' ) <nl> + ' AbortError ' , ' BaseError ' , ' UsageError ' ) <nl> mmm a / src / python / grpcio / grpc / experimental / aio / _call . py <nl> ppp b / src / python / grpcio / grpc / experimental / aio / _call . py <nl> <nl> import asyncio <nl> from functools import partial <nl> import logging <nl> + import enum <nl> from typing import AsyncIterable , Awaitable , Dict , Optional <nl> <nl> import grpc <nl> def __str__ ( self ) - > str : <nl> return self . _repr ( ) <nl> <nl> <nl> + class _APIStyle ( enum . IntEnum ) : <nl> + UNKNOWN = 0 <nl> + ASYNC_GENERATOR = 1 <nl> + READER_WRITER = 2 <nl> + <nl> + <nl> class _UnaryResponseMixin ( Call ) : <nl> _call_response : asyncio . Task <nl> <nl> def __await__ ( self ) - > ResponseType : <nl> class _StreamResponseMixin ( Call ) : <nl> _message_aiter : AsyncIterable [ ResponseType ] <nl> _preparation : asyncio . Task <nl> + _response_style : _APIStyle <nl> <nl> def _init_stream_response_mixin ( self , preparation : asyncio . Task ) : <nl> self . _message_aiter = None <nl> self . _preparation = preparation <nl> + self . _response_style = _APIStyle . UNKNOWN <nl> + <nl> + def _update_response_style ( self , style : _APIStyle ) : <nl> + if self . _response_style is _APIStyle . UNKNOWN : <nl> + self . _response_style = style <nl> + elif self . _response_style is not style : <nl> + raise cygrpc . UsageError ( <nl> + ' Please don \ ' t mix two styles of API for streaming responses ' ) <nl> <nl> def cancel ( self ) - > bool : <nl> if super ( ) . cancel ( ) : <nl> async def _fetch_stream_responses ( self ) - > ResponseType : <nl> message = await self . _read ( ) <nl> <nl> def __aiter__ ( self ) - > AsyncIterable [ ResponseType ] : <nl> + self . _update_response_style ( _APIStyle . ASYNC_GENERATOR ) <nl> if self . _message_aiter is None : <nl> self . _message_aiter = self . _fetch_stream_responses ( ) <nl> return self . _message_aiter <nl> async def read ( self ) - > ResponseType : <nl> if self . done ( ) : <nl> await self . _raise_for_status ( ) <nl> return cygrpc . EOF <nl> + self . _update_response_style ( _APIStyle . READER_WRITER ) <nl> <nl> response_message = await self . _read ( ) <nl> <nl> async def read ( self ) - > ResponseType : <nl> <nl> class _StreamRequestMixin ( Call ) : <nl> _metadata_sent : asyncio . Event <nl> - _done_writing : bool <nl> + _done_writing_flag : bool <nl> _async_request_poller : Optional [ asyncio . Task ] <nl> + _request_style : _APIStyle <nl> <nl> def _init_stream_request_mixin ( <nl> self , request_async_iterator : Optional [ AsyncIterable [ RequestType ] ] ) : <nl> self . _metadata_sent = asyncio . Event ( loop = self . _loop ) <nl> - self . _done_writing = False <nl> + self . _done_writing_flag = False <nl> <nl> # If user passes in an async iterator , create a consumer Task . <nl> if request_async_iterator is not None : <nl> self . _async_request_poller = self . _loop . create_task ( <nl> self . _consume_request_iterator ( request_async_iterator ) ) <nl> + self . _request_style = _APIStyle . ASYNC_GENERATOR <nl> else : <nl> self . _async_request_poller = None <nl> + self . _request_style = _APIStyle . READER_WRITER <nl> + <nl> + def _raise_for_different_style ( self , style : _APIStyle ) : <nl> + if self . _request_style is not style : <nl> + raise cygrpc . UsageError ( <nl> + ' Please don \ ' t mix two styles of API for streaming requests ' ) <nl> <nl> def cancel ( self ) - > bool : <nl> if super ( ) . cancel ( ) : <nl> async def _consume_request_iterator ( <nl> self , request_async_iterator : AsyncIterable [ RequestType ] ) - > None : <nl> try : <nl> async for request in request_async_iterator : <nl> - await self . write ( request ) <nl> - await self . done_writing ( ) <nl> + await self . _write ( request ) <nl> + await self . _done_writing ( ) <nl> except AioRpcError as rpc_error : <nl> # Rpc status should be exposed through other API . Exceptions raised <nl> # within this Task won ' t be retrieved by another coroutine . It ' s <nl> async def _consume_request_iterator ( <nl> _LOGGER . debug ( ' Exception while consuming the request_iterator : % s ' , <nl> rpc_error ) <nl> <nl> - async def write ( self , request : RequestType ) - > None : <nl> + async def _write ( self , request : RequestType ) - > None : <nl> if self . done ( ) : <nl> raise asyncio . InvalidStateError ( _RPC_ALREADY_FINISHED_DETAILS ) <nl> - if self . _done_writing : <nl> + if self . _done_writing_flag : <nl> raise asyncio . InvalidStateError ( _RPC_HALF_CLOSED_DETAILS ) <nl> if not self . _metadata_sent . is_set ( ) : <nl> await self . _metadata_sent . wait ( ) <nl> async def write ( self , request : RequestType ) - > None : <nl> self . cancel ( ) <nl> await self . _raise_for_status ( ) <nl> <nl> - async def done_writing ( self ) - > None : <nl> - " " " Implementation of done_writing is idempotent . " " " <nl> + async def _done_writing ( self ) - > None : <nl> if self . done ( ) : <nl> # If the RPC is finished , do nothing . <nl> return <nl> - if not self . _done_writing : <nl> + if not self . _done_writing_flag : <nl> # If the done writing is not sent before , try to send it . <nl> - self . _done_writing = True <nl> + self . _done_writing_flag = True <nl> try : <nl> await self . _cython_call . send_receive_close ( ) <nl> except asyncio . CancelledError : <nl> async def done_writing ( self ) - > None : <nl> self . cancel ( ) <nl> await self . _raise_for_status ( ) <nl> <nl> + async def write ( self , request : RequestType ) - > None : <nl> + self . _raise_for_different_style ( _APIStyle . READER_WRITER ) <nl> + await self . _write ( request ) <nl> + <nl> + async def done_writing ( self ) - > None : <nl> + " " " Implementation of done_writing is idempotent . " " " <nl> + self . _raise_for_different_style ( _APIStyle . READER_WRITER ) <nl> + await self . _done_writing ( ) <nl> + <nl> <nl> class UnaryUnaryCall ( _UnaryResponseMixin , Call , _base_call . UnaryUnaryCall ) : <nl> " " " Object for managing unary - unary RPC calls . <nl> mmm a / src / python / grpcio_tests / tests_aio / unit / connectivity_test . py <nl> ppp b / src / python / grpcio_tests / tests_aio / unit / connectivity_test . py <nl> async def a_pending_wait ( ) : <nl> <nl> # It can raise exceptions since it is an usage error , but it should not <nl> # segfault or abort . <nl> - with self . assertRaises ( RuntimeError ) : <nl> + with self . assertRaises ( aio . UsageError ) : <nl> await channel . wait_for_state_change ( <nl> grpc . ChannelConnectivity . SHUTDOWN ) <nl> <nl> mmm a / src / python / grpcio_tests / tests_aio / unit / server_test . py <nl> ppp b / src / python / grpcio_tests / tests_aio / unit / server_test . py <nl> async def test_unary_stream_evilly_mixed ( self ) : <nl> # Uses reader API <nl> self . assertEqual ( _RESPONSE , await call . read ( ) ) <nl> <nl> - # Uses async generator API <nl> - response_cnt = 0 <nl> - async for response in call : <nl> - response_cnt + = 1 <nl> - self . assertEqual ( _RESPONSE , response ) <nl> - <nl> - self . assertEqual ( _NUM_STREAM_RESPONSES - 1 , response_cnt ) <nl> - self . assertEqual ( await call . code ( ) , grpc . StatusCode . OK ) <nl> + # Uses async generator API , mixed ! <nl> + with self . assertRaises ( aio . UsageError ) : <nl> + async for response in call : <nl> + self . assertEqual ( _RESPONSE , response ) <nl> <nl> async def test_stream_unary_async_generator ( self ) : <nl> stream_unary_call = self . _channel . stream_unary ( _STREAM_UNARY_ASYNC_GEN ) <nl>
|
Prohibit mixing two styles of API on client side
|
grpc/grpc
|
ecf44b094b379ba239e52dbbdf4e92853c9a75a4
|
2020-02-06T22:21:42Z
|
mmm a / test / SILOptimizer / unused_containers . swift <nl> ppp b / test / SILOptimizer / unused_containers . swift <nl> <nl> <nl> / / FIXME : https : / / bugs . swift . org / browse / SR - 7806 <nl> / / REQUIRES : CPU = arm64 | | CPU = x86_64 <nl> + / / REQUIRES : rdar45797168 <nl> <nl> / / FIXME : https : / / bugs . swift . org / browse / SR - 9008 <nl> - / / XFAIL : linux <nl> <nl> / / CHECK - LABEL : @ $ s17unused_containers16empty_array_testyyF <nl> / / CHECK : bb0 : <nl>
|
Merge pull request from nkcsgexi / rdar45797168
|
apple/swift
|
62a21ac2f8cd9d7c7b59b9088b4902f939e03655
|
2018-11-05T03:23:12Z
|
mmm a / tensorflow / contrib / makefile / tf_op_files . txt <nl> ppp b / tensorflow / contrib / makefile / tf_op_files . txt <nl> tensorflow / core / kernels / batch_norm_op . cc <nl> tensorflow / core / kernels / avgpooling_op . cc <nl> tensorflow / core / kernels / argmax_op . cc <nl> tensorflow / core / kernels / aggregate_ops . cc <nl> + tensorflow / core / kernels / depthwise_conv_op . cc <nl> tensorflow / core / kernels / dequantize_op . cc <nl> tensorflow / core / kernels / meta_support . cc <nl> tensorflow / core / kernels / quantization_utils . cc <nl>
|
Add tensorflow / core / kernels / depthwise_conv_op . cc to tf_op_files to bring parity with other mobile builds . Resolves
|
tensorflow/tensorflow
|
c43c858646d782a54b8b581d99d5ebc8b7b7b3b3
|
2017-02-04T00:31:17Z
|
mmm a / include / swift / Basic / Demangle . h <nl> ppp b / include / swift / Basic / Demangle . h <nl> class DemanglerPrinter { <nl> std : : string & Stream ; <nl> } ; <nl> <nl> + / / / Is a character considered a digit by the demangling grammar ? <nl> + / / / <nl> + / / / Yes , this is equivalent to the standard C isdigit ( 3 ) , but some platforms <nl> + / / / give isdigit suboptimal implementations . <nl> static inline bool isDigit ( int c ) { <nl> return c > = ' 0 ' & & c < = ' 9 ' ; <nl> } <nl>
|
Add a comment for why Demangler : : isDigit isn ' t just std : : isdigit .
|
apple/swift
|
7c68fc14c44f8944502660305b7b80d28c68a540
|
2015-11-18T20:01:00Z
|
mmm a / xbmc / cdrip / CDDARipper . cpp <nl> ppp b / xbmc / cdrip / CDDARipper . cpp <nl> <nl> * <nl> * / <nl> <nl> - # include " system . h " <nl> - <nl> - # ifdef HAS_CDDA_RIPPER <nl> - <nl> # include " CDDARipper . h " <nl> # include " CDDARipJob . h " <nl> # include " ServiceBroker . h " <nl> void CCDDARipper : : OnJobComplete ( unsigned int jobID , bool success , CJob * job ) <nl> <nl> CancelJobs ( ) ; <nl> } <nl> - <nl> - # endif <nl> mmm a / xbmc / cdrip / CMakeLists . txt <nl> ppp b / xbmc / cdrip / CMakeLists . txt <nl> <nl> set ( SOURCES CDDARipJob . cpp <nl> - CDDARipper . cpp <nl> Encoder . cpp <nl> EncoderFFmpeg . cpp ) <nl> <nl> set ( HEADERS CDDARipJob . h <nl> - CDDARipper . h <nl> Encoder . h <nl> EncoderFFmpeg . h <nl> IEncoder . h ) <nl> <nl> + if ( ENABLE_OPTICAL ) <nl> + list ( APPEND SOURCES CDDARipper . cpp ) <nl> + list ( APPEND HEADERS CDDARipper . h ) <nl> + endif ( ) <nl> + <nl> core_add_library ( cdrip ) <nl> mmm a / xbmc / cores / AudioEngine / Sinks / AESinkSNDIO . cpp <nl> ppp b / xbmc / cores / AudioEngine / Sinks / AESinkSNDIO . cpp <nl> <nl> * <nl> * / <nl> <nl> - # include " system . h " <nl> - # ifdef HAS_SNDIO <nl> # include " AESinkSNDIO . h " <nl> # include " cores / AudioEngine / AESinkFactory . h " <nl> # include " cores / AudioEngine / Utils / AEUtil . h " <nl> void CAESinkSNDIO : : EnumerateDevicesEx ( AEDeviceInfoList & list , bool force ) <nl> list . push_back ( info ) ; <nl> } <nl> } <nl> - <nl> - # endif <nl> mmm a / xbmc / cores / VideoPlayer / DVDCodecs / Video / MMALCodec . h <nl> ppp b / xbmc / cores / VideoPlayer / DVDCodecs / Video / MMALCodec . h <nl> <nl> * <nl> * / <nl> <nl> - # if defined ( HAS_MMAL ) <nl> - <nl> # include " cores / VideoPlayer / DVDStreamInfo . h " <nl> # include " DVDVideoCodec . h " <nl> # include " threads / Event . h " <nl> class CMMALVideo : public CDVDVideoCodec <nl> } ; <nl> <nl> } ; <nl> - / / defined ( HAS_MMAL ) <nl> - # endif <nl> mmm a / xbmc / cores / VideoPlayer / DVDCodecs / Video / MMALFFmpeg . cpp <nl> ppp b / xbmc / cores / VideoPlayer / DVDCodecs / Video / MMALFFmpeg . cpp <nl> <nl> * <nl> * / <nl> <nl> - # include " system . h " <nl> - # ifdef HAS_MMAL <nl> - <nl> # include < interface / mmal / util / mmal_default_components . h > <nl> <nl> # include " cores / VideoPlayer / VideoRenderers / RenderManager . h " <nl> void CDecoder : : Register ( ) <nl> { <nl> CDVDFactoryCodec : : RegisterHWAccel ( " mmalffmpeg " , CDecoder : : Create ) ; <nl> } <nl> - <nl> - # endif <nl> mmm a / xbmc / cores / VideoPlayer / VideoRenderers / HwDecRender / RendererAML . cpp <nl> ppp b / xbmc / cores / VideoPlayer / VideoRenderers / HwDecRender / RendererAML . cpp <nl> <nl> <nl> # include " RendererAML . h " <nl> <nl> - # if defined ( HAS_LIBAMCODEC ) <nl> # include " cores / VideoPlayer / DVDCodecs / Video / DVDVideoCodecAmlogic . h " <nl> # include " cores / VideoPlayer / DVDCodecs / Video / AMLCodec . h " <nl> # include " utils / log . h " <nl> void CRendererAML : : RenderUpdate ( int index , int index2 , bool clear , unsigned int <nl> } <nl> CAMLCodec : : PollFrame ( ) ; <nl> } <nl> - <nl> - # endif <nl> mmm a / xbmc / cores / VideoPlayer / VideoRenderers / HwDecRender / RendererAML . h <nl> ppp b / xbmc / cores / VideoPlayer / VideoRenderers / HwDecRender / RendererAML . h <nl> <nl> <nl> # pragma once <nl> <nl> - # include " system . h " <nl> - <nl> - # if defined ( HAS_LIBAMCODEC ) <nl> - <nl> # include " cores / VideoPlayer / VideoRenderers / BaseRenderer . h " <nl> <nl> class CRendererAML : public CBaseRenderer <nl> class CRendererAML : public CBaseRenderer <nl> int m_prevVPts ; <nl> bool m_bConfigured ; <nl> } ; <nl> - <nl> - # endif <nl> mmm a / xbmc / cores / VideoPlayer / VideoRenderers / OverlayRendererGL . h <nl> ppp b / xbmc / cores / VideoPlayer / VideoRenderers / OverlayRendererGL . h <nl> class CDVDOverlaySpu ; <nl> class CDVDOverlaySSA ; <nl> typedef struct ass_image ASS_Image ; <nl> <nl> - # if defined ( HAS_GL ) | | HAS_GLES > = 2 <nl> - <nl> namespace OVERLAY { <nl> <nl> class COverlayTextureGL : public COverlay <nl> namespace OVERLAY { <nl> } ; <nl> <nl> } <nl> - <nl> - # endif <nl> - <nl> mmm a / xbmc / dbwrappers / mysqldataset . cpp <nl> ppp b / xbmc / dbwrappers / mysqldataset . cpp <nl> <nl> # include " Util . h " <nl> # include " utils / StringUtils . h " <nl> <nl> - # ifdef HAS_MYSQL <nl> # include " mysqldataset . h " <nl> # include " mysql / errmsg . h " <nl> <nl> void MysqlDataset : : interrupt ( ) { <nl> } <nl> <nl> } / / namespace <nl> - # endif / / HAS_MYSQL <nl> - <nl> mmm a / xbmc / filesystem / CMakeLists . txt <nl> ppp b / xbmc / filesystem / CMakeLists . txt <nl> set ( SOURCES AddonsDirectory . cpp <nl> MusicDatabaseFile . cpp <nl> MusicFileDirectory . cpp <nl> MusicSearchDirectory . cpp <nl> - NFSDirectory . cpp <nl> - NFSFile . cpp <nl> OverrideDirectory . cpp <nl> OverrideFile . cpp <nl> PipeFile . cpp <nl> set ( SOURCES AddonsDirectory . cpp <nl> ResourceDirectory . cpp <nl> ResourceFile . cpp <nl> RSSDirectory . cpp <nl> - SFTPDirectory . cpp <nl> - SFTPFile . cpp <nl> ShoutcastFile . cpp <nl> SmartPlaylistDirectory . cpp <nl> SourcesDirectory . cpp <nl> set ( HEADERS AddonsDirectory . h <nl> DirectoryFactory . h <nl> DirectoryHistory . h <nl> DllLibCurl . h <nl> - DllLibNfs . h <nl> EventsDirectory . h <nl> FTPDirectory . h <nl> FTPParse . h <nl> set ( HEADERS AddonsDirectory . h <nl> MusicDatabaseFile . h <nl> MusicFileDirectory . h <nl> MusicSearchDirectory . h <nl> - NFSDirectory . h <nl> - NFSFile . h <nl> OverrideDirectory . h <nl> OverrideFile . h <nl> PVRDirectory . h <nl> set ( HEADERS AddonsDirectory . h <nl> RSSDirectory . h <nl> ResourceDirectory . h <nl> ResourceFile . h <nl> - SFTPDirectory . h <nl> - SFTPFile . h <nl> ShoutcastFile . h <nl> SmartPlaylistDirectory . h <nl> SourcesDirectory . h <nl> if ( ENABLE_OPTICAL ) <nl> CDDAFile . h ) <nl> endif ( ) <nl> <nl> + if ( NFS_FOUND ) <nl> + list ( APPEND SOURCES NFSDirectory . cpp <nl> + NFSFile . cpp ) <nl> + list ( APPEND HEADERS DllLibNfs . h <nl> + NFSDirectory . h <nl> + NFSFile . h ) <nl> + endif ( ) <nl> + <nl> + if ( SSH_FOUND ) <nl> + list ( APPEND SOURCES SFTPDirectory . cpp <nl> + SFTPFile . cpp ) <nl> + list ( APPEND SOURCES SFTPDirectory . h <nl> + SFTPFile . h ) <nl> + endif ( ) <nl> + <nl> if ( ENABLE_UPNP ) <nl> list ( APPEND SOURCES NptXbmcFile . cpp <nl> UPnPDirectory . cpp <nl> mmm a / xbmc / filesystem / NFSDirectory . cpp <nl> ppp b / xbmc / filesystem / NFSDirectory . cpp <nl> <nl> * <nl> * / <nl> <nl> - # include " system . h " <nl> - <nl> - # ifdef HAS_FILESYSTEM_NFS <nl> # include " DllLibNfs . h " <nl> <nl> # ifdef TARGET_WINDOWS <nl> bool CNFSDirectory : : Exists ( const CURL & url2 ) <nl> } <nl> return S_ISDIR ( info . st_mode ) ? true : false ; <nl> } <nl> - <nl> - # endif <nl> mmm a / xbmc / filesystem / NFSFile . cpp <nl> ppp b / xbmc / filesystem / NFSFile . cpp <nl> <nl> / / FileNFS . cpp : implementation of the CNFSFile class . <nl> / / <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - # include " system . h " <nl> <nl> - # ifdef HAS_FILESYSTEM_NFS <nl> # include " NFSFile . h " <nl> # include " threads / SingleLock . h " <nl> # include " utils / log . h " <nl> bool CNFSFile : : IsValidFile ( const std : : string & strFileName ) <nl> return false ; <nl> return true ; <nl> } <nl> - # endif / / HAS_FILESYSTEM_NFS <nl> - <nl> mmm a / xbmc / filesystem / SFTPDirectory . cpp <nl> ppp b / xbmc / filesystem / SFTPDirectory . cpp <nl> <nl> * / <nl> <nl> # include " SFTPDirectory . h " <nl> - # ifdef HAS_FILESYSTEM_SFTP <nl> + <nl> # include " SFTPFile . h " <nl> # include " utils / log . h " <nl> # include " URL . h " <nl> bool CSFTPDirectory : : Exists ( const CURL & url ) <nl> return false ; <nl> } <nl> } <nl> - # endif <nl> mmm a / xbmc / filesystem / SFTPDirectory . h <nl> ppp b / xbmc / filesystem / SFTPDirectory . h <nl> <nl> * <nl> * / <nl> <nl> - # include " system . h " <nl> - # ifdef HAS_FILESYSTEM_SFTP <nl> # include " IDirectory . h " <nl> <nl> class CURL ; <nl> namespace XFILE <nl> bool Exists ( const CURL & url ) override ; <nl> } ; <nl> } <nl> - # endif <nl> mmm a / xbmc / filesystem / SFTPFile . cpp <nl> ppp b / xbmc / filesystem / SFTPFile . cpp <nl> <nl> <nl> # include " threads / SystemClock . h " <nl> # include " SFTPFile . h " <nl> - # ifdef HAS_FILESYSTEM_SFTP <nl> # include " threads / SingleLock . h " <nl> # include " utils / log . h " <nl> # include " URL . h " <nl> int CSFTPFile : : IoControl ( EIoControl request , void * param ) <nl> <nl> return - 1 ; <nl> } <nl> - <nl> - # endif <nl> mmm a / xbmc / filesystem / SFTPFile . h <nl> ppp b / xbmc / filesystem / SFTPFile . h <nl> <nl> * <nl> * / <nl> <nl> - # include " system . h " <nl> - # ifdef HAS_FILESYSTEM_SFTP <nl> # include " IFile . h " <nl> # include " FileItem . h " <nl> # include " threads / CriticalSection . h " <nl> namespace XFILE <nl> sftp_file m_sftp_handle ; <nl> } ; <nl> } <nl> - # endif <nl> mmm a / xbmc / filesystem / test / CMakeLists . txt <nl> ppp b / xbmc / filesystem / test / CMakeLists . txt <nl> set ( SOURCES TestDirectory . cpp <nl> TestZipFile . cpp <nl> TestZipManager . cpp ) <nl> <nl> + if ( NFS_FOUND ) <nl> + list ( APPEND SOURCES TestNfsFile . cpp ) <nl> + endif ( ) <nl> + <nl> core_add_test_library ( filesystem_test ) <nl> mmm a / xbmc / filesystem / test / TestNfsFile . cpp <nl> ppp b / xbmc / filesystem / test / TestNfsFile . cpp <nl> <nl> * <nl> * / <nl> <nl> - # include " system . h " <nl> - # if defined ( HAS_FILESYSTEM_NFS ) <nl> # include " filesystem / NFSFile . h " <nl> # include " test / TestUtils . h " <nl> <nl> TEST_P ( TestNfs , splitUrlIntoExportAndPath ) <nl> } <nl> <nl> INSTANTIATE_TEST_CASE_P ( NfsFile , TestNfs , ValuesIn ( g_TestData ) ) ; <nl> - # endif / / HAS_FILESYSTEM_NFS <nl> mmm a / xbmc / guilib / MatrixGLES . cpp <nl> ppp b / xbmc / guilib / MatrixGLES . cpp <nl> <nl> * / <nl> <nl> <nl> - # include " system . h " <nl> - <nl> - # if defined ( HAS_GL ) | | HAS_GLES > = 2 <nl> # include " system_gl . h " <nl> <nl> # include < cmath > <nl> void CMatrixGLStack : : Load ( ) <nl> { <nl> <nl> } <nl> - <nl> - # endif <nl> mmm a / xbmc / network / CMakeLists . txt <nl> ppp b / xbmc / network / CMakeLists . txt <nl> set ( SOURCES DNSNameCache . cpp <nl> TCPServer . cpp <nl> UdpClient . cpp <nl> WakeOnAccess . cpp <nl> - WebServer . cpp <nl> ZeroconfBrowser . cpp <nl> Zeroconf . cpp ) <nl> <nl> set ( HEADERS DNSNameCache . h <nl> TCPServer . h <nl> UdpClient . h <nl> WakeOnAccess . h <nl> - WebServer . h <nl> Zeroconf . h <nl> ZeroconfBrowser . h ) <nl> <nl> if ( SHAIRPLAY_FOUND ) <nl> DllLibShairplay . h ) <nl> endif ( ) <nl> <nl> + if ( MICROHTTPD_FOUND ) <nl> + list ( APPEND SOURCES WebServer . cpp ) <nl> + list ( APPEND HEADERS WebServer . h ) <nl> + endif ( ) <nl> + <nl> core_add_library ( network ) <nl> if ( BLUETOOTH_FOUND ) <nl> target_compile_definitions ( $ { CORE_LIBRARY } PRIVATE - DHAVE_LIBBLUETOOTH = 1 ) <nl> mmm a / xbmc / network / WebServer . cpp <nl> ppp b / xbmc / network / WebServer . cpp <nl> <nl> <nl> # include " WebServer . h " <nl> <nl> - # ifdef HAS_WEB_SERVER <nl> # include < algorithm > <nl> # include < memory > <nl> # include < stdexcept > <nl> int CWebServer : : AddHeader ( struct MHD_Response * response , const std : : string & name <nl> <nl> return MHD_add_response_header ( response , name . c_str ( ) , value . c_str ( ) ) ; <nl> } <nl> - # endif <nl> mmm a / xbmc / network / WebServer . h <nl> ppp b / xbmc / network / WebServer . h <nl> <nl> * <nl> * / <nl> <nl> - # include " system . h " <nl> - <nl> - # ifdef HAS_WEB_SERVER <nl> # include < memory > <nl> # include < vector > <nl> <nl> class CWebServer <nl> CCriticalSection m_critSection ; <nl> std : : vector < IHTTPRequestHandler * > m_requestHandlers ; <nl> } ; <nl> - # endif <nl> mmm a / xbmc / network / linux / ZeroconfAvahi . h <nl> ppp b / xbmc / network / linux / ZeroconfAvahi . h <nl> <nl> * <nl> * / <nl> <nl> - # include " system . h " <nl> - <nl> - # ifdef HAS_AVAHI <nl> - <nl> # include < memory > <nl> # include < map > <nl> # include < vector > <nl> class CZeroconfAvahi : public CZeroconf <nl> bool m_shutdown ; <nl> pthread_t m_thread_id ; <nl> } ; <nl> - <nl> - # endif / / HAS_AVAHI <nl> - <nl> mmm a / xbmc / network / linux / ZeroconfBrowserAvahi . h <nl> ppp b / xbmc / network / linux / ZeroconfBrowserAvahi . h <nl> <nl> * <nl> * / <nl> <nl> - # include " system . h " <nl> - # ifdef HAS_AVAHI <nl> - <nl> # include < memory > <nl> # include < map > <nl> # include < vector > <nl> class CZeroconfBrowserAvahi : public CZeroconfBrowser <nl> CZeroconfBrowser : : ZeroconfService m_resolving_service ; <nl> CEvent m_resolved_event ; <nl> } ; <nl> - <nl> - # endif / / HAS_AVAHI <nl> mmm a / xbmc / rendering / gl / GUIWindowTestPatternGL . cpp <nl> ppp b / xbmc / rendering / gl / GUIWindowTestPatternGL . cpp <nl> <nl> * <nl> * / <nl> <nl> - # include " system . h " <nl> - <nl> - # ifdef HAS_GL <nl> # include " system_gl . h " <nl> # include " GUIWindowTestPatternGL . h " <nl> <nl> void CGUIWindowTestPatternGL : : EndRender ( ) <nl> { <nl> <nl> } <nl> - <nl> - # endif <nl> mmm a / xbmc / settings / SettingConditions . cpp <nl> ppp b / xbmc / settings / SettingConditions . cpp <nl> <nl> # include " cores / AudioEngine / Interfaces / AE . h " <nl> # include " cores / VideoPlayer / DVDCodecs / Video / DVDVideoCodec . h " <nl> # include " guilib / LocalizeStrings . h " <nl> + # if defined ( HAS_WEB_SERVER ) <nl> # include " network / WebServer . h " <nl> + # endif <nl> # include " peripherals / Peripherals . h " <nl> # include " profiles / ProfilesManager . h " <nl> # include " pvr / PVRGUIActions . h " <nl> mmm a / xbmc / system . h <nl> ppp b / xbmc / system . h <nl> <nl> # include " dxgi . h " <nl> # include " d3dcompiler . h " <nl> # include " directxmath . h " <nl> - # ifdef HAS_SDL <nl> - # include " SDL \ SDL . h " <nl> - # endif <nl> # endif <nl> <nl> # if defined ( TARGET_POSIX ) <nl> mmm a / xbmc / utils / CMakeLists . txt <nl> ppp b / xbmc / utils / CMakeLists . txt <nl> if ( NOT CORE_SYSTEM_NAME STREQUAL windows AND NOT CORE_SYSTEM_NAME STREQUAL windo <nl> endif ( ) <nl> <nl> if ( CORE_SYSTEM_NAME STREQUAL android OR AML_FOUND ) <nl> - list ( APPEND SOURCES AMLUtils . cpp <nl> - ScreenshotAML . cpp ) <nl> - list ( APPEND HEADERS AMLUtils . h <nl> - ScreenshotAML . h ) <nl> + list ( APPEND SOURCES AMLUtils . cpp ) <nl> + list ( APPEND HEADERS AMLUtils . h ) <nl> + endif ( ) <nl> + <nl> + if ( AML_FOUND ) <nl> + list ( APPEND HEADERS ScreenshotAML . cpp ) <nl> + list ( APPEND HEADERS ScreenshotAML . h ) <nl> endif ( ) <nl> <nl> core_add_library ( utils ) <nl> mmm a / xbmc / utils / ScreenshotAML . cpp <nl> ppp b / xbmc / utils / ScreenshotAML . cpp <nl> <nl> * <nl> * / <nl> <nl> - # include " system . h " <nl> - # if defined ( HAS_LIBAMCODEC ) <nl> # include " utils / ScreenshotAML . h " <nl> # include < sys / types . h > <nl> # include < sys / stat . h > <nl> # include < fcntl . h > <nl> + # include < string . h > <nl> + # include < unistd . h > <nl> <nl> # include < sys / ioctl . h > <nl> <nl> void CScreenshotAML : : CaptureVideoFrame ( unsigned char * buffer , int iWidth , int iH <nl> delete [ ] videoBuffer ; <nl> } <nl> } <nl> - # endif / / defined ( HAS_LIBAMCODEC ) <nl> mmm a / xbmc / utils / ScreenshotAML . h <nl> ppp b / xbmc / utils / ScreenshotAML . h <nl> <nl> * <nl> * / <nl> <nl> - # if defined ( HAS_LIBAMCODEC ) <nl> class CScreenshotAML <nl> { <nl> public : <nl> class CScreenshotAML <nl> / / the passed overlay . The buffer format is BGRA ( 4 byte ) <nl> static void CaptureVideoFrame ( unsigned char * buffer , int iWidth , int iHeight , bool bBlendToBuffer = true ) ; <nl> } ; <nl> - # endif / / HAS_LIBAMCODEC <nl> mmm a / xbmc / windowing / mir / CMakeLists . txt <nl> ppp b / xbmc / windowing / mir / CMakeLists . txt <nl> <nl> set ( SOURCES GLContextEGL . cpp <nl> WinEventsMir . cpp <nl> - WinSystemMir . cpp <nl> - WinSystemMirGLContext . cpp <nl> - WinSystemMirGLESContext . cpp ) <nl> + WinSystemMir . cpp ) <nl> <nl> - set ( HEADERS WinSystemMir . h <nl> - WinSystemMirGLContext . h <nl> - WinSystemMirGLESContext . h ) <nl> + set ( HEADERS WinSystemMir . h ) <nl> + <nl> + if ( OPENGL_FOUND ) <nl> + list ( APPEND SOURCES WinSystemMirGLContext . cpp ) <nl> + list ( APPEND HEADERS WinSystemMirGLContext . h ) <nl> + endif ( ) <nl> + elseif ( OPENGLES_FOUND ) <nl> + list ( APPEND SOURCES WinSystemMirGLESContext . cpp ) <nl> + list ( APPEND HEADERS WinSystemMirGLESContext . h ) <nl> + endif ( ) <nl> <nl> core_add_library ( windowing_MIR ) <nl> mmm a / xbmc / windowing / mir / WinSystemMirGLContext . cpp <nl> ppp b / xbmc / windowing / mir / WinSystemMirGLContext . cpp <nl> <nl> <nl> # include " WinSystemMirGLContext . h " <nl> <nl> - # if defined ( HAS_GL ) <nl> - <nl> bool CWinSystemMirGLContext : : CreateNewWindow ( const std : : string & name , <nl> bool fullScreen , <nl> RESOLUTION_INFO & res ) <nl> bool CWinSystemMirGLContext : : IsExtSupported ( const char * extension ) <nl> { <nl> return false ; <nl> } <nl> - <nl> - # endif <nl> mmm a / xbmc / windowing / mir / WinSystemMirGLESContext . cpp <nl> ppp b / xbmc / windowing / mir / WinSystemMirGLESContext . cpp <nl> <nl> <nl> # include " WinSystemMirGLESContext . h " <nl> <nl> - # if defined ( HAS_GLES ) <nl> - <nl> bool CWinSystemMirGLESContext : : CreateNewWindow ( const std : : string & name , <nl> bool fullScreen , <nl> RESOLUTION_INFO & res ) <nl> bool CWinSystemMirGLESContext : : IsExtSupported ( const char * extension ) <nl> { <nl> return false ; <nl> } <nl> - <nl> - # endif <nl> mmm a / xbmc / windowing / osx / WinEventsSDL . h <nl> ppp b / xbmc / windowing / osx / WinEventsSDL . h <nl> <nl> * / <nl> # pragma once <nl> <nl> - # include " system . h " <nl> - <nl> - # ifdef HAS_SDL <nl> # include < SDL / SDL_events . h > <nl> <nl> # include " windowing / WinEvents . h " <nl> class CWinEventsSDL : public IWinEvents <nl> bool MessagePump ( ) override ; <nl> <nl> private : <nl> - # ifdef TARGET_DARWIN <nl> static bool ProcessOSXShortcuts ( SDL_Event & event ) ; <nl> - # elif defined ( TARGET_POSIX ) <nl> - static bool ProcessLinuxShortcuts ( SDL_Event & event ) ; <nl> - # endif <nl> } ; <nl> - <nl> - # endif <nl> - <nl>
|
Merge pull request from Rechi / cleanupWarnings
|
xbmc/xbmc
|
0df5de22a7153e322d295820f91edee40e64aead
|
2018-01-10T14:47:19Z
|
mmm a / tools / caffe / caffe2ncnn . cpp <nl> ppp b / tools / caffe / caffe2ncnn . cpp <nl> int main ( int argc , char * * argv ) <nl> else <nl> fprintf ( pp , " % - 16s " , " Convolution " ) ; <nl> } <nl> - else if ( layer . type ( ) = = " ConvolutionDepthwise " ) <nl> + else if ( layer . type ( ) = = " ConvolutionDepthwise " | | layer . type ( ) = = " DepthwiseConvolution " ) <nl> { <nl> fprintf ( pp , " % - 16s " , " ConvolutionDepthWise " ) ; <nl> } <nl> int main ( int argc , char * * argv ) <nl> int dim = concat_param . axis ( ) - 1 ; <nl> fprintf ( pp , " 0 = % d " , dim ) ; <nl> } <nl> - else if ( layer . type ( ) = = " Convolution " | | layer . type ( ) = = " ConvolutionDepthwise " ) <nl> + else if ( layer . type ( ) = = " Convolution " | | layer . type ( ) = = " ConvolutionDepthwise " | | layer . type ( ) = = " DepthwiseConvolution " ) <nl> { <nl> const caffe : : LayerParameter & binlayer = net . layer ( netidx ) ; <nl> <nl>
|
convert depthwiseconvolution from yonghenglh6 branch
|
Tencent/ncnn
|
3b8a3f6764397f96edef26a08cd8bf054ab3820c
|
2018-05-10T02:48:25Z
|
mmm a / src / compiler / js - intrinsic - lowering . cc <nl> ppp b / src / compiler / js - intrinsic - lowering . cc <nl> Reduction JSIntrinsicLowering : : Reduce ( Node * node ) { <nl> if ( node - > opcode ( ) ! = IrOpcode : : kJSCallRuntime ) return NoChange ( ) ; <nl> const Runtime : : Function * const f = <nl> Runtime : : FunctionForId ( CallRuntimeParametersOf ( node - > op ( ) ) . id ( ) ) ; <nl> - if ( f - > function_id = = Runtime : : kTurbofanStaticAssert ) <nl> + if ( f - > function_id = = Runtime : : kTurbofanStaticAssert ) { <nl> return ReduceTurbofanStaticAssert ( node ) ; <nl> + } <nl> + if ( f - > function_id = = Runtime : : kIsBeingInterpreted ) { <nl> + return ReduceIsBeingInterpreted ( node ) ; <nl> + } <nl> if ( f - > intrinsic_type ! = Runtime : : IntrinsicType : : INLINE ) return NoChange ( ) ; <nl> switch ( f - > function_id ) { <nl> case Runtime : : kInlineCopyDataProperties : <nl> Reduction JSIntrinsicLowering : : ReduceTurbofanStaticAssert ( Node * node ) { <nl> return Changed ( jsgraph_ - > UndefinedConstant ( ) ) ; <nl> } <nl> <nl> + Reduction JSIntrinsicLowering : : ReduceIsBeingInterpreted ( Node * node ) { <nl> + RelaxEffectsAndControls ( node ) ; <nl> + return Changed ( jsgraph_ - > FalseConstant ( ) ) ; <nl> + } <nl> + <nl> Reduction JSIntrinsicLowering : : Change ( Node * node , const Operator * op ) { <nl> / / Replace all effect uses of { node } with the effect dependency . <nl> RelaxEffectsAndControls ( node ) ; <nl> mmm a / src / compiler / js - intrinsic - lowering . h <nl> ppp b / src / compiler / js - intrinsic - lowering . h <nl> class V8_EXPORT_PRIVATE JSIntrinsicLowering final <nl> Reduction ReduceIsInstanceType ( Node * node , InstanceType instance_type ) ; <nl> Reduction ReduceIsJSReceiver ( Node * node ) ; <nl> Reduction ReduceIsSmi ( Node * node ) ; <nl> + Reduction ReduceIsBeingInterpreted ( Node * node ) ; <nl> Reduction ReduceTurbofanStaticAssert ( Node * node ) ; <nl> Reduction ReduceToLength ( Node * node ) ; <nl> Reduction ReduceToObject ( Node * node ) ; <nl> mmm a / src / runtime / runtime - test . cc <nl> ppp b / src / runtime / runtime - test . cc <nl> RUNTIME_FUNCTION ( Runtime_FreezeWasmLazyCompilation ) { <nl> <nl> RUNTIME_FUNCTION ( Runtime_TurbofanStaticAssert ) { <nl> SealHandleScope shs ( isolate ) ; <nl> - / / Always lowered to StaticAssert node in Turbofan , so we should never get <nl> - / / here in compiled code . <nl> + / / Always lowered to StaticAssert node in Turbofan , so we never get here in <nl> + / / compiled code . <nl> return ReadOnlyRoots ( isolate ) . undefined_value ( ) ; <nl> } <nl> <nl> + RUNTIME_FUNCTION ( Runtime_IsBeingInterpreted ) { <nl> + SealHandleScope shs ( isolate ) ; <nl> + / / Always lowered to false in Turbofan , so we never get here in compiled code . <nl> + return ReadOnlyRoots ( isolate ) . true_value ( ) ; <nl> + } <nl> + <nl> RUNTIME_FUNCTION ( Runtime_EnableCodeLoggingForTesting ) { <nl> / / The { NoopListener } currently does nothing on any callback , but reports <nl> / / { true } on { is_listening_to_code_events ( ) } . Feel free to add assertions to <nl> mmm a / src / runtime / runtime . h <nl> ppp b / src / runtime / runtime . h <nl> namespace internal { <nl> / / * Each compiler has an explicit list of intrisics it supports , falling back <nl> / / to a simple runtime call if necessary . <nl> <nl> - / / Entries have the form F ( name , number of arguments , number of values ) : <nl> + / / Entries have the form F ( name , number of arguments , number of return values ) : <nl> / / A variable number of arguments is specified by a - 1 , additional restrictions <nl> / / are specified by inline comments . To declare only the runtime version ( no <nl> / / inline ) , use the F macro below . To declare the runtime version and the inline <nl> namespace internal { <nl> F ( ICsAreEnabled , 0 , 1 ) \ <nl> F ( InYoungGeneration , 1 , 1 ) \ <nl> F ( IsAsmWasmCode , 1 , 1 ) \ <nl> + F ( IsBeingInterpreted , 0 , 1 ) \ <nl> F ( IsConcurrentRecompilationSupported , 0 , 1 ) \ <nl> F ( IsLiftoffFunction , 1 , 1 ) \ <nl> F ( IsThreadInWasm , 0 , 1 ) \ <nl> new file mode 100644 <nl> index 00000000000 . . cc93eede862 <nl> mmm / dev / null <nl> ppp b / test / mjsunit / compiler / is - being - interpreted - 1 . js <nl> <nl> + / / Copyright 2019 the V8 project authors . All rights reserved . <nl> + / / Use of this source code is governed by a BSD - style license that can be <nl> + / / found in the LICENSE file . <nl> + <nl> + / / Flags : - - allow - natives - syntax - - opt - - no - always - opt <nl> + <nl> + <nl> + function bar ( ) { return foo ( ) ; } <nl> + function foo ( ) { return % IsBeingInterpreted ( ) ; } <nl> + <nl> + % PrepareFunctionForOptimization ( bar ) ; <nl> + % PrepareFunctionForOptimization ( foo ) ; <nl> + <nl> + assertTrue ( bar ( ) ) ; <nl> + assertTrue ( bar ( ) ) ; <nl> + % OptimizeFunctionOnNextCall ( bar ) ; <nl> + assertFalse ( bar ( ) ) ; <nl> new file mode 100644 <nl> index 00000000000 . . 9d996eb94a6 <nl> mmm / dev / null <nl> ppp b / test / mjsunit / compiler / is - being - interpreted - 2 . js <nl> <nl> + / / Copyright 2019 the V8 project authors . All rights reserved . <nl> + / / Use of this source code is governed by a BSD - style license that can be <nl> + / / found in the LICENSE file . <nl> + <nl> + / / Flags : - - allow - natives - syntax - - no - turbo - inlining - - opt - - no - always - opt <nl> + <nl> + <nl> + function bar ( ) { return foo ( ) ; } <nl> + function foo ( ) { return % IsBeingInterpreted ( ) ; } <nl> + <nl> + % PrepareFunctionForOptimization ( bar ) ; <nl> + % PrepareFunctionForOptimization ( foo ) ; <nl> + <nl> + assertTrue ( bar ( ) ) ; <nl> + assertTrue ( bar ( ) ) ; <nl> + % OptimizeFunctionOnNextCall ( bar ) ; <nl> + assertTrue ( bar ( ) ) ; <nl> mmm a / test / mjsunit / compiler / serializer - accessors . js <nl> ppp b / test / mjsunit / compiler / serializer - accessors . js <nl> <nl> / / Use of this source code is governed by a BSD - style license that can be <nl> / / found in the LICENSE file . <nl> <nl> - / / Flags : - - allow - natives - syntax <nl> + / / Flags : - - allow - natives - syntax - - opt - - no - always - opt <nl> + <nl> + var expect_interpreted = true ; <nl> <nl> class C { <nl> get prop ( ) { <nl> return 42 ; <nl> } <nl> set prop ( v ) { <nl> + assertEquals ( expect_interpreted , % IsBeingInterpreted ( ) ) ; <nl> % TurbofanStaticAssert ( v = = = 43 ) ; <nl> } <nl> } <nl> class C { <nl> const c = new C ( ) ; <nl> <nl> function foo ( ) { <nl> + assertEquals ( expect_interpreted , % IsBeingInterpreted ( ) ) ; <nl> % TurbofanStaticAssert ( c . prop = = = 42 ) ; <nl> c . prop = 43 ; <nl> } <nl> function foo ( ) { <nl> % PrepareFunctionForOptimization ( <nl> Object . getOwnPropertyDescriptor ( C . prototype , ' prop ' ) . set ) ; <nl> % PrepareFunctionForOptimization ( foo ) ; <nl> + <nl> foo ( ) ; <nl> foo ( ) ; <nl> % OptimizeFunctionOnNextCall ( foo ) ; <nl> + expect_interpreted = false ; <nl> foo ( ) ; <nl> mmm a / test / mjsunit / compiler / serializer - transition - propagation . js <nl> ppp b / test / mjsunit / compiler / serializer - transition - propagation . js <nl> <nl> / / Use of this source code is governed by a BSD - style license that can be <nl> / / found in the LICENSE file . <nl> <nl> - / / Flags : - - allow - natives - syntax <nl> + / / Flags : - - allow - natives - syntax - - opt - - no - always - opt <nl> + <nl> + var expect_interpreted = true ; <nl> <nl> function C ( ) { <nl> this . a = 1 ; <nl> + assertEquals ( expect_interpreted , % IsBeingInterpreted ( ) ) ; <nl> % TurbofanStaticAssert ( this . x = = 42 ) ; <nl> } ; <nl> <nl> new G ; <nl> foo ( ) ; <nl> foo ( ) ; <nl> % OptimizeFunctionOnNextCall ( foo ) ; <nl> + expect_interpreted = false ; <nl> foo ( ) ; <nl> mmm a / test / mjsunit / mjsunit . status <nl> ppp b / test / mjsunit / mjsunit . status <nl> <nl> ' regexp - tier - up - multiple ' : [ SKIP ] , <nl> ' regress / regress - 996234 ' : [ SKIP ] , <nl> <nl> + # Tests that depend on optimization ( beyond doing assertOptimized ) . <nl> + ' compiler / is - being - interpreted - * ' : [ SKIP ] , <nl> + ' compiler / serializer - accessors ' : [ SKIP ] , <nl> + ' compiler / serializer - transition - propagation ' : [ SKIP ] , <nl> + <nl> # These tests check that we can trace the compiler . <nl> ' tools / compiler - trace - flags ' : [ SKIP ] , <nl> ' tools / compiler - trace - flags - wasm ' : [ SKIP ] , <nl> <nl> # phases . <nl> ' compiler / concurrent - inlining - 1 ' : [ SKIP ] , <nl> ' compiler / concurrent - inlining - 2 ' : [ SKIP ] , <nl> + ' compiler / constant - fold - add - static ' : [ SKIP ] , <nl> ' compiler / diamond - followedby - branch ' : [ SKIP ] , <nl> + ' compiler / is - being - interpreted - * ' : [ SKIP ] , <nl> ' compiler / load - elimination - const - field ' : [ SKIP ] , <nl> - ' compiler / constant - fold - add - static ' : [ SKIP ] , <nl> - ' compiler / serializer - feedback - propagation - * ' : [ SKIP ] , <nl> ' compiler / serializer - accessors ' : [ SKIP ] , <nl> + ' compiler / serializer - feedback - propagation - * ' : [ SKIP ] , <nl> + ' compiler / serializer - transition - propagation ' : [ SKIP ] , <nl> <nl> # Some tests rely on inlining . <nl> ' compiler / opt - higher - order - functions ' : [ SKIP ] , <nl>
|
Introduce % IsBeingInterpreted
|
v8/v8
|
9ac62c4dcca5ea079268c4f114b37ef03829f32c
|
2019-11-28T14:20:45Z
|
mmm a / xbmc / settings / Settings . cpp <nl> ppp b / xbmc / settings / Settings . cpp <nl> void CSettings : : Initialize ( ) <nl> m_bNonLinStretch = false ; <nl> <nl> m_pictureExtensions = " . png | . jpg | . jpeg | . bmp | . gif | . ico | . tif | . tiff | . tga | . pcx | . cbz | . zip | . cbr | . rar | . m3u | . dng | . nef | . cr2 | . crw | . orf | . arw | . erf | . 3fr | . dcr | . x3f | . mef | . raf | . mrw | . pef | . sr2 | . rss " ; <nl> - m_musicExtensions = " . nsv | . m4a | . flac | . aac | . strm | . pls | . rm | . rma | . mpa | . wav | . wma | . ogg | . mp3 | . mp2 | . m3u | . mod | . amf | . 669 | . dmf | . dsm | . far | . gdm | . imf | . it | . m15 | . med | . okt | . s3m | . stm | . sfx | . ult | . uni | . xm | . sid | . ac3 | . dts | . cue | . aif | . aiff | . wpl | . ape | . mac | . mpc | . mp + | . mpp | . shn | . zip | . rar | . wv | . nsf | . spc | . gym | . adx | . dsp | . adp | . ymf | . ast | . afc | . hps | . xsp | . xwav | . waa | . wvs | . wam | . gcm | . idsp | . mpdsp | . mss | . spt | . rsd | . mid | . kar | . sap | . cmc | . cmr | . dmc | . mpt | . mpd | . rmt | . tmc | . tm8 | . tm2 | . oga | . url | . pxml | . tta | . rss | . cm3 | . cms | . dlt | . brstm " ; <nl> - m_videoExtensions = " . m4v | . 3g2 | . 3gp | . nsv | . tp | . ts | . ty | . strm | . pls | . rm | . rmvb | . m3u | . ifo | . mov | . qt | . divx | . xvid | . bivx | . vob | . nrg | . img | . iso | . pva | . wmv | . asf | . asx | . ogm | . m2v | . avi | . bin | . dat | . mpg | . mpeg | . mp4 | . mkv | . avc | . vp3 | . svq3 | . nuv | . viv | . dv | . fli | . flv | . rar | . 001 | . wpl | . zip | . vdr | . dvr - ms | . xsp | . mts | . m2t | . m2ts | . evo | . ogv | . sdp | . avs | . rec | . url | . pxml | . vc1 | . h264 | . rcv | . rss | . mpls | . webm | . bdmv " ; <nl> + m_musicExtensions = " . nsv | . m4a | . flac | . aac | . strm | . pls | . rm | . rma | . mpa | . wav | . wma | . ogg | . mp3 | . mp2 | . m3u | . mod | . amf | . 669 | . dmf | . dsm | . far | . gdm | . imf | . it | . m15 | . med | . okt | . s3m | . stm | . sfx | . ult | . uni | . xm | . sid | . ac3 | . dts | . cue | . aif | . aiff | . wpl | . ape | . mac | . mpc | . mp + | . mpp | . shn | . zip | . rar | . wv | . nsf | . spc | . gym | . adx | . dsp | . adp | . ymf | . ast | . afc | . hps | . xsp | . xwav | . waa | . wvs | . wam | . gcm | . idsp | . mpdsp | . mss | . spt | . rsd | . mid | . kar | . sap | . cmc | . cmr | . dmc | . mpt | . mpd | . rmt | . tmc | . tm8 | . tm2 | . oga | . url | . pxml | . tta | . rss | . cm3 | . cms | . dlt | . brstm | . wtv " ; <nl> + m_videoExtensions = " . m4v | . 3g2 | . 3gp | . nsv | . tp | . ts | . ty | . strm | . pls | . rm | . rmvb | . m3u | . ifo | . mov | . qt | . divx | . xvid | . bivx | . vob | . nrg | . img | . iso | . pva | . wmv | . asf | . asx | . ogm | . m2v | . avi | . bin | . dat | . mpg | . mpeg | . mp4 | . mkv | . avc | . vp3 | . svq3 | . nuv | . viv | . dv | . fli | . flv | . rar | . 001 | . wpl | . zip | . vdr | . dvr - ms | . xsp | . mts | . m2t | . m2ts | . evo | . ogv | . sdp | . avs | . rec | . url | . pxml | . vc1 | . h264 | . rcv | . rss | . mpls | . webm | . bdmv | . wtv " ; <nl> / / internal music extensions <nl> m_musicExtensions + = " | . sidstream | . oggstream | . nsfstream | . asapstream | . cdda " ; <nl> <nl>
|
added : Windows Television ( . wtv ) to list of known audio and video file extensions ( )
|
xbmc/xbmc
|
679f2c460fffd1ab3477aa933694f2d07cdc510b
|
2011-02-27T08:04:11Z
|
mmm a / src / mongo / db / storage / rocks / rocks_index . cpp <nl> ppp b / src / mongo / db / storage / rocks / rocks_index . cpp <nl> namespace mongo { <nl> } <nl> rocksdb : : Range wholeRange ( _prefix , nextPrefix ) ; <nl> _db - > GetApproximateSizes ( & wholeRange , 1 , & storageSize ) ; <nl> - return static_cast < long long > ( storageSize ) ; <nl> + / / There might be some bytes in the WAL that we don ' t count here . Some <nl> + / / tests depend on the fact that non - empty indexes have non - zero sizes <nl> + return static_cast < long long > ( <nl> + std : : max ( storageSize , static_cast < uint64_t > ( 1 ) ) ) ; <nl> } <nl> <nl> std : : string RocksIndexBase : : _makePrefixedKey ( const std : : string & prefix , <nl> mmm a / src / mongo / db / storage / rocks / rocks_record_store . cpp <nl> ppp b / src / mongo / db / storage / rocks / rocks_record_store . cpp <nl> namespace mongo { <nl> int64_t RocksRecordStore : : storageSize ( OperationContext * txn , BSONObjBuilder * extraInfo , <nl> int infoLevel ) const { <nl> / / we ' re lying , but that ' s the best we can do for now <nl> - return _dataSize . load ( ) ; <nl> + / / We need to make it multiple of 256 to make <nl> + / / jstests / concurrency / fsm_workloads / convert_to_capped_collection . js happy <nl> + return static_cast < int64_t > ( <nl> + std : : max ( _dataSize . load ( ) & ( ~ 255 ) , static_cast < long long > ( 256 ) ) ) ; <nl> } <nl> <nl> RecordData RocksRecordStore : : dataFor ( OperationContext * txn , const RecordId & loc ) const { <nl>
|
SERVER - 17269 Fix concurrency and sharding tests in Rocks
|
mongodb/mongo
|
c1b5595b5fdf93e0599bbdd4154f35bfa10fadd1
|
2015-02-13T17:07:09Z
|
mmm a / lib / IR / StandardTypes . cpp <nl> ppp b / lib / IR / StandardTypes . cpp <nl> using namespace mlir : : detail ; <nl> / / Integer Type <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> + / / static constexpr must have a definition ( until in C + + 17 and inline variable ) . <nl> + constexpr unsigned IntegerType : : kMaxWidth ; <nl> + <nl> / / / Verify the construction of an integer type . <nl> LogicalResult IntegerType : : verifyConstructionInvariants ( <nl> llvm : : Optional < Location > loc , MLIRContext * context , unsigned width ) { <nl>
|
Fix MacOS build : static constexpr must be defined
|
tensorflow/tensorflow
|
2f17f4dfe8daf10789bcd7cf16e4112bd6bd2244
|
2019-05-06T15:30:26Z
|
mmm a / caffe2 / python / hypothesis_test . py <nl> ppp b / caffe2 / python / hypothesis_test . py <nl> def test_atomic_iter_with_concurrent_steps ( self , initial_iters , num_iters , <nl> num_iter = num_iters ) <nl> for i in range ( num_nets ) : <nl> net = core . Net ( " net_ { } " . format ( i ) ) <nl> - # clear stats from global stats registry <nl> - net . StatRegistryExport ( <nl> - [ ] , [ " _k { } " . format ( i ) , " _v { } " . format ( i ) , " _t { } " . format ( i ) ] ) <nl> net . AtomicIter ( [ iter_mutex , " iter " ] , [ " iter " ] ) <nl> step = core . ExecutionStep ( " step " , [ net ] ) <nl> - net . StatRegistryExport ( <nl> - [ ] , [ <nl> - " stat_key_ { } " . format ( i ) , " stat_value_ { } " . format ( i ) , <nl> - " stat_ts_ { } " . format ( i ) <nl> - ] <nl> - ) <nl> concurrent_steps . AddSubstep ( step ) <nl> <nl> concurrent_steps . SetConcurrentSubsteps ( True ) <nl> def test_atomic_iter_with_concurrent_steps ( self , initial_iters , num_iters , <nl> self . assertEqual ( iters . dtype , np . int64 ) <nl> self . assertEqual ( iters [ 0 ] , initial_iters + num_iters * num_nets ) <nl> <nl> - for i in range ( num_nets ) : <nl> - stat_key = self . ws . blobs [ ( " stat_key_ { } " . format ( i ) ) ] . fetch ( ) <nl> - self . assertEqual ( b ' atomic_iter / stats / iter / num_iter ' , stat_key [ 0 ] ) <nl> - stat_value = self . ws . blobs [ ( " stat_value_ { } " . format ( i ) ) ] . fetch ( ) <nl> - self . assertEqual ( np . int64 , stat_value . dtype ) <nl> - if num_iters > 0 : <nl> - self . assertEqual ( 1 , stat_value [ 0 ] ) <nl> - <nl> @ given ( a = hu . tensor ( ) , <nl> src = st . sampled_from ( list ( viewkeys ( _NUMPY_TYPE_TO_ENUM ) ) ) , <nl> dst = st . sampled_from ( list ( viewkeys ( _NUMPY_TYPE_TO_ENUM ) ) ) , <nl> mmm a / caffe2 / sgd / iter_op . h <nl> ppp b / caffe2 / sgd / iter_op . h <nl> <nl> # include " caffe2 / core / blob_serialization . h " <nl> # include " caffe2 / core / context . h " <nl> # include " caffe2 / core / operator . h " <nl> - # include " caffe2 / core / stats . h " <nl> <nl> namespace caffe2 { <nl> <nl> class AtomicIterOp final : public Operator < Context > { <nl> USE_OPERATOR_CONTEXT_FUNCTIONS ; <nl> <nl> AtomicIterOp ( const OperatorDef & operator_def , Workspace * ws ) <nl> - : Operator < Context > ( operator_def , ws ) , <nl> - stats_ ( std : : string ( " atomic_iter / stats / " ) + operator_def . input ( 1 ) ) { } <nl> + : Operator < Context > ( operator_def , ws ) { } <nl> <nl> bool RunOnDevice ( ) override { <nl> auto & mutex = OperatorBase : : Input < std : : unique_ptr < std : : mutex > > ( 0 ) ; <nl> std : : lock_guard < std : : mutex > lg ( * mutex ) ; <nl> IncrementIter ( OperatorBase : : Output < TensorCPU > ( 0 ) ) ; <nl> - CAFFE_EVENT ( stats_ , num_iter ) ; <nl> return true ; <nl> } <nl> - <nl> - private : <nl> - struct AtomicIterOpStats { <nl> - CAFFE_STAT_CTOR ( AtomicIterOpStats ) ; <nl> - CAFFE_EXPORTED_STAT ( num_iter ) ; <nl> - } stats_ ; <nl> } ; <nl> <nl> class MutexSerializer : public BlobSerializerBase { <nl>
|
Revert " Export number of iterations of AtomicIterOp " ( )
|
pytorch/pytorch
|
0ea8964fd61d807d049d84ca924d66fffeee4682
|
2018-03-21T23:11:29Z
|
mmm a / Telegram / Resources / langs / lang . strings <nl> ppp b / Telegram / Resources / langs / lang . strings <nl> Copyright ( c ) 2014 - 2017 John Preston , https : / / desktop . telegram . org <nl> " lng_profile_edit_public_link " = " Edit public link " ; <nl> " lng_profile_manage_admins " = " Manage administrators " ; <nl> " lng_profile_manage_blocklist " = " Manage blocked users " ; <nl> + " lng_profile_manage_restrictedlist " = " Manage restricted users " ; <nl> " lng_profile_common_groups # one " = " { count } group in common " ; <nl> " lng_profile_common_groups # other " = " { count } groups in common " ; <nl> " lng_profile_common_groups_section " = " Groups in common " ; <nl> Copyright ( c ) 2014 - 2017 John Preston , https : / / desktop . telegram . org <nl> " lng_profile_delete_and_exit " = " Leave " ; <nl> " lng_profile_kick " = " Remove " ; <nl> " lng_profile_admin " = " admin " ; <nl> - " lng_profile_edit_admin " = " Edit " ; <nl> + " lng_profile_edit_permissions " = " Edit " ; <nl> " lng_profile_sure_kick " = " Remove { user } from the group ? " ; <nl> " lng_profile_sure_kick_channel " = " Remove { user } from the channel ? " ; <nl> " lng_profile_sure_kick_admin " = " Remove { user } from administrators ? " ; <nl> Copyright ( c ) 2014 - 2017 John Preston , https : / / desktop . telegram . org <nl> " lng_restricted_send_gifs " = " The admins of this group restricted you from posting GIFs here . " ; <nl> " lng_restricted_send_inline " = " The admins of this group restricted you from posting inline content here . " ; <nl> <nl> + " lng_restricted_list_title " = " Restricted users " ; <nl> + <nl> / / Not used <nl> <nl> " lng_topbar_info " = " Info " ; <nl> mmm a / Telegram / SourceFiles / boxes / edit_privacy_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / edit_privacy_box . cpp <nl> namespace { <nl> <nl> class PrivacyExceptionsBoxController : public ChatsListBoxController { <nl> public : <nl> - PrivacyExceptionsBoxController ( base : : lambda < QString ( ) > titleFactory , const QVector < UserData * > & selected , base : : lambda_once < void ( QVector < UserData * > & & result ) > saveCallback ) ; <nl> - void rowClicked ( PeerListBox : : Row * row ) override ; <nl> + PrivacyExceptionsBoxController ( base : : lambda < QString ( ) > titleFactory , const std : : vector < gsl : : not_null < UserData * > > & selected ) ; <nl> + void rowClicked ( gsl : : not_null < PeerListRow * > row ) override ; <nl> + <nl> + std : : vector < gsl : : not_null < UserData * > > getResult ( ) const ; <nl> <nl> protected : <nl> void prepareViewHook ( ) override ; <nl> - std : : unique_ptr < Row > createRow ( History * history ) override ; <nl> + std : : unique_ptr < Row > createRow ( gsl : : not_null < History * > history ) override ; <nl> <nl> private : <nl> base : : lambda < QString ( ) > _titleFactory ; <nl> - QVector < UserData * > _selected ; <nl> - base : : lambda_once < void ( QVector < UserData * > & & result ) > _saveCallback ; <nl> + std : : vector < gsl : : not_null < UserData * > > _selected ; <nl> <nl> } ; <nl> <nl> - PrivacyExceptionsBoxController : : PrivacyExceptionsBoxController ( base : : lambda < QString ( ) > titleFactory , const QVector < UserData * > & selected , base : : lambda_once < void ( QVector < UserData * > & & result ) > saveCallback ) <nl> + PrivacyExceptionsBoxController : : PrivacyExceptionsBoxController ( base : : lambda < QString ( ) > titleFactory , const std : : vector < gsl : : not_null < UserData * > > & selected ) <nl> : _titleFactory ( std : : move ( titleFactory ) ) <nl> - , _selected ( selected ) <nl> - , _saveCallback ( std : : move ( saveCallback ) ) { <nl> + , _selected ( selected ) { <nl> } <nl> <nl> void PrivacyExceptionsBoxController : : prepareViewHook ( ) { <nl> - view ( ) - > setTitle ( _titleFactory ) ; <nl> - view ( ) - > addButton ( langFactory ( lng_settings_save ) , [ this ] { <nl> - auto peers = view ( ) - > collectSelectedRows ( ) ; <nl> - auto users = QVector < UserData * > ( ) ; <nl> - if ( ! peers . empty ( ) ) { <nl> - users . reserve ( peers . size ( ) ) ; <nl> - for_const ( auto peer , peers ) { <nl> - auto user = peer - > asUser ( ) ; <nl> - t_assert ( user ! = nullptr ) ; <nl> - users . push_back ( user ) ; <nl> - } <nl> + delegate ( ) - > peerListSetTitle ( _titleFactory ) ; <nl> + delegate ( ) - > peerListAddSelectedRows ( _selected ) ; <nl> + } <nl> + <nl> + std : : vector < gsl : : not_null < UserData * > > PrivacyExceptionsBoxController : : getResult ( ) const { <nl> + auto peers = delegate ( ) - > peerListCollectSelectedRows ( ) ; <nl> + auto users = std : : vector < gsl : : not_null < UserData * > > ( ) ; <nl> + if ( ! peers . empty ( ) ) { <nl> + users . reserve ( peers . size ( ) ) ; <nl> + for_const ( auto peer , peers ) { <nl> + auto user = peer - > asUser ( ) ; <nl> + t_assert ( user ! = nullptr ) ; <nl> + users . push_back ( user ) ; <nl> } <nl> - _saveCallback ( std : : move ( users ) ) ; <nl> - view ( ) - > closeBox ( ) ; <nl> - } ) ; <nl> - view ( ) - > addButton ( langFactory ( lng_cancel ) , [ this ] { view ( ) - > closeBox ( ) ; } ) ; <nl> - view ( ) - > addSelectedRows ( _selected ) ; <nl> + } <nl> + return users ; <nl> } <nl> <nl> - void PrivacyExceptionsBoxController : : rowClicked ( PeerListBox : : Row * row ) { <nl> - view ( ) - > setRowChecked ( row , ! row - > checked ( ) ) ; <nl> + void PrivacyExceptionsBoxController : : rowClicked ( gsl : : not_null < PeerListRow * > row ) { <nl> + delegate ( ) - > peerListSetRowChecked ( row , ! row - > checked ( ) ) ; <nl> } <nl> <nl> - std : : unique_ptr < PrivacyExceptionsBoxController : : Row > PrivacyExceptionsBoxController : : createRow ( History * history ) { <nl> + std : : unique_ptr < PrivacyExceptionsBoxController : : Row > PrivacyExceptionsBoxController : : createRow ( gsl : : not_null < History * > history ) { <nl> if ( auto user = history - > peer - > asUser ( ) ) { <nl> if ( ! user - > isSelf ( ) ) { <nl> return std : : make_unique < Row > ( history ) ; <nl> int EditPrivacyBox : : countDefaultHeight ( int newWidth ) { <nl> void EditPrivacyBox : : editExceptionUsers ( Exception exception ) { <nl> auto controller = std : : make_unique < PrivacyExceptionsBoxController > ( base : : lambda_guarded ( this , [ this , exception ] { <nl> return _controller - > exceptionBoxTitle ( exception ) ; <nl> - } ) , exceptionUsers ( exception ) , base : : lambda_guarded ( this , [ this , exception ] ( QVector < UserData * > & & users ) { <nl> - exceptionUsers ( exception ) = std : : move ( users ) ; <nl> - exceptionLink ( exception ) - > entity ( ) - > setText ( exceptionLinkText ( exception ) ) ; <nl> - auto removeFrom = ( [ exception ] { <nl> - switch ( exception ) { <nl> - case Exception : : Always : return Exception : : Never ; <nl> - case Exception : : Never : return Exception : : Always ; <nl> + } ) , exceptionUsers ( exception ) ) ; <nl> + auto initBox = [ this , exception , controller = controller . get ( ) ] ( PeerListBox * box ) { <nl> + box - > addButton ( langFactory ( lng_settings_save ) , base : : lambda_guarded ( this , [ this , box , exception , controller ] { <nl> + exceptionUsers ( exception ) = controller - > getResult ( ) ; <nl> + exceptionLink ( exception ) - > entity ( ) - > setText ( exceptionLinkText ( exception ) ) ; <nl> + auto removeFrom = ( [ exception ] { <nl> + switch ( exception ) { <nl> + case Exception : : Always : return Exception : : Never ; <nl> + case Exception : : Never : return Exception : : Always ; <nl> + } <nl> + Unexpected ( " Invalid exception value . " ) ; <nl> + } ) ( ) ; <nl> + auto & removeFromUsers = exceptionUsers ( removeFrom ) ; <nl> + auto removedSome = false ; <nl> + for ( auto user : exceptionUsers ( exception ) ) { <nl> + auto removedStart = std : : remove ( removeFromUsers . begin ( ) , removeFromUsers . end ( ) , user ) ; <nl> + if ( removedStart ! = removeFromUsers . end ( ) ) { <nl> + removeFromUsers . erase ( removedStart , removeFromUsers . end ( ) ) ; <nl> + removedSome = true ; <nl> + } <nl> } <nl> - Unexpected ( " Invalid exception value . " ) ; <nl> - } ) ( ) ; <nl> - auto & removeFromUsers = exceptionUsers ( removeFrom ) ; <nl> - auto removedSome = false ; <nl> - for ( auto user : exceptionUsers ( exception ) ) { <nl> - if ( removeFromUsers . contains ( user ) ) { <nl> - removeFromUsers . erase ( std : : remove ( removeFromUsers . begin ( ) , removeFromUsers . end ( ) , user ) , removeFromUsers . end ( ) ) ; <nl> - removedSome = true ; <nl> + if ( removedSome ) { <nl> + exceptionLink ( removeFrom ) - > entity ( ) - > setText ( exceptionLinkText ( removeFrom ) ) ; <nl> } <nl> - } <nl> - if ( removedSome ) { <nl> - exceptionLink ( removeFrom ) - > entity ( ) - > setText ( exceptionLinkText ( removeFrom ) ) ; <nl> - } <nl> - } ) ) ; <nl> - Ui : : show ( Box < PeerListBox > ( std : : move ( controller ) ) , KeepOtherLayers ) ; <nl> + box - > closeBox ( ) ; <nl> + } ) ) ; <nl> + box - > addButton ( langFactory ( lng_cancel ) , [ box ] { box - > closeBox ( ) ; } ) ; <nl> + } ; <nl> + Ui : : show ( Box < PeerListBox > ( std : : move ( controller ) , std : : move ( initBox ) ) , KeepOtherLayers ) ; <nl> } <nl> <nl> QString EditPrivacyBox : : exceptionLinkText ( Exception exception ) { <nl> style : : margins EditPrivacyBox : : exceptionLinkMargins ( ) const { <nl> return st : : editPrivacyLinkMargin ; <nl> } <nl> <nl> - QVector < UserData * > & EditPrivacyBox : : exceptionUsers ( Exception exception ) { <nl> + std : : vector < gsl : : not_null < UserData * > > & EditPrivacyBox : : exceptionUsers ( Exception exception ) { <nl> switch ( exception ) { <nl> case Exception : : Always : return _alwaysUsers ; <nl> case Exception : : Never : return _neverUsers ; <nl> void EditPrivacyBox : : loadData ( ) { <nl> _alwaysUsers . reserve ( _alwaysUsers . size ( ) + users . size ( ) ) ; <nl> for ( auto & userId : users ) { <nl> auto user = App : : user ( UserId ( userId . v ) ) ; <nl> - if ( ! _neverUsers . contains ( user ) & & ! _alwaysUsers . contains ( user ) ) { <nl> + if ( ! base : : contains ( _neverUsers , user ) & & ! base : : contains ( _alwaysUsers , user ) ) { <nl> _alwaysUsers . push_back ( user ) ; <nl> } <nl> } <nl> void EditPrivacyBox : : loadData ( ) { <nl> _neverUsers . reserve ( _neverUsers . size ( ) + users . size ( ) ) ; <nl> for ( auto & userId : users ) { <nl> auto user = App : : user ( UserId ( userId . v ) ) ; <nl> - if ( ! _alwaysUsers . contains ( user ) & & ! _neverUsers . contains ( user ) ) { <nl> + if ( ! base : : contains ( _alwaysUsers , user ) & & ! base : : contains ( _neverUsers , user ) ) { <nl> _neverUsers . push_back ( user ) ; <nl> } <nl> } <nl> mmm a / Telegram / SourceFiles / boxes / edit_privacy_box . h <nl> ppp b / Telegram / SourceFiles / boxes / edit_privacy_box . h <nl> class EditPrivacyBox : public BoxContent , private MTP : : Sender { <nl> <nl> void editExceptionUsers ( Exception exception ) ; <nl> QString exceptionLinkText ( Exception exception ) ; <nl> - QVector < UserData * > & exceptionUsers ( Exception exception ) ; <nl> + std : : vector < gsl : : not_null < UserData * > > & exceptionUsers ( Exception exception ) ; <nl> object_ptr < Ui : : WidgetSlideWrap < Ui : : LinkButton > > & exceptionLink ( Exception exception ) ; <nl> <nl> std : : unique_ptr < Controller > _controller ; <nl> class EditPrivacyBox : public BoxContent , private MTP : : Sender { <nl> object_ptr < Ui : : WidgetSlideWrap < Ui : : LinkButton > > _neverLink = { nullptr } ; <nl> object_ptr < Ui : : FlatLabel > _exceptionsDescription = { nullptr } ; <nl> <nl> - QVector < UserData * > _alwaysUsers ; <nl> - QVector < UserData * > _neverUsers ; <nl> + std : : vector < gsl : : not_null < UserData * > > _alwaysUsers ; <nl> + std : : vector < gsl : : not_null < UserData * > > _neverUsers ; <nl> <nl> } ; <nl> mmm a / Telegram / SourceFiles / boxes / members_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / members_box . cpp <nl> MembersBox : : Inner : : Inner ( QWidget * parent , gsl : : not_null < ChannelData * > channel , M <nl> , _rowHeight ( st : : contactsPadding . top ( ) + st : : contactsPhotoSize + st : : contactsPadding . bottom ( ) ) <nl> , _channel ( channel ) <nl> , _filter ( filter ) <nl> - , _kickText ( lang ( ( filter = = MembersFilter : : Admins ) ? lng_profile_edit_admin : lng_profile_kick ) ) <nl> + , _kickText ( lang ( ( filter = = MembersFilter : : Admins ) ? lng_profile_edit_permissions : lng_profile_kick ) ) <nl> , _kickWidth ( st : : normalFont - > width ( _kickText ) ) <nl> , _aboutWidth ( st : : boxWideWidth - st : : contactsPadding . left ( ) - st : : contactsPadding . right ( ) ) <nl> , _about ( _aboutWidth ) { <nl> mmm a / Telegram / SourceFiles / boxes / peer_list_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / peer_list_box . cpp <nl> Copyright ( c ) 2014 - 2017 John Preston , https : / / desktop . telegram . org <nl> # include " boxes / contacts_box . h " <nl> # include " window / themes / window_theme . h " <nl> <nl> - PeerListBox : : PeerListBox ( QWidget * , std : : unique_ptr < Controller > controller ) <nl> - : _controller ( std : : move ( controller ) ) { <nl> + PeerListBox : : PeerListBox ( QWidget * , std : : unique_ptr < PeerListController > controller , base : : lambda < void ( PeerListBox * ) > init ) <nl> + : _controller ( std : : move ( controller ) ) <nl> + , _init ( std : : move ( init ) ) { <nl> + Expects ( _controller ! = nullptr ) ; <nl> } <nl> <nl> object_ptr < Ui : : WidgetSlideWrap < Ui : : MultiSelect > > PeerListBox : : createMultiSelect ( ) { <nl> void PeerListBox : : updateScrollSkips ( ) { <nl> void PeerListBox : : prepare ( ) { <nl> _inner = setInnerWidget ( object_ptr < Inner > ( this , _controller . get ( ) ) , st : : boxLayerScroll ) ; <nl> <nl> - _controller - > setView ( this ) ; <nl> + _controller - > setDelegate ( this ) ; <nl> <nl> setDimensions ( st : : boxWideWidth , st : : boxMaxListHeight ) ; <nl> if ( _select ) { <nl> void PeerListBox : : prepare ( ) { <nl> } <nl> <nl> connect ( _inner , SIGNAL ( mustScrollTo ( int , int ) ) , this , SLOT ( onScrollToY ( int , int ) ) ) ; <nl> + <nl> + if ( _init ) { <nl> + _init ( this ) ; <nl> + } <nl> } <nl> <nl> void PeerListBox : : keyPressEvent ( QKeyEvent * e ) { <nl> void PeerListBox : : setInnerFocus ( ) { <nl> } <nl> } <nl> <nl> - void PeerListBox : : appendRow ( std : : unique_ptr < Row > row ) { <nl> + void PeerListBox : : peerListAppendRow ( std : : unique_ptr < PeerListRow > row ) { <nl> _inner - > appendRow ( std : : move ( row ) ) ; <nl> } <nl> <nl> - void PeerListBox : : prependRow ( std : : unique_ptr < Row > row ) { <nl> + void PeerListBox : : peerListAppendSearchRow ( std : : unique_ptr < PeerListRow > row ) { <nl> + _inner - > appendSearchRow ( std : : move ( row ) ) ; <nl> + } <nl> + <nl> + void PeerListBox : : peerListAppendFoundRow ( gsl : : not_null < PeerListRow * > row ) { <nl> + _inner - > appendFoundRow ( row ) ; <nl> + } <nl> + <nl> + void PeerListBox : : peerListPrependRow ( std : : unique_ptr < PeerListRow > row ) { <nl> _inner - > prependRow ( std : : move ( row ) ) ; <nl> } <nl> <nl> - PeerListBox : : Row * PeerListBox : : findRow ( RowId id ) { <nl> + PeerListRow * PeerListBox : : peerListFindRow ( PeerListRowId id ) { <nl> return _inner - > findRow ( id ) ; <nl> } <nl> <nl> - void PeerListBox : : updateRow ( Row * row ) { <nl> + void PeerListBox : : peerListUpdateRow ( gsl : : not_null < PeerListRow * > row ) { <nl> _inner - > updateRow ( row ) ; <nl> } <nl> <nl> - void PeerListBox : : removeRow ( Row * row ) { <nl> + void PeerListBox : : peerListRemoveRow ( gsl : : not_null < PeerListRow * > row ) { <nl> _inner - > removeRow ( row ) ; <nl> } <nl> <nl> - void PeerListBox : : setRowChecked ( Row * row , bool checked ) { <nl> + void PeerListBox : : peerListSetRowChecked ( gsl : : not_null < PeerListRow * > row , bool checked ) { <nl> auto peer = row - > peer ( ) ; <nl> if ( checked ) { <nl> - addSelectItem ( peer , Row : : SetStyle : : Animated ) ; <nl> - _inner - > changeCheckState ( row , checked , Row : : SetStyle : : Animated ) ; <nl> - updateRow ( row ) ; <nl> + addSelectItem ( peer , PeerListRow : : SetStyle : : Animated ) ; <nl> + _inner - > changeCheckState ( row , checked , PeerListRow : : SetStyle : : Animated ) ; <nl> + peerListUpdateRow ( row ) ; <nl> <nl> - / / This call deletes row from _globalSearchRows . <nl> + / / This call deletes row from _searchRows . <nl> _select - > entity ( ) - > clearQuery ( ) ; <nl> } else { <nl> / / The itemRemovedCallback will call changeCheckState ( ) here . <nl> _select - > entity ( ) - > removeItem ( peer - > id ) ; <nl> - updateRow ( row ) ; <nl> + peerListUpdateRow ( row ) ; <nl> } <nl> } <nl> <nl> - int PeerListBox : : fullRowsCount ( ) const { <nl> + int PeerListBox : : peerListFullRowsCount ( ) { <nl> return _inner - > fullRowsCount ( ) ; <nl> } <nl> <nl> - PeerListBox : : Row * PeerListBox : : rowAt ( int index ) const { <nl> + gsl : : not_null < PeerListRow * > PeerListBox : : peerListRowAt ( int index ) { <nl> return _inner - > rowAt ( index ) ; <nl> } <nl> <nl> - void PeerListBox : : setAboutText ( const QString & aboutText ) { <nl> - if ( aboutText . isEmpty ( ) ) { <nl> - setAbout ( nullptr ) ; <nl> - } else { <nl> - setAbout ( object_ptr < Ui : : FlatLabel > ( this , aboutText , Ui : : FlatLabel : : InitType : : Simple , st : : membersAbout ) ) ; <nl> - } <nl> + void PeerListBox : : peerListRefreshRows ( ) { <nl> + _inner - > refreshRows ( ) ; <nl> } <nl> <nl> - void PeerListBox : : setAbout ( object_ptr < Ui : : FlatLabel > about ) { <nl> - _inner - > setAbout ( std : : move ( about ) ) ; <nl> + void PeerListBox : : peerListScrollToTop ( ) { <nl> + onScrollToY ( 0 ) ; <nl> } <nl> <nl> - void PeerListBox : : refreshRows ( ) { <nl> - _inner - > refreshRows ( ) ; <nl> + void PeerListBox : : peerListSetDescription ( object_ptr < Ui : : FlatLabel > description ) { <nl> + _inner - > setDescription ( std : : move ( description ) ) ; <nl> + } <nl> + <nl> + void PeerListBox : : peerListSetSearchLoading ( object_ptr < Ui : : FlatLabel > loading ) { <nl> + _inner - > setSearchLoading ( std : : move ( loading ) ) ; <nl> } <nl> <nl> - void PeerListBox : : setSearchMode ( SearchMode mode ) { <nl> + void PeerListBox : : peerListSetSearchNoResults ( object_ptr < Ui : : FlatLabel > noResults ) { <nl> + _inner - > setSearchNoResults ( std : : move ( noResults ) ) ; <nl> + } <nl> + <nl> + void PeerListBox : : peerListSetSearchMode ( PeerListSearchMode mode ) { <nl> _inner - > setSearchMode ( mode ) ; <nl> - if ( mode ! = SearchMode : : None & & ! _select ) { <nl> + if ( mode ! = PeerListSearchMode : : None & & ! _select ) { <nl> _select = createMultiSelect ( ) ; <nl> _select - > entity ( ) - > setSubmittedCallback ( [ this ] ( bool chtrlShiftEnter ) { _inner - > submitted ( ) ; } ) ; <nl> _select - > entity ( ) - > setQueryChangedCallback ( [ this ] ( const QString & query ) { searchQueryChanged ( query ) ; } ) ; <nl> _select - > entity ( ) - > setItemRemovedCallback ( [ this ] ( uint64 itemId ) { <nl> if ( auto peer = App : : peerLoaded ( itemId ) ) { <nl> - if ( auto row = findRow ( peer - > id ) ) { <nl> - _inner - > changeCheckState ( row , false , Row : : SetStyle : : Animated ) ; <nl> + if ( auto row = peerListFindRow ( peer - > id ) ) { <nl> + _inner - > changeCheckState ( row , false , PeerListRow : : SetStyle : : Animated ) ; <nl> update ( ) ; <nl> } <nl> } <nl> void PeerListBox : : setSearchMode ( SearchMode mode ) { <nl> _select - > moveToLeft ( 0 , 0 ) ; <nl> } <nl> if ( _select ) { <nl> - _select - > toggleAnimated ( mode ! = SearchMode : : None ) ; <nl> + _select - > toggleAnimated ( mode ! = PeerListSearchMode : : None ) ; <nl> } <nl> } <nl> <nl> - void PeerListBox : : setSearchNoResultsText ( const QString & searchNoResultsText ) { <nl> - if ( searchNoResultsText . isEmpty ( ) ) { <nl> - setSearchNoResults ( nullptr ) ; <nl> - } else { <nl> - setSearchNoResults ( object_ptr < Ui : : FlatLabel > ( this , searchNoResultsText , Ui : : FlatLabel : : InitType : : Simple , st : : membersAbout ) ) ; <nl> + void PeerListBox : : peerListSortRows ( base : : lambda < bool ( PeerListRow & a , PeerListRow & b ) > compare ) { <nl> + _inner - > reorderRows ( [ compare = std : : move ( compare ) ] ( auto & & begin , auto & & end ) { <nl> + std : : sort ( begin , end , [ & compare ] ( auto & & a , auto & & b ) { <nl> + return compare ( * a , * b ) ; <nl> + } ) ; <nl> + } ) ; <nl> + } <nl> + <nl> + void PeerListBox : : peerListPartitionRows ( base : : lambda < bool ( PeerListRow & a ) > border ) { <nl> + _inner - > reorderRows ( [ border = std : : move ( border ) ] ( auto & & begin , auto & & end ) { <nl> + std : : stable_partition ( begin , end , [ & border ] ( auto & & current ) { <nl> + return border ( * current ) ; <nl> + } ) ; <nl> + } ) ; <nl> + } <nl> + <nl> + PeerListController : : PeerListController ( std : : unique_ptr < PeerListSearchController > searchController ) : _searchController ( std : : move ( searchController ) ) { <nl> + if ( _searchController ) { <nl> + _searchController - > setDelegate ( this ) ; <nl> } <nl> } <nl> <nl> - void PeerListBox : : setSearchNoResults ( object_ptr < Ui : : FlatLabel > searchNoResults ) { <nl> - _inner - > setSearchNoResults ( std : : move ( searchNoResults ) ) ; <nl> + void PeerListController : : search ( const QString & query ) { <nl> + Expects ( _searchController ! = nullptr ) ; <nl> + _searchController - > searchQuery ( query ) ; <nl> } <nl> <nl> - void PeerListBox : : setSearchLoadingText ( const QString & searchLoadingText ) { <nl> - if ( searchLoadingText . isEmpty ( ) ) { <nl> - setSearchLoading ( nullptr ) ; <nl> + void PeerListController : : peerListSearchAddRow ( gsl : : not_null < PeerData * > peer ) { <nl> + if ( auto row = delegate ( ) - > peerListFindRow ( peer - > id ) ) { <nl> + t_assert ( row - > id ( ) = = row - > peer ( ) - > id ) ; <nl> + delegate ( ) - > peerListAppendFoundRow ( row ) ; <nl> + } else if ( auto row = createSearchRow ( peer ) ) { <nl> + t_assert ( row - > id ( ) = = row - > peer ( ) - > id ) ; <nl> + delegate ( ) - > peerListAppendSearchRow ( std : : move ( row ) ) ; <nl> + } <nl> + } <nl> + <nl> + void PeerListController : : peerListSearchRefreshRows ( ) { <nl> + delegate ( ) - > peerListRefreshRows ( ) ; <nl> + } <nl> + <nl> + void PeerListController : : setDescriptionText ( const QString & text ) { <nl> + if ( text . isEmpty ( ) ) { <nl> + setDescription ( nullptr ) ; <nl> } else { <nl> - setSearchLoading ( object_ptr < Ui : : FlatLabel > ( this , searchLoadingText , Ui : : FlatLabel : : InitType : : Simple , st : : membersAbout ) ) ; <nl> + setDescription ( object_ptr < Ui : : FlatLabel > ( nullptr , text , Ui : : FlatLabel : : InitType : : Simple , st : : membersAbout ) ) ; <nl> } <nl> } <nl> <nl> - void PeerListBox : : setSearchLoading ( object_ptr < Ui : : FlatLabel > searchLoading ) { <nl> - _inner - > setSearchLoading ( std : : move ( searchLoading ) ) ; <nl> + void PeerListController : : setSearchLoadingText ( const QString & text ) { <nl> + if ( text . isEmpty ( ) ) { <nl> + setSearchLoading ( nullptr ) ; <nl> + } else { <nl> + setSearchLoading ( object_ptr < Ui : : FlatLabel > ( nullptr , text , Ui : : FlatLabel : : InitType : : Simple , st : : membersAbout ) ) ; <nl> + } <nl> } <nl> <nl> - QVector < PeerData * > PeerListBox : : collectSelectedRows ( ) const { <nl> - Expects ( _select ! = nullptr ) ; <nl> - auto result = QVector < PeerData * > ( ) ; <nl> - auto items = _select - > entity ( ) - > getItems ( ) ; <nl> - if ( ! items . empty ( ) ) { <nl> - result . reserve ( items . size ( ) ) ; <nl> - for_const ( auto itemId , items ) { <nl> - result . push_back ( App : : peer ( itemId ) ) ; <nl> - } <nl> + void PeerListController : : setSearchNoResultsText ( const QString & text ) { <nl> + if ( text . isEmpty ( ) ) { <nl> + setSearchNoResults ( nullptr ) ; <nl> + } else { <nl> + setSearchNoResults ( object_ptr < Ui : : FlatLabel > ( nullptr , text , Ui : : FlatLabel : : InitType : : Simple , st : : membersAbout ) ) ; <nl> } <nl> - return result ; <nl> } <nl> <nl> - void PeerListBox : : addSelectItem ( PeerData * peer , Row : : SetStyle style ) { <nl> + void PeerListBox : : addSelectItem ( gsl : : not_null < PeerData * > peer , PeerListRow : : SetStyle style ) { <nl> Expects ( _select ! = nullptr ) ; <nl> - if ( style = = Row : : SetStyle : : Fast ) { <nl> + if ( style = = PeerListRow : : SetStyle : : Fast ) { <nl> _select - > entity ( ) - > addItemInBunch ( peer - > id , peer - > shortName ( ) , st : : activeButtonBg , PaintUserpicCallback ( peer ) ) ; <nl> } else { <nl> _select - > entity ( ) - > addItem ( peer - > id , peer - > shortName ( ) , st : : activeButtonBg , PaintUserpicCallback ( peer ) , Ui : : MultiSelect : : AddItemWay : : Default ) ; <nl> } <nl> } <nl> <nl> - void PeerListBox : : finishSelectItemsBunch ( ) { <nl> + void PeerListBox : : peerListFinishSelectedRowsBunch ( ) { <nl> Expects ( _select ! = nullptr ) ; <nl> _select - > entity ( ) - > finishItemsBunch ( ) ; <nl> } <nl> <nl> - bool PeerListBox : : isRowSelected ( PeerData * peer ) const { <nl> + bool PeerListBox : : peerListIsRowSelected ( gsl : : not_null < PeerData * > peer ) { <nl> Expects ( _select ! = nullptr ) ; <nl> return _select - > entity ( ) - > hasItem ( peer - > id ) ; <nl> } <nl> <nl> - PeerListBox : : Row : : Row ( PeerData * peer ) : Row ( peer , peer - > id ) { <nl> + std : : vector < gsl : : not_null < PeerData * > > PeerListBox : : peerListCollectSelectedRows ( ) <nl> + { <nl> + Expects ( _select ! = nullptr ) ; <nl> + auto result = std : : vector < gsl : : not_null < PeerData * > > ( ) ; <nl> + auto items = _select - > entity ( ) - > getItems ( ) ; <nl> + if ( ! items . empty ( ) ) { <nl> + result . reserve ( items . size ( ) ) ; <nl> + for_const ( auto itemId , items ) { <nl> + result . push_back ( App : : peer ( itemId ) ) ; <nl> + } <nl> + } <nl> + return result ; <nl> } <nl> <nl> - PeerListBox : : Row : : Row ( PeerData * peer , RowId id ) : _id ( id ) , _peer ( peer ) { <nl> + PeerListRow : : PeerListRow ( gsl : : not_null < PeerData * > peer ) : PeerListRow ( peer , peer - > id ) { <nl> } <nl> <nl> - bool PeerListBox : : Row : : checked ( ) const { <nl> + PeerListRow : : PeerListRow ( gsl : : not_null < PeerData * > peer , PeerListRowId id ) : _id ( id ) , _peer ( peer ) { <nl> + } <nl> + <nl> + bool PeerListRow : : checked ( ) const { <nl> return _checkbox & & _checkbox - > checked ( ) ; <nl> } <nl> <nl> - void PeerListBox : : Row : : setCustomStatus ( const QString & status ) { <nl> + void PeerListRow : : setCustomStatus ( const QString & status ) { <nl> _status = status ; <nl> _statusType = StatusType : : Custom ; <nl> } <nl> <nl> - void PeerListBox : : Row : : clearCustomStatus ( ) { <nl> + void PeerListRow : : clearCustomStatus ( ) { <nl> _statusType = StatusType : : Online ; <nl> refreshStatus ( ) ; <nl> } <nl> <nl> - void PeerListBox : : Row : : refreshStatus ( ) { <nl> + void PeerListRow : : refreshStatus ( ) { <nl> if ( ! _initialized | | _statusType = = StatusType : : Custom ) { <nl> return ; <nl> } <nl> void PeerListBox : : Row : : refreshStatus ( ) { <nl> } <nl> } <nl> <nl> - void PeerListBox : : Row : : refreshName ( ) { <nl> + void PeerListRow : : refreshName ( ) { <nl> if ( ! _initialized ) { <nl> return ; <nl> } <nl> _name . setText ( st : : contactsNameStyle , peer ( ) - > name , _textNameOptions ) ; <nl> } <nl> <nl> - PeerListBox : : Row : : ~ Row ( ) = default ; <nl> + PeerListRow : : ~ PeerListRow ( ) = default ; <nl> <nl> - void PeerListBox : : Row : : invalidatePixmapsCache ( ) { <nl> + void PeerListRow : : invalidatePixmapsCache ( ) { <nl> if ( _checkbox ) { <nl> _checkbox - > invalidateCache ( ) ; <nl> } <nl> } <nl> <nl> - void PeerListBox : : Row : : paintStatusText ( Painter & p , int x , int y , int outerWidth , bool selected ) { <nl> - auto statusHasOnlineColor = ( _statusType = = Row : : StatusType : : Online ) ; <nl> + void PeerListRow : : paintStatusText ( Painter & p , int x , int y , int outerWidth , bool selected ) { <nl> + auto statusHasOnlineColor = ( _statusType = = PeerListRow : : StatusType : : Online ) ; <nl> p . setPen ( statusHasOnlineColor ? st : : contactsStatusFgOnline : ( selected ? st : : contactsStatusFgOver : st : : contactsStatusFg ) ) ; <nl> p . drawTextLeft ( x , y , outerWidth , _status ) ; <nl> } <nl> <nl> template < typename UpdateCallback > <nl> - void PeerListBox : : Row : : addRipple ( QSize size , QPoint point , UpdateCallback updateCallback ) { <nl> + void PeerListRow : : addRipple ( QSize size , QPoint point , UpdateCallback updateCallback ) { <nl> if ( ! _ripple ) { <nl> auto mask = Ui : : RippleAnimation : : rectMask ( size ) ; <nl> _ripple = std : : make_unique < Ui : : RippleAnimation > ( st : : contactsRipple , std : : move ( mask ) , std : : move ( updateCallback ) ) ; <nl> void PeerListBox : : Row : : addRipple ( QSize size , QPoint point , UpdateCallback update <nl> _ripple - > add ( point ) ; <nl> } <nl> <nl> - void PeerListBox : : Row : : stopLastRipple ( ) { <nl> + void PeerListRow : : stopLastRipple ( ) { <nl> if ( _ripple ) { <nl> _ripple - > lastStop ( ) ; <nl> } <nl> } <nl> <nl> - void PeerListBox : : Row : : paintRipple ( Painter & p , TimeMs ms , int x , int y , int outerWidth ) { <nl> + void PeerListRow : : paintRipple ( Painter & p , TimeMs ms , int x , int y , int outerWidth ) { <nl> if ( _ripple ) { <nl> _ripple - > paint ( p , x , y , outerWidth , ms ) ; <nl> if ( _ripple - > empty ( ) ) { <nl> void PeerListBox : : Row : : paintRipple ( Painter & p , TimeMs ms , int x , int y , int oute <nl> } <nl> } <nl> <nl> - void PeerListBox : : Row : : paintUserpic ( Painter & p , TimeMs ms , int x , int y , int outerWidth ) { <nl> + void PeerListRow : : paintUserpic ( Painter & p , TimeMs ms , int x , int y , int outerWidth ) { <nl> if ( _checkbox ) { <nl> if ( disabled ( ) & & checked ( ) ) { <nl> paintDisabledCheckUserpic ( p , x , y , outerWidth ) ; <nl> void PeerListBox : : Row : : paintUserpic ( Painter & p , TimeMs ms , int x , int y , int out <nl> } <nl> <nl> / / Emulates Ui : : RoundImageCheckbox : : paint ( ) in a checked state . <nl> - void PeerListBox : : Row : : paintDisabledCheckUserpic ( Painter & p , int x , int y , int outerWidth ) const { <nl> + void PeerListRow : : paintDisabledCheckUserpic ( Painter & p , int x , int y , int outerWidth ) const { <nl> auto userpicRadius = st : : contactsPhotoCheckbox . imageSmallRadius ; <nl> auto userpicShift = st : : contactsPhotoCheckbox . imageRadius - userpicRadius ; <nl> auto userpicDiameter = st : : contactsPhotoCheckbox . imageRadius * 2 ; <nl> void PeerListBox : : Row : : paintDisabledCheckUserpic ( Painter & p , int x , int y , int o <nl> st : : contactsPhotoCheckbox . check . check . paint ( p , iconEllipse . topLeft ( ) , outerWidth ) ; <nl> } <nl> <nl> - float64 PeerListBox : : Row : : checkedRatio ( ) { <nl> + float64 PeerListRow : : checkedRatio ( ) { <nl> return _checkbox ? _checkbox - > checkedAnimationRatio ( ) : 0 . ; <nl> } <nl> <nl> - void PeerListBox : : Row : : lazyInitialize ( ) { <nl> + void PeerListRow : : lazyInitialize ( ) { <nl> if ( _initialized ) { <nl> return ; <nl> } <nl> void PeerListBox : : Row : : lazyInitialize ( ) { <nl> refreshStatus ( ) ; <nl> } <nl> <nl> - void PeerListBox : : Row : : createCheckbox ( base : : lambda < void ( ) > updateCallback ) { <nl> + void PeerListRow : : createCheckbox ( base : : lambda < void ( ) > updateCallback ) { <nl> _checkbox = std : : make_unique < Ui : : RoundImageCheckbox > ( st : : contactsPhotoCheckbox , std : : move ( updateCallback ) , PaintUserpicCallback ( _peer ) ) ; <nl> } <nl> <nl> - void PeerListBox : : Row : : setCheckedInternal ( bool checked , SetStyle style ) { <nl> + void PeerListRow : : setCheckedInternal ( bool checked , SetStyle style ) { <nl> Expects ( _checkbox ! = nullptr ) ; <nl> using CheckboxStyle = Ui : : RoundCheckbox : : SetStyle ; <nl> auto speed = ( style = = SetStyle : : Animated ) ? CheckboxStyle : : Animated : CheckboxStyle : : Fast ; <nl> _checkbox - > setChecked ( checked , speed ) ; <nl> } <nl> <nl> - PeerListBox : : Inner : : Inner ( QWidget * parent , Controller * controller ) : TWidget ( parent ) <nl> + PeerListBox : : Inner : : Inner ( QWidget * parent , gsl : : not_null < PeerListController * > controller ) : TWidget ( parent ) <nl> , _controller ( controller ) <nl> , _rowHeight ( st : : contactsPadding . top ( ) + st : : contactsPhotoSize + st : : contactsPadding . bottom ( ) ) { <nl> subscribe ( AuthSession : : CurrentDownloaderTaskFinished ( ) , [ this ] { update ( ) ; } ) ; <nl> PeerListBox : : Inner : : Inner ( QWidget * parent , Controller * controller ) : TWidget ( par <nl> } ) ; <nl> } <nl> <nl> - void PeerListBox : : Inner : : appendRow ( std : : unique_ptr < Row > row ) { <nl> + void PeerListBox : : Inner : : appendRow ( std : : unique_ptr < PeerListRow > row ) { <nl> + Expects ( row ! = nullptr ) ; <nl> if ( _rowsById . find ( row - > id ( ) ) = = _rowsById . cend ( ) ) { <nl> row - > setAbsoluteIndex ( _rows . size ( ) ) ; <nl> addRowEntry ( row . get ( ) ) ; <nl> void PeerListBox : : Inner : : appendRow ( std : : unique_ptr < Row > row ) { <nl> } <nl> } <nl> <nl> - void PeerListBox : : Inner : : appendGlobalSearchRow ( std : : unique_ptr < Row > row ) { <nl> + void PeerListBox : : Inner : : appendSearchRow ( std : : unique_ptr < PeerListRow > row ) { <nl> + Expects ( row ! = nullptr ) ; <nl> Expects ( showingSearch ( ) ) ; <nl> if ( _rowsById . find ( row - > id ( ) ) = = _rowsById . cend ( ) ) { <nl> - row - > setAbsoluteIndex ( _globalSearchRows . size ( ) ) ; <nl> - row - > setIsGlobalSearchResult ( true ) ; <nl> + row - > setAbsoluteIndex ( _searchRows . size ( ) ) ; <nl> + row - > setIsSearchResult ( true ) ; <nl> addRowEntry ( row . get ( ) ) ; <nl> _filterResults . push_back ( row . get ( ) ) ; <nl> - _globalSearchRows . push_back ( std : : move ( row ) ) ; <nl> + _searchRows . push_back ( std : : move ( row ) ) ; <nl> } <nl> } <nl> <nl> - void PeerListBox : : Inner : : changeCheckState ( Row * row , bool checked , Row : : SetStyle style ) { <nl> + void PeerListBox : : Inner : : appendFoundRow ( gsl : : not_null < PeerListRow * > row ) { <nl> + Expects ( showingSearch ( ) ) ; <nl> + auto index = findRowIndex ( row ) ; <nl> + if ( index . value < 0 ) { <nl> + _filterResults . push_back ( row ) ; <nl> + } <nl> + } <nl> + <nl> + void PeerListBox : : Inner : : changeCheckState ( gsl : : not_null < PeerListRow * > row , bool checked , PeerListRow : : SetStyle style ) { <nl> row - > setChecked ( checked , style , [ this , row ] { <nl> updateRow ( row ) ; <nl> } ) ; <nl> } <nl> <nl> - void PeerListBox : : Inner : : addRowEntry ( Row * row ) { <nl> + void PeerListBox : : Inner : : addRowEntry ( gsl : : not_null < PeerListRow * > row ) { <nl> _rowsById . emplace ( row - > id ( ) , row ) ; <nl> _rowsByPeer [ row - > peer ( ) ] . push_back ( row ) ; <nl> if ( addingToSearchIndex ( ) ) { <nl> addToSearchIndex ( row ) ; <nl> } <nl> - if ( _searchMode ! = SearchMode : : None ) { <nl> + if ( _searchMode ! = PeerListSearchMode : : None ) { <nl> t_assert ( row - > id ( ) = = row - > peer ( ) - > id ) ; <nl> - if ( _controller - > view ( ) - > isRowSelected ( row - > peer ( ) ) ) { <nl> - changeCheckState ( row , true , Row : : SetStyle : : Fast ) ; <nl> + if ( _controller - > isRowSelected ( row - > peer ( ) ) ) { <nl> + changeCheckState ( row , true , PeerListRow : : SetStyle : : Fast ) ; <nl> } <nl> } <nl> } <nl> void PeerListBox : : Inner : : invalidatePixmapsCache ( ) { <nl> for_const ( auto & row , _rows ) { <nl> row - > invalidatePixmapsCache ( ) ; <nl> } <nl> - for_const ( auto & row , _globalSearchRows ) { <nl> + for_const ( auto & row , _searchRows ) { <nl> row - > invalidatePixmapsCache ( ) ; <nl> } <nl> } <nl> <nl> bool PeerListBox : : Inner : : addingToSearchIndex ( ) const { <nl> / / If we started indexing already , we continue . <nl> - return ( _searchMode ! = SearchMode : : None ) | | ! _searchIndex . empty ( ) ; <nl> + return ( _searchMode ! = PeerListSearchMode : : None ) | | ! _searchIndex . empty ( ) ; <nl> } <nl> <nl> - void PeerListBox : : Inner : : addToSearchIndex ( Row * row ) { <nl> - if ( row - > isGlobalSearchResult ( ) ) { <nl> + void PeerListBox : : Inner : : addToSearchIndex ( gsl : : not_null < PeerListRow * > row ) { <nl> + if ( row - > isSearchResult ( ) ) { <nl> return ; <nl> } <nl> <nl> void PeerListBox : : Inner : : addToSearchIndex ( Row * row ) { <nl> } <nl> } <nl> <nl> - void PeerListBox : : Inner : : removeFromSearchIndex ( Row * row ) { <nl> + void PeerListBox : : Inner : : removeFromSearchIndex ( gsl : : not_null < PeerListRow * > row ) { <nl> auto & nameFirstChars = row - > nameFirstChars ( ) ; <nl> if ( ! nameFirstChars . empty ( ) ) { <nl> for_const ( auto ch , row - > nameFirstChars ( ) ) { <nl> void PeerListBox : : Inner : : removeFromSearchIndex ( Row * row ) { <nl> } <nl> } <nl> <nl> - void PeerListBox : : Inner : : prependRow ( std : : unique_ptr < Row > row ) { <nl> + void PeerListBox : : Inner : : prependRow ( std : : unique_ptr < PeerListRow > row ) { <nl> + Expects ( row ! = nullptr ) ; <nl> if ( _rowsById . find ( row - > id ( ) ) = = _rowsById . cend ( ) ) { <nl> addRowEntry ( row . get ( ) ) ; <nl> _rows . insert ( _rows . begin ( ) , std : : move ( row ) ) ; <nl> void PeerListBox : : Inner : : refreshIndices ( ) { <nl> } <nl> } <nl> <nl> - PeerListBox : : Row * PeerListBox : : Inner : : findRow ( RowId id ) { <nl> + PeerListRow * PeerListBox : : Inner : : findRow ( PeerListRowId id ) { <nl> auto it = _rowsById . find ( id ) ; <nl> - return ( it = = _rowsById . cend ( ) ) ? nullptr : it - > second ; <nl> + return ( it = = _rowsById . cend ( ) ) ? nullptr : it - > second . get ( ) ; <nl> } <nl> <nl> - void PeerListBox : : Inner : : removeRow ( Row * row ) { <nl> + void PeerListBox : : Inner : : removeRow ( gsl : : not_null < PeerListRow * > row ) { <nl> auto index = row - > absoluteIndex ( ) ; <nl> - auto isGlobalSearchResult = row - > isGlobalSearchResult ( ) ; <nl> - auto & eraseFrom = isGlobalSearchResult ? _globalSearchRows : _rows ; <nl> + auto isGlobalSearchResult = row - > isSearchResult ( ) ; <nl> + auto & eraseFrom = isGlobalSearchResult ? _searchRows : _rows ; <nl> <nl> t_assert ( index > = 0 & & index < eraseFrom . size ( ) ) ; <nl> t_assert ( eraseFrom [ index ] . get ( ) = = row ) ; <nl> int PeerListBox : : Inner : : fullRowsCount ( ) const { <nl> return _rows . size ( ) ; <nl> } <nl> <nl> - PeerListBox : : Row * PeerListBox : : Inner : : rowAt ( int index ) const { <nl> + gsl : : not_null < PeerListRow * > PeerListBox : : Inner : : rowAt ( int index ) const { <nl> Expects ( index > = 0 & & index < _rows . size ( ) ) ; <nl> return _rows [ index ] . get ( ) ; <nl> } <nl> <nl> - void PeerListBox : : Inner : : setAbout ( object_ptr < Ui : : FlatLabel > about ) { <nl> - _about = std : : move ( about ) ; <nl> - if ( _about ) { <nl> - _about - > setParent ( this ) ; <nl> + void PeerListBox : : Inner : : setDescription ( object_ptr < Ui : : FlatLabel > description ) { <nl> + _description = std : : move ( description ) ; <nl> + if ( _description ) { <nl> + _description - > setParent ( this ) ; <nl> + } <nl> + } <nl> + <nl> + void PeerListBox : : Inner : : setSearchLoading ( object_ptr < Ui : : FlatLabel > loading ) { <nl> + _searchLoading = std : : move ( loading ) ; <nl> + if ( _searchLoading ) { <nl> + _searchLoading - > setParent ( this ) ; <nl> + } <nl> + } <nl> + <nl> + void PeerListBox : : Inner : : setSearchNoResults ( object_ptr < Ui : : FlatLabel > noResults ) { <nl> + _searchNoResults = std : : move ( noResults ) ; <nl> + if ( _searchNoResults ) { <nl> + _searchNoResults - > setParent ( this ) ; <nl> } <nl> } <nl> <nl> int PeerListBox : : Inner : : labelHeight ( ) const { <nl> if ( ! _filterResults . empty ( ) ) { <nl> return 0 ; <nl> } <nl> - if ( globalSearchLoading ( ) ) { <nl> + if ( _controller - > isSearchLoading ( ) ) { <nl> return computeLabelHeight ( _searchLoading ) ; <nl> } <nl> return computeLabelHeight ( _searchNoResults ) ; <nl> } <nl> - return computeLabelHeight ( _about ) ; <nl> + return computeLabelHeight ( _description ) ; <nl> } <nl> <nl> void PeerListBox : : Inner : : refreshRows ( ) { <nl> auto labelTop = st : : membersMarginTop + qMax ( 1 , shownRowsCount ( ) ) * _rowHeight ; <nl> resize ( width ( ) , labelTop + labelHeight ( ) + st : : membersMarginBottom ) ; <nl> - if ( _about ) { <nl> - _about - > moveToLeft ( st : : contactsPadding . left ( ) , labelTop + st : : membersAboutLimitPadding . top ( ) ) ; <nl> - _about - > setVisible ( ! showingSearch ( ) ) ; <nl> + if ( _description ) { <nl> + _description - > moveToLeft ( st : : contactsPadding . left ( ) , labelTop + st : : membersAboutLimitPadding . top ( ) ) ; <nl> + _description - > setVisible ( ! showingSearch ( ) ) ; <nl> } <nl> if ( _searchNoResults ) { <nl> _searchNoResults - > moveToLeft ( st : : contactsPadding . left ( ) , labelTop + st : : membersAboutLimitPadding . top ( ) ) ; <nl> - _searchNoResults - > setVisible ( showingSearch ( ) & & _filterResults . empty ( ) & & ! globalSearchLoading ( ) ) ; <nl> + _searchNoResults - > setVisible ( showingSearch ( ) & & _filterResults . empty ( ) & & ! _controller - > isSearchLoading ( ) ) ; <nl> } <nl> if ( _searchLoading ) { <nl> _searchLoading - > moveToLeft ( st : : contactsPadding . left ( ) , labelTop + st : : membersAboutLimitPadding . top ( ) ) ; <nl> - _searchLoading - > setVisible ( showingSearch ( ) & & _filterResults . empty ( ) & & globalSearchLoading ( ) ) ; <nl> + _searchLoading - > setVisible ( showingSearch ( ) & & _filterResults . empty ( ) & & _controller - > isSearchLoading ( ) ) ; <nl> } <nl> if ( _visibleBottom > 0 ) { <nl> checkScrollForPreload ( ) ; <nl> } <nl> + updateSelection ( ) ; <nl> update ( ) ; <nl> } <nl> <nl> - void PeerListBox : : Inner : : setSearchMode ( SearchMode mode ) { <nl> + void PeerListBox : : Inner : : setSearchMode ( PeerListSearchMode mode ) { <nl> if ( _searchMode ! = mode ) { <nl> if ( ! addingToSearchIndex ( ) ) { <nl> for_const ( auto & row , _rows ) { <nl> void PeerListBox : : Inner : : setSearchMode ( SearchMode mode ) { <nl> } <nl> } <nl> _searchMode = mode ; <nl> - if ( _searchMode = = SearchMode : : Global ) { <nl> + if ( _searchMode = = PeerListSearchMode : : Complex ) { <nl> if ( ! _searchLoading ) { <nl> setSearchLoading ( object_ptr < Ui : : FlatLabel > ( this , lang ( lng_contacts_loading ) , Ui : : FlatLabel : : InitType : : Simple , st : : membersAbout ) ) ; <nl> } <nl> } else { <nl> - clearGlobalSearchRows ( ) ; <nl> + clearSearchRows ( ) ; <nl> } <nl> } <nl> } <nl> <nl> - void PeerListBox : : Inner : : clearGlobalSearchRows ( ) { <nl> - while ( ! _globalSearchRows . empty ( ) ) { <nl> - removeRow ( _globalSearchRows . back ( ) . get ( ) ) ; <nl> - } <nl> - } <nl> - <nl> - void PeerListBox : : Inner : : setSearchNoResults ( object_ptr < Ui : : FlatLabel > searchNoResults ) { <nl> - _searchNoResults = std : : move ( searchNoResults ) ; <nl> - if ( _searchNoResults ) { <nl> - _searchNoResults - > setParent ( this ) ; <nl> - } <nl> - } <nl> - <nl> - void PeerListBox : : Inner : : setSearchLoading ( object_ptr < Ui : : FlatLabel > searchLoading ) { <nl> - _searchLoading = std : : move ( searchLoading ) ; <nl> - if ( _searchLoading ) { <nl> - _searchLoading - > setParent ( this ) ; <nl> + void PeerListBox : : Inner : : clearSearchRows ( ) { <nl> + while ( ! _searchRows . empty ( ) ) { <nl> + removeRow ( _searchRows . back ( ) . get ( ) ) ; <nl> } <nl> } <nl> <nl> void PeerListBox : : Inner : : paintRow ( Painter & p , TimeMs ms , RowIndex index ) { <nl> } <nl> <nl> p . setFont ( st : : contactsStatusFont ) ; <nl> - if ( row - > isGlobalSearchResult ( ) & & ! peer - > userName ( ) . isEmpty ( ) ) { <nl> + if ( row - > isSearchResult ( ) & & ! peer - > userName ( ) . isEmpty ( ) ) { <nl> auto username = peer - > userName ( ) ; <nl> - if ( ! _globalSearchHighlight . isEmpty ( ) & & username . startsWith ( _globalSearchHighlight , Qt : : CaseInsensitive ) ) { <nl> + auto mentionHighlight = _searchQuery ; <nl> + if ( mentionHighlight . startsWith ( ' @ ' ) ) { <nl> + mentionHighlight = mentionHighlight . mid ( 1 ) ; <nl> + } <nl> + if ( ! mentionHighlight . isEmpty ( ) & & username . startsWith ( mentionHighlight , Qt : : CaseInsensitive ) ) { <nl> auto availableWidth = width ( ) - namex - st : : contactsPadding . right ( ) ; <nl> - auto highlightedPart = ' @ ' + username . mid ( 0 , _globalSearchHighlight . size ( ) ) ; <nl> - auto grayedPart = username . mid ( _globalSearchHighlight . size ( ) ) ; <nl> + auto highlightedPart = ' @ ' + username . mid ( 0 , mentionHighlight . size ( ) ) ; <nl> + auto grayedPart = username . mid ( mentionHighlight . size ( ) ) ; <nl> auto highlightedWidth = st : : contactsStatusFont - > width ( highlightedPart ) ; <nl> if ( highlightedWidth > = availableWidth | | grayedPart . isEmpty ( ) ) { <nl> if ( highlightedWidth > availableWidth ) { <nl> void PeerListBox : : Inner : : selectSkip ( int direction ) { <nl> auto rowsCount = shownRowsCount ( ) ; <nl> auto index = 0 ; <nl> auto firstEnabled = - 1 , lastEnabled = - 1 ; <nl> - enumerateShownRows ( [ & firstEnabled , & lastEnabled , & index ] ( Row * row ) { <nl> + enumerateShownRows ( [ & firstEnabled , & lastEnabled , & index ] ( gsl : : not_null < PeerListRow * > row ) { <nl> if ( ! row - > disabled ( ) ) { <nl> if ( firstEnabled < 0 ) { <nl> firstEnabled = index ; <nl> void PeerListBox : : Inner : : searchQueryChanged ( QString query ) { <nl> <nl> _searchQuery = query ; <nl> _filterResults . clear ( ) ; <nl> - clearGlobalSearchRows ( ) ; <nl> - if ( ! searchWordsList . isEmpty ( ) ) { <nl> - auto minimalList = ( const std : : vector < Row * > * ) nullptr ; <nl> + clearSearchRows ( ) ; <nl> + if ( _controller - > searchInLocal ( ) & & ! searchWordsList . isEmpty ( ) ) { <nl> + auto minimalList = ( const std : : vector < gsl : : not_null < PeerListRow * > > * ) nullptr ; <nl> for_const ( auto & searchWord , searchWordsList ) { <nl> auto searchWordStart = searchWord [ 0 ] . toLower ( ) ; <nl> auto it = _searchIndex . find ( searchWordStart ) ; <nl> void PeerListBox : : Inner : : searchQueryChanged ( QString query ) { <nl> } <nl> } <nl> } <nl> - if ( _searchMode = = SearchMode : : Global ) { <nl> - _globalSearchRequestId = 0 ; <nl> - needGlobalSearch ( ) ; <nl> + if ( _searchMode = = PeerListSearchMode : : Complex ) { <nl> + _controller - > search ( _searchQuery ) ; <nl> } <nl> refreshRows ( ) ; <nl> restoreSelection ( ) ; <nl> } <nl> } <nl> <nl> - void PeerListBox : : Inner : : needGlobalSearch ( ) { <nl> - if ( ! globalSearchInCache ( ) ) { <nl> - if ( ! _globalSearchTimer ) { <nl> - _globalSearchTimer = object_ptr < SingleTimer > ( this ) ; <nl> - _globalSearchTimer - > setTimeoutHandler ( [ this ] { globalSearchOnServer ( ) ; } ) ; <nl> - } <nl> - _globalSearchTimer - > start ( AutoSearchTimeout ) ; <nl> - } <nl> - } <nl> - <nl> - bool PeerListBox : : Inner : : globalSearchInCache ( ) { <nl> - auto it = _globalSearchCache . find ( _searchQuery ) ; <nl> - if ( it ! = _globalSearchCache . cend ( ) ) { <nl> - _globalSearchQuery = _searchQuery ; <nl> - _globalSearchRequestId = 0 ; <nl> - globalSearchDone ( it - > second , _globalSearchRequestId ) ; <nl> - return true ; <nl> - } <nl> - return false ; <nl> - } <nl> - <nl> - void PeerListBox : : Inner : : globalSearchOnServer ( ) { <nl> - _globalSearchQuery = _searchQuery ; <nl> - _globalSearchRequestId = request ( MTPcontacts_Search ( MTP_string ( _globalSearchQuery ) , MTP_int ( SearchPeopleLimit ) ) ) . done ( [ this ] ( const MTPcontacts_Found & result , mtpRequestId requestId ) { <nl> - globalSearchDone ( result , requestId ) ; <nl> - } ) . fail ( [ this ] ( const RPCError & error , mtpRequestId requestId ) { <nl> - if ( _globalSearchRequestId = = requestId ) { <nl> - _globalSearchRequestId = 0 ; <nl> - refreshRows ( ) ; <nl> - } <nl> - } ) . send ( ) ; <nl> - _globalSearchQueries . emplace ( _globalSearchRequestId , _globalSearchQuery ) ; <nl> - } <nl> - <nl> - void PeerListBox : : Inner : : globalSearchDone ( const MTPcontacts_Found & result , mtpRequestId requestId ) { <nl> - auto query = _globalSearchQuery ; <nl> - if ( requestId ) { <nl> - auto it = _globalSearchQueries . find ( requestId ) ; <nl> - if ( it ! = _globalSearchQueries . cend ( ) ) { <nl> - query = it - > second ; <nl> - _globalSearchCache [ query ] = result ; <nl> - _globalSearchQueries . erase ( it ) ; <nl> - } <nl> - } <nl> - if ( _globalSearchRequestId = = requestId ) { <nl> - _globalSearchRequestId = 0 ; <nl> - if ( result . type ( ) = = mtpc_contacts_found ) { <nl> - auto & contacts = result . c_contacts_found ( ) ; <nl> - App : : feedUsers ( contacts . vusers ) ; <nl> - App : : feedChats ( contacts . vchats ) ; <nl> - <nl> - _globalSearchHighlight = query ; <nl> - if ( ! _globalSearchHighlight . isEmpty ( ) & & _globalSearchHighlight [ 0 ] = = ' @ ' ) { <nl> - _globalSearchHighlight = _globalSearchHighlight . mid ( 1 ) ; <nl> - } <nl> - <nl> - for_const ( auto & mtpPeer , contacts . vresults . v ) { <nl> - if ( auto peer = App : : peerLoaded ( peerFromMTP ( mtpPeer ) ) ) { <nl> - if ( findRow ( peer - > id ) ) { <nl> - continue ; <nl> - } <nl> - if ( auto row = _controller - > createGlobalRow ( peer ) ) { <nl> - t_assert ( row - > id ( ) = = row - > peer ( ) - > id ) ; <nl> - appendGlobalSearchRow ( std : : move ( row ) ) ; <nl> - } <nl> - } <nl> - } <nl> - } <nl> - refreshRows ( ) ; <nl> - updateSelection ( ) ; <nl> - } <nl> - } <nl> - <nl> - bool PeerListBox : : Inner : : globalSearchLoading ( ) const { <nl> - return ( _globalSearchTimer & & _globalSearchTimer - > isActive ( ) ) | | _globalSearchRequestId ; <nl> - } <nl> - <nl> void PeerListBox : : Inner : : submitted ( ) { <nl> if ( auto row = getRow ( _selected . index ) ) { <nl> _controller - > rowClicked ( row ) ; <nl> void PeerListBox : : Inner : : updateSelection ( ) { <nl> setSelected ( selected ) ; <nl> } <nl> <nl> - QRect PeerListBox : : Inner : : getActionRect ( Row * row , RowIndex index ) const { <nl> + QRect PeerListBox : : Inner : : getActionRect ( gsl : : not_null < PeerListRow * > row , RowIndex index ) const { <nl> auto actionSize = row - > actionSize ( ) ; <nl> if ( actionSize . isEmpty ( ) ) { <nl> return QRect ( ) ; <nl> int PeerListBox : : Inner : : getRowTop ( RowIndex index ) const { <nl> return - 1 ; <nl> } <nl> <nl> - void PeerListBox : : Inner : : updateRow ( Row * row , RowIndex hint ) { <nl> + void PeerListBox : : Inner : : updateRow ( gsl : : not_null < PeerListRow * > row , RowIndex hint ) { <nl> updateRow ( findRowIndex ( row , hint ) ) ; <nl> } <nl> <nl> bool PeerListBox : : Inner : : enumerateShownRows ( int from , int to , Callback callback ) <nl> return true ; <nl> } <nl> <nl> - PeerListBox : : Row * PeerListBox : : Inner : : getRow ( RowIndex index ) { <nl> + PeerListRow * PeerListBox : : Inner : : getRow ( RowIndex index ) { <nl> if ( index . value > = 0 ) { <nl> if ( showingSearch ( ) ) { <nl> if ( index . value < _filterResults . size ( ) ) { <nl> PeerListBox : : Row * PeerListBox : : Inner : : getRow ( RowIndex index ) { <nl> return nullptr ; <nl> } <nl> <nl> - PeerListBox : : Inner : : RowIndex PeerListBox : : Inner : : findRowIndex ( Row * row , RowIndex hint ) { <nl> + PeerListBox : : Inner : : RowIndex PeerListBox : : Inner : : findRowIndex ( gsl : : not_null < PeerListRow * > row , RowIndex hint ) { <nl> if ( ! showingSearch ( ) ) { <nl> - t_assert ( ! row - > isGlobalSearchResult ( ) ) ; <nl> + t_assert ( ! row - > isSearchResult ( ) ) ; <nl> return RowIndex ( row - > absoluteIndex ( ) ) ; <nl> } <nl> <nl> void PeerListRowWithLink : : refreshActionLink ( ) { <nl> } <nl> <nl> void PeerListRowWithLink : : lazyInitialize ( ) { <nl> - Row : : lazyInitialize ( ) ; <nl> + PeerListRow : : lazyInitialize ( ) ; <nl> refreshActionLink ( ) ; <nl> } <nl> <nl> void PeerListRowWithLink : : paintAction ( Painter & p , TimeMs ms , int x , int y , int o <nl> p . drawTextLeft ( x , y , outerWidth , _action , _actionWidth ) ; <nl> } <nl> <nl> + PeerListGlobalSearchController : : PeerListGlobalSearchController ( ) { <nl> + _timer . setCallback ( [ this ] { searchOnServer ( ) ; } ) ; <nl> + } <nl> + <nl> + void PeerListGlobalSearchController : : searchQuery ( const QString & query ) { <nl> + _query = query ; <nl> + _requestId = 0 ; <nl> + if ( _query . isEmpty ( ) & & ! searchInCache ( ) ) { <nl> + _timer . callOnce ( AutoSearchTimeout ) ; <nl> + } else { <nl> + _timer . cancel ( ) ; <nl> + } <nl> + } <nl> + <nl> + bool PeerListGlobalSearchController : : searchInCache ( ) { <nl> + auto it = _cache . find ( _query ) ; <nl> + if ( it ! = _cache . cend ( ) ) { <nl> + _requestId = 0 ; <nl> + searchDone ( it - > second , _requestId ) ; <nl> + return true ; <nl> + } <nl> + return false ; <nl> + } <nl> + <nl> + void PeerListGlobalSearchController : : searchOnServer ( ) { <nl> + _requestId = request ( MTPcontacts_Search ( MTP_string ( _query ) , MTP_int ( SearchPeopleLimit ) ) ) . done ( [ this ] ( const MTPcontacts_Found & result , mtpRequestId requestId ) { <nl> + searchDone ( result , requestId ) ; <nl> + } ) . fail ( [ this ] ( const RPCError & error , mtpRequestId requestId ) { <nl> + if ( _requestId = = requestId ) { <nl> + _requestId = 0 ; <nl> + delegate ( ) - > peerListSearchRefreshRows ( ) ; <nl> + } <nl> + } ) . send ( ) ; <nl> + _queries . emplace ( _requestId , _query ) ; <nl> + } <nl> + <nl> + void PeerListGlobalSearchController : : searchDone ( const MTPcontacts_Found & result , mtpRequestId requestId ) { <nl> + Expects ( result . type ( ) = = mtpc_contacts_found ) ; <nl> + <nl> + auto & contacts = result . c_contacts_found ( ) ; <nl> + auto query = _query ; <nl> + if ( requestId ) { <nl> + App : : feedUsers ( contacts . vusers ) ; <nl> + App : : feedChats ( contacts . vchats ) ; <nl> + auto it = _queries . find ( requestId ) ; <nl> + if ( it ! = _queries . cend ( ) ) { <nl> + query = it - > second ; <nl> + _cache [ query ] = result ; <nl> + _queries . erase ( it ) ; <nl> + } <nl> + } <nl> + if ( _requestId = = requestId ) { <nl> + _requestId = 0 ; <nl> + for_const ( auto & mtpPeer , contacts . vresults . v ) { <nl> + if ( auto peer = App : : peerLoaded ( peerFromMTP ( mtpPeer ) ) ) { <nl> + delegate ( ) - > peerListSearchAddRow ( peer ) ; <nl> + } <nl> + } <nl> + delegate ( ) - > peerListSearchRefreshRows ( ) ; <nl> + } <nl> + } <nl> + <nl> + bool PeerListGlobalSearchController : : isLoading ( ) { <nl> + return _timer . isActive ( ) | | _requestId ; <nl> + } <nl> + <nl> + ChatsListBoxController : : ChatsListBoxController ( std : : unique_ptr < PeerListSearchController > searchController ) : PeerListController ( std : : move ( searchController ) ) { <nl> + } <nl> + <nl> void ChatsListBoxController : : prepare ( ) { <nl> - view ( ) - > setSearchNoResultsText ( lang ( lng_blocked_list_not_found ) ) ; <nl> - view ( ) - > setSearchMode ( PeerListBox : : SearchMode : : Global ) ; <nl> + setSearchNoResultsText ( lang ( lng_blocked_list_not_found ) ) ; <nl> + delegate ( ) - > peerListSetSearchMode ( PeerListSearchMode : : Complex ) ; <nl> <nl> prepareViewHook ( ) ; <nl> <nl> void ChatsListBoxController : : prepare ( ) { <nl> <nl> void ChatsListBoxController : : rebuildRows ( ) { <nl> auto ms = getms ( ) ; <nl> - auto wasEmpty = ! view ( ) - > fullRowsCount ( ) ; <nl> + auto wasEmpty = ! delegate ( ) - > peerListFullRowsCount ( ) ; <nl> auto appendList = [ this ] ( auto chats ) { <nl> auto count = 0 ; <nl> for_const ( auto row , chats - > all ( ) ) { <nl> void ChatsListBoxController : : rebuildRows ( ) { <nl> auto added = appendList ( App : : main ( ) - > dialogsList ( ) ) ; <nl> added + = appendList ( App : : main ( ) - > contactsNoDialogsList ( ) ) ; <nl> if ( ! wasEmpty & & added > 0 ) { <nl> - view ( ) - > reorderRows ( [ ] ( auto & & begin , auto & & end ) { <nl> - / / Place dialogs list before contactsNoDialogs list . <nl> - std : : stable_partition ( begin , end , [ ] ( auto & row ) { <nl> - auto history = static_cast < Row & > ( * row ) . history ( ) ; <nl> - return history - > inChatList ( Dialogs : : Mode : : All ) ; <nl> - } ) ; <nl> + / / Place dialogs list before contactsNoDialogs list . <nl> + delegate ( ) - > peerListPartitionRows ( [ ] ( PeerListRow & a ) { <nl> + auto history = static_cast < Row & > ( a ) . history ( ) ; <nl> + return history - > inChatList ( Dialogs : : Mode : : All ) ; <nl> } ) ; <nl> } <nl> checkForEmptyRows ( ) ; <nl> - view ( ) - > refreshRows ( ) ; <nl> + delegate ( ) - > peerListRefreshRows ( ) ; <nl> } <nl> <nl> void ChatsListBoxController : : checkForEmptyRows ( ) { <nl> - if ( view ( ) - > fullRowsCount ( ) ) { <nl> - view ( ) - > setAboutText ( QString ( ) ) ; <nl> + if ( delegate ( ) - > peerListFullRowsCount ( ) ) { <nl> + setDescriptionText ( QString ( ) ) ; <nl> } else { <nl> auto & sessionData = AuthSession : : Current ( ) . data ( ) ; <nl> auto loaded = sessionData . contactsLoaded ( ) . value ( ) & & sessionData . allChatsLoaded ( ) . value ( ) ; <nl> - view ( ) - > setAboutText ( lang ( loaded ? lng_contacts_not_found : lng_contacts_loading ) ) ; <nl> + setDescriptionText ( lang ( loaded ? lng_contacts_not_found : lng_contacts_loading ) ) ; <nl> } <nl> } <nl> <nl> - std : : unique_ptr < PeerListBox : : Row > ChatsListBoxController : : createGlobalRow ( PeerData * peer ) { <nl> + std : : unique_ptr < PeerListRow > ChatsListBoxController : : createSearchRow ( gsl : : not_null < PeerData * > peer ) { <nl> return createRow ( App : : history ( peer ) ) ; <nl> } <nl> <nl> bool ChatsListBoxController : : appendRow ( History * history ) { <nl> - if ( auto row = view ( ) - > findRow ( history - > peer - > id ) ) { <nl> + if ( auto row = delegate ( ) - > peerListFindRow ( history - > peer - > id ) ) { <nl> updateRowHook ( static_cast < Row * > ( row ) ) ; <nl> return false ; <nl> } <nl> if ( auto row = createRow ( history ) ) { <nl> - view ( ) - > appendRow ( std : : move ( row ) ) ; <nl> + delegate ( ) - > peerListAppendRow ( std : : move ( row ) ) ; <nl> return true ; <nl> } <nl> return false ; <nl> mmm a / Telegram / SourceFiles / boxes / peer_list_box . h <nl> ppp b / Telegram / SourceFiles / boxes / peer_list_box . h <nl> Copyright ( c ) 2014 - 2017 John Preston , https : / / desktop . telegram . org <nl> <nl> # include " boxes / abstract_box . h " <nl> # include " mtproto / sender . h " <nl> + # include " base / timer . h " <nl> <nl> namespace Ui { <nl> class RippleAnimation ; <nl> class WidgetSlideWrap ; <nl> class FlatLabel ; <nl> } / / namespace Ui <nl> <nl> - class PeerListBox : public BoxContent { <nl> - class Inner ; <nl> - <nl> + using PeerListRowId = uint64 ; <nl> + class PeerListRow { <nl> public : <nl> - using RowId = uint64 ; <nl> + PeerListRow ( gsl : : not_null < PeerData * > peer ) ; <nl> + PeerListRow ( gsl : : not_null < PeerData * > peer , PeerListRowId id ) ; <nl> <nl> - class Row { <nl> - public : <nl> - Row ( PeerData * peer ) ; <nl> - Row ( PeerData * peer , RowId id ) ; <nl> + void setDisabled ( bool disabled ) { <nl> + _disabled = disabled ; <nl> + } <nl> <nl> - void setDisabled ( bool disabled ) { <nl> - _disabled = disabled ; <nl> - } <nl> + / / Checked state is controlled by the box with multiselect , <nl> + / / not by the row itself , so there is no setChecked ( ) method . <nl> + / / We can query the checked state from row , but before it is <nl> + / / added to the box it is always false . <nl> + bool checked ( ) const ; <nl> <nl> - / / Checked state is controlled by the box with multiselect , <nl> - / / not by the row itself , so there is no setChecked ( ) method . <nl> - / / We can query the checked state from row , but before it is <nl> - / / added to the box it is always false . <nl> - bool checked ( ) const ; <nl> + gsl : : not_null < PeerData * > peer ( ) const { <nl> + return _peer ; <nl> + } <nl> + PeerListRowId id ( ) const { <nl> + return _id ; <nl> + } <nl> <nl> - PeerData * peer ( ) const { <nl> - return _peer ; <nl> - } <nl> - RowId id ( ) const { <nl> - return _id ; <nl> - } <nl> + void setCustomStatus ( const QString & status ) ; <nl> + void clearCustomStatus ( ) ; <nl> <nl> - void setCustomStatus ( const QString & status ) ; <nl> - void clearCustomStatus ( ) ; <nl> + virtual ~ PeerListRow ( ) ; <nl> <nl> - virtual ~ Row ( ) ; <nl> + / / Box interface . <nl> + virtual bool needsVerifiedIcon ( ) const { <nl> + return _peer - > isVerified ( ) ; <nl> + } <nl> + virtual QSize actionSize ( ) const { <nl> + return QSize ( ) ; <nl> + } <nl> + virtual QMargins actionMargins ( ) const { <nl> + return QMargins ( ) ; <nl> + } <nl> + virtual void addActionRipple ( QPoint point , base : : lambda < void ( ) > updateCallback ) { <nl> + } <nl> + virtual void stopLastActionRipple ( ) { <nl> + } <nl> + virtual void paintAction ( Painter & p , TimeMs ms , int x , int y , int outerWidth , bool actionSelected ) { <nl> + } <nl> <nl> - protected : <nl> - virtual void paintStatusText ( Painter & p , int x , int y , int outerWidth , bool selected ) ; <nl> + void refreshName ( ) ; <nl> + const Text & name ( ) const { <nl> + return _name ; <nl> + } <nl> <nl> - bool isInitialized ( ) const { <nl> - return _initialized ; <nl> - } <nl> - virtual void lazyInitialize ( ) ; <nl> + enum class StatusType { <nl> + Online , <nl> + LastSeen , <nl> + Custom , <nl> + } ; <nl> + void refreshStatus ( ) ; <nl> <nl> - private : <nl> - / / Inner interface . <nl> - friend class PeerListBox ; <nl> - friend class Inner ; <nl> + void setAbsoluteIndex ( int index ) { <nl> + _absoluteIndex = index ; <nl> + } <nl> + int absoluteIndex ( ) const { <nl> + return _absoluteIndex ; <nl> + } <nl> + bool disabled ( ) const { <nl> + return _disabled ; <nl> + } <nl> + bool isSearchResult ( ) const { <nl> + return _isSearchResult ; <nl> + } <nl> + void setIsSearchResult ( bool isSearchResult ) { <nl> + _isSearchResult = isSearchResult ; <nl> + } <nl> <nl> - virtual bool needsVerifiedIcon ( ) const { <nl> - return _peer - > isVerified ( ) ; <nl> - } <nl> - virtual QSize actionSize ( ) const { <nl> - return QSize ( ) ; <nl> - } <nl> - virtual QMargins actionMargins ( ) const { <nl> - return QMargins ( ) ; <nl> - } <nl> - virtual void addActionRipple ( QPoint point , base : : lambda < void ( ) > updateCallback ) { <nl> - } <nl> - virtual void stopLastActionRipple ( ) { <nl> - } <nl> - virtual void paintAction ( Painter & p , TimeMs ms , int x , int y , int outerWidth , bool actionSelected ) { <nl> + enum class SetStyle { <nl> + Animated , <nl> + Fast , <nl> + } ; <nl> + template < typename UpdateCallback > <nl> + void setChecked ( bool checked , SetStyle style , UpdateCallback callback ) { <nl> + if ( checked & & ! _checkbox ) { <nl> + createCheckbox ( std : : move ( callback ) ) ; <nl> } <nl> + setCheckedInternal ( checked , style ) ; <nl> + } <nl> + void invalidatePixmapsCache ( ) ; <nl> <nl> - void refreshName ( ) ; <nl> - const Text & name ( ) const { <nl> - return _name ; <nl> - } <nl> + template < typename UpdateCallback > <nl> + void addRipple ( QSize size , QPoint point , UpdateCallback updateCallback ) ; <nl> + void stopLastRipple ( ) ; <nl> + void paintRipple ( Painter & p , TimeMs ms , int x , int y , int outerWidth ) ; <nl> + void paintUserpic ( Painter & p , TimeMs ms , int x , int y , int outerWidth ) ; <nl> + float64 checkedRatio ( ) ; <nl> <nl> - enum class StatusType { <nl> - Online , <nl> - LastSeen , <nl> - Custom , <nl> - } ; <nl> - void refreshStatus ( ) ; <nl> + void setNameFirstChars ( const OrderedSet < QChar > & nameFirstChars ) { <nl> + _nameFirstChars = nameFirstChars ; <nl> + } <nl> + const OrderedSet < QChar > & nameFirstChars ( ) const { <nl> + return _nameFirstChars ; <nl> + } <nl> <nl> - void setAbsoluteIndex ( int index ) { <nl> - _absoluteIndex = index ; <nl> - } <nl> - int absoluteIndex ( ) const { <nl> - return _absoluteIndex ; <nl> - } <nl> - bool disabled ( ) const { <nl> - return _disabled ; <nl> - } <nl> - bool isGlobalSearchResult ( ) const { <nl> - return _isGlobalSearchResult ; <nl> - } <nl> - void setIsGlobalSearchResult ( bool isGlobalSearchResult ) { <nl> - _isGlobalSearchResult = isGlobalSearchResult ; <nl> - } <nl> + virtual void lazyInitialize ( ) ; <nl> + virtual void paintStatusText ( Painter & p , int x , int y , int outerWidth , bool selected ) ; <nl> <nl> - enum class SetStyle { <nl> - Animated , <nl> - Fast , <nl> - } ; <nl> - template < typename UpdateCallback > <nl> - void setChecked ( bool checked , SetStyle style , UpdateCallback callback ) { <nl> - if ( checked & & ! _checkbox ) { <nl> - createCheckbox ( std : : move ( callback ) ) ; <nl> - } <nl> - setCheckedInternal ( checked , style ) ; <nl> - } <nl> - void invalidatePixmapsCache ( ) ; <nl> + protected : <nl> + bool isInitialized ( ) const { <nl> + return _initialized ; <nl> + } <nl> <nl> - template < typename UpdateCallback > <nl> - void addRipple ( QSize size , QPoint point , UpdateCallback updateCallback ) ; <nl> - void stopLastRipple ( ) ; <nl> - void paintRipple ( Painter & p , TimeMs ms , int x , int y , int outerWidth ) ; <nl> - void paintUserpic ( Painter & p , TimeMs ms , int x , int y , int outerWidth ) ; <nl> - float64 checkedRatio ( ) ; <nl> + private : <nl> + void createCheckbox ( base : : lambda < void ( ) > updateCallback ) ; <nl> + void setCheckedInternal ( bool checked , SetStyle style ) ; <nl> + void paintDisabledCheckUserpic ( Painter & p , int x , int y , int outerWidth ) const ; <nl> + <nl> + PeerListRowId _id = 0 ; <nl> + gsl : : not_null < PeerData * > _peer ; <nl> + bool _initialized = false ; <nl> + std : : unique_ptr < Ui : : RippleAnimation > _ripple ; <nl> + std : : unique_ptr < Ui : : RoundImageCheckbox > _checkbox ; <nl> + Text _name ; <nl> + QString _status ; <nl> + StatusType _statusType = StatusType : : Online ; <nl> + bool _disabled = false ; <nl> + int _absoluteIndex = - 1 ; <nl> + OrderedSet < QChar > _nameFirstChars ; <nl> + bool _isSearchResult = false ; <nl> <nl> - void setNameFirstChars ( const OrderedSet < QChar > & nameFirstChars ) { <nl> - _nameFirstChars = nameFirstChars ; <nl> - } <nl> - const OrderedSet < QChar > & nameFirstChars ( ) const { <nl> - return _nameFirstChars ; <nl> - } <nl> + } ; <nl> <nl> - private : <nl> - void createCheckbox ( base : : lambda < void ( ) > updateCallback ) ; <nl> - void setCheckedInternal ( bool checked , SetStyle style ) ; <nl> - void paintDisabledCheckUserpic ( Painter & p , int x , int y , int outerWidth ) const ; <nl> - <nl> - RowId _id = 0 ; <nl> - PeerData * _peer = nullptr ; <nl> - bool _initialized = false ; <nl> - std : : unique_ptr < Ui : : RippleAnimation > _ripple ; <nl> - std : : unique_ptr < Ui : : RoundImageCheckbox > _checkbox ; <nl> - Text _name ; <nl> - QString _status ; <nl> - StatusType _statusType = StatusType : : Online ; <nl> - bool _disabled = false ; <nl> - int _absoluteIndex = - 1 ; <nl> - OrderedSet < QChar > _nameFirstChars ; <nl> - bool _isGlobalSearchResult = false ; <nl> + enum class PeerListSearchMode { <nl> + None , <nl> + Local , <nl> + Complex , <nl> + } ; <nl> <nl> - } ; <nl> + class PeerListDelegate { <nl> + public : <nl> + virtual void peerListSetTitle ( base : : lambda < QString ( ) > title ) = 0 ; <nl> + virtual void peerListSetDescription ( object_ptr < Ui : : FlatLabel > description ) = 0 ; <nl> + virtual void peerListSetSearchLoading ( object_ptr < Ui : : FlatLabel > loading ) = 0 ; <nl> + virtual void peerListSetSearchNoResults ( object_ptr < Ui : : FlatLabel > noResults ) = 0 ; <nl> + virtual void peerListSetSearchMode ( PeerListSearchMode mode ) = 0 ; <nl> + virtual void peerListAppendRow ( std : : unique_ptr < PeerListRow > row ) = 0 ; <nl> + virtual void peerListAppendSearchRow ( std : : unique_ptr < PeerListRow > row ) = 0 ; <nl> + virtual void peerListAppendFoundRow ( gsl : : not_null < PeerListRow * > row ) = 0 ; <nl> + virtual void peerListPrependRow ( std : : unique_ptr < PeerListRow > row ) = 0 ; <nl> + virtual void peerListUpdateRow ( gsl : : not_null < PeerListRow * > row ) = 0 ; <nl> + virtual bool peerListIsRowSelected ( gsl : : not_null < PeerData * > peer ) = 0 ; <nl> + virtual void peerListRemoveRow ( gsl : : not_null < PeerListRow * > row ) = 0 ; <nl> + virtual void peerListSetRowChecked ( gsl : : not_null < PeerListRow * > row , bool checked ) = 0 ; <nl> + virtual gsl : : not_null < PeerListRow * > peerListRowAt ( int index ) = 0 ; <nl> + virtual void peerListRefreshRows ( ) = 0 ; <nl> + virtual void peerListScrollToTop ( ) = 0 ; <nl> + virtual int peerListFullRowsCount ( ) = 0 ; <nl> + virtual PeerListRow * peerListFindRow ( PeerListRowId id ) = 0 ; <nl> + virtual void peerListSortRows ( base : : lambda < bool ( PeerListRow & a , PeerListRow & b ) > compare ) = 0 ; <nl> + virtual void peerListPartitionRows ( base : : lambda < bool ( PeerListRow & a ) > border ) = 0 ; <nl> <nl> - class Controller { <nl> - public : <nl> - virtual void prepare ( ) = 0 ; <nl> - virtual void rowClicked ( Row * row ) = 0 ; <nl> - virtual void rowActionClicked ( Row * row ) { <nl> - } <nl> - virtual void preloadRows ( ) { <nl> - } <nl> - virtual std : : unique_ptr < Row > createGlobalRow ( PeerData * peer ) { <nl> - return std : : unique_ptr < Row > ( ) ; <nl> + template < typename PeerDataRange > <nl> + void peerListAddSelectedRows ( PeerDataRange & & range ) { <nl> + for ( auto peer : range ) { <nl> + peerListAddSelectedRowInBunch ( peer ) ; <nl> } <nl> + peerListFinishSelectedRowsBunch ( ) ; <nl> + } <nl> <nl> - virtual ~ Controller ( ) = default ; <nl> + virtual std : : vector < gsl : : not_null < PeerData * > > peerListCollectSelectedRows ( ) = 0 ; <nl> + virtual ~ PeerListDelegate ( ) = default ; <nl> <nl> - protected : <nl> - PeerListBox * view ( ) const { <nl> - return _view ; <nl> - } <nl> + private : <nl> + virtual void peerListAddSelectedRowInBunch ( gsl : : not_null < PeerData * > peer ) = 0 ; <nl> + virtual void peerListFinishSelectedRowsBunch ( ) = 0 ; <nl> <nl> - private : <nl> - void setView ( PeerListBox * box ) { <nl> - _view = box ; <nl> - prepare ( ) ; <nl> - } <nl> + } ; <nl> <nl> - PeerListBox * _view = nullptr ; <nl> + class PeerListSearchDelegate { <nl> + public : <nl> + virtual void peerListSearchAddRow ( gsl : : not_null < PeerData * > peer ) = 0 ; <nl> + virtual void peerListSearchRefreshRows ( ) = 0 ; <nl> + virtual ~ PeerListSearchDelegate ( ) = default ; <nl> <nl> - friend class PeerListBox ; <nl> - friend class Inner ; <nl> + } ; <nl> <nl> - } ; <nl> - PeerListBox ( QWidget * , std : : unique_ptr < Controller > controller ) ; <nl> + class PeerListSearchController { <nl> + public : <nl> + virtual void searchQuery ( const QString & query ) = 0 ; <nl> + virtual bool isLoading ( ) = 0 ; <nl> + virtual ~ PeerListSearchController ( ) = default ; <nl> <nl> - / / Interface for the controller . <nl> - void appendRow ( std : : unique_ptr < Row > row ) ; <nl> - void prependRow ( std : : unique_ptr < Row > row ) ; <nl> - Row * findRow ( RowId id ) ; <nl> - void updateRow ( Row * row ) ; <nl> - void removeRow ( Row * row ) ; <nl> - void setRowChecked ( Row * row , bool checked ) ; <nl> - int fullRowsCount ( ) const ; <nl> - Row * rowAt ( int index ) const ; <nl> - void setAboutText ( const QString & aboutText ) ; <nl> - void setAbout ( object_ptr < Ui : : FlatLabel > about ) ; <nl> - void refreshRows ( ) ; <nl> + void setDelegate ( gsl : : not_null < PeerListSearchDelegate * > delegate ) { <nl> + _delegate = delegate ; <nl> + } <nl> <nl> + protected : <nl> + gsl : : not_null < PeerListSearchDelegate * > delegate ( ) const { <nl> + return _delegate ; <nl> + } <nl> + <nl> + private : <nl> + PeerListSearchDelegate * _delegate = nullptr ; <nl> + <nl> + } ; <nl> + <nl> + class PeerListController : public PeerListSearchDelegate { <nl> + public : <nl> / / Search works only with RowId = = peer - > id . <nl> - enum class SearchMode { <nl> - None , <nl> - Local , <nl> - Global , <nl> - } ; <nl> - void setSearchMode ( SearchMode mode ) ; <nl> - void setSearchNoResultsText ( const QString & noResultsText ) ; <nl> - void setSearchNoResults ( object_ptr < Ui : : FlatLabel > searchNoResults ) ; <nl> - void setSearchLoadingText ( const QString & searchLoadingText ) ; <nl> - void setSearchLoading ( object_ptr < Ui : : FlatLabel > searchLoading ) ; <nl> + PeerListController ( std : : unique_ptr < PeerListSearchController > searchController = nullptr ) ; <nl> <nl> - template < typename PeerDataRange > <nl> - void addSelectedRows ( PeerDataRange & & range ) { <nl> - Expects ( _select ! = nullptr ) ; <nl> - for ( auto peer : range ) { <nl> - addSelectItem ( peer , Row : : SetStyle : : Fast ) ; <nl> - } <nl> - finishSelectItemsBunch ( ) ; <nl> + void setDelegate ( gsl : : not_null < PeerListDelegate * > delegate ) { <nl> + _delegate = delegate ; <nl> + prepare ( ) ; <nl> } <nl> - QVector < PeerData * > collectSelectedRows ( ) const ; <nl> <nl> - / / callback takes two iterators , like [ ] ( auto & begin , auto & end ) . <nl> - template < typename ReorderCallback > <nl> - void reorderRows ( ReorderCallback & & callback ) ; <nl> + virtual void prepare ( ) = 0 ; <nl> + virtual void rowClicked ( gsl : : not_null < PeerListRow * > row ) = 0 ; <nl> + virtual void rowActionClicked ( gsl : : not_null < PeerListRow * > row ) { <nl> + } <nl> + virtual void preloadRows ( ) { <nl> + } <nl> + bool isSearchLoading ( ) const { <nl> + return _searchController ? _searchController - > isLoading ( ) : false ; <nl> + } <nl> + virtual std : : unique_ptr < PeerListRow > createSearchRow ( gsl : : not_null < PeerData * > peer ) { <nl> + return std : : unique_ptr < PeerListRow > ( ) ; <nl> + } <nl> + <nl> + bool isRowSelected ( gsl : : not_null < PeerData * > peer ) { <nl> + return delegate ( ) - > peerListIsRowSelected ( peer ) ; <nl> + } <nl> <nl> - bool isRowSelected ( PeerData * peer ) const ; <nl> + virtual bool searchInLocal ( ) { <nl> + return true ; <nl> + } <nl> + void search ( const QString & query ) ; <nl> + <nl> + void peerListSearchAddRow ( gsl : : not_null < PeerData * > peer ) override ; <nl> + void peerListSearchRefreshRows ( ) override ; <nl> + <nl> + virtual ~ PeerListController ( ) = default ; <nl> + <nl> + protected : <nl> + gsl : : not_null < PeerListDelegate * > delegate ( ) const { <nl> + return _delegate ; <nl> + } <nl> + <nl> + void setDescriptionText ( const QString & text ) ; <nl> + void setSearchLoadingText ( const QString & text ) ; <nl> + void setSearchNoResultsText ( const QString & text ) ; <nl> + void setDescription ( object_ptr < Ui : : FlatLabel > description ) { <nl> + delegate ( ) - > peerListSetDescription ( std : : move ( description ) ) ; <nl> + } <nl> + void setSearchLoading ( object_ptr < Ui : : FlatLabel > loading ) { <nl> + delegate ( ) - > peerListSetSearchLoading ( std : : move ( loading ) ) ; <nl> + } <nl> + void setSearchNoResults ( object_ptr < Ui : : FlatLabel > noResults ) { <nl> + delegate ( ) - > peerListSetSearchNoResults ( std : : move ( noResults ) ) ; <nl> + } <nl> + <nl> + private : <nl> + PeerListDelegate * _delegate = nullptr ; <nl> + std : : unique_ptr < PeerListSearchController > _searchController = nullptr ; <nl> + <nl> + } ; <nl> + <nl> + class PeerListBox : public BoxContent , public PeerListDelegate { <nl> + class Inner ; <nl> + <nl> + public : <nl> + PeerListBox ( QWidget * , std : : unique_ptr < PeerListController > controller , base : : lambda < void ( PeerListBox * ) > init ) ; <nl> + <nl> + void peerListSetTitle ( base : : lambda < QString ( ) > title ) override { <nl> + setTitle ( std : : move ( title ) ) ; <nl> + } <nl> + void peerListSetDescription ( object_ptr < Ui : : FlatLabel > description ) override ; <nl> + void peerListSetSearchLoading ( object_ptr < Ui : : FlatLabel > loading ) override ; <nl> + void peerListSetSearchNoResults ( object_ptr < Ui : : FlatLabel > noResults ) override ; <nl> + void peerListSetSearchMode ( PeerListSearchMode mode ) override ; <nl> + void peerListAppendRow ( std : : unique_ptr < PeerListRow > row ) override ; <nl> + void peerListAppendSearchRow ( std : : unique_ptr < PeerListRow > row ) override ; <nl> + void peerListAppendFoundRow ( gsl : : not_null < PeerListRow * > row ) override ; <nl> + void peerListPrependRow ( std : : unique_ptr < PeerListRow > row ) override ; <nl> + void peerListUpdateRow ( gsl : : not_null < PeerListRow * > row ) override ; <nl> + void peerListRemoveRow ( gsl : : not_null < PeerListRow * > row ) override ; <nl> + void peerListSetRowChecked ( gsl : : not_null < PeerListRow * > row , bool checked ) override ; <nl> + gsl : : not_null < PeerListRow * > peerListRowAt ( int index ) override ; <nl> + bool peerListIsRowSelected ( gsl : : not_null < PeerData * > peer ) override ; <nl> + std : : vector < gsl : : not_null < PeerData * > > peerListCollectSelectedRows ( ) override ; <nl> + void peerListRefreshRows ( ) override ; <nl> + void peerListScrollToTop ( ) override ; <nl> + int peerListFullRowsCount ( ) override ; <nl> + PeerListRow * peerListFindRow ( PeerListRowId id ) override ; <nl> + void peerListSortRows ( base : : lambda < bool ( PeerListRow & a , PeerListRow & b ) > compare ) override ; <nl> + void peerListPartitionRows ( base : : lambda < bool ( PeerListRow & a ) > border ) override ; <nl> <nl> protected : <nl> void prepare ( ) override ; <nl> class PeerListBox : public BoxContent { <nl> void resizeEvent ( QResizeEvent * e ) override ; <nl> <nl> private : <nl> - void addSelectItem ( PeerData * peer , Row : : SetStyle style ) ; <nl> - void finishSelectItemsBunch ( ) ; <nl> + void peerListAddSelectedRowInBunch ( gsl : : not_null < PeerData * > peer ) override { <nl> + addSelectItem ( peer , PeerListRow : : SetStyle : : Fast ) ; <nl> + } <nl> + void peerListFinishSelectedRowsBunch ( ) override ; <nl> + <nl> + void addSelectItem ( gsl : : not_null < PeerData * > peer , PeerListRow : : SetStyle style ) ; <nl> object_ptr < Ui : : WidgetSlideWrap < Ui : : MultiSelect > > createMultiSelect ( ) ; <nl> int getTopScrollSkip ( ) const ; <nl> void updateScrollSkips ( ) ; <nl> class PeerListBox : public BoxContent { <nl> <nl> QPointer < Inner > _inner ; <nl> <nl> - std : : unique_ptr < Controller > _controller ; <nl> + std : : unique_ptr < PeerListController > _controller ; <nl> + base : : lambda < void ( PeerListBox * ) > _init ; <nl> <nl> } ; <nl> <nl> / / This class is hold in header because it requires Qt preprocessing . <nl> - class PeerListBox : : Inner : public TWidget , private MTP : : Sender , private base : : Subscriber { <nl> + class PeerListBox : : Inner : public TWidget , private base : : Subscriber { <nl> Q_OBJECT <nl> <nl> public : <nl> - Inner ( QWidget * parent , Controller * controller ) ; <nl> + Inner ( QWidget * parent , gsl : : not_null < PeerListController * > controller ) ; <nl> <nl> void selectSkip ( int direction ) ; <nl> void selectSkipPage ( int height , int direction ) ; <nl> class PeerListBox : : Inner : public TWidget , private MTP : : Sender , private base : : Su <nl> void submitted ( ) ; <nl> <nl> / / Interface for the controller . <nl> - void appendRow ( std : : unique_ptr < Row > row ) ; <nl> - void prependRow ( std : : unique_ptr < Row > row ) ; <nl> - Row * findRow ( RowId id ) ; <nl> - void updateRow ( Row * row ) { <nl> + void appendRow ( std : : unique_ptr < PeerListRow > row ) ; <nl> + void appendSearchRow ( std : : unique_ptr < PeerListRow > row ) ; <nl> + void appendFoundRow ( gsl : : not_null < PeerListRow * > row ) ; <nl> + void prependRow ( std : : unique_ptr < PeerListRow > row ) ; <nl> + PeerListRow * findRow ( PeerListRowId id ) ; <nl> + void updateRow ( gsl : : not_null < PeerListRow * > row ) { <nl> updateRow ( row , RowIndex ( ) ) ; <nl> } <nl> - void removeRow ( Row * row ) ; <nl> + void removeRow ( gsl : : not_null < PeerListRow * > row ) ; <nl> int fullRowsCount ( ) const ; <nl> - Row * rowAt ( int index ) const ; <nl> - void setAbout ( object_ptr < Ui : : FlatLabel > about ) ; <nl> + gsl : : not_null < PeerListRow * > rowAt ( int index ) const ; <nl> + void setDescription ( object_ptr < Ui : : FlatLabel > description ) ; <nl> + void setSearchLoading ( object_ptr < Ui : : FlatLabel > loading ) ; <nl> + void setSearchNoResults ( object_ptr < Ui : : FlatLabel > noResults ) ; <nl> void refreshRows ( ) ; <nl> - void setSearchMode ( SearchMode mode ) ; <nl> - void setSearchNoResults ( object_ptr < Ui : : FlatLabel > searchNoResults ) ; <nl> - void setSearchLoading ( object_ptr < Ui : : FlatLabel > searchLoading ) ; <nl> <nl> - void changeCheckState ( Row * row , bool checked , Row : : SetStyle style ) ; <nl> + void setSearchMode ( PeerListSearchMode mode ) ; <nl> + void changeCheckState ( gsl : : not_null < PeerListRow * > row , bool checked , PeerListRow : : SetStyle style ) ; <nl> <nl> template < typename ReorderCallback > <nl> void reorderRows ( ReorderCallback & & callback ) { <nl> public slots : <nl> <nl> private : <nl> void refreshIndices ( ) ; <nl> - void appendGlobalSearchRow ( std : : unique_ptr < Row > row ) ; <nl> <nl> void invalidatePixmapsCache ( ) ; <nl> <nl> public slots : <nl> void loadProfilePhotos ( ) ; <nl> void checkScrollForPreload ( ) ; <nl> <nl> - void updateRow ( Row * row , RowIndex hint ) ; <nl> + void updateRow ( gsl : : not_null < PeerListRow * > row , RowIndex hint ) ; <nl> void updateRow ( RowIndex row ) ; <nl> int getRowTop ( RowIndex row ) const ; <nl> - Row * getRow ( RowIndex element ) ; <nl> - RowIndex findRowIndex ( Row * row , RowIndex hint = RowIndex ( ) ) ; <nl> - QRect getActionRect ( Row * row , RowIndex index ) const ; <nl> + PeerListRow * getRow ( RowIndex element ) ; <nl> + RowIndex findRowIndex ( gsl : : not_null < PeerListRow * > row , RowIndex hint = RowIndex ( ) ) ; <nl> + QRect getActionRect ( gsl : : not_null < PeerListRow * > row , RowIndex index ) const ; <nl> <nl> void paintRow ( Painter & p , TimeMs ms , RowIndex index ) ; <nl> <nl> - void addRowEntry ( Row * row ) ; <nl> - void addToSearchIndex ( Row * row ) ; <nl> + void addRowEntry ( gsl : : not_null < PeerListRow * > row ) ; <nl> + void addToSearchIndex ( gsl : : not_null < PeerListRow * > row ) ; <nl> bool addingToSearchIndex ( ) const ; <nl> - void removeFromSearchIndex ( Row * row ) ; <nl> + void removeFromSearchIndex ( gsl : : not_null < PeerListRow * > row ) ; <nl> bool showingSearch ( ) const { <nl> return ! _searchQuery . isEmpty ( ) ; <nl> } <nl> public slots : <nl> <nl> int labelHeight ( ) const ; <nl> <nl> - void needGlobalSearch ( ) ; <nl> - bool globalSearchInCache ( ) ; <nl> - void globalSearchOnServer ( ) ; <nl> - void globalSearchDone ( const MTPcontacts_Found & result , mtpRequestId requestId ) ; <nl> - bool globalSearchLoading ( ) const ; <nl> - void clearGlobalSearchRows ( ) ; <nl> + void clearSearchRows ( ) ; <nl> + <nl> + gsl : : not_null < PeerListController * > _controller ; <nl> + PeerListSearchMode _searchMode = PeerListSearchMode : : None ; <nl> <nl> - Controller * _controller = nullptr ; <nl> int _rowHeight = 0 ; <nl> int _visibleTop = 0 ; <nl> int _visibleBottom = 0 ; <nl> public slots : <nl> Selected _pressed ; <nl> bool _mouseSelection = false ; <nl> <nl> - std : : vector < std : : unique_ptr < Row > > _rows ; <nl> - std : : map < RowId , Row * > _rowsById ; <nl> - std : : map < PeerData * , std : : vector < Row * > > _rowsByPeer ; <nl> + std : : vector < std : : unique_ptr < PeerListRow > > _rows ; <nl> + std : : map < PeerListRowId , gsl : : not_null < PeerListRow * > > _rowsById ; <nl> + std : : map < PeerData * , std : : vector < gsl : : not_null < PeerListRow * > > > _rowsByPeer ; <nl> <nl> - SearchMode _searchMode = SearchMode : : None ; <nl> - std : : map < QChar , std : : vector < Row * > > _searchIndex ; <nl> + std : : map < QChar , std : : vector < gsl : : not_null < PeerListRow * > > > _searchIndex ; <nl> QString _searchQuery ; <nl> - std : : vector < Row * > _filterResults ; <nl> + std : : vector < gsl : : not_null < PeerListRow * > > _filterResults ; <nl> <nl> - object_ptr < Ui : : FlatLabel > _about = { nullptr } ; <nl> + object_ptr < Ui : : FlatLabel > _description = { nullptr } ; <nl> object_ptr < Ui : : FlatLabel > _searchNoResults = { nullptr } ; <nl> object_ptr < Ui : : FlatLabel > _searchLoading = { nullptr } ; <nl> <nl> QPoint _lastMousePosition ; <nl> <nl> - std : : vector < std : : unique_ptr < Row > > _globalSearchRows ; <nl> - object_ptr < SingleTimer > _globalSearchTimer = { nullptr } ; <nl> - QString _globalSearchQuery ; <nl> - QString _globalSearchHighlight ; <nl> - mtpRequestId _globalSearchRequestId = 0 ; <nl> - std : : map < QString , MTPcontacts_Found > _globalSearchCache ; <nl> - std : : map < mtpRequestId , QString > _globalSearchQueries ; <nl> + std : : vector < std : : unique_ptr < PeerListRow > > _searchRows ; <nl> <nl> } ; <nl> <nl> - template < typename ReorderCallback > <nl> - inline void PeerListBox : : reorderRows ( ReorderCallback & & callback ) { <nl> - _inner - > reorderRows ( std : : forward < ReorderCallback > ( callback ) ) ; <nl> - } <nl> - <nl> - class PeerListRowWithLink : public PeerListBox : : Row { <nl> + class PeerListRowWithLink : public PeerListRow { <nl> public : <nl> - using Row : : Row ; <nl> + using PeerListRow : : PeerListRow ; <nl> <nl> void setActionLink ( const QString & action ) ; <nl> <nl> - protected : <nl> void lazyInitialize ( ) override ; <nl> <nl> private : <nl> class PeerListRowWithLink : public PeerListBox : : Row { <nl> <nl> } ; <nl> <nl> - class ChatsListBoxController : public PeerListBox : : Controller , protected base : : Subscriber { <nl> + class PeerListGlobalSearchController : public PeerListSearchController , private MTP : : Sender { <nl> public : <nl> + PeerListGlobalSearchController ( ) ; <nl> + <nl> + void searchQuery ( const QString & query ) override ; <nl> + bool isLoading ( ) override ; <nl> + <nl> + private : <nl> + bool searchInCache ( ) ; <nl> + void searchOnServer ( ) ; <nl> + void searchDone ( const MTPcontacts_Found & result , mtpRequestId requestId ) ; <nl> + <nl> + base : : Timer _timer ; <nl> + QString _query ; <nl> + mtpRequestId _requestId = 0 ; <nl> + std : : map < QString , MTPcontacts_Found > _cache ; <nl> + std : : map < mtpRequestId , QString > _queries ; <nl> + <nl> + } ; <nl> + <nl> + class ChatsListBoxController : public PeerListController , protected base : : Subscriber { <nl> + public : <nl> + ChatsListBoxController ( std : : unique_ptr < PeerListSearchController > searchController = std : : make_unique < PeerListGlobalSearchController > ( ) ) ; <nl> + <nl> void prepare ( ) override final ; <nl> - std : : unique_ptr < PeerListBox : : Row > createGlobalRow ( PeerData * peer ) override final ; <nl> + std : : unique_ptr < PeerListRow > createSearchRow ( gsl : : not_null < PeerData * > peer ) override final ; <nl> <nl> protected : <nl> - class Row : public PeerListBox : : Row { <nl> + class Row : public PeerListRow { <nl> public : <nl> - Row ( History * history ) : PeerListBox : : Row ( history - > peer ) , _history ( history ) { <nl> + Row ( gsl : : not_null < History * > history ) : PeerListRow ( history - > peer ) , _history ( history ) { <nl> } <nl> - History * history ( ) const { <nl> + gsl : : not_null < History * > history ( ) const { <nl> return _history ; <nl> } <nl> <nl> private : <nl> - History * _history = nullptr ; <nl> + gsl : : not_null < History * > _history ; <nl> <nl> } ; <nl> - virtual std : : unique_ptr < Row > createRow ( History * history ) = 0 ; <nl> + virtual std : : unique_ptr < Row > createRow ( gsl : : not_null < History * > history ) = 0 ; <nl> virtual void prepareViewHook ( ) = 0 ; <nl> virtual void updateRowHook ( Row * row ) { <nl> } <nl> mmm a / Telegram / SourceFiles / calls / calls_box_controller . cpp <nl> ppp b / Telegram / SourceFiles / calls / calls_box_controller . cpp <nl> constexpr auto kPerPageCount = 100 ; <nl> <nl> } / / namespace <nl> <nl> - class BoxController : : Row : public PeerListBox : : Row { <nl> + class BoxController : : Row : public PeerListRow { <nl> public : <nl> Row ( HistoryItem * item ) ; <nl> <nl> class BoxController : : Row : public PeerListBox : : Row { <nl> return _items . front ( ) - > id ; <nl> } <nl> <nl> - protected : <nl> void paintStatusText ( Painter & p , int x , int y , int outerWidth , bool selected ) override ; <nl> void addActionRipple ( QPoint point , base : : lambda < void ( ) > updateCallback ) override ; <nl> void stopLastActionRipple ( ) override ; <nl> <nl> - private : <nl> bool needsVerifiedIcon ( ) const override { <nl> return false ; <nl> } <nl> class BoxController : : Row : public PeerListBox : : Row { <nl> } <nl> void paintAction ( Painter & p , TimeMs ms , int x , int y , int outerWidth , bool actionSelected ) override ; <nl> <nl> + private : <nl> void refreshStatus ( ) ; <nl> static Type ComputeType ( HistoryItem * item ) ; <nl> <nl> class BoxController : : Row : public PeerListBox : : Row { <nl> <nl> } ; <nl> <nl> - BoxController : : Row : : Row ( HistoryItem * item ) : PeerListBox : : Row ( item - > history ( ) - > peer , item - > id ) <nl> + BoxController : : Row : : Row ( HistoryItem * item ) : PeerListRow ( item - > history ( ) - > peer , item - > id ) <nl> , _items ( 1 , item ) <nl> , _date ( item - > date . date ( ) ) <nl> , _type ( ComputeType ( item ) ) { <nl> void BoxController : : Row : : paintStatusText ( Painter & p , int x , int y , int outerWidt <nl> icon - > paint ( p , x + st : : callArrowPosition . x ( ) , y + st : : callArrowPosition . y ( ) , outerWidth ) ; <nl> x + = + st : : callArrowPosition . x ( ) + icon - > width ( ) + st : : callArrowSkip ; <nl> <nl> - PeerListBox : : Row : : paintStatusText ( p , x , y , outerWidth , selected ) ; <nl> + PeerListRow : : paintStatusText ( p , x , y , outerWidth , selected ) ; <nl> } <nl> <nl> void BoxController : : Row : : paintAction ( Painter & p , TimeMs ms , int x , int y , int outerWidth , bool actionSelected ) { <nl> void BoxController : : prepare ( ) { <nl> if ( auto row = rowForItem ( item ) ) { <nl> row - > itemRemoved ( item ) ; <nl> if ( ! row - > hasItems ( ) ) { <nl> - view ( ) - > removeRow ( row ) ; <nl> - if ( ! view ( ) - > fullRowsCount ( ) ) { <nl> + delegate ( ) - > peerListRemoveRow ( row ) ; <nl> + if ( ! delegate ( ) - > peerListFullRowsCount ( ) ) { <nl> refreshAbout ( ) ; <nl> } <nl> } <nl> - view ( ) - > refreshRows ( ) ; <nl> + delegate ( ) - > peerListRefreshRows ( ) ; <nl> } <nl> } ) ; <nl> subscribe ( Current ( ) . newServiceMessage ( ) , [ this ] ( const FullMsgId & msgId ) { <nl> void BoxController : : prepare ( ) { <nl> } <nl> } ) ; <nl> <nl> - view ( ) - > setTitle ( langFactory ( lng_call_box_title ) ) ; <nl> - view ( ) - > addButton ( langFactory ( lng_close ) , [ this ] { view ( ) - > closeBox ( ) ; } ) ; <nl> - view ( ) - > setAboutText ( lang ( lng_contacts_loading ) ) ; <nl> - view ( ) - > refreshRows ( ) ; <nl> + delegate ( ) - > peerListSetTitle ( langFactory ( lng_call_box_title ) ) ; <nl> + setDescriptionText ( lang ( lng_contacts_loading ) ) ; <nl> + delegate ( ) - > peerListRefreshRows ( ) ; <nl> <nl> preloadRows ( ) ; <nl> } <nl> void BoxController : : preloadRows ( ) { <nl> } <nl> <nl> void BoxController : : refreshAbout ( ) { <nl> - view ( ) - > setAboutText ( view ( ) - > fullRowsCount ( ) ? QString ( ) : lang ( lng_call_box_about ) ) ; <nl> + setDescriptionText ( delegate ( ) - > peerListFullRowsCount ( ) ? QString ( ) : lang ( lng_call_box_about ) ) ; <nl> } <nl> <nl> - void BoxController : : rowClicked ( PeerListBox : : Row * row ) { <nl> - auto itemsRow = static_cast < Row * > ( row ) ; <nl> + void BoxController : : rowClicked ( gsl : : not_null < PeerListRow * > row ) { <nl> + auto itemsRow = static_cast < Row * > ( row . get ( ) ) ; <nl> auto itemId = itemsRow - > maxItemId ( ) ; <nl> Ui : : showPeerHistoryAsync ( row - > peer ( ) - > id , itemId ) ; <nl> } <nl> <nl> - void BoxController : : rowActionClicked ( PeerListBox : : Row * row ) { <nl> + void BoxController : : rowActionClicked ( gsl : : not_null < PeerListRow * > row ) { <nl> auto user = row - > peer ( ) - > asUser ( ) ; <nl> t_assert ( user ! = nullptr ) ; <nl> <nl> void BoxController : : receivedCalls ( const QVector < MTPMessage > & result ) { <nl> } <nl> <nl> refreshAbout ( ) ; <nl> - view ( ) - > refreshRows ( ) ; <nl> + delegate ( ) - > peerListRefreshRows ( ) ; <nl> } <nl> <nl> bool BoxController : : insertRow ( HistoryItem * item , InsertWay way ) { <nl> bool BoxController : : insertRow ( HistoryItem * item , InsertWay way ) { <nl> return false ; <nl> } <nl> } <nl> - ( way = = InsertWay : : Append ) ? view ( ) - > appendRow ( createRow ( item ) ) : view ( ) - > prependRow ( createRow ( item ) ) ; <nl> - view ( ) - > reorderRows ( [ ] ( auto & & begin , auto & & end ) { <nl> - std : : sort ( begin , end , [ ] ( auto & a , auto & b ) { <nl> - return static_cast < Row & > ( * a ) . maxItemId ( ) > static_cast < Row & > ( * a ) . maxItemId ( ) ; <nl> - } ) ; <nl> + ( way = = InsertWay : : Append ) ? delegate ( ) - > peerListAppendRow ( createRow ( item ) ) : delegate ( ) - > peerListPrependRow ( createRow ( item ) ) ; <nl> + delegate ( ) - > peerListSortRows ( [ ] ( PeerListRow & a , PeerListRow & b ) { <nl> + return static_cast < Row & > ( a ) . maxItemId ( ) > static_cast < Row & > ( b ) . maxItemId ( ) ; <nl> } ) ; <nl> return true ; <nl> } <nl> <nl> BoxController : : Row * BoxController : : rowForItem ( HistoryItem * item ) { <nl> - auto v = view ( ) ; <nl> - if ( auto fullRowsCount = v - > fullRowsCount ( ) ) { <nl> + auto v = delegate ( ) ; <nl> + if ( auto fullRowsCount = v - > peerListFullRowsCount ( ) ) { <nl> auto itemId = item - > id ; <nl> - auto lastRow = static_cast < Row * > ( v - > rowAt ( fullRowsCount - 1 ) ) ; <nl> + auto lastRow = static_cast < Row * > ( v - > peerListRowAt ( fullRowsCount - 1 ) . get ( ) ) ; <nl> if ( itemId < lastRow - > minItemId ( ) ) { <nl> return lastRow ; <nl> } <nl> - auto firstRow = static_cast < Row * > ( v - > rowAt ( 0 ) ) ; <nl> + auto firstRow = static_cast < Row * > ( v - > peerListRowAt ( 0 ) . get ( ) ) ; <nl> if ( itemId > firstRow - > maxItemId ( ) ) { <nl> return firstRow ; <nl> } <nl> BoxController : : Row * BoxController : : rowForItem ( HistoryItem * item ) { <nl> auto right = fullRowsCount ; <nl> while ( left + 1 < right ) { <nl> auto middle = ( right + left ) / 2 ; <nl> - auto middleRow = static_cast < Row * > ( v - > rowAt ( middle ) ) ; <nl> + auto middleRow = static_cast < Row * > ( v - > peerListRowAt ( middle ) . get ( ) ) ; <nl> if ( middleRow - > maxItemId ( ) > = itemId ) { <nl> left = middle ; <nl> } else { <nl> right = middle ; <nl> } <nl> } <nl> - auto result = static_cast < Row * > ( v - > rowAt ( left ) ) ; <nl> + auto result = static_cast < Row * > ( v - > peerListRowAt ( left ) . get ( ) ) ; <nl> / / Check for rowAt ( left ) - > minItemId > itemId > rowAt ( left + 1 ) - > maxItemId . <nl> / / In that case we sometimes need to return rowAt ( left + 1 ) , not rowAt ( left ) . <nl> if ( result - > minItemId ( ) > itemId & & left + 1 < fullRowsCount ) { <nl> - auto possibleResult = static_cast < Row * > ( v - > rowAt ( left + 1 ) ) ; <nl> + auto possibleResult = static_cast < Row * > ( v - > peerListRowAt ( left + 1 ) . get ( ) ) ; <nl> t_assert ( possibleResult - > maxItemId ( ) < itemId ) ; <nl> if ( possibleResult - > canAddItem ( item ) ) { <nl> return possibleResult ; <nl> BoxController : : Row * BoxController : : rowForItem ( HistoryItem * item ) { <nl> return nullptr ; <nl> } <nl> <nl> - std : : unique_ptr < PeerListBox : : Row > BoxController : : createRow ( HistoryItem * item ) const { <nl> + std : : unique_ptr < PeerListRow > BoxController : : createRow ( HistoryItem * item ) const { <nl> auto row = std : : make_unique < Row > ( item ) ; <nl> return std : : move ( row ) ; <nl> } <nl> mmm a / Telegram / SourceFiles / calls / calls_box_controller . h <nl> ppp b / Telegram / SourceFiles / calls / calls_box_controller . h <nl> Copyright ( c ) 2014 - 2017 John Preston , https : / / desktop . telegram . org <nl> <nl> namespace Calls { <nl> <nl> - class BoxController : public PeerListBox : : Controller , private base : : Subscriber , private MTP : : Sender { <nl> + class BoxController : public PeerListController , private base : : Subscriber , private MTP : : Sender { <nl> public : <nl> void prepare ( ) override ; <nl> - void rowClicked ( PeerListBox : : Row * row ) override ; <nl> - void rowActionClicked ( PeerListBox : : Row * row ) override ; <nl> + void rowClicked ( gsl : : not_null < PeerListRow * > row ) override ; <nl> + void rowActionClicked ( gsl : : not_null < PeerListRow * > row ) override ; <nl> void preloadRows ( ) override ; <nl> <nl> private : <nl> class BoxController : public PeerListBox : : Controller , private base : : Subscriber , <nl> Prepend , <nl> } ; <nl> bool insertRow ( HistoryItem * item , InsertWay way ) ; <nl> - std : : unique_ptr < PeerListBox : : Row > createRow ( HistoryItem * item ) const ; <nl> + std : : unique_ptr < PeerListRow > createRow ( HistoryItem * item ) const ; <nl> <nl> MsgId _offsetId = 0 ; <nl> mtpRequestId _loadRequestId = 0 ; <nl> mmm a / Telegram / SourceFiles / profile / profile_block_group_members . cpp <nl> ppp b / Telegram / SourceFiles / profile / profile_block_group_members . cpp <nl> void GroupMembersWidget : : restrictUser ( gsl : : not_null < UserData * > user ) { <nl> } <nl> auto defaultRestricted = MegagroupInfo : : Restricted { EditRestrictedBox : : DefaultRights ( megagroup ) } ; <nl> auto currentRights = megagroup - > mgInfo - > lastRestricted . value ( user , defaultRestricted ) . rights ; <nl> - Ui : : show ( Box < EditRestrictedBox > ( megagroup , user , currentRights , base : : lambda_guarded ( this , [ this , megagroup , user ] ( const MTPChannelBannedRights & rights ) { <nl> + Ui : : show ( Box < EditRestrictedBox > ( megagroup , user , currentRights , [ megagroup , user ] ( const MTPChannelBannedRights & rights ) { <nl> Ui : : hideLayer ( ) ; <nl> - MTP : : send ( MTPchannels_EditBanned ( megagroup - > inputChannel , user - > inputUser , rights ) , rpcDone ( base : : lambda_guarded ( this , [ this , megagroup , user , rights ] ( const MTPUpdates & result ) { <nl> + MTP : : send ( MTPchannels_EditBanned ( megagroup - > inputChannel , user - > inputUser , rights ) , rpcDone ( [ megagroup , user , rights ] ( const MTPUpdates & result ) { <nl> if ( App : : main ( ) ) App : : main ( ) - > sentUpdatesReceived ( result ) ; <nl> megagroup - > applyEditBanned ( user , rights ) ; <nl> - } ) ) ) ; <nl> - } ) ) ) ; <nl> + } ) ) ; <nl> + } ) ) ; <nl> } <nl> <nl> void GroupMembersWidget : : removePeer ( PeerData * selectedPeer ) { <nl> mmm a / Telegram / SourceFiles / profile / profile_block_settings . cpp <nl> ppp b / Telegram / SourceFiles / profile / profile_block_settings . cpp <nl> Copyright ( c ) 2014 - 2017 John Preston , https : / / desktop . telegram . org <nl> # include " boxes / confirm_box . h " <nl> # include " boxes / contacts_box . h " <nl> # include " boxes / peer_list_box . h " <nl> + # include " boxes / edit_participant_box . h " <nl> # include " observer_peer . h " <nl> # include " auth_session . h " <nl> # include " mainwidget . h " <nl> namespace { <nl> <nl> constexpr auto kBlockedPerPage = 40 ; <nl> <nl> - class BlockedBoxController : public PeerListBox : : Controller , private base : : Subscriber , private MTP : : Sender { <nl> + class BlockedBoxSearchController : public PeerListSearchController , private MTP : : Sender { <nl> public : <nl> - BlockedBoxController ( ChannelData * channel ) : _channel ( channel ) { <nl> + BlockedBoxSearchController ( gsl : : not_null < ChannelData * > channel , bool restricted , gsl : : not_null < std : : map < UserData * , MTPChannelBannedRights > * > rights ) ; <nl> + <nl> + void searchQuery ( const QString & query ) override ; <nl> + bool isLoading ( ) override ; <nl> + <nl> + private : <nl> + bool searchInCache ( ) ; <nl> + void searchOnServer ( ) ; <nl> + void searchDone ( const MTPchannels_ChannelParticipants & result , mtpRequestId requestId ) ; <nl> + <nl> + gsl : : not_null < ChannelData * > _channel ; <nl> + bool _restricted = false ; <nl> + gsl : : not_null < std : : map < UserData * , MTPChannelBannedRights > * > _rights ; <nl> + <nl> + base : : Timer _timer ; <nl> + QString _query ; <nl> + mtpRequestId _requestId = 0 ; <nl> + int _offset = 0 ; <nl> + bool _allLoaded = false ; <nl> + std : : map < QString , MTPchannels_ChannelParticipants > _cache ; <nl> + std : : map < mtpRequestId , QString > _queries ; <nl> + <nl> + } ; <nl> + <nl> + BlockedBoxSearchController : : BlockedBoxSearchController ( gsl : : not_null < ChannelData * > channel , bool restricted , gsl : : not_null < std : : map < UserData * , MTPChannelBannedRights > * > rights ) <nl> + : _channel ( channel ) <nl> + , _restricted ( restricted ) <nl> + , _rights ( rights ) { <nl> + _timer . setCallback ( [ this ] { searchOnServer ( ) ; } ) ; <nl> + } <nl> + <nl> + void BlockedBoxSearchController : : searchQuery ( const QString & query ) { <nl> + if ( _query ! = query ) { <nl> + _query = query ; <nl> + _offset = 0 ; <nl> + _requestId = 0 ; <nl> + if ( ! _query . isEmpty ( ) & & ! searchInCache ( ) ) { <nl> + _timer . callOnce ( AutoSearchTimeout ) ; <nl> + } else { <nl> + _timer . cancel ( ) ; <nl> + } <nl> } <nl> + } <nl> + <nl> + bool BlockedBoxSearchController : : searchInCache ( ) { <nl> + auto it = _cache . find ( _query ) ; <nl> + if ( it ! = _cache . cend ( ) ) { <nl> + _requestId = 0 ; <nl> + searchDone ( it - > second , _requestId ) ; <nl> + return true ; <nl> + } <nl> + return false ; <nl> + } <nl> + <nl> + void BlockedBoxSearchController : : searchOnServer ( ) { <nl> + Expects ( ! _query . isEmpty ( ) ) ; <nl> + auto filter = _restricted ? MTP_channelParticipantsBanned ( MTP_string ( _query ) ) : MTP_channelParticipantsKicked ( MTP_string ( _query ) ) ; <nl> + _requestId = request ( MTPchannels_GetParticipants ( _channel - > inputChannel , filter , MTP_int ( _offset ) , MTP_int ( kBlockedPerPage ) ) ) . done ( [ this ] ( const MTPchannels_ChannelParticipants & result , mtpRequestId requestId ) { <nl> + searchDone ( result , requestId ) ; <nl> + } ) . fail ( [ this ] ( const RPCError & error , mtpRequestId requestId ) { <nl> + if ( _requestId = = requestId ) { <nl> + _requestId = 0 ; <nl> + _allLoaded = true ; <nl> + delegate ( ) - > peerListSearchRefreshRows ( ) ; <nl> + } <nl> + } ) . send ( ) ; <nl> + _queries . emplace ( _requestId , _query ) ; <nl> + } <nl> + <nl> + void BlockedBoxSearchController : : searchDone ( const MTPchannels_ChannelParticipants & result , mtpRequestId requestId ) { <nl> + Expects ( result . type ( ) = = mtpc_channels_channelParticipants ) ; <nl> + <nl> + auto & participants = result . c_channels_channelParticipants ( ) ; <nl> + auto query = _query ; <nl> + if ( requestId ) { <nl> + App : : feedUsers ( participants . vusers ) ; <nl> + auto it = _queries . find ( requestId ) ; <nl> + if ( it ! = _queries . cend ( ) ) { <nl> + query = it - > second ; <nl> + _cache [ query ] = result ; <nl> + _queries . erase ( it ) ; <nl> + } <nl> + } <nl> + <nl> + if ( _requestId = = requestId ) { <nl> + _requestId = 0 ; <nl> + auto & list = participants . vparticipants . v ; <nl> + if ( list . isEmpty ( ) ) { <nl> + _allLoaded = true ; <nl> + } else { <nl> + for_const ( auto & participant , list ) { <nl> + + + _offset ; <nl> + if ( participant . type ( ) = = mtpc_channelParticipantBanned ) { <nl> + auto & banned = participant . c_channelParticipantBanned ( ) ; <nl> + auto userId = banned . vuser_id . v ; <nl> + if ( auto user = App : : userLoaded ( userId ) ) { <nl> + delegate ( ) - > peerListSearchAddRow ( user ) ; <nl> + ( * _rights ) [ user ] = banned . vbanned_rights ; <nl> + } <nl> + } else { <nl> + LOG ( ( " API Error : Non kicked participant got while requesting for kicked participants : % 1 " ) . arg ( participant . type ( ) ) ) ; <nl> + continue ; <nl> + } <nl> + } <nl> + } <nl> + delegate ( ) - > peerListSearchRefreshRows ( ) ; <nl> + } <nl> + } <nl> + <nl> + bool BlockedBoxSearchController : : isLoading ( ) { <nl> + return _timer . isActive ( ) | | _requestId ; <nl> + } <nl> + <nl> + class BlockedBoxController : public PeerListController , private base : : Subscriber , private MTP : : Sender , public base : : enable_weak_from_this { <nl> + public : <nl> + BlockedBoxController ( gsl : : not_null < ChannelData * > channel , bool restricted ) ; <nl> <nl> void prepare ( ) override ; <nl> - void rowClicked ( PeerListBox : : Row * row ) override ; <nl> - void rowActionClicked ( PeerListBox : : Row * row ) override ; <nl> + void rowClicked ( gsl : : not_null < PeerListRow * > row ) override ; <nl> + void rowActionClicked ( gsl : : not_null < PeerListRow * > row ) override ; <nl> void preloadRows ( ) override ; <nl> + bool searchInLocal ( ) override { <nl> + return false ; <nl> + } <nl> + <nl> + void peerListSearchAddRow ( gsl : : not_null < PeerData * > peer ) override ; <nl> <nl> private : <nl> bool appendRow ( UserData * user ) ; <nl> bool prependRow ( UserData * user ) ; <nl> - std : : unique_ptr < PeerListBox : : Row > createRow ( UserData * user ) const ; <nl> + std : : unique_ptr < PeerListRow > createRow ( UserData * user ) const ; <nl> <nl> - ChannelData * _channel = nullptr ; <nl> + gsl : : not_null < ChannelData * > _channel ; <nl> + bool _restricted = false ; <nl> int _offset = 0 ; <nl> mtpRequestId _loadRequestId = 0 ; <nl> bool _allLoaded = false ; <nl> + std : : map < UserData * , MTPChannelBannedRights > _rights ; <nl> + QPointer < EditRestrictedBox > _editBox ; <nl> <nl> } ; <nl> <nl> + void BlockedBoxController : : peerListSearchAddRow ( gsl : : not_null < PeerData * > peer ) { <nl> + PeerListController : : peerListSearchAddRow ( peer ) ; <nl> + if ( _restricted & & delegate ( ) - > peerListFullRowsCount ( ) > 0 ) { <nl> + setDescriptionText ( QString ( ) ) ; <nl> + } <nl> + } <nl> + <nl> + BlockedBoxController : : BlockedBoxController ( gsl : : not_null < ChannelData * > channel , bool restricted ) : PeerListController ( std : : make_unique < BlockedBoxSearchController > ( channel , restricted , & _rights ) ) <nl> + , _channel ( channel ) <nl> + , _restricted ( restricted ) { <nl> + } <nl> + <nl> void BlockedBoxController : : prepare ( ) { <nl> - view ( ) - > setTitle ( langFactory ( lng_blocked_list_title ) ) ; <nl> - view ( ) - > addButton ( langFactory ( lng_close ) , [ this ] { view ( ) - > closeBox ( ) ; } ) ; <nl> - view ( ) - > setAboutText ( lang ( lng_contacts_loading ) ) ; <nl> - view ( ) - > refreshRows ( ) ; <nl> + delegate ( ) - > peerListSetSearchMode ( PeerListSearchMode : : Complex ) ; <nl> + delegate ( ) - > peerListSetTitle ( langFactory ( _restricted ? lng_restricted_list_title : lng_blocked_list_title ) ) ; <nl> + setDescriptionText ( lang ( lng_contacts_loading ) ) ; <nl> + setSearchNoResultsText ( lang ( lng_blocked_list_not_found ) ) ; <nl> + delegate ( ) - > peerListRefreshRows ( ) ; <nl> <nl> preloadRows ( ) ; <nl> } <nl> void BlockedBoxController : : preloadRows ( ) { <nl> return ; <nl> } <nl> <nl> - _loadRequestId = request ( MTPchannels_GetParticipants ( _channel - > inputChannel , MTP_channelParticipantsKicked ( MTP_string ( " " ) ) , MTP_int ( _offset ) , MTP_int ( kBlockedPerPage ) ) ) . done ( [ this ] ( const MTPchannels_ChannelParticipants & result ) { <nl> + auto filter = _restricted ? MTP_channelParticipantsBanned ( MTP_string ( QString ( ) ) ) : MTP_channelParticipantsKicked ( MTP_string ( QString ( ) ) ) ; <nl> + _loadRequestId = request ( MTPchannels_GetParticipants ( _channel - > inputChannel , filter , MTP_int ( _offset ) , MTP_int ( kBlockedPerPage ) ) ) . done ( [ this ] ( const MTPchannels_ChannelParticipants & result ) { <nl> Expects ( result . type ( ) = = mtpc_channels_channelParticipants ) ; <nl> <nl> _loadRequestId = 0 ; <nl> <nl> if ( ! _offset ) { <nl> - view ( ) - > setAboutText ( lang ( lng_group_blocked_list_about ) ) ; <nl> + setDescriptionText ( _restricted ? QString ( ) : lang ( lng_group_blocked_list_about ) ) ; <nl> } <nl> auto & participants = result . c_channels_channelParticipants ( ) ; <nl> App : : feedUsers ( participants . vusers ) ; <nl> void BlockedBoxController : : preloadRows ( ) { <nl> } else { <nl> for_const ( auto & participant , list ) { <nl> + + _offset ; <nl> - if ( participant . type ( ) ! = mtpc_channelParticipantBanned ) { <nl> - LOG ( ( " API Error : Non banned participant got while requesting for kicked participants : % 1 " ) . arg ( participant . type ( ) ) ) ; <nl> - continue ; <nl> - } <nl> - auto & kicked = participant . c_channelParticipantBanned ( ) ; <nl> - if ( ! kicked . is_left ( ) ) { <nl> - LOG ( ( " API Error : Non left participant got while requesting for kicked participants . " ) ) ; <nl> + if ( participant . type ( ) = = mtpc_channelParticipantBanned ) { <nl> + auto & banned = participant . c_channelParticipantBanned ( ) ; <nl> + auto userId = banned . vuser_id . v ; <nl> + if ( auto user = App : : userLoaded ( userId ) ) { <nl> + appendRow ( user ) ; <nl> + _rights [ user ] = banned . vbanned_rights ; <nl> + } <nl> + } else { <nl> + LOG ( ( " API Error : Non kicked participant got while requesting for kicked participants : % 1 " ) . arg ( participant . type ( ) ) ) ; <nl> continue ; <nl> } <nl> - auto userId = kicked . vuser_id . v ; <nl> - if ( auto user = App : : userLoaded ( userId ) ) { <nl> - appendRow ( user ) ; <nl> - } <nl> } <nl> } <nl> - view ( ) - > refreshRows ( ) ; <nl> + delegate ( ) - > peerListRefreshRows ( ) ; <nl> } ) . fail ( [ this ] ( const RPCError & error ) { <nl> _loadRequestId = 0 ; <nl> } ) . send ( ) ; <nl> } <nl> <nl> - void BlockedBoxController : : rowClicked ( PeerListBox : : Row * row ) { <nl> + void BlockedBoxController : : rowClicked ( gsl : : not_null < PeerListRow * > row ) { <nl> Ui : : showPeerHistoryAsync ( row - > peer ( ) - > id , ShowAtUnreadMsgId ) ; <nl> } <nl> <nl> - void BlockedBoxController : : rowActionClicked ( PeerListBox : : Row * row ) { <nl> + void BlockedBoxController : : rowActionClicked ( gsl : : not_null < PeerListRow * > row ) { <nl> auto user = row - > peer ( ) - > asUser ( ) ; <nl> Expects ( user ! = nullptr ) ; <nl> <nl> - view ( ) - > removeRow ( row ) ; <nl> - view ( ) - > refreshRows ( ) ; <nl> + if ( _restricted ) { <nl> + auto it = _rights . find ( user ) ; <nl> + t_assert ( it ! = _rights . cend ( ) ) ; <nl> + auto weak = base : : weak_unique_ptr < BlockedBoxController > ( this ) ; <nl> + _editBox = Ui : : show ( Box < EditRestrictedBox > ( _channel , user , it - > second , [ megagroup = _channel . get ( ) , user , weak ] ( const MTPChannelBannedRights & rights ) { <nl> + MTP : : send ( MTPchannels_EditBanned ( megagroup - > inputChannel , user - > inputUser , rights ) , rpcDone ( [ megagroup , user , weak , rights ] ( const MTPUpdates & result ) { <nl> + if ( App : : main ( ) ) App : : main ( ) - > sentUpdatesReceived ( result ) ; <nl> + megagroup - > applyEditBanned ( user , rights ) ; <nl> + if ( weak ) { <nl> + weak - > _editBox - > closeBox ( ) ; <nl> + if ( rights . c_channelBannedRights ( ) . vflags . v = = 0 | | rights . c_channelBannedRights ( ) . is_view_messages ( ) ) { <nl> + if ( auto row = weak - > delegate ( ) - > peerListFindRow ( user - > id ) ) { <nl> + weak - > delegate ( ) - > peerListRemoveRow ( row ) ; <nl> + weak - > delegate ( ) - > peerListRefreshRows ( ) ; <nl> + if ( ! weak - > delegate ( ) - > peerListFullRowsCount ( ) ) { <nl> + weak - > setDescriptionText ( lang ( lng_blocked_list_not_found ) ) ; <nl> + } <nl> + } <nl> + } else { <nl> + weak - > _rights [ user ] = rights ; <nl> + } <nl> + } <nl> + } ) ) ; <nl> + } ) , KeepOtherLayers ) ; <nl> + } else { <nl> + delegate ( ) - > peerListRemoveRow ( row ) ; <nl> + delegate ( ) - > peerListRefreshRows ( ) ; <nl> <nl> - AuthSession : : Current ( ) . api ( ) . unblockParticipant ( _channel , user ) ; <nl> + AuthSession : : Current ( ) . api ( ) . unblockParticipant ( _channel , user ) ; <nl> + } <nl> } <nl> <nl> bool BlockedBoxController : : appendRow ( UserData * user ) { <nl> - if ( view ( ) - > findRow ( user - > id ) ) { <nl> + if ( delegate ( ) - > peerListFindRow ( user - > id ) ) { <nl> return false ; <nl> } <nl> - view ( ) - > appendRow ( createRow ( user ) ) ; <nl> + delegate ( ) - > peerListAppendRow ( createRow ( user ) ) ; <nl> + if ( _restricted ) { <nl> + setDescriptionText ( QString ( ) ) ; <nl> + } <nl> return true ; <nl> } <nl> <nl> bool BlockedBoxController : : prependRow ( UserData * user ) { <nl> - if ( view ( ) - > findRow ( user - > id ) ) { <nl> + if ( delegate ( ) - > peerListFindRow ( user - > id ) ) { <nl> return false ; <nl> } <nl> - view ( ) - > prependRow ( createRow ( user ) ) ; <nl> + delegate ( ) - > peerListPrependRow ( createRow ( user ) ) ; <nl> + if ( _restricted ) { <nl> + setDescriptionText ( QString ( ) ) ; <nl> + } <nl> return true ; <nl> } <nl> <nl> - std : : unique_ptr < PeerListBox : : Row > BlockedBoxController : : createRow ( UserData * user ) const { <nl> + std : : unique_ptr < PeerListRow > BlockedBoxController : : createRow ( UserData * user ) const { <nl> auto row = std : : make_unique < PeerListRowWithLink > ( user ) ; <nl> - row - > setActionLink ( lang ( lng_blocked_list_unblock ) ) ; <nl> - auto status = [ user ] ( ) - > QString { <nl> - if ( user - > botInfo ) { <nl> - return lang ( lng_status_bot ) ; <nl> - } else if ( user - > phone ( ) . isEmpty ( ) ) { <nl> - return lang ( lng_blocked_list_unknown_phone ) ; <nl> - } <nl> - return App : : formatPhone ( user - > phone ( ) ) ; <nl> - } ; <nl> - row - > setCustomStatus ( status ( ) ) ; <nl> + row - > setActionLink ( lang ( _restricted ? lng_profile_edit_permissions : lng_blocked_list_unblock ) ) ; <nl> return std : : move ( row ) ; <nl> } <nl> <nl> int SettingsWidget : : resizeGetHeight ( int newWidth ) { <nl> } ; <nl> moveLink ( _manageAdmins ) ; <nl> moveLink ( _manageBlockedUsers ) ; <nl> + moveLink ( _manageRestrictedUsers ) ; <nl> moveLink ( _inviteLink ) ; <nl> <nl> newHeight + = st : : profileBlockMarginBottom ; <nl> void SettingsWidget : : refreshManageAdminsButton ( ) { <nl> void SettingsWidget : : refreshManageBlockedUsersButton ( ) { <nl> auto hasManageBlockedUsers = [ this ] { <nl> if ( auto channel = peer ( ) - > asMegagroup ( ) ) { <nl> - return channel - > canBanMembers ( ) & & ( channel - > kickedCount ( ) > 0 | | channel - > restrictedCount ( ) > 0 ) ; <nl> + return channel - > canBanMembers ( ) & & ( channel - > kickedCount ( ) > 0 ) ; <nl> } <nl> return false ; <nl> } ; <nl> void SettingsWidget : : refreshManageBlockedUsersButton ( ) { <nl> _manageBlockedUsers - > show ( ) ; <nl> connect ( _manageBlockedUsers , SIGNAL ( clicked ( ) ) , this , SLOT ( onManageBlockedUsers ( ) ) ) ; <nl> } <nl> + <nl> + auto hasManageRestrictedUsers = [ this ] { <nl> + if ( auto channel = peer ( ) - > asMegagroup ( ) ) { <nl> + return channel - > canBanMembers ( ) & & ( channel - > restrictedCount ( ) > 0 ) ; <nl> + } <nl> + return false ; <nl> + } ; <nl> + _manageRestrictedUsers . destroy ( ) ; <nl> + if ( hasManageRestrictedUsers ( ) ) { <nl> + _manageRestrictedUsers . create ( this , lang ( lng_profile_manage_restrictedlist ) , st : : defaultLeftOutlineButton ) ; <nl> + _manageRestrictedUsers - > show ( ) ; <nl> + connect ( _manageRestrictedUsers , SIGNAL ( clicked ( ) ) , this , SLOT ( onManageRestrictedUsers ( ) ) ) ; <nl> + } <nl> } <nl> <nl> void SettingsWidget : : refreshInviteLinkButton ( ) { <nl> void SettingsWidget : : onManageAdmins ( ) { <nl> <nl> void SettingsWidget : : onManageBlockedUsers ( ) { <nl> if ( auto channel = peer ( ) - > asMegagroup ( ) ) { <nl> - Ui : : show ( Box < PeerListBox > ( std : : make_unique < BlockedBoxController > ( channel ) ) ) ; <nl> + Ui : : show ( Box < PeerListBox > ( std : : make_unique < BlockedBoxController > ( channel , false ) , [ ] ( PeerListBox * box ) { <nl> + box - > addButton ( langFactory ( lng_close ) , [ box ] { box - > closeBox ( ) ; } ) ; <nl> + } ) ) ; <nl> + } <nl> + } <nl> + <nl> + void SettingsWidget : : onManageRestrictedUsers ( ) { <nl> + if ( auto channel = peer ( ) - > asMegagroup ( ) ) { <nl> + Ui : : show ( Box < PeerListBox > ( std : : make_unique < BlockedBoxController > ( channel , true ) , [ ] ( PeerListBox * box ) { <nl> + box - > addButton ( langFactory ( lng_close ) , [ box ] { box - > closeBox ( ) ; } ) ; <nl> + } ) ) ; <nl> } <nl> } <nl> <nl> mmm a / Telegram / SourceFiles / profile / profile_block_settings . h <nl> ppp b / Telegram / SourceFiles / profile / profile_block_settings . h <nl> private slots : <nl> void onNotificationsChange ( ) ; <nl> void onManageAdmins ( ) ; <nl> void onManageBlockedUsers ( ) ; <nl> + void onManageRestrictedUsers ( ) ; <nl> void onInviteLink ( ) ; <nl> <nl> private : <nl> private slots : <nl> / / In channels : creator of supergroup can see this link . <nl> object_ptr < Ui : : LeftOutlineButton > _manageAdmins = { nullptr } ; <nl> object_ptr < Ui : : LeftOutlineButton > _manageBlockedUsers = { nullptr } ; <nl> + object_ptr < Ui : : LeftOutlineButton > _manageRestrictedUsers = { nullptr } ; <nl> object_ptr < Ui : : LeftOutlineButton > _inviteLink = { nullptr } ; <nl> <nl> } ; <nl> mmm a / Telegram / SourceFiles / settings / settings_privacy_controllers . cpp <nl> ppp b / Telegram / SourceFiles / settings / settings_privacy_controllers . cpp <nl> constexpr auto kBlockedPerPage = 40 ; <nl> <nl> class BlockUserBoxController : public ChatsListBoxController { <nl> public : <nl> - void rowClicked ( PeerListBox : : Row * row ) override ; <nl> + void rowClicked ( gsl : : not_null < PeerListRow * > row ) override ; <nl> + <nl> + void setBlockUserCallback ( base : : lambda < void ( gsl : : not_null < UserData * > user ) > callback ) { <nl> + _blockUserCallback = std : : move ( callback ) ; <nl> + } <nl> <nl> protected : <nl> void prepareViewHook ( ) override ; <nl> - std : : unique_ptr < Row > createRow ( History * history ) override ; <nl> + std : : unique_ptr < Row > createRow ( gsl : : not_null < History * > history ) override ; <nl> void updateRowHook ( Row * row ) override { <nl> updateIsBlocked ( row , row - > peer ( ) - > asUser ( ) ) ; <nl> - view ( ) - > updateRow ( row ) ; <nl> + delegate ( ) - > peerListUpdateRow ( row ) ; <nl> } <nl> <nl> private : <nl> - void updateIsBlocked ( PeerListBox : : Row * row , UserData * user ) const ; <nl> + void updateIsBlocked ( gsl : : not_null < PeerListRow * > row , UserData * user ) const ; <nl> + <nl> + base : : lambda < void ( gsl : : not_null < UserData * > user ) > _blockUserCallback ; <nl> <nl> } ; <nl> <nl> void BlockUserBoxController : : prepareViewHook ( ) { <nl> - view ( ) - > setTitle ( langFactory ( lng_blocked_list_add_title ) ) ; <nl> - view ( ) - > addButton ( langFactory ( lng_cancel ) , [ this ] { view ( ) - > closeBox ( ) ; } ) ; <nl> - <nl> + delegate ( ) - > peerListSetTitle ( langFactory ( lng_blocked_list_add_title ) ) ; <nl> subscribe ( Notify : : PeerUpdated ( ) , Notify : : PeerUpdatedHandler ( Notify : : PeerUpdate : : Flag : : UserIsBlocked , [ this ] ( const Notify : : PeerUpdate & update ) { <nl> if ( auto user = update . peer - > asUser ( ) ) { <nl> - if ( auto row = view ( ) - > findRow ( user - > id ) ) { <nl> + if ( auto row = delegate ( ) - > peerListFindRow ( user - > id ) ) { <nl> updateIsBlocked ( row , user ) ; <nl> - view ( ) - > updateRow ( row ) ; <nl> + delegate ( ) - > peerListUpdateRow ( row ) ; <nl> } <nl> } <nl> } ) ) ; <nl> } <nl> <nl> - void BlockUserBoxController : : updateIsBlocked ( PeerListBox : : Row * row , UserData * user ) const { <nl> + void BlockUserBoxController : : updateIsBlocked ( gsl : : not_null < PeerListRow * > row , UserData * user ) const { <nl> auto blocked = user - > isBlocked ( ) ; <nl> row - > setDisabled ( blocked ) ; <nl> if ( blocked ) { <nl> void BlockUserBoxController : : updateIsBlocked ( PeerListBox : : Row * row , UserData * us <nl> } <nl> } <nl> <nl> - void BlockUserBoxController : : rowClicked ( PeerListBox : : Row * row ) { <nl> - auto user = row - > peer ( ) - > asUser ( ) ; <nl> - Expects ( user ! = nullptr ) ; <nl> - <nl> - App : : api ( ) - > blockUser ( user ) ; <nl> - view ( ) - > closeBox ( ) ; <nl> + void BlockUserBoxController : : rowClicked ( gsl : : not_null < PeerListRow * > row ) { <nl> + _blockUserCallback ( row - > peer ( ) - > asUser ( ) ) ; <nl> } <nl> <nl> - std : : unique_ptr < BlockUserBoxController : : Row > BlockUserBoxController : : createRow ( History * history ) { <nl> + std : : unique_ptr < BlockUserBoxController : : Row > BlockUserBoxController : : createRow ( gsl : : not_null < History * > history ) { <nl> if ( auto user = history - > peer - > asUser ( ) ) { <nl> auto row = std : : make_unique < Row > ( history ) ; <nl> updateIsBlocked ( row . get ( ) , user ) ; <nl> std : : unique_ptr < BlockUserBoxController : : Row > BlockUserBoxController : : createRow ( H <nl> } / / namespace <nl> <nl> void BlockedBoxController : : prepare ( ) { <nl> - view ( ) - > setTitle ( langFactory ( lng_blocked_list_title ) ) ; <nl> - view ( ) - > addButton ( langFactory ( lng_close ) , [ this ] { view ( ) - > closeBox ( ) ; } ) ; <nl> - view ( ) - > addLeftButton ( langFactory ( lng_blocked_list_add ) , [ this ] { blockUser ( ) ; } ) ; <nl> - view ( ) - > setAboutText ( lang ( lng_contacts_loading ) ) ; <nl> - view ( ) - > refreshRows ( ) ; <nl> + delegate ( ) - > peerListSetTitle ( langFactory ( lng_blocked_list_title ) ) ; <nl> + setDescriptionText ( lang ( lng_contacts_loading ) ) ; <nl> + delegate ( ) - > peerListRefreshRows ( ) ; <nl> <nl> subscribe ( Notify : : PeerUpdated ( ) , Notify : : PeerUpdatedHandler ( Notify : : PeerUpdate : : Flag : : UserIsBlocked , [ this ] ( const Notify : : PeerUpdate & update ) { <nl> if ( auto user = update . peer - > asUser ( ) ) { <nl> void BlockedBoxController : : preloadRows ( ) { <nl> _loadRequestId = 0 ; <nl> <nl> if ( ! _offset ) { <nl> - view ( ) - > setAboutText ( lang ( lng_blocked_list_about ) ) ; <nl> + setDescriptionText ( lang ( lng_blocked_list_about ) ) ; <nl> } <nl> <nl> auto handleContactsBlocked = [ ] ( auto & list ) { <nl> void BlockedBoxController : : preloadRows ( ) { <nl> } ) . send ( ) ; <nl> } <nl> <nl> - void BlockedBoxController : : rowClicked ( PeerListBox : : Row * row ) { <nl> + void BlockedBoxController : : rowClicked ( gsl : : not_null < PeerListRow * > row ) { <nl> Ui : : showPeerHistoryAsync ( row - > peer ( ) - > id , ShowAtUnreadMsgId ) ; <nl> } <nl> <nl> - void BlockedBoxController : : rowActionClicked ( PeerListBox : : Row * row ) { <nl> + void BlockedBoxController : : rowActionClicked ( gsl : : not_null < PeerListRow * > row ) { <nl> auto user = row - > peer ( ) - > asUser ( ) ; <nl> Expects ( user ! = nullptr ) ; <nl> <nl> void BlockedBoxController : : receivedUsers ( const QVector < MTPContactBlocked > & resul <nl> user - > setBlockStatus ( UserData : : BlockStatus : : Blocked ) ; <nl> } <nl> } <nl> - view ( ) - > refreshRows ( ) ; <nl> + delegate ( ) - > peerListRefreshRows ( ) ; <nl> } <nl> <nl> void BlockedBoxController : : handleBlockedEvent ( UserData * user ) { <nl> if ( user - > isBlocked ( ) ) { <nl> if ( prependRow ( user ) ) { <nl> - view ( ) - > refreshRows ( ) ; <nl> - view ( ) - > onScrollToY ( 0 ) ; <nl> + delegate ( ) - > peerListRefreshRows ( ) ; <nl> + delegate ( ) - > peerListScrollToTop ( ) ; <nl> } <nl> - } else if ( auto row = view ( ) - > findRow ( user - > id ) ) { <nl> - view ( ) - > removeRow ( row ) ; <nl> - view ( ) - > refreshRows ( ) ; <nl> + } else if ( auto row = delegate ( ) - > peerListFindRow ( user - > id ) ) { <nl> + delegate ( ) - > peerListRemoveRow ( row ) ; <nl> + delegate ( ) - > peerListRefreshRows ( ) ; <nl> } <nl> } <nl> <nl> - void BlockedBoxController : : blockUser ( ) { <nl> - Ui : : show ( Box < PeerListBox > ( std : : make_unique < BlockUserBoxController > ( ) ) , KeepOtherLayers ) ; <nl> + void BlockedBoxController : : BlockNewUser ( ) { <nl> + auto controller = std : : make_unique < BlockUserBoxController > ( ) ; <nl> + auto initBox = [ controller = controller . get ( ) ] ( PeerListBox * box ) { <nl> + controller - > setBlockUserCallback ( [ box ] ( gsl : : not_null < UserData * > user ) { <nl> + App : : api ( ) - > blockUser ( user ) ; <nl> + box - > closeBox ( ) ; <nl> + } ) ; <nl> + box - > addButton ( langFactory ( lng_cancel ) , [ box ] { box - > closeBox ( ) ; } ) ; <nl> + } ; <nl> + Ui : : show ( Box < PeerListBox > ( std : : move ( controller ) , std : : move ( initBox ) ) , KeepOtherLayers ) ; <nl> } <nl> <nl> bool BlockedBoxController : : appendRow ( UserData * user ) { <nl> - if ( view ( ) - > findRow ( user - > id ) ) { <nl> + if ( delegate ( ) - > peerListFindRow ( user - > id ) ) { <nl> return false ; <nl> } <nl> - view ( ) - > appendRow ( createRow ( user ) ) ; <nl> + delegate ( ) - > peerListAppendRow ( createRow ( user ) ) ; <nl> return true ; <nl> } <nl> <nl> bool BlockedBoxController : : prependRow ( UserData * user ) { <nl> - if ( view ( ) - > findRow ( user - > id ) ) { <nl> + if ( delegate ( ) - > peerListFindRow ( user - > id ) ) { <nl> return false ; <nl> } <nl> - view ( ) - > prependRow ( createRow ( user ) ) ; <nl> + delegate ( ) - > peerListPrependRow ( createRow ( user ) ) ; <nl> return true ; <nl> } <nl> <nl> - std : : unique_ptr < PeerListBox : : Row > BlockedBoxController : : createRow ( UserData * user ) const { <nl> + std : : unique_ptr < PeerListRow > BlockedBoxController : : createRow ( UserData * user ) const { <nl> auto row = std : : make_unique < PeerListRowWithLink > ( user ) ; <nl> row - > setActionLink ( lang ( lng_blocked_list_unblock ) ) ; <nl> auto status = [ user ] ( ) - > QString { <nl> mmm a / Telegram / SourceFiles / settings / settings_privacy_controllers . h <nl> ppp b / Telegram / SourceFiles / settings / settings_privacy_controllers . h <nl> Copyright ( c ) 2014 - 2017 John Preston , https : / / desktop . telegram . org <nl> <nl> namespace Settings { <nl> <nl> - class BlockedBoxController : public PeerListBox : : Controller , private base : : Subscriber , private MTP : : Sender { <nl> + class BlockedBoxController : public PeerListController , private base : : Subscriber , private MTP : : Sender { <nl> public : <nl> void prepare ( ) override ; <nl> - void rowClicked ( PeerListBox : : Row * row ) override ; <nl> - void rowActionClicked ( PeerListBox : : Row * row ) override ; <nl> + void rowClicked ( gsl : : not_null < PeerListRow * > row ) override ; <nl> + void rowActionClicked ( gsl : : not_null < PeerListRow * > row ) override ; <nl> void preloadRows ( ) override ; <nl> <nl> + static void BlockNewUser ( ) ; <nl> + <nl> private : <nl> void receivedUsers ( const QVector < MTPContactBlocked > & result ) ; <nl> void handleBlockedEvent ( UserData * user ) ; <nl> - void blockUser ( ) ; <nl> <nl> bool appendRow ( UserData * user ) ; <nl> bool prependRow ( UserData * user ) ; <nl> - std : : unique_ptr < PeerListBox : : Row > createRow ( UserData * user ) const ; <nl> + std : : unique_ptr < PeerListRow > createRow ( UserData * user ) const ; <nl> <nl> int _offset = 0 ; <nl> mtpRequestId _loadRequestId = 0 ; <nl> mmm a / Telegram / SourceFiles / settings / settings_privacy_widget . cpp <nl> ppp b / Telegram / SourceFiles / settings / settings_privacy_widget . cpp <nl> void PrivacyWidget : : autoLockUpdated ( ) { <nl> } <nl> <nl> void PrivacyWidget : : onBlockedUsers ( ) { <nl> - Ui : : show ( Box < PeerListBox > ( std : : make_unique < BlockedBoxController > ( ) ) ) ; <nl> + Ui : : show ( Box < PeerListBox > ( std : : make_unique < BlockedBoxController > ( ) , [ ] ( PeerListBox * box ) { <nl> + box - > addButton ( langFactory ( lng_close ) , [ box ] { box - > closeBox ( ) ; } ) ; <nl> + box - > addLeftButton ( langFactory ( lng_blocked_list_add ) , [ box ] { BlockedBoxController : : BlockNewUser ( ) ; } ) ; <nl> + } ) ) ; <nl> } <nl> <nl> void PrivacyWidget : : onLastSeenPrivacy ( ) { <nl> mmm a / Telegram / SourceFiles / window / window_main_menu . cpp <nl> ppp b / Telegram / SourceFiles / window / window_main_menu . cpp <nl> void MainMenu : : refreshMenu ( ) { <nl> } , & st : : mainMenuContacts , & st : : mainMenuContactsOver ) ; <nl> if ( Global : : PhoneCallsEnabled ( ) ) { <nl> _menu - > addAction ( lang ( lng_menu_calls ) , [ ] { <nl> - Ui : : show ( Box < PeerListBox > ( std : : make_unique < Calls : : BoxController > ( ) ) ) ; <nl> + Ui : : show ( Box < PeerListBox > ( std : : make_unique < Calls : : BoxController > ( ) , [ ] ( PeerListBox * box ) { <nl> + box - > addButton ( langFactory ( lng_close ) , [ box ] { box - > closeBox ( ) ; } ) ; <nl> + } ) ) ; <nl> } , & st : : mainMenuCalls , & st : : mainMenuCallsOver ) ; <nl> } <nl> _menu - > addAction ( lang ( lng_menu_settings ) , [ ] { <nl>
|
Add restricted users box like kicked users box .
|
telegramdesktop/tdesktop
|
7fdac9cd94f44da03cf5a94af2e36b326d6dfdb1
|
2017-06-29T08:40:14Z
|
mmm a / . gitignore <nl> ppp b / . gitignore <nl> <nl> js - * . h <nl> - mr - * . h <nl> . deps <nl> . dirstamp <nl> * . o <nl> mr - * . h <nl> <nl> . libev - build - 64 <nl> . v8 - build - 64 <nl> - . icu - build - 64 <nl> . idea <nl> . mruby - build - 64 <nl> . zlib - build - 64 <nl> . libev - build - 32 <nl> . v8 - build - 32 <nl> . zlib - build - 32 <nl> - . icu - build - 32 <nl> . mruby - build - 32 <nl> . setup - mr - directories <nl> . setup - js - directories <nl> mr - * . h <nl> 3rdParty / libev / ARCH . x64 / <nl> 3rdParty / libev / ARCH . ia32 / <nl> 3rdParty / zlib - 1 . 2 . 7 / <nl> - 3rdParty / V8 - 3 . 29 . 59 / build / Debug * <nl> - 3rdParty / V8 - 3 . 29 . 59 / build / Release * <nl> - 3rdParty / V8 - 3 . 29 . 59 / build / all . opensdf <nl> <nl> Build * <nl> <nl>
|
cleanup of . gitignore
|
arangodb/arangodb
|
43556df7486e5e429016b241f75cb4bc4cb41e5a
|
2015-02-19T16:52:30Z
|
mmm a / CocosDenshion / proj . bada / sdk2 . 0 / . badaprj <nl> ppp b / CocosDenshion / proj . bada / sdk2 . 0 / . badaprj <nl> <nl> < ? xml version = " 1 . 0 " encoding = " UTF - 8 " standalone = " no " ? > <nl> < bada > <nl> - < type > 3 < / type > <nl> + < type > 0 < / type > <nl> < sdk > C : \ bada \ 2 . 0 . 2 < / sdk > <nl> - < model > WaveHVGA < / model > <nl> + < model > WaveWVGA < / model > <nl> < apiversioncheck > true < / apiversioncheck > <nl> < priviligecheck > false < / priviligecheck > <nl> < properties / > <nl> mmm a / CocosDenshion / proj . bada / sdk2 . 0 / . cproject <nl> ppp b / CocosDenshion / proj . bada / sdk2 . 0 / . cproject <nl> <nl> < listOptionValue builtIn = " false " value = " _DEBUG " / > <nl> < listOptionValue builtIn = " false " value = " CC_BADA_2_0 " / > <nl> < / option > <nl> - < option id = " osp . gnu . target . cpp . compiler . debug . so . option . include . paths . 716302668 " superClass = " osp . gnu . target . cpp . compiler . debug . so . option . include . paths " valueType = " includePath " > <nl> + < option id = " osp . gnu . target . cpp . compiler . debug . so . option . include . paths . 716302668 " name = " Include paths ( - I ) " superClass = " osp . gnu . target . cpp . compiler . debug . so . option . include . paths " valueType = " includePath " > <nl> < listOptionValue builtIn = " false " value = " & quot ; $ { SDKROOT } / include & quot ; " / > <nl> < listOptionValue builtIn = " false " value = " . . / . . / . . / include " / > <nl> + < listOptionValue builtIn = " false " value = " . . / . . / . . / bada " / > <nl> < / option > <nl> < inputType id = " cdt . managedbuild . tool . osp . gnu . cpp . compiler . input . 1952294255 " superClass = " cdt . managedbuild . tool . osp . gnu . cpp . compiler . input " / > <nl> < / tool > <nl> <nl> < / tool > <nl> < tool id = " cdt . managedbuild . tool . osp . gnu . target . c . linker . so . debug . 1930124323 " name = " bada C Linker " superClass = " cdt . managedbuild . tool . osp . gnu . target . c . linker . so . debug " / > <nl> < tool id = " cdt . managedbuild . tool . osp . gnu . target . cpp . linker . so . debug . 1196904841 " name = " bada C + + Linker " superClass = " cdt . managedbuild . tool . osp . gnu . target . cpp . linker . so . debug " > <nl> + < option id = " osp . gnu . target . cpp . link . debug . so . option . libs . paths . 864633692 " name = " Library search path ( - L ) " superClass = " osp . gnu . target . cpp . link . debug . so . option . libs . paths " valueType = " libPaths " > <nl> + < listOptionValue builtIn = " false " value = " & quot ; $ { TARGET_LIB_PATH } & quot ; " / > <nl> + < listOptionValue builtIn = " false " value = " & quot ; $ { PROJECT_ROOT } / lib & quot ; " / > <nl> + < / option > <nl> + < option id = " osp . gnu . target . cpp . link . debug . so . option . libs . 218425042 " name = " Libraries ( - l ) " superClass = " osp . gnu . target . cpp . link . debug . so . option . libs " valueType = " libs " > <nl> + < listOptionValue builtIn = " false " value = " vorbis " / > <nl> + < listOptionValue builtIn = " false " value = " ogg " / > <nl> + < / option > <nl> < inputType id = " cdt . managedbuild . tool . osp . gnu . cpp . linker . input . 1773800931 " superClass = " cdt . managedbuild . tool . osp . gnu . cpp . linker . input " > <nl> < additionalInput kind = " additionalinputdependency " paths = " $ ( USER_OBJS ) " / > <nl> < additionalInput kind = " additionalinput " paths = " $ ( LIBS ) " / > <nl> <nl> < / scannerConfigBuildInfo > <nl> < / storageModule > <nl> < storageModule moduleId = " org . eclipse . cdt . internal . ui . text . commentOwnerProjectMappings " / > <nl> + < storageModule moduleId = " org . eclipse . cdt . core . language . mapping " / > <nl> < / cconfiguration > <nl> < cconfiguration id = " cdt . managedbuild . config . osp . gnu . target . so . release . 284388679 " > <nl> < storageModule buildSystemId = " org . eclipse . cdt . managedbuilder . core . configurationDataProvider " id = " cdt . managedbuild . config . osp . gnu . target . so . release . 284388679 " moduleId = " org . eclipse . cdt . core . settings " name = " Target - Release " > <nl> <nl> < listOptionValue builtIn = " false " value = " SHP " / > <nl> < listOptionValue builtIn = " false " value = " CC_BADA_2_0 " / > <nl> < / option > <nl> - < option id = " osp . gnu . target . cpp . compiler . release . so . option . include . paths . 620428582 " superClass = " osp . gnu . target . cpp . compiler . release . so . option . include . paths " valueType = " includePath " > <nl> + < option id = " osp . gnu . target . cpp . compiler . release . so . option . include . paths . 620428582 " name = " Include paths ( - I ) " superClass = " osp . gnu . target . cpp . compiler . release . so . option . include . paths " valueType = " includePath " > <nl> < listOptionValue builtIn = " false " value = " & quot ; $ { SDKROOT } / include & quot ; " / > <nl> < listOptionValue builtIn = " false " value = " . . / . . / . . / include " / > <nl> + < listOptionValue builtIn = " false " value = " . . / . . / . . / bada " / > <nl> < / option > <nl> < inputType id = " cdt . managedbuild . tool . osp . gnu . cpp . compiler . input . 437912108 " superClass = " cdt . managedbuild . tool . osp . gnu . cpp . compiler . input " / > <nl> < / tool > <nl> <nl> < / tool > <nl> < tool id = " cdt . managedbuild . tool . osp . gnu . target . c . linker . so . release . 1201354205 " name = " bada C Linker " superClass = " cdt . managedbuild . tool . osp . gnu . target . c . linker . so . release " / > <nl> < tool id = " cdt . managedbuild . tool . osp . gnu . target . cpp . linker . so . release . 184411703 " name = " bada C + + Linker " superClass = " cdt . managedbuild . tool . osp . gnu . target . cpp . linker . so . release " > <nl> + < option id = " osp . gnu . target . cpp . link . release . so . option . libs . paths . 870091860 " name = " Library search path ( - L ) " superClass = " osp . gnu . target . cpp . link . release . so . option . libs . paths " valueType = " libPaths " > <nl> + < listOptionValue builtIn = " false " value = " & quot ; $ { TARGET_LIB_PATH } & quot ; " / > <nl> + < listOptionValue builtIn = " false " value = " & quot ; $ { PROJECT_ROOT } / lib & quot ; " / > <nl> + < / option > <nl> + < option id = " osp . gnu . target . cpp . link . release . so . option . libs . 904097450 " name = " Libraries ( - l ) " superClass = " osp . gnu . target . cpp . link . release . so . option . libs " valueType = " libs " > <nl> + < listOptionValue builtIn = " false " value = " vorbis " / > <nl> + < listOptionValue builtIn = " false " value = " ogg " / > <nl> + < / option > <nl> < inputType id = " cdt . managedbuild . tool . osp . gnu . cpp . linker . input . 2118565794 " superClass = " cdt . managedbuild . tool . osp . gnu . cpp . linker . input " > <nl> < additionalInput kind = " additionalinputdependency " paths = " $ ( USER_OBJS ) " / > <nl> < additionalInput kind = " additionalinput " paths = " $ ( LIBS ) " / > <nl> <nl> < / scannerConfigBuildInfo > <nl> < / storageModule > <nl> < storageModule moduleId = " org . eclipse . cdt . internal . ui . text . commentOwnerProjectMappings " / > <nl> + < storageModule moduleId = " org . eclipse . cdt . core . language . mapping " / > <nl> < / cconfiguration > <nl> < / storageModule > <nl> < storageModule moduleId = " cdtBuildSystem " version = " 4 . 0 . 0 " > <nl> mmm a / HelloWorld / bada / sdk2 . 0 / . cproject <nl> ppp b / HelloWorld / bada / sdk2 . 0 / . cproject <nl> <nl> < listOptionValue builtIn = " false " value = " . . / . . / . . / . . / chipmunk / include / chipmunk " / > <nl> < listOptionValue builtIn = " false " value = " . . / . . / . . / . . / CocosDenshion / include " / > <nl> < / option > <nl> - < option id = " osp . gnu . target . cpp . compiler . release . exe . option . preprocessor . def . 1056983953 " superClass = " osp . gnu . target . cpp . compiler . release . exe . option . preprocessor . def " valueType = " definedSymbols " > <nl> + < option id = " osp . gnu . target . cpp . compiler . release . exe . option . preprocessor . def . 1056983953 " name = " Defined symbols ( - D ) " superClass = " osp . gnu . target . cpp . compiler . release . exe . option . preprocessor . def " valueType = " definedSymbols " > <nl> < listOptionValue builtIn = " false " value = " SHP " / > <nl> < listOptionValue builtIn = " false " value = " CC_BADA_2_0 " / > <nl> < / option > <nl> mmm a / cocos2dx / platform / third_party / bada / src / libjpeg / sdk2 . 0 / . badaprj <nl> ppp b / cocos2dx / platform / third_party / bada / src / libjpeg / sdk2 . 0 / . badaprj <nl> <nl> < bada > <nl> < type > 0 < / type > <nl> < sdk > C : \ bada \ 2 . 0 . 2 < / sdk > <nl> - < model > WaveHVGA < / model > <nl> + < model > WaveWVGA < / model > <nl> < apiversioncheck > true < / apiversioncheck > <nl> < priviligecheck > false < / priviligecheck > <nl> < properties / > <nl> mmm a / cocos2dx / platform / third_party / bada / src / png / sdk2 . 0 / . badaprj <nl> ppp b / cocos2dx / platform / third_party / bada / src / png / sdk2 . 0 / . badaprj <nl> <nl> < bada > <nl> < type > 0 < / type > <nl> < sdk > C : \ bada \ 2 . 0 . 2 < / sdk > <nl> - < model > WaveHVGA < / model > <nl> + < model > WaveWVGA < / model > <nl> < apiversioncheck > true < / apiversioncheck > <nl> < priviligecheck > false < / priviligecheck > <nl> < properties / > <nl> mmm a / cocos2dx / platform / third_party / bada / src / zlib / sdk2 . 0 / . badaprj <nl> ppp b / cocos2dx / platform / third_party / bada / src / zlib / sdk2 . 0 / . badaprj <nl> <nl> < bada > <nl> < type > 0 < / type > <nl> < sdk > C : \ bada \ 2 . 0 . 2 < / sdk > <nl> - < model > WaveHVGA < / model > <nl> + < model > WaveWVGA < / model > <nl> < apiversioncheck > true < / apiversioncheck > <nl> < priviligecheck > false < / priviligecheck > <nl> < properties / > <nl> mmm a / cocos2dx / proj . bada / sdk2 . 0 / . badaprj <nl> ppp b / cocos2dx / proj . bada / sdk2 . 0 / . badaprj <nl> <nl> < bada > <nl> < type > 0 < / type > <nl> < sdk > C : \ bada \ 2 . 0 . 2 < / sdk > <nl> - < model > WaveHVGA < / model > <nl> + < model > WaveWVGA < / model > <nl> < apiversioncheck > true < / apiversioncheck > <nl> < priviligecheck > false < / priviligecheck > <nl> < properties / > <nl>
|
modify project configure
|
cocos2d/cocos2d-x
|
d061e8323dadd0418d7de000d9240c75136849a2
|
2011-10-27T11:22:14Z
|
mmm a / Telegram / Resources / basic . style <nl> ppp b / Telegram / Resources / basic . style <nl> infoButton : PeerAvatarButton { <nl> profileTopBarBackIconFg : # 0290d7 ; <nl> profileTopBarBackIcon : icon { { " title_back " , profileTopBarBackIconFg } } ; <nl> <nl> - historyReplyCancelIcon : icon { { " box_button_close - invert " , historyReplyBg } } ; <nl> - boxSearchCancelIcon : icon { { " box_button_close - invert " , boxSearchBg } } ; <nl> - settingsFixedBarCloseIcon : icon { { " box_button_close - invert " , settingsFixedBarBg } } ; <nl> + historyReplyCancelIcon : icon { { " box_button_close " , historyReplyCancelFg } } ; <nl> + historyReplyCancelIconOver : icon { { " box_button_close " , historyReplyCancelFgOver } } ; <nl> + boxSearchCancelIcon : icon { { " box_button_close " , boxSearchCancelIconFg } } ; <nl> + boxSearchCancelIconOver : icon { { " box_button_close " , boxSearchCancelIconFgOver } } ; <nl> + boxBlockTitleCloseIcon : icon { { " box_button_close " , boxBlockTitleCloseFg } } ; <nl> + boxBlockTitleCloseIconOver : icon { { " box_button_close " , boxBlockTitleCloseFgOver } } ; <nl> <nl> notifyFadeRight : icon { { " fade_horizontal " , notificationBg } } ; <nl> <nl> mmm a / Telegram / Resources / colors . palette <nl> ppp b / Telegram / Resources / colors . palette <nl> boxSearchBg : boxBg ; <nl> boxSearchCancelIconFg : cancelIconFg ; <nl> boxSearchCancelIconFgOver : cancelIconFgOver ; <nl> <nl> + boxBlockTitleBg : boxBg ; <nl> + boxBlockTitleFg : boxTitleFg ; <nl> + boxBlockTitleAdditionalFg : # 808080 ; <nl> + boxBlockTitleCloseFg : cancelIconFg ; <nl> + boxBlockTitleCloseFgOver : cancelIconFgOver ; <nl> + <nl> membersAboutLimitFg : windowSubTextFg ; <nl> <nl> contactsBg : windowBg ; <nl> photoCropFadeBg : # 0000007f ; <nl> photoCropPointFg : # ffffff7f ; <nl> <nl> / / settings <nl> - settingsFixedBarBg : boxBg ; <nl> - settingsCloseFg : cancelIconFg ; <nl> - settingsCloseFgOver : cancelIconFgOver ; <nl> - <nl> notificationsBoxMonitorFg : windowTextFg ; <nl> <nl> notificationSampleUserpicFg : windowActiveBg ; <nl> historySendIconFg : windowActiveBg ; <nl> historySendIconFgOver : windowActiveBg ; <nl> historyPinnedBg : historyComposeAreaBg ; <nl> historyReplyBg : historyComposeAreaBg ; <nl> - historyReplyCancelIconFg : cancelIconFg ; <nl> - historyReplyCancelIconFgOver : cancelIconFgOver ; <nl> + historyReplyCancelFg : cancelIconFg ; <nl> + historyReplyCancelFgOver : cancelIconFgOver ; <nl> <nl> historyComposeButtonBg : historyComposeAreaBg ; <nl> historyComposeButtonBgOver : # f5f5f5 ; <nl> Binary files a / Telegram / Resources / icons / box_title_shadow . png and b / Telegram / Resources / icons / box_title_shadow . png differ <nl> Binary files a / Telegram / Resources / icons / box_title_shadow @ 2x . png and b / Telegram / Resources / icons / box_title_shadow @ 2x . png differ <nl> Binary files a / Telegram / Resources / icons / dropdown_shadow . png and b / Telegram / Resources / icons / dropdown_shadow . png differ <nl> Binary files a / Telegram / Resources / icons / dropdown_shadow @ 2x . png and b / Telegram / Resources / icons / dropdown_shadow @ 2x . png differ <nl> new file mode 100644 <nl> index 00000000000 . . 199ab2b0c0f <nl> Binary files / dev / null and b / Telegram / Resources / icons / send_control_save . png differ <nl> new file mode 100644 <nl> index 00000000000 . . 5412d12966f <nl> Binary files / dev / null and b / Telegram / Resources / icons / send_control_save @ 2x . png differ <nl> Binary files a / Telegram / Resources / icons / send_control_silent_off . png and b / Telegram / Resources / icons / send_control_silent_off . png differ <nl> Binary files a / Telegram / Resources / icons / send_control_silent_off @ 2x . png and b / Telegram / Resources / icons / send_control_silent_off @ 2x . png differ <nl> Binary files a / Telegram / Resources / icons / send_control_silent_on . png and b / Telegram / Resources / icons / send_control_silent_on . png differ <nl> Binary files a / Telegram / Resources / icons / send_control_silent_on @ 2x . png and b / Telegram / Resources / icons / send_control_silent_on @ 2x . png differ <nl> mmm a / Telegram / Resources / sample . tdesktop - theme <nl> ppp b / Telegram / Resources / sample . tdesktop - theme <nl> boxTitleFg : # 404040 ; <nl> boxSearchBg : boxBg ; <nl> boxSearchCancelIconFg : cancelIconFg ; <nl> boxSearchCancelIconFgOver : cancelIconFgOver ; <nl> + boxBlockTitleBg : boxBg ; <nl> + boxBlockTitleFg : boxTitleFg ; <nl> + boxBlockTitleAdditionalFg : # 808080 ; <nl> + boxBlockTitleCloseFg : cancelIconFg ; <nl> + boxBlockTitleCloseFgOver : cancelIconFgOver ; <nl> membersAboutLimitFg : windowSubTextFg ; <nl> contactsBg : windowBg ; <nl> contactsBgOver : windowOverBg ; <nl> contactsNameFg : boxTextFg ; <nl> photoCropFadeBg : # 0000007f ; <nl> photoCropPointFg : # ffffff7f ; <nl> - settingsFixedBarBg : boxBg ; <nl> - settingsCloseFg : cancelIconFg ; <nl> - settingsCloseFgOver : cancelIconFgOver ; <nl> notificationsBoxMonitorFg : windowTextFg ; <nl> notificationSampleUserpicFg : windowActiveBg ; <nl> notificationSampleCloseFg : # d7d7d7 ; / / windowSubTextFg ; <nl> historySendIconFg : windowActiveBg ; <nl> historySendIconFgOver : windowActiveBg ; <nl> historyPinnedBg : historyComposeAreaBg ; <nl> historyReplyBg : historyComposeAreaBg ; <nl> - historyReplyCancelIconFg : cancelIconFg ; <nl> - historyReplyCancelIconFgOver : cancelIconFgOver ; <nl> + historyReplyCancelFg : cancelIconFg ; <nl> + historyReplyCancelFgOver : cancelIconFgOver ; <nl> historyComposeButtonBg : historyComposeAreaBg ; <nl> historyComposeButtonBgOver : # f5f5f5 ; <nl> historyTextInFg : windowTextFg ; <nl> mmm a / Telegram / Resources / winrc / Telegram . rc <nl> ppp b / Telegram / Resources / winrc / Telegram . rc <nl> IDI_ICON1 ICON " . . \ \ art \ \ icon256 . ico " <nl> / / <nl> <nl> VS_VERSION_INFO VERSIONINFO <nl> - FILEVERSION 0 , 10 , 19 , 2 <nl> - PRODUCTVERSION 0 , 10 , 19 , 2 <nl> + FILEVERSION 0 , 10 , 19 , 3 <nl> + PRODUCTVERSION 0 , 10 , 19 , 3 <nl> FILEFLAGSMASK 0x3fL <nl> # ifdef _DEBUG <nl> FILEFLAGS 0x1L <nl> BEGIN <nl> BLOCK " 040904b0 " <nl> BEGIN <nl> VALUE " CompanyName " , " Telegram Messenger LLP " <nl> - VALUE " FileVersion " , " 0 . 10 . 19 . 2 " <nl> + VALUE " FileVersion " , " 0 . 10 . 19 . 3 " <nl> VALUE " LegalCopyright " , " Copyright ( C ) 2014 - 2016 " <nl> VALUE " ProductName " , " Telegram Desktop " <nl> - VALUE " ProductVersion " , " 0 . 10 . 19 . 2 " <nl> + VALUE " ProductVersion " , " 0 . 10 . 19 . 3 " <nl> END <nl> END <nl> BLOCK " VarFileInfo " <nl> mmm a / Telegram / Resources / winrc / Updater . rc <nl> ppp b / Telegram / Resources / winrc / Updater . rc <nl> LANGUAGE LANG_ENGLISH , SUBLANG_ENGLISH_US <nl> / / <nl> <nl> VS_VERSION_INFO VERSIONINFO <nl> - FILEVERSION 0 , 10 , 19 , 2 <nl> - PRODUCTVERSION 0 , 10 , 19 , 2 <nl> + FILEVERSION 0 , 10 , 19 , 3 <nl> + PRODUCTVERSION 0 , 10 , 19 , 3 <nl> FILEFLAGSMASK 0x3fL <nl> # ifdef _DEBUG <nl> FILEFLAGS 0x1L <nl> BEGIN <nl> BEGIN <nl> VALUE " CompanyName " , " Telegram Messenger LLP " <nl> VALUE " FileDescription " , " Telegram Updater " <nl> - VALUE " FileVersion " , " 0 . 10 . 19 . 2 " <nl> + VALUE " FileVersion " , " 0 . 10 . 19 . 3 " <nl> VALUE " LegalCopyright " , " Copyright ( C ) 2014 - 2016 " <nl> VALUE " ProductName " , " Telegram Desktop " <nl> - VALUE " ProductVersion " , " 0 . 10 . 19 . 2 " <nl> + VALUE " ProductVersion " , " 0 . 10 . 19 . 3 " <nl> END <nl> END <nl> BLOCK " VarFileInfo " <nl> mmm a / Telegram / SourceFiles / boxes / aboutbox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / aboutbox . cpp <nl> Full license : https : / / github . com / telegramdesktop / tdesktop / blob / master / LICENSE <nl> Copyright ( c ) 2014 - 2016 John Preston , https : / / desktop . telegram . org <nl> * / <nl> # include " stdafx . h " <nl> - # include " lang . h " <nl> + # include " boxes / aboutbox . h " <nl> <nl> - # include " aboutbox . h " <nl> + # include " lang . h " <nl> # include " mainwidget . h " <nl> # include " mainwindow . h " <nl> - <nl> # include " autoupdater . h " <nl> # include " boxes / confirmbox . h " <nl> - <nl> # include " application . h " <nl> <nl> AboutBox : : AboutBox ( ) : AbstractBox ( st : : aboutWidth ) <nl> AboutBox : : AboutBox ( ) : AbstractBox ( st : : aboutWidth ) <nl> , _done ( this , lang ( lng_close ) , st : : defaultBoxButton ) { <nl> _text3 . setRichText ( lng_about_text_3 ( lt_faq_open , qsl ( " [ a href = \ " % 1 \ " ] " ) . arg ( telegramFaqLink ( ) ) , lt_faq_close , qsl ( " [ / a ] " ) ) ) ; <nl> <nl> - setMaxHeight ( st : : boxTitleHeight + st : : aboutTextTop + _text1 . height ( ) + st : : aboutSkip + _text2 . height ( ) + st : : aboutSkip + _text3 . height ( ) + st : : boxButtonPadding . top ( ) + _done . height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> + setMaxHeight ( titleHeight ( ) + st : : aboutTextTop + _text1 . height ( ) + st : : aboutSkip + _text2 . height ( ) + st : : aboutSkip + _text3 . height ( ) + st : : boxButtonPadding . top ( ) + _done . height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> <nl> connect ( & _version , SIGNAL ( clicked ( ) ) , this , SLOT ( onVersion ( ) ) ) ; <nl> connect ( & _done , SIGNAL ( clicked ( ) ) , this , SLOT ( onClose ( ) ) ) ; <nl> void AboutBox : : showAll ( ) { <nl> } <nl> <nl> void AboutBox : : resizeEvent ( QResizeEvent * e ) { <nl> - _version . moveToLeft ( st : : boxPadding . left ( ) , st : : boxTitleHeight + st : : aboutVersionTop ) ; <nl> - _text1 . moveToLeft ( st : : boxPadding . left ( ) , st : : boxTitleHeight + st : : aboutTextTop ) ; <nl> + _version . moveToLeft ( st : : boxPadding . left ( ) , titleHeight ( ) + st : : aboutVersionTop ) ; <nl> + _text1 . moveToLeft ( st : : boxPadding . left ( ) , titleHeight ( ) + st : : aboutTextTop ) ; <nl> _text2 . moveToLeft ( st : : boxPadding . left ( ) , _text1 . y ( ) + _text1 . height ( ) + st : : aboutSkip ) ; <nl> _text3 . moveToLeft ( st : : boxPadding . left ( ) , _text2 . y ( ) + _text2 . height ( ) + st : : aboutSkip ) ; <nl> _done . moveToRight ( st : : boxButtonPadding . right ( ) , height ( ) - st : : boxButtonPadding . bottom ( ) - _done . height ( ) ) ; <nl> mmm a / Telegram / SourceFiles / boxes / abstractbox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / abstractbox . cpp <nl> Copyright ( c ) 2014 - 2016 John Preston , https : / / desktop . telegram . org <nl> # include " stdafx . h " <nl> # include " boxes / abstractbox . h " <nl> <nl> + # include " styles / style_boxes . h " <nl> # include " localstorage . h " <nl> # include " lang . h " <nl> # include " ui / buttons / icon_button . h " <nl> # include " mainwidget . h " <nl> # include " mainwindow . h " <nl> - # include " styles / style_boxes . h " <nl> - <nl> - void BlueTitleShadow : : paintEvent ( QPaintEvent * e ) { <nl> - Painter p ( this ) ; <nl> - <nl> - QRect r ( e - > rect ( ) ) ; <nl> - st : : boxBlueTitleShadow . fill ( p , QRect ( r . left ( ) , 0 , r . width ( ) , height ( ) ) ) ; <nl> - } <nl> <nl> AbstractBox : : AbstractBox ( int w ) : LayerWidget ( App : : wnd ( ) - > bodyWidget ( ) ) { <nl> setAttribute ( Qt : : WA_OpaquePaintEvent ) ; <nl> - resize ( w , 0 ) ; <nl> + resize ( ( w > 0 ) ? w : st : : boxWideWidth , 0 ) ; <nl> } <nl> <nl> void AbstractBox : : prepare ( ) { <nl> + raiseShadow ( ) ; <nl> showAll ( ) ; <nl> } <nl> <nl> void AbstractBox : : keyPressEvent ( QKeyEvent * e ) { <nl> } <nl> <nl> void AbstractBox : : resizeEvent ( QResizeEvent * e ) { <nl> - if ( _blueClose ) { <nl> - _blueClose - > moveToRight ( 0 , 0 ) ; <nl> + if ( _blockClose ) { <nl> + _blockClose - > moveToRight ( 0 , 0 ) ; <nl> } <nl> - if ( _blueShadow ) { <nl> - _blueShadow - > moveToLeft ( 0 , st : : boxTitleHeight ) ; <nl> - _blueShadow - > resize ( width ( ) , st : : boxBlueTitleShadow . height ( ) ) ; <nl> + if ( _blockShadow ) { <nl> + _blockShadow - > setGeometry ( 0 , st : : boxBlockTitleHeight , width ( ) , st : : boxBlockTitleShadow . height ( ) ) ; <nl> } <nl> LayerWidget : : resizeEvent ( e ) ; <nl> } <nl> bool AbstractBox : : paint ( QPainter & p ) { <nl> return false ; <nl> } <nl> <nl> + int AbstractBox : : titleHeight ( ) const { <nl> + return _blockTitle ? st : : boxBlockTitleHeight : st : : boxTitleHeight ; <nl> + } <nl> + <nl> void AbstractBox : : paintTitle ( Painter & p , const QString & title , const QString & additional ) { <nl> - p . setFont ( st : : boxTitleFont ) ; <nl> - if ( _blueTitle ) { <nl> - p . fillRect ( 0 , 0 , width ( ) , st : : boxTitleHeight , st : : boxBlueTitleBg ) ; <nl> - p . setPen ( st : : boxBlueTitleFg ) ; <nl> + if ( _blockTitle ) { <nl> + p . fillRect ( 0 , 0 , width ( ) , titleHeight ( ) , st : : boxBlockTitleBg ) ; <nl> + <nl> + p . setFont ( st : : boxBlockTitleFont ) ; <nl> + p . setPen ( st : : boxBlockTitleFg ) ; <nl> <nl> - int32 titleWidth = st : : boxTitleFont - > width ( title ) ; <nl> - p . drawTextLeft ( st : : boxBlueTitlePosition . x ( ) , st : : boxBlueTitlePosition . y ( ) , width ( ) , title , titleWidth ) ; <nl> + auto titleWidth = st : : boxBlockTitleFont - > width ( title ) ; <nl> + p . drawTextLeft ( st : : boxBlockTitlePosition . x ( ) , st : : boxBlockTitlePosition . y ( ) , width ( ) , title , titleWidth ) ; <nl> <nl> if ( ! additional . isEmpty ( ) ) { <nl> - p . setFont ( st : : boxTextFont ) ; <nl> - p . setPen ( st : : boxBlueTitleAdditionalFg ) ; <nl> - p . drawTextLeft ( st : : boxBlueTitlePosition . x ( ) + titleWidth + st : : boxBlueTitleAdditionalSkip , st : : boxBlueTitlePosition . y ( ) , width ( ) , additional ) ; <nl> + p . setFont ( st : : boxBlockTitleAdditionalFont ) ; <nl> + p . setPen ( st : : boxBlockTitleAdditionalFg ) ; <nl> + p . drawTextLeft ( st : : boxBlockTitlePosition . x ( ) + titleWidth + st : : boxBlockTitleAdditionalSkip , st : : boxBlockTitlePosition . y ( ) , width ( ) , additional ) ; <nl> } <nl> } else { <nl> + p . setFont ( st : : boxTitleFont ) ; <nl> p . setPen ( st : : boxTitleFg ) ; <nl> p . drawTextLeft ( st : : boxTitlePosition . x ( ) , st : : boxTitlePosition . y ( ) , width ( ) , title ) ; <nl> } <nl> void AbstractBox : : onClose ( ) { <nl> emit closed ( this ) ; <nl> } <nl> <nl> - void AbstractBox : : setBlueTitle ( bool blue ) { <nl> - _blueTitle = blue ; <nl> - _blueShadow . create ( this ) ; <nl> - _blueClose . create ( this , st : : boxBlueClose ) ; <nl> - _blueClose - > setClickedCallback ( [ this ] { onClose ( ) ; } ) ; <nl> + void AbstractBox : : setBlockTitle ( bool block ) { <nl> + _blockTitle = block ; <nl> + _blockShadow . create ( this , st : : boxBlockTitleShadow ) ; <nl> + _blockClose . create ( this , st : : boxBlockTitleClose ) ; <nl> + _blockClose - > setClickedCallback ( [ this ] { onClose ( ) ; } ) ; <nl> } <nl> <nl> void AbstractBox : : raiseShadow ( ) { <nl> - if ( _blueShadow ) { <nl> - _blueShadow - > raise ( ) ; <nl> + if ( _blockShadow ) { <nl> + _blockShadow - > raise ( ) ; <nl> } <nl> } <nl> <nl> + ScrollableBoxShadow : : ScrollableBoxShadow ( QWidget * parent ) : Ui : : PlainShadow ( parent , st : : boxScrollShadowBg ) { <nl> + } <nl> + <nl> ScrollableBox : : ScrollableBox ( const style : : flatScroll & scroll , int32 w ) : AbstractBox ( w ) <nl> , _scroll ( this , scroll ) <nl> - , _topSkip ( st : : boxTitleHeight ) <nl> + , _topSkip ( st : : boxBlockTitleHeight ) <nl> , _bottomSkip ( st : : boxScrollSkip ) { <nl> - setBlueTitle ( true ) ; <nl> + setBlockTitle ( true ) ; <nl> } <nl> <nl> void ScrollableBox : : resizeEvent ( QResizeEvent * e ) { <nl> void ScrollableBox : : resizeEvent ( QResizeEvent * e ) { <nl> } <nl> <nl> void ScrollableBox : : init ( TWidget * inner , int bottomSkip , int topSkip ) { <nl> + if ( bottomSkip < 0 ) bottomSkip = st : : boxScrollSkip ; <nl> + if ( topSkip < 0 ) topSkip = st : : boxBlockTitleHeight ; <nl> _bottomSkip = bottomSkip ; <nl> _topSkip = topSkip ; <nl> _scroll - > setOwnedWidget ( inner ) ; <nl> void ScrollableBox : : init ( TWidget * inner , int bottomSkip , int topSkip ) { <nl> } <nl> <nl> void ScrollableBox : : setScrollSkips ( int bottomSkip , int topSkip ) { <nl> + if ( bottomSkip < 0 ) bottomSkip = st : : boxScrollSkip ; <nl> + if ( topSkip < 0 ) topSkip = st : : boxBlockTitleHeight ; <nl> if ( _topSkip ! = topSkip | | _bottomSkip ! = bottomSkip ) { <nl> _topSkip = topSkip ; <nl> _bottomSkip = bottomSkip ; <nl> mmm a / Telegram / SourceFiles / boxes / abstractbox . h <nl> ppp b / Telegram / SourceFiles / boxes / abstractbox . h <nl> Copyright ( c ) 2014 - 2016 John Preston , https : / / desktop . telegram . org <nl> # include " ui / widgets / shadow . h " <nl> <nl> namespace Ui { <nl> - class MaskButton ; <nl> + class IconButton ; <nl> + class GradientShadow ; <nl> } / / namespace Ui <nl> <nl> - class BlueTitleShadow : public TWidget { <nl> - public : <nl> - BlueTitleShadow ( QWidget * parent ) : TWidget ( parent ) { <nl> - } <nl> - void paintEvent ( QPaintEvent * e ) ; <nl> - } ; <nl> - <nl> class AbstractBox : public LayerWidget , protected base : : Subscriber { <nl> Q_OBJECT <nl> <nl> public : <nl> - AbstractBox ( int w = st : : boxWideWidth ) ; <nl> + AbstractBox ( int w = 0 ) ; <nl> void parentResized ( ) override ; <nl> void showDone ( ) override { <nl> showAll ( ) ; <nl> } <nl> <nl> - void setBlueTitle ( bool blue ) ; <nl> + void setBlockTitle ( bool block ) ; <nl> void raiseShadow ( ) ; <nl> <nl> public slots : <nl> public slots : <nl> <nl> void prepare ( ) ; <nl> bool paint ( QPainter & p ) ; <nl> + int titleHeight ( ) const ; <nl> void paintTitle ( Painter & p , const QString & title , const QString & additional = QString ( ) ) ; <nl> void setMaxHeight ( int32 maxHeight ) ; <nl> void resizeMaxHeight ( int32 newWidth , int32 maxHeight ) ; <nl> public slots : <nl> <nl> bool _closed = false ; <nl> <nl> - bool _blueTitle = false ; <nl> - ChildWidget < Ui : : MaskButton > _blueClose = { nullptr } ; <nl> - ChildWidget < BlueTitleShadow > _blueShadow = { nullptr } ; <nl> + bool _blockTitle = false ; <nl> + ChildWidget < Ui : : IconButton > _blockClose = { nullptr } ; <nl> + ChildWidget < Ui : : GradientShadow > _blockShadow = { nullptr } ; <nl> <nl> } ; <nl> <nl> class ScrollableBoxShadow : public Ui : : PlainShadow { <nl> public : <nl> - ScrollableBoxShadow ( QWidget * parent ) : Ui : : PlainShadow ( parent , st : : boxScrollShadowBg ) { <nl> - } <nl> + ScrollableBoxShadow ( QWidget * parent ) ; <nl> + <nl> } ; <nl> <nl> class ScrollableBox : public AbstractBox { <nl> public : <nl> - ScrollableBox ( const style : : flatScroll & scroll , int w = st : : boxWideWidth ) ; <nl> + ScrollableBox ( const style : : flatScroll & scroll , int w = 0 ) ; <nl> <nl> protected : <nl> - void init ( TWidget * inner , int bottomSkip = st : : boxScrollSkip , int topSkip = st : : boxTitleHeight ) ; <nl> - void setScrollSkips ( int bottomSkip = st : : boxScrollSkip , int topSkip = st : : boxTitleHeight ) ; <nl> + void init ( TWidget * inner , int bottomSkip = - 1 , int topSkip = - 1 ) ; <nl> + void setScrollSkips ( int bottomSkip = - 1 , int topSkip = - 1 ) ; <nl> <nl> void resizeEvent ( QResizeEvent * e ) override ; <nl> <nl> class ScrollableBox : public AbstractBox { <nl> <nl> class ItemListBox : public ScrollableBox { <nl> public : <nl> - ItemListBox ( const style : : flatScroll & scroll , int32 w = st : : boxWideWidth ) ; <nl> + ItemListBox ( const style : : flatScroll & scroll , int32 w = 0 ) ; <nl> <nl> } ; <nl> <nl> mmm a / Telegram / SourceFiles / boxes / addcontactbox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / addcontactbox . cpp <nl> Full license : https : / / github . com / telegramdesktop / tdesktop / blob / master / LICENSE <nl> Copyright ( c ) 2014 - 2016 John Preston , https : / / desktop . telegram . org <nl> * / <nl> # include " stdafx . h " <nl> - # include " lang . h " <nl> + # include " boxes / addcontactbox . h " <nl> <nl> + # include " styles / style_boxes . h " <nl> + # include " styles / style_dialogs . h " <nl> + # include " lang . h " <nl> # include " application . h " <nl> - # include " addcontactbox . h " <nl> - # include " contactsbox . h " <nl> - # include " confirmbox . h " <nl> - # include " photocropbox . h " <nl> + # include " boxes / contactsbox . h " <nl> + # include " boxes / confirmbox . h " <nl> + # include " boxes / photocropbox . h " <nl> # include " ui / filedialog . h " <nl> # include " ui / buttons / checkbox . h " <nl> # include " mainwidget . h " <nl> # include " mainwindow . h " <nl> # include " apiwrap . h " <nl> # include " observer_peer . h " <nl> - # include " styles / style_boxes . h " <nl> - # include " styles / style_dialogs . h " <nl> <nl> AddContactBox : : AddContactBox ( QString fname , QString lname , QString phone ) : AbstractBox ( st : : boxWidth ) <nl> , _first ( this , st : : defaultInputField , lang ( lng_signup_firstname ) , fname ) <nl> void AddContactBox : : initBox ( ) { <nl> bool readyToAdd = ! _phone - > getLastText ( ) . isEmpty ( ) & & ( ! _first - > getLastText ( ) . isEmpty ( ) | | ! _last - > getLastText ( ) . isEmpty ( ) ) ; <nl> _boxTitle = lang ( readyToAdd ? lng_confirm_contact_data : lng_enter_contact_data ) ; <nl> } <nl> - setMaxHeight ( st : : boxTitleHeight + st : : contactPadding . top ( ) + _first - > height ( ) + st : : contactSkip + _last - > height ( ) + st : : contactPhoneSkip + _phone - > height ( ) + st : : contactPadding . bottom ( ) + st : : boxPadding . bottom ( ) + st : : boxButtonPadding . top ( ) + _save - > height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> + setMaxHeight ( titleHeight ( ) + st : : contactPadding . top ( ) + _first - > height ( ) + st : : contactSkip + _last - > height ( ) + st : : contactPhoneSkip + _phone - > height ( ) + st : : contactPadding . bottom ( ) + st : : boxPadding . bottom ( ) + st : : boxButtonPadding . top ( ) + _save - > height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> _retry - > hide ( ) ; <nl> <nl> connect ( _save , SIGNAL ( clicked ( ) ) , this , SLOT ( onSave ( ) ) ) ; <nl> void AddContactBox : : paintEvent ( QPaintEvent * e ) { <nl> } else { <nl> p . setPen ( st : : boxTextFg ) ; <nl> p . setFont ( st : : boxTextFont ) ; <nl> - int32 h = height ( ) - st : : boxTitleHeight - st : : contactPadding . top ( ) - st : : contactPadding . bottom ( ) - st : : boxPadding . bottom ( ) - st : : boxButtonPadding . top ( ) - _retry - > height ( ) - st : : boxButtonPadding . bottom ( ) ; <nl> - p . drawText ( QRect ( st : : boxPadding . left ( ) , st : : boxTitleHeight + st : : contactPadding . top ( ) , width ( ) - st : : boxPadding . left ( ) - st : : boxPadding . right ( ) , h ) , lng_contact_not_joined ( lt_name , _sentName ) , style : : al_topleft ) ; <nl> + int32 h = height ( ) - titleHeight ( ) - st : : contactPadding . top ( ) - st : : contactPadding . bottom ( ) - st : : boxPadding . bottom ( ) - st : : boxButtonPadding . top ( ) - _retry - > height ( ) - st : : boxButtonPadding . bottom ( ) ; <nl> + p . drawText ( QRect ( st : : boxPadding . left ( ) , titleHeight ( ) + st : : contactPadding . top ( ) , width ( ) - st : : boxPadding . left ( ) - st : : boxPadding . right ( ) , h ) , lng_contact_not_joined ( lt_name , _sentName ) , style : : al_topleft ) ; <nl> } <nl> } <nl> <nl> void AddContactBox : : resizeEvent ( QResizeEvent * e ) { <nl> _last - > resize ( _first - > width ( ) , _last - > height ( ) ) ; <nl> _phone - > resize ( _first - > width ( ) , _last - > height ( ) ) ; <nl> if ( _invertOrder ) { <nl> - _last - > moveToLeft ( st : : boxPadding . left ( ) + st : : contactPadding . left ( ) , st : : boxTitleHeight + st : : contactPadding . top ( ) ) ; <nl> + _last - > moveToLeft ( st : : boxPadding . left ( ) + st : : contactPadding . left ( ) , titleHeight ( ) + st : : contactPadding . top ( ) ) ; <nl> _first - > moveToLeft ( st : : boxPadding . left ( ) + st : : contactPadding . left ( ) , _last - > y ( ) + _last - > height ( ) + st : : contactSkip ) ; <nl> _phone - > moveToLeft ( st : : boxPadding . left ( ) + st : : contactPadding . left ( ) , _first - > y ( ) + _first - > height ( ) + st : : contactPhoneSkip ) ; <nl> } else { <nl> - _first - > moveToLeft ( st : : boxPadding . left ( ) + st : : contactPadding . left ( ) , st : : boxTitleHeight + st : : contactPadding . top ( ) ) ; <nl> + _first - > moveToLeft ( st : : boxPadding . left ( ) + st : : contactPadding . left ( ) , titleHeight ( ) + st : : contactPadding . top ( ) ) ; <nl> _last - > moveToLeft ( st : : boxPadding . left ( ) + st : : contactPadding . left ( ) , _first - > y ( ) + _first - > height ( ) + st : : contactSkip ) ; <nl> _phone - > moveToLeft ( st : : boxPadding . left ( ) + st : : contactPadding . left ( ) , _last - > y ( ) + _last - > height ( ) + st : : contactPhoneSkip ) ; <nl> } <nl> _invertOrder ( ! peer - > isChat ( ) & & langFirstNameGoesSecond ( ) ) { <nl> _first - > setMaxLength ( MaxGroupChannelTitle ) ; <nl> _last - > setMaxLength ( MaxGroupChannelTitle ) ; <nl> <nl> - int32 h = st : : boxTitleHeight + st : : contactPadding . top ( ) + _first - > height ( ) ; <nl> + int32 h = titleHeight ( ) + st : : contactPadding . top ( ) + _first - > height ( ) ; <nl> if ( _peer - > isUser ( ) ) { <nl> _boxTitle = lang ( _peer = = App : : self ( ) ? lng_edit_self_title : lng_edit_contact_title ) ; <nl> h + = st : : contactSkip + _last - > height ( ) ; <nl> void EditNameTitleBox : : resizeEvent ( QResizeEvent * e ) { <nl> _first - > resize ( width ( ) - st : : boxPadding . left ( ) - st : : newGroupInfoPadding . left ( ) - st : : boxPadding . right ( ) , _first - > height ( ) ) ; <nl> _last - > resize ( _first - > size ( ) ) ; <nl> if ( _invertOrder ) { <nl> - _last - > moveToLeft ( st : : boxPadding . left ( ) + st : : newGroupInfoPadding . left ( ) , st : : boxTitleHeight + st : : contactPadding . top ( ) ) ; <nl> + _last - > moveToLeft ( st : : boxPadding . left ( ) + st : : newGroupInfoPadding . left ( ) , titleHeight ( ) + st : : contactPadding . top ( ) ) ; <nl> _first - > moveToLeft ( st : : boxPadding . left ( ) + st : : newGroupInfoPadding . left ( ) , _last - > y ( ) + _last - > height ( ) + st : : contactSkip ) ; <nl> } else { <nl> - _first - > moveToLeft ( st : : boxPadding . left ( ) + st : : newGroupInfoPadding . left ( ) , st : : boxTitleHeight + st : : contactPadding . top ( ) ) ; <nl> + _first - > moveToLeft ( st : : boxPadding . left ( ) + st : : newGroupInfoPadding . left ( ) , titleHeight ( ) + st : : contactPadding . top ( ) ) ; <nl> _last - > moveToLeft ( st : : boxPadding . left ( ) + st : : newGroupInfoPadding . left ( ) , _first - > y ( ) + _first - > height ( ) + st : : contactSkip ) ; <nl> } <nl> <nl> void EditChannelBox : : onDescriptionResized ( ) { <nl> } <nl> <nl> void EditChannelBox : : updateMaxHeight ( ) { <nl> - int32 h = st : : boxTitleHeight + st : : newGroupInfoPadding . top ( ) + _title - > height ( ) ; <nl> + int32 h = titleHeight ( ) + st : : newGroupInfoPadding . top ( ) + _title - > height ( ) ; <nl> h + = st : : newGroupDescriptionPadding . top ( ) + _description - > height ( ) + st : : newGroupDescriptionPadding . bottom ( ) ; <nl> if ( ! _channel - > isMegagroup ( ) ) { <nl> h + = st : : newGroupPublicLinkPadding . top ( ) + _sign - > height ( ) + st : : newGroupPublicLinkPadding . bottom ( ) ; <nl> void EditChannelBox : : updateMaxHeight ( ) { <nl> <nl> void EditChannelBox : : resizeEvent ( QResizeEvent * e ) { <nl> _title - > resize ( width ( ) - st : : boxPadding . left ( ) - st : : newGroupInfoPadding . left ( ) - st : : boxPadding . right ( ) , _title - > height ( ) ) ; <nl> - _title - > moveToLeft ( st : : boxPadding . left ( ) + st : : newGroupInfoPadding . left ( ) , st : : boxTitleHeight + st : : newGroupInfoPadding . top ( ) + st : : newGroupNamePosition . y ( ) ) ; <nl> + _title - > moveToLeft ( st : : boxPadding . left ( ) + st : : newGroupInfoPadding . left ( ) , titleHeight ( ) + st : : newGroupInfoPadding . top ( ) + st : : newGroupNamePosition . y ( ) ) ; <nl> <nl> _description - > moveToLeft ( st : : boxPadding . left ( ) + st : : newGroupInfoPadding . left ( ) , _title - > y ( ) + _title - > height ( ) + st : : newGroupDescriptionPadding . top ( ) ) ; <nl> <nl> mmm a / Telegram / SourceFiles / boxes / autolockbox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / autolockbox . cpp <nl> Full license : https : / / github . com / telegramdesktop / tdesktop / blob / master / LICENSE <nl> Copyright ( c ) 2014 - 2016 John Preston , https : / / desktop . telegram . org <nl> * / <nl> # include " stdafx . h " <nl> - # include " lang . h " <nl> + # include " boxes / autolockbox . h " <nl> <nl> + # include " lang . h " <nl> # include " localstorage . h " <nl> - <nl> - # include " autolockbox . h " <nl> - # include " confirmbox . h " <nl> + # include " boxes / confirmbox . h " <nl> # include " mainwidget . h " <nl> # include " mainwindow . h " <nl> # include " ui / buttons / checkbox . h " <nl> _close ( this , lang ( lng_box_ok ) , st : : defaultBoxButton ) { <nl> <nl> int32 opts [ ] = { 60 , 300 , 3600 , 18000 } , cnt = sizeof ( opts ) / sizeof ( opts [ 0 ] ) ; <nl> <nl> - resizeMaxHeight ( st : : langsWidth , st : : boxTitleHeight + cnt * ( st : : boxOptionListPadding . top ( ) + st : : langsButton . height ) + st : : boxOptionListPadding . bottom ( ) + st : : boxPadding . bottom ( ) + st : : boxButtonPadding . top ( ) + _close . height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> + resizeMaxHeight ( st : : langsWidth , titleHeight ( ) + cnt * ( st : : boxOptionListPadding . top ( ) + st : : langsButton . height ) + st : : boxOptionListPadding . bottom ( ) + st : : boxPadding . bottom ( ) + st : : boxButtonPadding . top ( ) + _close . height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> <nl> - int32 y = st : : boxTitleHeight + st : : boxOptionListPadding . top ( ) ; <nl> + int32 y = titleHeight ( ) + st : : boxOptionListPadding . top ( ) ; <nl> _options . reserve ( cnt ) ; <nl> for ( int32 i = 0 ; i < cnt ; + + i ) { <nl> int32 v = opts [ i ] ; <nl> mmm a / Telegram / SourceFiles / boxes / backgroundbox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / backgroundbox . cpp <nl> Full license : https : / / github . com / telegramdesktop / tdesktop / blob / master / LICENSE <nl> Copyright ( c ) 2014 - 2016 John Preston , https : / / desktop . telegram . org <nl> * / <nl> # include " stdafx . h " <nl> - # include " lang . h " <nl> + # include " boxes / backgroundbox . h " <nl> <nl> - # include " backgroundbox . h " <nl> + # include " lang . h " <nl> # include " mainwidget . h " <nl> # include " mainwindow . h " <nl> # include " window / window_theme . h " <nl> mmm a / Telegram / SourceFiles / boxes / boxes . style <nl> ppp b / Telegram / SourceFiles / boxes / boxes . style <nl> using " basic . style " ; <nl> using " ui / widgets / widgets . style " ; <nl> using " intro / intro . style " ; <nl> <nl> - boxBlueTitleBg : # 6393b5 ; <nl> - boxBlueTitleFg : # ffffff ; <nl> - boxBlueTitleAdditionalFg : # dae9f5 ; <nl> - boxBlueTitleAdditionalSkip : 12px ; <nl> - boxBlueTitlePosition : point ( 23px , 18px ) ; <nl> - boxBlueTitleShadow : icon { { " box_title_shadow " , windowShadowFg } } ; <nl> - <nl> - boxBlueClose : MaskButton ( defaultMaskButton ) { <nl> - width : boxTitleHeight ; <nl> - height : boxTitleHeight ; <nl> - <nl> - bg : boxBlueTitleBg ; <nl> - iconBg : # c8e1f0 ; <nl> - iconBgOver : # ffffff ; <nl> - <nl> - icon : icon { { " box_button_close - invert " , boxBlueTitleBg } } ; <nl> + boxBlockTitleHeight : 48px ; <nl> + boxBlockTitlePosition : point ( 18px , 14px ) ; <nl> + boxBlockTitleFont : font ( boxFontSize semibold ) ; <nl> + boxBlockTitleAdditionalSkip : 6px ; <nl> + boxBlockTitleAdditionalFont : normalFont ; <nl> + boxBlockTitleShadow : icon { { " box_title_shadow " , windowShadowFg } } ; <nl> + <nl> + boxBlockTitleClose : IconButton ( defaultIconButton ) { <nl> + width : boxBlockTitleHeight ; <nl> + height : boxBlockTitleHeight ; <nl> + <nl> + icon : boxBlockTitleCloseIcon ; <nl> + iconOver : boxBlockTitleCloseIconOver ; <nl> } <nl> <nl> confirmInviteTitle : flatLabel ( labelDefFlat ) { <nl> contactsMultiSelect : MultiSelect { <nl> fieldIcon : boxFieldSearchIcon ; <nl> fieldIconSkip : 36px ; <nl> <nl> - fieldCancel : MaskButton ( defaultMaskButton ) { <nl> + fieldCancel : IconButton { <nl> width : 41px ; <nl> height : 48px ; <nl> <nl> - bg : boxSearchBg ; <nl> icon : boxSearchCancelIcon ; <nl> - <nl> - iconBg : boxSearchCancelIconFg ; <nl> - iconBgOver : boxSearchCancelIconFgOver ; <nl> + iconOver : boxSearchCancelIconOver ; <nl> <nl> iconPosition : point ( 8px , 18px ) ; <nl> iconPositionDown : point ( 8px , 18px ) ; <nl> mmm a / Telegram / SourceFiles / boxes / confirmbox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / confirmbox . cpp <nl> Copyright ( c ) 2014 - 2016 John Preston , https : / / desktop . telegram . org <nl> # include " stdafx . h " <nl> # include " boxes / confirmbox . h " <nl> <nl> + # include " styles / style_boxes . h " <nl> # include " lang . h " <nl> # include " mainwidget . h " <nl> # include " mainwindow . h " <nl> Copyright ( c ) 2014 - 2016 John Preston , https : / / desktop . telegram . org <nl> # include " application . h " <nl> # include " ui / buttons / checkbox . h " <nl> # include " core / click_handler_types . h " <nl> - # include " styles / style_boxes . h " <nl> # include " localstorage . h " <nl> <nl> TextParseOptions _confirmBoxTextOptions = { <nl> ConvertToSupergroupBox : : ConvertToSupergroupBox ( ChatData * chat ) : AbstractBox ( st : <nl> _note . setText ( st : : boxTextFont , lng_profile_convert_warning ( lt_bold_start , textcmdStartSemibold ( ) , lt_bold_end , textcmdStopSemibold ( ) ) , _confirmBoxTextOptions ) ; <nl> _textWidth = st : : boxWideWidth - st : : boxPadding . left ( ) - st : : boxButtonPadding . right ( ) ; <nl> _textHeight = _text . countHeight ( _textWidth ) ; <nl> - setMaxHeight ( st : : boxTitleHeight + _textHeight + st : : boxPadding . bottom ( ) + _note . countHeight ( _textWidth ) + st : : boxButtonPadding . top ( ) + _convert - > height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> + setMaxHeight ( titleHeight ( ) + _textHeight + st : : boxPadding . bottom ( ) + _note . countHeight ( _textWidth ) + st : : boxButtonPadding . top ( ) + _convert - > height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> textstyleRestore ( ) ; <nl> <nl> connect ( _convert , SIGNAL ( clicked ( ) ) , this , SLOT ( onConvert ( ) ) ) ; <nl> void ConvertToSupergroupBox : : paintEvent ( QPaintEvent * e ) { <nl> / / draw box title / text <nl> p . setPen ( st : : boxTextFg ) ; <nl> textstyleSet ( & st : : boxTextStyle ) ; <nl> - _text . drawLeft ( p , st : : boxPadding . left ( ) , st : : boxTitleHeight , _textWidth , width ( ) ) ; <nl> - _note . drawLeft ( p , st : : boxPadding . left ( ) , st : : boxTitleHeight + _textHeight + st : : boxPadding . bottom ( ) , _textWidth , width ( ) ) ; <nl> + _text . drawLeft ( p , st : : boxPadding . left ( ) , titleHeight ( ) , _textWidth , width ( ) ) ; <nl> + _note . drawLeft ( p , st : : boxPadding . left ( ) , titleHeight ( ) + _textHeight + st : : boxPadding . bottom ( ) , _textWidth , width ( ) ) ; <nl> textstyleRestore ( ) ; <nl> } <nl> <nl> mmm a / Telegram / SourceFiles / boxes / confirmphonebox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / confirmphonebox . cpp <nl> void ConfirmPhoneBox : : setCallStatus ( const CallStatus & status ) { <nl> } <nl> <nl> void ConfirmPhoneBox : : launch ( ) { <nl> - setBlueTitle ( true ) ; <nl> + setBlockTitle ( true ) ; <nl> <nl> _about = new FlatLabel ( this , st : : confirmPhoneAboutLabel ) ; <nl> TextWithEntities aboutText ; <nl> void ConfirmPhoneBox : : launch ( ) { <nl> _send = new BoxButton ( this , lang ( lng_confirm_phone_send ) , st : : defaultBoxButton ) ; <nl> _cancel = new BoxButton ( this , lang ( lng_cancel ) , st : : cancelBoxButton ) ; <nl> <nl> - setMaxHeight ( st : : boxTitleHeight + st : : usernamePadding . top ( ) + _code - > height ( ) + st : : usernameSkip + _about - > height ( ) + st : : usernameSkip + _send - > height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> + setMaxHeight ( titleHeight ( ) + st : : usernamePadding . top ( ) + _code - > height ( ) + st : : usernameSkip + _about - > height ( ) + st : : usernameSkip + _send - > height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> <nl> connect ( _send , SIGNAL ( clicked ( ) ) , this , SLOT ( onSendCode ( ) ) ) ; <nl> connect ( _cancel , SIGNAL ( clicked ( ) ) , this , SLOT ( onClose ( ) ) ) ; <nl> QString ConfirmPhoneBox : : getCallText ( ) const { <nl> <nl> void ConfirmPhoneBox : : resizeEvent ( QResizeEvent * e ) { <nl> _code - > resize ( width ( ) - st : : usernamePadding . left ( ) - st : : usernamePadding . right ( ) , _code - > height ( ) ) ; <nl> - _code - > moveToLeft ( st : : usernamePadding . left ( ) , st : : boxTitleHeight + st : : usernamePadding . top ( ) ) ; <nl> + _code - > moveToLeft ( st : : usernamePadding . left ( ) , titleHeight ( ) + st : : usernamePadding . top ( ) ) ; <nl> <nl> _about - > moveToLeft ( st : : usernamePadding . left ( ) , _code - > y ( ) + _code - > height ( ) + st : : usernameSkip ) ; <nl> <nl> mmm a / Telegram / SourceFiles / boxes / connectionbox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / connectionbox . cpp <nl> Full license : https : / / github . com / telegramdesktop / tdesktop / blob / master / LICENSE <nl> Copyright ( c ) 2014 - 2016 John Preston , https : / / desktop . telegram . org <nl> * / <nl> # include " stdafx . h " <nl> - # include " lang . h " <nl> + # include " boxes / connectionbox . h " <nl> <nl> + # include " lang . h " <nl> # include " localstorage . h " <nl> - <nl> - # include " connectionbox . h " <nl> # include " mainwidget . h " <nl> # include " mainwindow . h " <nl> # include " ui / buttons / checkbox . h " <nl> void ConnectionBox : : showAll ( ) { <nl> _tcpProxyRadio - > show ( ) ; <nl> _tryIPv6 - > show ( ) ; <nl> <nl> - int32 h = st : : boxTitleHeight + st : : boxOptionListPadding . top ( ) + _autoRadio - > height ( ) + st : : boxOptionListPadding . top ( ) + _httpProxyRadio - > height ( ) + st : : boxOptionListPadding . top ( ) + _tcpProxyRadio - > height ( ) + st : : boxOptionListPadding . top ( ) + st : : connectionIPv6Skip + _tryIPv6 - > height ( ) + st : : boxOptionListPadding . bottom ( ) + st : : boxPadding . bottom ( ) + st : : boxButtonPadding . top ( ) + _save - > height ( ) + st : : boxButtonPadding . bottom ( ) ; <nl> + int32 h = titleHeight ( ) + st : : boxOptionListPadding . top ( ) + _autoRadio - > height ( ) + st : : boxOptionListPadding . top ( ) + _httpProxyRadio - > height ( ) + st : : boxOptionListPadding . top ( ) + _tcpProxyRadio - > height ( ) + st : : boxOptionListPadding . top ( ) + st : : connectionIPv6Skip + _tryIPv6 - > height ( ) + st : : boxOptionListPadding . bottom ( ) + st : : boxPadding . bottom ( ) + st : : boxButtonPadding . top ( ) + _save - > height ( ) + st : : boxButtonPadding . bottom ( ) ; <nl> if ( _httpProxyRadio - > checked ( ) | | _tcpProxyRadio - > checked ( ) ) { <nl> h + = 2 * st : : boxOptionListPadding . top ( ) + 2 * _hostInput - > height ( ) ; <nl> _hostInput - > show ( ) ; <nl> void ConnectionBox : : paintEvent ( QPaintEvent * e ) { <nl> } <nl> <nl> void ConnectionBox : : resizeEvent ( QResizeEvent * e ) { <nl> - _autoRadio - > moveToLeft ( st : : boxPadding . left ( ) + st : : boxOptionListPadding . left ( ) , st : : boxTitleHeight + st : : boxOptionListPadding . top ( ) ) ; <nl> + _autoRadio - > moveToLeft ( st : : boxPadding . left ( ) + st : : boxOptionListPadding . left ( ) , titleHeight ( ) + st : : boxOptionListPadding . top ( ) ) ; <nl> _httpProxyRadio - > moveToLeft ( st : : boxPadding . left ( ) + st : : boxOptionListPadding . left ( ) , _autoRadio - > y ( ) + _autoRadio - > height ( ) + st : : boxOptionListPadding . top ( ) ) ; <nl> <nl> int32 inputy = 0 ; <nl> AutoDownloadBox : : AutoDownloadBox ( ) : AbstractBox ( st : : boxWidth ) <nl> , _gifPrivate ( this , lang ( lng_media_auto_private_chats ) , ! ( cAutoDownloadGif ( ) & dbiadNoPrivate ) , st : : defaultBoxCheckbox ) <nl> , _gifGroups ( this , lang ( lng_media_auto_groups ) , ! ( cAutoDownloadGif ( ) & dbiadNoGroups ) , st : : defaultBoxCheckbox ) <nl> , _gifPlay ( this , lang ( lng_media_auto_play ) , cAutoPlayGif ( ) , st : : defaultBoxCheckbox ) <nl> - , _sectionHeight ( st : : boxTitleHeight + 2 * ( st : : defaultBoxCheckbox . height + st : : setLittleSkip ) ) <nl> + , _sectionHeight ( titleHeight ( ) + 2 * ( st : : defaultBoxCheckbox . height + st : : setLittleSkip ) ) <nl> , _save ( this , lang ( lng_connection_save ) , st : : defaultBoxButton ) <nl> , _cancel ( this , lang ( lng_cancel ) , st : : cancelBoxButton ) { <nl> <nl> void AutoDownloadBox : : paintEvent ( QPaintEvent * e ) { <nl> } <nl> <nl> void AutoDownloadBox : : resizeEvent ( QResizeEvent * e ) { <nl> - _photoPrivate - > moveToLeft ( st : : boxTitlePosition . x ( ) , st : : boxTitleHeight + st : : setLittleSkip ) ; <nl> + _photoPrivate - > moveToLeft ( st : : boxTitlePosition . x ( ) , titleHeight ( ) + st : : setLittleSkip ) ; <nl> _photoGroups - > moveToLeft ( st : : boxTitlePosition . x ( ) , _photoPrivate - > y ( ) + _photoPrivate - > height ( ) + st : : setLittleSkip ) ; <nl> <nl> - _audioPrivate - > moveToLeft ( st : : boxTitlePosition . x ( ) , _sectionHeight + st : : boxTitleHeight + st : : setLittleSkip ) ; <nl> + _audioPrivate - > moveToLeft ( st : : boxTitlePosition . x ( ) , _sectionHeight + titleHeight ( ) + st : : setLittleSkip ) ; <nl> _audioGroups - > moveToLeft ( st : : boxTitlePosition . x ( ) , _audioPrivate - > y ( ) + _audioPrivate - > height ( ) + st : : setLittleSkip ) ; <nl> <nl> - _gifPrivate - > moveToLeft ( st : : boxTitlePosition . x ( ) , 2 * _sectionHeight + st : : boxTitleHeight + st : : setLittleSkip ) ; <nl> + _gifPrivate - > moveToLeft ( st : : boxTitlePosition . x ( ) , 2 * _sectionHeight + titleHeight ( ) + st : : setLittleSkip ) ; <nl> _gifGroups - > moveToLeft ( st : : boxTitlePosition . x ( ) , _gifPrivate - > y ( ) + _gifPrivate - > height ( ) + st : : setLittleSkip ) ; <nl> _gifPlay - > moveToLeft ( st : : boxTitlePosition . x ( ) , _gifGroups - > y ( ) + _gifGroups - > height ( ) + st : : setLittleSkip ) ; <nl> <nl> mmm a / Telegram / SourceFiles / boxes / contactsbox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / contactsbox . cpp <nl> Copyright ( c ) 2014 - 2016 John Preston , https : / / desktop . telegram . org <nl> # include " boxes / contactsbox . h " <nl> <nl> # include " dialogs / dialogs_indexed_list . h " <nl> + # include " styles / style_boxes . h " <nl> # include " styles / style_dialogs . h " <nl> # include " styles / style_history . h " <nl> - # include " styles / style_boxes . h " <nl> # include " lang . h " <nl> # include " boxes / addcontactbox . h " <nl> # include " mainwidget . h " <nl> void ContactsBox : : paintEvent ( QPaintEvent * e ) { <nl> } <nl> <nl> int ContactsBox : : getTopScrollSkip ( ) const { <nl> - auto result = st : : boxTitleHeight ; <nl> + auto result = titleHeight ( ) ; <nl> if ( ! _select - > isHidden ( ) ) { <nl> result + = _select - > height ( ) ; <nl> } <nl> void ContactsBox : : resizeEvent ( QResizeEvent * e ) { <nl> ItemListBox : : resizeEvent ( e ) ; <nl> <nl> _select - > resizeToWidth ( width ( ) ) ; <nl> - _select - > moveToLeft ( 0 , st : : boxTitleHeight ) ; <nl> + _select - > moveToLeft ( 0 , titleHeight ( ) ) ; <nl> <nl> updateScrollSkips ( ) ; <nl> <nl> mmm a / Telegram / SourceFiles / boxes / downloadpathbox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / downloadpathbox . cpp <nl> void DownloadPathBox : : showAll ( ) { <nl> _save - > show ( ) ; <nl> _cancel - > show ( ) ; <nl> <nl> - int32 h = st : : boxTitleHeight + st : : boxOptionListPadding . top ( ) + _default - > height ( ) + st : : boxOptionListPadding . top ( ) + _temp - > height ( ) + st : : boxOptionListPadding . top ( ) + _dir - > height ( ) ; <nl> + int32 h = titleHeight ( ) + st : : boxOptionListPadding . top ( ) + _default - > height ( ) + st : : boxOptionListPadding . top ( ) + _temp - > height ( ) + st : : boxOptionListPadding . top ( ) + _dir - > height ( ) ; <nl> if ( _dir - > checked ( ) ) h + = st : : downloadPathSkip + _pathLink - > height ( ) ; <nl> h + = st : : boxOptionListPadding . bottom ( ) + st : : boxButtonPadding . top ( ) + _save - > height ( ) + st : : boxButtonPadding . bottom ( ) ; <nl> <nl> void DownloadPathBox : : paintEvent ( QPaintEvent * e ) { <nl> } <nl> <nl> void DownloadPathBox : : resizeEvent ( QResizeEvent * e ) { <nl> - _default - > moveToLeft ( st : : boxPadding . left ( ) + st : : boxOptionListPadding . left ( ) , st : : boxTitleHeight + st : : boxOptionListPadding . top ( ) ) ; <nl> + _default - > moveToLeft ( st : : boxPadding . left ( ) + st : : boxOptionListPadding . left ( ) , titleHeight ( ) + st : : boxOptionListPadding . top ( ) ) ; <nl> _temp - > moveToLeft ( st : : boxPadding . left ( ) + st : : boxOptionListPadding . left ( ) , _default - > y ( ) + _default - > height ( ) + st : : boxOptionListPadding . top ( ) ) ; <nl> _dir - > moveToLeft ( st : : boxPadding . left ( ) + st : : boxOptionListPadding . left ( ) , _temp - > y ( ) + _temp - > height ( ) + st : : boxOptionListPadding . top ( ) ) ; <nl> int32 inputx = st : : boxPadding . left ( ) + st : : boxOptionListPadding . left ( ) + st : : defaultRadiobutton . textPosition . x ( ) ; <nl> mmm a / Telegram / SourceFiles / boxes / emojibox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / emojibox . cpp <nl> Full license : https : / / github . com / telegramdesktop / tdesktop / blob / master / LICENSE <nl> Copyright ( c ) 2014 - 2016 John Preston , https : / / desktop . telegram . org <nl> * / <nl> # include " stdafx . h " <nl> - # include " lang . h " <nl> + # include " boxes / emojibox . h " <nl> <nl> - # include " emojibox . h " <nl> + # include " lang . h " <nl> # include " mainwidget . h " <nl> # include " mainwindow . h " <nl> <nl> namespace { <nl> } <nl> <nl> EmojiBox : : EmojiBox ( ) : _esize ( EmojiSizes [ EIndex + 1 ] ) { <nl> - setBlueTitle ( true ) ; <nl> + setBlockTitle ( true ) ; <nl> <nl> fillBlocks ( ) ; <nl> <nl> _blockHeight = st : : emojiReplaceInnerHeight ; <nl> <nl> - resizeMaxHeight ( _blocks [ 0 ] . size ( ) * st : : emojiReplaceWidth + 2 * st : : emojiReplacePadding , st : : boxTitleHeight + st : : emojiReplacePadding + _blocks . size ( ) * st : : emojiReplaceHeight + ( st : : emojiReplaceHeight - _blockHeight ) + st : : emojiReplacePadding ) ; <nl> + resizeMaxHeight ( _blocks [ 0 ] . size ( ) * st : : emojiReplaceWidth + 2 * st : : emojiReplacePadding , titleHeight ( ) + st : : emojiReplacePadding + _blocks . size ( ) * st : : emojiReplaceHeight + ( st : : emojiReplaceHeight - _blockHeight ) + st : : emojiReplacePadding ) ; <nl> <nl> prepare ( ) ; <nl> } <nl> void EmojiBox : : paintEvent ( QPaintEvent * e ) { <nl> <nl> p . setFont ( st : : emojiTextFont ) ; <nl> p . setPen ( st : : boxTextFg ) ; <nl> - int32 top = st : : boxTitleHeight + st : : emojiReplacePadding + ( st : : emojiReplaceHeight - _blockHeight ) / 2 ; <nl> + int32 top = titleHeight ( ) + st : : emojiReplacePadding + ( st : : emojiReplaceHeight - _blockHeight ) / 2 ; <nl> for ( Blocks : : const_iterator i = _blocks . cbegin ( ) , e = _blocks . cend ( ) ; i ! = e ; + + i ) { <nl> int32 rowSize = i - > size ( ) , left = ( width ( ) - rowSize * st : : emojiReplaceWidth ) / 2 ; <nl> for ( BlockRow : : const_iterator j = i - > cbegin ( ) , en = i - > cend ( ) ; j ! = en ; + + j ) { <nl> mmm a / Telegram / SourceFiles / boxes / languagebox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / languagebox . cpp <nl> _close ( this , lang ( lng_box_ok ) , st : : defaultBoxButton ) { <nl> <nl> bool haveTestLang = ( cLang ( ) = = languageTest ) ; <nl> <nl> - int32 y = st : : boxTitleHeight + st : : boxOptionListPadding . top ( ) ; <nl> + int32 y = titleHeight ( ) + st : : boxOptionListPadding . top ( ) ; <nl> _langs . reserve ( languageCount + ( haveTestLang ? 1 : 0 ) ) ; <nl> if ( haveTestLang ) { <nl> _langs . push_back ( new Ui : : Radiobutton ( this , qsl ( " lang " ) , languageTest , qsl ( " Custom Lang " ) , ( cLang ( ) = = languageTest ) , st : : langsButton ) ) ; <nl> _close ( this , lang ( lng_box_ok ) , st : : defaultBoxButton ) { <nl> connect ( _langs . back ( ) , SIGNAL ( changed ( ) ) , this , SLOT ( onChange ( ) ) ) ; <nl> } <nl> <nl> - resizeMaxHeight ( st : : langsWidth , st : : boxTitleHeight + ( languageCount + ( haveTestLang ? 1 : 0 ) ) * ( st : : boxOptionListPadding . top ( ) + st : : langsButton . height ) + st : : boxOptionListPadding . bottom ( ) + st : : boxPadding . bottom ( ) + st : : boxButtonPadding . top ( ) + _close . height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> + resizeMaxHeight ( st : : langsWidth , titleHeight ( ) + ( languageCount + ( haveTestLang ? 1 : 0 ) ) * ( st : : boxOptionListPadding . top ( ) + st : : langsButton . height ) + st : : boxOptionListPadding . bottom ( ) + st : : boxPadding . bottom ( ) + st : : boxButtonPadding . top ( ) + _close . height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> <nl> connect ( & _close , SIGNAL ( clicked ( ) ) , this , SLOT ( onClose ( ) ) ) ; <nl> <nl> mmm a / Telegram / SourceFiles / boxes / localstoragebox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / localstoragebox . cpp <nl> Copyright ( c ) 2014 - 2016 John Preston , https : / / desktop . telegram . org <nl> # include " stdafx . h " <nl> # include " boxes / localstoragebox . h " <nl> <nl> + # include " styles / style_boxes . h " <nl> # include " localstorage . h " <nl> # include " ui / flatbutton . h " <nl> # include " lang . h " <nl> - # include " styles / style_boxes . h " <nl> # include " mainwindow . h " <nl> <nl> LocalStorageBox : : LocalStorageBox ( ) : AbstractBox ( ) <nl> void LocalStorageBox : : updateControls ( ) { <nl> rowsHeight = st : : linkFont - > height + st : : localStorageBoxSkip ; <nl> } <nl> _clear - > setVisible ( _imagesCount > 0 | | _audiosCount > 0 ) ; <nl> - setMaxHeight ( st : : boxTitleHeight + st : : localStorageBoxSkip + rowsHeight + _clear - > height ( ) + st : : boxButtonPadding . top ( ) + _close - > height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> - _clear - > moveToLeft ( st : : boxPadding . left ( ) , st : : boxTitleHeight + st : : localStorageBoxSkip + rowsHeight ) ; <nl> + setMaxHeight ( titleHeight ( ) + st : : localStorageBoxSkip + rowsHeight + _clear - > height ( ) + st : : boxButtonPadding . top ( ) + _close - > height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> + _clear - > moveToLeft ( st : : boxPadding . left ( ) , titleHeight ( ) + st : : localStorageBoxSkip + rowsHeight ) ; <nl> _close - > moveToRight ( st : : boxButtonPadding . right ( ) , height ( ) - st : : boxButtonPadding . bottom ( ) - _close - > height ( ) ) ; <nl> update ( ) ; <nl> } <nl> void LocalStorageBox : : paintEvent ( QPaintEvent * e ) { <nl> p . setFont ( st : : boxTextFont ) ; <nl> p . setPen ( st : : windowTextFg ) ; <nl> checkLocalStoredCounts ( ) ; <nl> - int top = st : : boxTitleHeight + st : : localStorageBoxSkip ; <nl> + int top = titleHeight ( ) + st : : localStorageBoxSkip ; <nl> if ( _imagesCount > 0 ) { <nl> auto text = lng_settings_images_cached ( lt_count , _imagesCount , lt_size , formatSizeText ( Local : : storageImagesSize ( ) + Local : : storageStickersSize ( ) + Local : : storageWebFilesSize ( ) ) ) ; <nl> p . drawTextLeft ( st : : boxPadding . left ( ) , top , width ( ) , text ) ; <nl> mmm a / Telegram / SourceFiles / boxes / passcodebox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / passcodebox . cpp <nl> PasscodeBox : : PasscodeBox ( const QByteArray & newSalt , const QByteArray & curSalt , b <nl> } <nl> <nl> void PasscodeBox : : init ( ) { <nl> - setBlueTitle ( true ) ; <nl> + setBlockTitle ( true ) ; <nl> <nl> textstyleSet ( & st : : usernameTextStyle ) ; <nl> _about . setRichText ( st : : normalFont , lang ( _cloudPwd ? lng_cloud_password_about : lng_passcode_about ) ) ; <nl> void PasscodeBox : : init ( ) { <nl> if ( _turningOff ) { <nl> _oldPasscode . show ( ) ; <nl> _boxTitle = lang ( _cloudPwd ? lng_cloud_password_remove : lng_passcode_remove ) ; <nl> - setMaxHeight ( st : : boxTitleHeight + st : : passcodePadding . top ( ) + _oldPasscode . height ( ) + st : : passcodeSkip + ( ( _hasRecovery & & ! _hintText . isEmpty ( ) ) ? st : : passcodeSkip : 0 ) + _aboutHeight + st : : passcodePadding . bottom ( ) + st : : boxButtonPadding . top ( ) + _saveButton . height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> + setMaxHeight ( titleHeight ( ) + st : : passcodePadding . top ( ) + _oldPasscode . height ( ) + st : : passcodeSkip + ( ( _hasRecovery & & ! _hintText . isEmpty ( ) ) ? st : : passcodeSkip : 0 ) + _aboutHeight + st : : passcodePadding . bottom ( ) + st : : boxButtonPadding . top ( ) + _saveButton . height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> } else { <nl> bool has = _cloudPwd ? ( ! _curSalt . isEmpty ( ) ) : Global : : LocalPasscode ( ) ; <nl> if ( has ) { <nl> _oldPasscode . show ( ) ; <nl> _boxTitle = lang ( _cloudPwd ? lng_cloud_password_change : lng_passcode_change ) ; <nl> - setMaxHeight ( st : : boxTitleHeight + st : : passcodePadding . top ( ) + _oldPasscode . height ( ) + st : : passcodeSkip + ( ( _hasRecovery & & ! _hintText . isEmpty ( ) ) ? st : : passcodeSkip : 0 ) + _newPasscode . height ( ) + st : : contactSkip + _reenterPasscode . height ( ) + st : : passcodeSkip + ( _cloudPwd ? _passwordHint . height ( ) + st : : contactSkip : 0 ) + _aboutHeight + st : : passcodePadding . bottom ( ) + st : : boxButtonPadding . top ( ) + _saveButton . height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> + setMaxHeight ( titleHeight ( ) + st : : passcodePadding . top ( ) + _oldPasscode . height ( ) + st : : passcodeSkip + ( ( _hasRecovery & & ! _hintText . isEmpty ( ) ) ? st : : passcodeSkip : 0 ) + _newPasscode . height ( ) + st : : contactSkip + _reenterPasscode . height ( ) + st : : passcodeSkip + ( _cloudPwd ? _passwordHint . height ( ) + st : : contactSkip : 0 ) + _aboutHeight + st : : passcodePadding . bottom ( ) + st : : boxButtonPadding . top ( ) + _saveButton . height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> } else { <nl> _oldPasscode . hide ( ) ; <nl> _boxTitle = lang ( _cloudPwd ? lng_cloud_password_create : lng_passcode_create ) ; <nl> - setMaxHeight ( st : : boxTitleHeight + st : : passcodePadding . top ( ) + _newPasscode . height ( ) + st : : contactSkip + _reenterPasscode . height ( ) + st : : passcodeSkip + ( _cloudPwd ? _passwordHint . height ( ) + st : : contactSkip : 0 ) + _aboutHeight + ( _cloudPwd ? st : : contactSkip + _recoverEmail . height ( ) + st : : passcodeSkip : st : : passcodePadding . bottom ( ) ) + st : : boxButtonPadding . top ( ) + _saveButton . height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> + setMaxHeight ( titleHeight ( ) + st : : passcodePadding . top ( ) + _newPasscode . height ( ) + st : : contactSkip + _reenterPasscode . height ( ) + st : : passcodeSkip + ( _cloudPwd ? _passwordHint . height ( ) + st : : contactSkip : 0 ) + _aboutHeight + ( _cloudPwd ? st : : contactSkip + _recoverEmail . height ( ) + st : : passcodeSkip : st : : passcodePadding . bottom ( ) ) + st : : boxButtonPadding . top ( ) + _saveButton . height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> } <nl> } <nl> <nl> void PasscodeBox : : resizeEvent ( QResizeEvent * e ) { <nl> bool has = _cloudPwd ? ( ! _curSalt . isEmpty ( ) ) : Global : : LocalPasscode ( ) ; <nl> int32 w = st : : boxWidth - st : : boxPadding . left ( ) - st : : boxPadding . right ( ) ; <nl> _oldPasscode . resize ( w , _oldPasscode . height ( ) ) ; <nl> - _oldPasscode . moveToLeft ( st : : boxPadding . left ( ) , st : : boxTitleHeight + st : : passcodePadding . top ( ) ) ; <nl> + _oldPasscode . moveToLeft ( st : : boxPadding . left ( ) , titleHeight ( ) + st : : passcodePadding . top ( ) ) ; <nl> _newPasscode . resize ( w , _newPasscode . height ( ) ) ; <nl> _newPasscode . moveToLeft ( st : : boxPadding . left ( ) , _oldPasscode . y ( ) + ( ( _turningOff | | has ) ? ( _oldPasscode . height ( ) + st : : passcodeSkip + ( ( _hasRecovery & & ! _hintText . isEmpty ( ) ) ? st : : passcodeSkip : 0 ) ) : 0 ) ) ; <nl> _reenterPasscode . resize ( w , _reenterPasscode . height ( ) ) ; <nl> RecoverBox : : RecoverBox ( const QString & pattern ) : AbstractBox ( st : : boxWidth ) <nl> , _saveButton ( this , lang ( lng_passcode_submit ) , st : : defaultBoxButton ) <nl> , _cancelButton ( this , lang ( lng_cancel ) , st : : cancelBoxButton ) <nl> , _recoverCode ( this , st : : defaultInputField , lang ( lng_signin_code ) ) { <nl> - setBlueTitle ( true ) ; <nl> + setBlockTitle ( true ) ; <nl> <nl> - setMaxHeight ( st : : boxTitleHeight + st : : passcodePadding . top ( ) + st : : passcodeSkip + _recoverCode . height ( ) + st : : passcodeSkip + st : : passcodePadding . bottom ( ) + st : : boxButtonPadding . top ( ) + _saveButton . height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> + setMaxHeight ( titleHeight ( ) + st : : passcodePadding . top ( ) + st : : passcodeSkip + _recoverCode . height ( ) + st : : passcodeSkip + st : : passcodePadding . bottom ( ) + st : : boxButtonPadding . top ( ) + _saveButton . height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> <nl> connect ( & _saveButton , SIGNAL ( clicked ( ) ) , this , SLOT ( onSubmit ( ) ) ) ; <nl> connect ( & _cancelButton , SIGNAL ( clicked ( ) ) , this , SLOT ( onClose ( ) ) ) ; <nl> void RecoverBox : : paintEvent ( QPaintEvent * e ) { <nl> <nl> void RecoverBox : : resizeEvent ( QResizeEvent * e ) { <nl> _recoverCode . resize ( st : : boxWidth - st : : boxPadding . left ( ) - st : : boxPadding . right ( ) , _recoverCode . height ( ) ) ; <nl> - _recoverCode . moveToLeft ( st : : boxPadding . left ( ) , st : : boxTitleHeight + st : : passcodePadding . top ( ) + st : : passcodeSkip ) ; <nl> + _recoverCode . moveToLeft ( st : : boxPadding . left ( ) , titleHeight ( ) + st : : passcodePadding . top ( ) + st : : passcodeSkip ) ; <nl> <nl> _saveButton . moveToRight ( st : : boxButtonPadding . right ( ) , height ( ) - st : : boxButtonPadding . bottom ( ) - _saveButton . height ( ) ) ; <nl> _cancelButton . moveToRight ( st : : boxButtonPadding . right ( ) + _saveButton . width ( ) + st : : boxButtonPadding . left ( ) , _saveButton . y ( ) ) ; <nl> mmm a / Telegram / SourceFiles / boxes / report_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / report_box . cpp <nl> void ReportBox : : paintEvent ( QPaintEvent * e ) { <nl> } <nl> <nl> void ReportBox : : resizeEvent ( QResizeEvent * e ) { <nl> - _reasonSpam - > moveToLeft ( st : : boxPadding . left ( ) + st : : boxOptionListPadding . left ( ) , st : : boxTitleHeight + st : : boxOptionListPadding . top ( ) ) ; <nl> + _reasonSpam - > moveToLeft ( st : : boxPadding . left ( ) + st : : boxOptionListPadding . left ( ) , titleHeight ( ) + st : : boxOptionListPadding . top ( ) ) ; <nl> _reasonViolence - > moveToLeft ( st : : boxPadding . left ( ) + st : : boxOptionListPadding . left ( ) , _reasonSpam - > y ( ) + _reasonSpam - > height ( ) + st : : boxOptionListPadding . top ( ) ) ; <nl> _reasonPornography - > moveToLeft ( st : : boxPadding . left ( ) + st : : boxOptionListPadding . left ( ) , _reasonViolence - > y ( ) + _reasonViolence - > height ( ) + st : : boxOptionListPadding . top ( ) ) ; <nl> _reasonOther - > moveToLeft ( st : : boxPadding . left ( ) + st : : boxOptionListPadding . left ( ) , _reasonPornography - > y ( ) + _reasonPornography - > height ( ) + st : : boxOptionListPadding . top ( ) ) ; <nl> bool ReportBox : : reportFail ( const RPCError & error ) { <nl> } <nl> <nl> void ReportBox : : updateMaxHeight ( ) { <nl> - int32 h = st : : boxTitleHeight + 4 * ( st : : boxOptionListPadding . top ( ) + _reasonSpam - > height ( ) ) + st : : boxButtonPadding . top ( ) + _report - > height ( ) + st : : boxButtonPadding . bottom ( ) ; <nl> + int32 h = titleHeight ( ) + 4 * ( st : : boxOptionListPadding . top ( ) + _reasonSpam - > height ( ) ) + st : : boxButtonPadding . top ( ) + _report - > height ( ) + st : : boxButtonPadding . bottom ( ) ; <nl> if ( _reasonOtherText ) { <nl> h + = st : : newGroupDescriptionPadding . top ( ) + _reasonOtherText - > height ( ) + st : : newGroupDescriptionPadding . bottom ( ) ; <nl> } <nl> mmm a / Telegram / SourceFiles / boxes / sessionsbox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / sessionsbox . cpp <nl> SessionsBox : : SessionsBox ( ) : ScrollableBox ( st : : sessionsScroll ) <nl> connect ( App : : wnd ( ) , SIGNAL ( newAuthorization ( ) ) , this , SLOT ( onNewAuthorization ( ) ) ) ; <nl> connect ( & _shortPollTimer , SIGNAL ( timeout ( ) ) , this , SLOT ( onShortPollAuthorizations ( ) ) ) ; <nl> <nl> - init ( _inner , st : : boxButtonPadding . bottom ( ) + _done . height ( ) + st : : boxButtonPadding . top ( ) , st : : boxTitleHeight ) ; <nl> + init ( _inner , st : : boxButtonPadding . bottom ( ) + _done . height ( ) + st : : boxButtonPadding . top ( ) , titleHeight ( ) ) ; <nl> _inner - > resize ( width ( ) , st : : noContactsHeight ) ; <nl> <nl> prepare ( ) ; <nl> void SessionsBox : : paintEvent ( QPaintEvent * e ) { <nl> if ( paint ( p ) ) return ; <nl> <nl> paintTitle ( p , lang ( lng_sessions_other_header ) ) ; <nl> - p . translate ( 0 , st : : boxTitleHeight ) ; <nl> + p . translate ( 0 , titleHeight ( ) ) ; <nl> <nl> if ( _loading ) { <nl> p . setFont ( st : : noContactsFont - > f ) ; <nl> mmm a / Telegram / SourceFiles / boxes / sharebox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / sharebox . cpp <nl> ShareBox : : ShareBox ( CopyCallback & & copyCallback , SubmitCallback & & submitCallback , <nl> } <nl> <nl> int ShareBox : : getTopScrollSkip ( ) const { <nl> - auto result = st : : boxTitleHeight ; <nl> + auto result = titleHeight ( ) ; <nl> if ( ! _select - > isHidden ( ) ) { <nl> result + = _select - > height ( ) ; <nl> } <nl> void ShareBox : : resizeEvent ( QResizeEvent * e ) { <nl> ItemListBox : : resizeEvent ( e ) ; <nl> <nl> _select - > resizeToWidth ( width ( ) ) ; <nl> - _select - > moveToLeft ( 0 , st : : boxTitleHeight ) ; <nl> + _select - > moveToLeft ( 0 , titleHeight ( ) ) ; <nl> <nl> updateScrollSkips ( ) ; <nl> <nl> mmm a / Telegram / SourceFiles / boxes / stickers_box . cpp <nl> ppp b / Telegram / SourceFiles / boxes / stickers_box . cpp <nl> void StickersBox : : setup ( ) { <nl> _aboutHeight = st : : stickersReorderPadding . top ( ) + _about . countHeight ( _aboutWidth ) + st : : stickersReorderPadding . bottom ( ) ; <nl> _topShadow . create ( this , st : : contactsAboutShadow ) ; <nl> } <nl> - ItemListBox : : init ( _inner , bottomSkip , st : : boxTitleHeight + _aboutHeight ) ; <nl> + ItemListBox : : init ( _inner , bottomSkip , titleHeight ( ) + _aboutHeight ) ; <nl> setMaxHeight ( snap ( countHeight ( ) , int32 ( st : : sessionsHeight ) , int32 ( st : : boxMaxListHeight ) ) ) ; <nl> <nl> connect ( App : : main ( ) , SIGNAL ( stickersUpdated ( ) ) , this , SLOT ( onStickersUpdated ( ) ) ) ; <nl> int32 StickersBox : : countHeight ( ) const { <nl> if ( _section = = Section : : Installed ) { <nl> bottomSkip = st : : boxButtonPadding . top ( ) + _save - > height ( ) + st : : boxButtonPadding . bottom ( ) ; <nl> } <nl> - return st : : boxTitleHeight + _aboutHeight + _inner - > height ( ) + bottomSkip ; <nl> + return titleHeight ( ) + _aboutHeight + _inner - > height ( ) + bottomSkip ; <nl> } <nl> <nl> void StickersBox : : disenableDone ( const MTPmessages_StickerSetInstallResult & result , mtpRequestId req ) { <nl> void StickersBox : : paintEvent ( QPaintEvent * e ) { <nl> return lang ( lng_stickers_archived ) ; <nl> } ) ( ) ; <nl> paintTitle ( p , title ) ; <nl> - p . translate ( 0 , st : : boxTitleHeight ) ; <nl> + p . translate ( 0 , titleHeight ( ) ) ; <nl> <nl> if ( _aboutHeight > 0 ) { <nl> p . fillRect ( 0 , 0 , width ( ) , _aboutHeight , st : : contactsAboutBg ) ; <nl> void StickersBox : : resizeEvent ( QResizeEvent * e ) { <nl> _inner - > setVisibleScrollbar ( ( scrollArea ( ) - > scrollTopMax ( ) > 0 ) ? ( st : : boxScroll . width - st : : boxScroll . deltax ) : 0 ) ; <nl> updateVisibleTopBottom ( ) ; <nl> if ( _topShadow ) { <nl> - _topShadow - > setGeometry ( 0 , st : : boxTitleHeight + _aboutHeight , width ( ) , st : : lineWidth ) ; <nl> + _topShadow - > setGeometry ( 0 , titleHeight ( ) + _aboutHeight , width ( ) , st : : lineWidth ) ; <nl> } <nl> if ( _save ) { <nl> _save - > moveToRight ( st : : boxButtonPadding . right ( ) , height ( ) - st : : boxButtonPadding . bottom ( ) - _save - > height ( ) ) ; <nl> mmm a / Telegram / SourceFiles / boxes / stickersetbox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / stickersetbox . cpp <nl> void StickerSetBox : : Inner : : gotSet ( const MTPmessages_StickerSet & set ) { <nl> } <nl> } <nl> if ( d . vset . type ( ) = = mtpc_stickerSet ) { <nl> - auto & s ( d . vset . c_stickerSet ( ) ) ; <nl> + auto & s = d . vset . c_stickerSet ( ) ; <nl> _setTitle = stickerSetTitle ( s ) ; <nl> - _title = st : : boxTitleFont - > elided ( _setTitle , width ( ) - st : : boxTitlePosition . x ( ) - st : : boxTitleHeight ) ; <nl> + _title = st : : boxBlockTitleFont - > elided ( _setTitle , width ( ) - st : : boxBlockTitlePosition . x ( ) - st : : boxBlockTitleHeight ) ; <nl> _setShortName = qs ( s . vshort_name ) ; <nl> _setId = s . vid . v ; <nl> _setAccess = s . vaccess_hash . v ; <nl> mmm a / Telegram / SourceFiles / boxes / usernamebox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / usernamebox . cpp <nl> _username ( this , st : : defaultInputField , qsl ( " @ username " ) , App : : self ( ) - > username , <nl> _link ( this , QString ( ) , st : : defaultBoxLinkButton ) , <nl> _saveRequestId ( 0 ) , _checkRequestId ( 0 ) , <nl> _about ( st : : boxWidth - st : : usernamePadding . left ( ) ) { <nl> - setBlueTitle ( true ) ; <nl> + setBlockTitle ( true ) ; <nl> <nl> _goodText = App : : self ( ) - > username . isEmpty ( ) ? QString ( ) : lang ( lng_username_available ) ; <nl> <nl> textstyleSet ( & st : : usernameTextStyle ) ; <nl> _about . setRichText ( st : : boxTextFont , lang ( lng_username_about ) ) ; <nl> - resizeMaxHeight ( st : : boxWidth , st : : boxTitleHeight + st : : usernamePadding . top ( ) + _username . height ( ) + st : : usernameSkip + _about . countHeight ( st : : boxWidth - st : : usernamePadding . left ( ) ) + 3 * st : : usernameTextStyle . lineHeight + st : : usernamePadding . bottom ( ) + st : : boxButtonPadding . top ( ) + _save . height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> + resizeMaxHeight ( st : : boxWidth , titleHeight ( ) + st : : usernamePadding . top ( ) + _username . height ( ) + st : : usernameSkip + _about . countHeight ( st : : boxWidth - st : : usernamePadding . left ( ) ) + 3 * st : : usernameTextStyle . lineHeight + st : : usernamePadding . bottom ( ) + st : : boxButtonPadding . top ( ) + _save . height ( ) + st : : boxButtonPadding . bottom ( ) ) ; <nl> textstyleRestore ( ) ; <nl> <nl> connect ( & _save , SIGNAL ( clicked ( ) ) , this , SLOT ( onSave ( ) ) ) ; <nl> void UsernameBox : : paintEvent ( QPaintEvent * e ) { <nl> <nl> void UsernameBox : : resizeEvent ( QResizeEvent * e ) { <nl> _username . resize ( width ( ) - st : : usernamePadding . left ( ) - st : : usernamePadding . right ( ) , _username . height ( ) ) ; <nl> - _username . moveToLeft ( st : : usernamePadding . left ( ) , st : : boxTitleHeight + st : : usernamePadding . top ( ) ) ; <nl> + _username . moveToLeft ( st : : usernamePadding . left ( ) , titleHeight ( ) + st : : usernamePadding . top ( ) ) ; <nl> <nl> textstyleSet ( & st : : usernameTextStyle ) ; <nl> int32 availw = st : : boxWidth - st : : usernamePadding . left ( ) , h = _about . countHeight ( availw ) ; <nl> mmm a / Telegram / SourceFiles / core / version . h <nl> ppp b / Telegram / SourceFiles / core / version . h <nl> Copyright ( c ) 2014 - 2016 John Preston , https : / / desktop . telegram . org <nl> <nl> # include " core / utils . h " <nl> <nl> - # define BETA_VERSION_MACRO ( 10019002ULL ) <nl> + # define BETA_VERSION_MACRO ( 10019003ULL ) <nl> <nl> constexpr int AppVersion = 10020 ; <nl> constexpr str_const AppVersionStr = " 0 . 10 . 20 " ; <nl> mmm a / Telegram / SourceFiles / history / history . style <nl> ppp b / Telegram / SourceFiles / history / history . style <nl> historySend : IconButton { <nl> iconPosition : point ( 11px , 11px ) ; <nl> iconPositionDown : point ( 11px , 11px ) ; <nl> } <nl> + historyEditSaveIcon : icon { { " send_control_save " , historySendIconFg , point ( 3px , 7px ) } } ; <nl> + historyEditSaveIconOver : icon { { " send_control_save " , historySendIconFgOver , point ( 3px , 7px ) } } ; <nl> + <nl> historyAttach : IconButton ( historySend ) { <nl> icon : icon { { " send_control_attach " , historyComposeIconFg } } ; <nl> iconOver : icon { { " send_control_attach " , historyComposeIconFgOver } } ; <nl> historyReplyIconPosition : point ( 13px , 13px ) ; <nl> historyReplyIcon : icon { { " history_action_reply " , # 6fa1d2 } } ; <nl> historyForwardIcon : icon { { " history_action_forward " , # 6fa1d2 } } ; <nl> historyEditIcon : icon { { " history_action_edit " , # 6fa1d2 } } ; <nl> - historyReplyCancel : MaskButton ( defaultMaskButton ) { <nl> + historyReplyCancel : IconButton { <nl> width : 49px ; <nl> height : 49px ; <nl> <nl> - bg : historyReplyBg ; <nl> icon : historyReplyCancelIcon ; <nl> + iconOver : historyReplyCancelIconOver ; <nl> <nl> - iconBg : historyReplyCancelIconFg ; <nl> - iconBgOver : historyReplyCancelIconFgOver ; <nl> + iconPosition : point ( - 1px , - 1px ) ; <nl> + iconPositionDown : point ( - 1px , - 1px ) ; <nl> } <nl> - historyInlineBotCancel : MaskButton ( historyReplyCancel ) { <nl> + historyInlineBotCancel : IconButton ( historyReplyCancel ) { <nl> height : 46px ; <nl> } <nl> <nl> mmm a / Telegram / SourceFiles / historywidget . cpp <nl> ppp b / Telegram / SourceFiles / historywidget . cpp <nl> HistoryWidget : : HistoryWidget ( QWidget * parent ) : TWidget ( parent ) <nl> , _fieldAutocomplete ( this ) <nl> , _reportSpamPanel ( this ) <nl> , _send ( this , st : : historySend ) <nl> - , _unblock ( this , lang ( lng_unblock_button ) , st : : historyUnblock ) <nl> - , _botStart ( this , lang ( lng_bot_start ) , st : : historyComposeButton ) <nl> - , _joinChannel ( this , lang ( lng_channel_join ) , st : : historyComposeButton ) <nl> - , _muteUnmute ( this , lang ( lng_channel_mute ) , st : : historyComposeButton ) <nl> + , _unblock ( this , lang ( lng_unblock_button ) . toUpper ( ) , st : : historyUnblock ) <nl> + , _botStart ( this , lang ( lng_bot_start ) . toUpper ( ) , st : : historyComposeButton ) <nl> + , _joinChannel ( this , lang ( lng_channel_join ) . toUpper ( ) , st : : historyComposeButton ) <nl> + , _muteUnmute ( this , lang ( lng_channel_mute ) . toUpper ( ) , st : : historyComposeButton ) <nl> , _attachToggle ( this , st : : historyAttach ) <nl> , _attachEmoji ( this , st : : historyAttachEmoji ) <nl> , _botKeyboardShow ( this , st : : historyBotKeyboardShow ) <nl> void HistoryWidget : : clearInlineBot ( ) { <nl> void HistoryWidget : : inlineBotChanged ( ) { <nl> bool isInlineBot = _inlineBot & & ( _inlineBot ! = LookingUpInlineBot ) ; <nl> if ( isInlineBot & & ! _inlineBotCancel ) { <nl> - _inlineBotCancel = std_ : : make_unique < Ui : : MaskButton > ( this , st : : historyInlineBotCancel ) ; <nl> + _inlineBotCancel = std_ : : make_unique < Ui : : IconButton > ( this , st : : historyInlineBotCancel ) ; <nl> connect ( _inlineBotCancel . get ( ) , SIGNAL ( clicked ( ) ) , this , SLOT ( onInlineBotCancel ( ) ) ) ; <nl> _inlineBotCancel - > setGeometry ( _send - > geometry ( ) ) ; <nl> _attachEmoji - > raise ( ) ; <nl> void HistoryWidget : : onCheckFieldAutocomplete ( ) { <nl> void HistoryWidget : : updateFieldPlaceholder ( ) { <nl> if ( _editMsgId ) { <nl> _field - > setPlaceholder ( lang ( lng_edit_message_text ) ) ; <nl> - / / _send - > setText ( lang ( lng_settings_save ) ) ; <nl> + _send - > setIcon ( & st : : historyEditSaveIcon , & st : : historyEditSaveIconOver ) ; <nl> } else { <nl> if ( _inlineBot & & _inlineBot ! = LookingUpInlineBot ) { <nl> _field - > setPlaceholder ( _inlineBot - > botInfo - > inlinePlaceholder . mid ( 1 ) , _inlineBot - > username . size ( ) + 2 ) ; <nl> } else { <nl> _field - > setPlaceholder ( lang ( ( _history & & _history - > isChannel ( ) & & ! _history - > isMegagroup ( ) ) ? ( _silent - > checked ( ) ? lng_broadcast_silent_ph : lng_broadcast_ph ) : lng_message_ph ) ) ; <nl> } <nl> - / / _send - > setText ( lang ( lng_send_button ) ) ; <nl> + _send - > setIcon ( nullptr ) ; <nl> } <nl> } <nl> <nl> mmm a / Telegram / SourceFiles / historywidget . h <nl> ppp b / Telegram / SourceFiles / historywidget . h <nl> class DropdownMenu ; <nl> class PlainShadow ; <nl> class PopupMenu ; <nl> class IconButton ; <nl> - class MaskButton ; <nl> class HistoryDownButton ; <nl> class EmojiButton ; <nl> } / / namespace Ui <nl> private slots : <nl> Text _replyEditMsgText ; <nl> mutable SingleTimer _updateEditTimeLeftDisplay ; <nl> <nl> - ChildWidget < Ui : : MaskButton > _fieldBarCancel ; <nl> + ChildWidget < Ui : : IconButton > _fieldBarCancel ; <nl> void updateReplyEditTexts ( bool force = false ) ; <nl> <nl> struct PinnedBar { <nl> private slots : <nl> MsgId msgId = 0 ; <nl> HistoryItem * msg = nullptr ; <nl> Text text ; <nl> - ChildWidget < Ui : : MaskButton > cancel ; <nl> + ChildWidget < Ui : : IconButton > cancel ; <nl> ChildWidget < Ui : : PlainShadow > shadow ; <nl> } ; <nl> std_ : : unique_ptr < PinnedBar > _pinnedBar ; <nl> private slots : <nl> UserData * _inlineBot = nullptr ; <nl> QString _inlineBotUsername ; <nl> mtpRequestId _inlineBotResolveRequestId = 0 ; <nl> - std_ : : unique_ptr < Ui : : MaskButton > _inlineBotCancel ; <nl> + std_ : : unique_ptr < Ui : : IconButton > _inlineBotCancel ; <nl> void inlineBotResolveDone ( const MTPcontacts_ResolvedPeer & result ) ; <nl> bool inlineBotResolveFail ( QString name , const RPCError & error ) ; <nl> <nl> mmm a / Telegram / SourceFiles / mainwindow . cpp <nl> ppp b / Telegram / SourceFiles / mainwindow . cpp <nl> void MainWindow : : showConnecting ( const QString & text , const QString & reconnect ) { <nl> _connecting - > set ( text , reconnect ) ; <nl> } else { <nl> _connecting . create ( bodyWidget ( ) , text , reconnect ) ; <nl> + _connecting - > show ( ) ; <nl> updateControlsGeometry ( ) ; <nl> fixOrder ( ) ; <nl> } <nl> mmm a / Telegram / SourceFiles / media / player / media_player . style <nl> ppp b / Telegram / SourceFiles / media / player / media_player . style <nl> mediaPlayerScroll : flatScroll ( solidScroll ) { <nl> } <nl> mediaPlayerListHeightMax : 280px ; <nl> mediaPlayerListMarginBottom : 10px ; <nl> - mediaPlayerScrollShadow : icon { { " playlist_shadow " , # 000000 } } ; <nl> + mediaPlayerScrollShadow : icon { { " playlist_shadow " , windowShadowFg } } ; <nl> <nl> mediaPlayerListMarginTop : 8px ; <nl> mediaPlayerListIconFg : # ffffff ; <nl> mmm a / Telegram / SourceFiles / settings / settings . style <nl> ppp b / Telegram / SourceFiles / settings / settings . style <nl> settingsMargin : 48px ; <nl> <nl> settingsFixedBarHeight : 52px ; <nl> settingsFixedBarFont : font ( 14px semibold ) ; <nl> - settingsFixedBarFg : windowTextFg ; <nl> settingsFixedBarTextLeft : 20px ; <nl> settingsFixedBarTextTop : 16px ; <nl> - settingsFixedBarClose : MaskButton ( defaultMaskButton ) { <nl> + settingsFixedBarClose : IconButton ( boxBlockTitleClose ) { <nl> width : settingsFixedBarHeight ; <nl> height : settingsFixedBarHeight ; <nl> - <nl> - bg : settingsFixedBarBg ; <nl> - icon : settingsFixedBarCloseIcon ; <nl> - <nl> - iconBg : settingsCloseFg ; <nl> - iconBgOver : settingsCloseFgOver ; <nl> } <nl> - settingsFixedBarShadowBg1 : # 00000021 ; <nl> - settingsFixedBarShadowBg2 : # 0000000b ; <nl> <nl> settingsMarginTop : 34px ; <nl> settingsPhotoSize : 112px ; <nl> mmm a / Telegram / SourceFiles / settings / settings_fixed_bar . cpp <nl> ppp b / Telegram / SourceFiles / settings / settings_fixed_bar . cpp <nl> void FixedBar : : resizeEvent ( QResizeEvent * e ) { <nl> void FixedBar : : paintEvent ( QPaintEvent * e ) { <nl> Painter p ( this ) ; <nl> <nl> - p . fillRect ( e - > rect ( ) , st : : settingsFixedBarBg ) ; <nl> + p . fillRect ( e - > rect ( ) , st : : boxBlockTitleBg ) ; <nl> <nl> p . setFont ( st : : settingsFixedBarFont ) ; <nl> p . setPen ( st : : windowTextFg ) ; <nl> mmm a / Telegram / SourceFiles / settings / settings_fixed_bar . h <nl> ppp b / Telegram / SourceFiles / settings / settings_fixed_bar . h <nl> Copyright ( c ) 2014 - 2016 John Preston , https : / / desktop . telegram . org <nl> # pragma once <nl> <nl> namespace Ui { <nl> - class MaskButton ; <nl> + class IconButton ; <nl> } / / namespace Ui <nl> <nl> namespace Settings { <nl> class FixedBar : public TWidget { <nl> int resizeGetHeight ( int newWidth ) override ; <nl> <nl> private : <nl> - ChildWidget < Ui : : MaskButton > _close ; <nl> + ChildWidget < Ui : : IconButton > _close ; <nl> <nl> } ; <nl> <nl> mmm a / Telegram / SourceFiles / settings / settings_widget . cpp <nl> ppp b / Telegram / SourceFiles / settings / settings_widget . cpp <nl> Widget : : Widget ( QWidget * parent ) : LayerWidget ( parent ) <nl> , _scroll ( this , st : : setScroll ) <nl> , _inner ( this ) <nl> , _fixedBar ( this ) <nl> - , _fixedBarShadow1 ( this , st : : settingsFixedBarShadowBg1 ) <nl> - , _fixedBarShadow2 ( this , st : : settingsFixedBarShadowBg2 ) { <nl> + , _fixedBarShadow ( this , st : : boxBlockTitleShadow ) { <nl> _scroll - > setOwnedWidget ( _inner ) ; <nl> setAttribute ( Qt : : WA_OpaquePaintEvent ) ; <nl> <nl> _fixedBar - > move ( 0 , 0 ) ; <nl> - _fixedBarShadow1 - > move ( 0 , _fixedBar - > y ( ) + st : : settingsFixedBarHeight ) ; <nl> - _fixedBarShadow2 - > move ( 0 , _fixedBarShadow1 - > y ( ) + st : : lineWidth ) ; <nl> + _fixedBarShadow - > move ( 0 , _fixedBar - > y ( ) + st : : settingsFixedBarHeight ) ; <nl> _scroll - > move ( 0 , st : : settingsFixedBarHeight ) ; <nl> <nl> connect ( _inner , SIGNAL ( heightUpdated ( ) ) , this , SLOT ( onInnerHeightUpdated ( ) ) ) ; <nl> void Widget : : resizeEvent ( QResizeEvent * e ) { <nl> } <nl> <nl> _fixedBar - > resizeToWidth ( width ( ) ) ; <nl> - _fixedBarShadow1 - > resize ( width ( ) , st : : lineWidth ) ; <nl> - _fixedBarShadow2 - > resize ( width ( ) , st : : lineWidth ) ; <nl> + _fixedBarShadow - > resize ( width ( ) , st : : boxBlockTitleShadow . height ( ) ) ; <nl> <nl> QSize scrollSize ( width ( ) , height ( ) - _fixedBar - > height ( ) ) ; <nl> if ( _scroll - > size ( ) ! = scrollSize ) { <nl> mmm a / Telegram / SourceFiles / settings / settings_widget . h <nl> ppp b / Telegram / SourceFiles / settings / settings_widget . h <nl> Copyright ( c ) 2014 - 2016 John Preston , https : / / desktop . telegram . org <nl> # include " layerwidget . h " <nl> <nl> namespace Ui { <nl> - class PlainShadow ; <nl> + class GradientShadow ; <nl> } / / namespace Ui <nl> <nl> namespace Settings { <nl> private slots : <nl> ChildWidget < ScrollArea > _scroll ; <nl> ChildWidget < InnerWidget > _inner ; <nl> ChildWidget < FixedBar > _fixedBar ; <nl> - ChildWidget < Ui : : PlainShadow > _fixedBarShadow1 , _fixedBarShadow2 ; <nl> + ChildWidget < Ui : : GradientShadow > _fixedBarShadow ; <nl> <nl> int _contentLeft = 0 ; <nl> <nl> mmm a / Telegram / SourceFiles / ui / buttons / icon_button . cpp <nl> ppp b / Telegram / SourceFiles / ui / buttons / icon_button . cpp <nl> void IconButton : : paintEvent ( QPaintEvent * e ) { <nl> if ( position . x ( ) < 0 ) { <nl> position . setX ( ( width ( ) - icon - > width ( ) ) / 2 ) ; <nl> } <nl> + if ( position . y ( ) < 0 ) { <nl> + position . setY ( ( height ( ) - icon - > height ( ) ) / 2 ) ; <nl> + } <nl> icon - > paint ( p , position , width ( ) ) ; <nl> if ( over > 0 . & & over < 1 . ) { <nl> auto iconOver = overIcon ( ) ; <nl> mmm a / Telegram / SourceFiles / ui / countryinput . cpp <nl> ppp b / Telegram / SourceFiles / ui / countryinput . cpp <nl> CountrySelectBox : : CountrySelectBox ( ) : ItemListBox ( st : : countriesScroll , st : : boxW <nl> , _topShadow ( this ) { <nl> _select - > resizeToWidth ( st : : boxWidth ) ; <nl> <nl> - ItemListBox : : init ( _inner , st : : boxScrollSkip , st : : boxTitleHeight + _select - > height ( ) ) ; <nl> + ItemListBox : : init ( _inner , st : : boxScrollSkip , titleHeight ( ) + _select - > height ( ) ) ; <nl> <nl> _select - > setQueryChangedCallback ( [ this ] ( const QString & query ) { onFilterUpdate ( query ) ; } ) ; <nl> _select - > setSubmittedCallback ( [ this ] ( bool ) { onSubmit ( ) ; } ) ; <nl> void CountrySelectBox : : resizeEvent ( QResizeEvent * e ) { <nl> ItemListBox : : resizeEvent ( e ) ; <nl> <nl> _select - > resizeToWidth ( width ( ) ) ; <nl> - _select - > moveToLeft ( 0 , st : : boxTitleHeight ) ; <nl> + _select - > moveToLeft ( 0 , titleHeight ( ) ) ; <nl> <nl> _inner - > resizeToWidth ( width ( ) ) ; <nl> - _topShadow . setGeometry ( 0 , st : : boxTitleHeight + _select - > height ( ) , width ( ) , st : : lineWidth ) ; <nl> + _topShadow . setGeometry ( 0 , titleHeight ( ) + _select - > height ( ) , width ( ) , st : : lineWidth ) ; <nl> } <nl> <nl> void CountrySelectBox : : showAll ( ) { <nl> mmm a / Telegram / SourceFiles / ui / widgets / multi_select . h <nl> ppp b / Telegram / SourceFiles / ui / widgets / multi_select . h <nl> class InputField ; <nl> <nl> namespace Ui { <nl> <nl> - class MaskButton ; <nl> + class IconButton ; <nl> <nl> class MultiSelect : public TWidget { <nl> public : <nl> private slots : <nl> int _fieldTop = 0 ; <nl> int _fieldWidth = 0 ; <nl> ChildWidget < InputField > _field ; <nl> - ChildWidget < Ui : : MaskButton > _cancel ; <nl> + ChildWidget < Ui : : IconButton > _cancel ; <nl> <nl> int _newHeight = 0 ; <nl> IntAnimation _height ; <nl> mmm a / Telegram / SourceFiles / ui / widgets / widgets . style <nl> ppp b / Telegram / SourceFiles / ui / widgets / widgets . style <nl> MultiSelect { <nl> fieldMinWidth : pixels ; <nl> fieldIcon : icon ; <nl> fieldIconSkip : pixels ; <nl> - fieldCancel : MaskButton ; <nl> + fieldCancel : IconButton ; <nl> fieldCancelSkip : pixels ; <nl> } <nl> <nl> defaultLabelSimple : LabelSimple { <nl> textFg : windowTextFg ; <nl> } <nl> <nl> + defaultIconButton : IconButton { <nl> + iconPosition : point ( - 1px , - 1px ) ; <nl> + iconPositionDown : point ( - 1px , - 1px ) ; <nl> + } <nl> + <nl> defaultMaskButton : MaskButton { <nl> iconPosition : point ( - 1px , - 1px ) ; <nl> iconPositionDown : point ( - 1px , - 1px ) ; <nl> mmm a / Telegram / build / version <nl> ppp b / Telegram / build / version <nl> AppVersionStrMajor 0 . 10 <nl> AppVersionStrSmall 0 . 10 . 20 <nl> AppVersionStr 0 . 10 . 20 <nl> AlphaChannel 0 <nl> - BetaVersion 10019002 <nl> + BetaVersion 10019003 <nl>
|
10019003 : Some compose area icons improved . Box headers redesigned .
|
telegramdesktop/tdesktop
|
494254496efe6ed68c2570e1739f5adc6d6e3b17
|
2016-12-30T13:51:52Z
|
mmm a / examples / vulkan_example / imgui_impl_glfw_vulkan . cpp <nl> ppp b / examples / vulkan_example / imgui_impl_glfw_vulkan . cpp <nl> void ImGui_ImplGlfwVulkan_RenderDrawLists ( ImDrawData * draw_data ) <nl> else <nl> { <nl> VkRect2D scissor ; <nl> - scissor . offset . x = ( int32_t ) ( pcmd - > ClipRect . x ) ; <nl> - scissor . offset . y = ( int32_t ) ( pcmd - > ClipRect . y ) ; <nl> + scissor . offset . x = ( int32_t ) ( pcmd - > ClipRect . x ) > 0 ? ( int32_t ) ( pcmd - > ClipRect . x ) : 0 ; <nl> + scissor . offset . y = ( int32_t ) ( pcmd - > ClipRect . y ) > 0 ? ( int32_t ) ( pcmd - > ClipRect . y ) : 0 ; <nl> scissor . extent . width = ( uint32_t ) ( pcmd - > ClipRect . z - pcmd - > ClipRect . x ) ; <nl> scissor . extent . height = ( uint32_t ) ( pcmd - > ClipRect . w - pcmd - > ClipRect . y + 1 ) ; / / TODO : + 1 ? ? ? ? ? ? <nl> vkCmdSetScissor ( g_CommandBuffer , 0 , 1 , & scissor ) ; <nl>
|
Clip negative scissor offsets to zero
|
ocornut/imgui
|
4da26d85cdf4d84eb0e491fbfcf1efce3311d093
|
2017-03-26T17:54:59Z
|
mmm a / bindings / python / examples / CifarResNet / CifarResNet . py <nl> ppp b / bindings / python / examples / CifarResNet / CifarResNet . py <nl> def cifar_resnet ( base_path , debug_output = False ) : <nl> <nl> return total_error / num_mbs <nl> <nl> - # Place holder for real test <nl> - def test_TODO_remove_me ( device_id ) : <nl> - # FIXME : need a backdoor to work around the limitation of changing the default device not possible <nl> - # from cntk . utils import cntk_device <nl> - # DeviceDescriptor . set_default_device ( cntk_device ( device_id ) ) <nl> - try : <nl> - base_path = os . path . join ( os . environ [ ' CNTK_EXTERNAL_TESTDATA_SOURCE_DIRECTORY ' ] , <nl> - * " Image / CIFAR / v0 / cifar - 10 - batches - py " . split ( " / " ) ) <nl> - os . chdir ( os . path . join ( base_path , ' . . ' ) ) <nl> - except KeyError : <nl> - base_path = os . path . join ( \ <nl> - * " . . / . . / . . / . . / Examples / Image / Miscellaneous / CIFAR - 10 / cifar - 10 - batches - py " . split ( " / " ) ) <nl> - base_path = os . path . normpath ( base_path ) <nl> - cifar_resnet ( base_path ) <nl> - <nl> if __name__ = = ' __main__ ' : <nl> # Specify the target device to be used for computing <nl> target_device = DeviceDescriptor . gpu_device ( 0 ) <nl> + # If it is crashing , probably you don ' t have a GPU , so try with CPU : <nl> + # target_device = DeviceDescriptor . cpu_device ( ) <nl> DeviceDescriptor . set_default_device ( target_device ) <nl> <nl> base_path = os . path . normpath ( os . path . join ( <nl> mmm a / bindings / python / examples / MNIST / SimpleMNIST . py <nl> ppp b / bindings / python / examples / MNIST / SimpleMNIST . py <nl> def simple_mnist ( debug_output = False ) : <nl> print_training_progress ( trainer , i , training_progress_output_freq ) <nl> <nl> # Load test data <nl> - rel_path = os . path . join ( <nl> - * " . . / . . / . . / . . / Examples / Image / MNIST / Data / Test - 28x28_cntk_text . txt " . split ( " / " ) ) <nl> + try : <nl> + rel_path = os . path . join ( os . environ [ ' CNTK_EXTERNAL_TESTDATA_SOURCE_DIRECTORY ' ] , <nl> + * " Image / MNIST / v0 / Test - 28x28_cntk_text . txt " . split ( " / " ) ) <nl> + except KeyError : <nl> + rel_path = os . path . join ( * " . . / . . / . . / . . / Examples / Image / MNIST / Data / Test - 28x28_cntk_text . txt " . split ( " / " ) ) <nl> path = os . path . normpath ( os . path . join ( abs_path , rel_path ) ) <nl> check_path ( path ) <nl> <nl> def simple_mnist ( debug_output = False ) : <nl> return test_result / num_minibatches_to_test <nl> <nl> <nl> - # Place holder for real test <nl> - def test_mnist ( device_id ) : <nl> - # FIXME : need a backdoor to work around the limitation of changing the default device not possible <nl> - # from cntk . utils import cntk_device <nl> - # DeviceDescriptor . set_default_device ( cntk_device ( device_id ) ) <nl> - simple_mnist ( ) <nl> - <nl> if __name__ = = ' __main__ ' : <nl> # Specify the target device to be used for computing <nl> target_device = DeviceDescriptor . gpu_device ( 0 ) <nl> mmm a / bindings / python / examples / NumpyInterop / FeedForwardNet . py <nl> ppp b / bindings / python / examples / NumpyInterop / FeedForwardNet . py <nl> def ffnet ( debug_output = False ) : <nl> { input : test_features , label : test_labels } ) <nl> return avg_error <nl> <nl> - def test_error_TODO ( device_id ) : <nl> - # FIXME : need a backdoor to work around the limitation of changing the default device not possible <nl> - # from cntk . utils import cntk_device <nl> - # DeviceDescriptor . set_default_device ( cntk_device ( device_id ) ) <nl> - <nl> - avg_error = ffnet ( debug_output = False ) <nl> - expected_avg_error = 0 . 12 <nl> - assert np . allclose ( avg_error , expected_avg_error , atol = TOLERANCE_ABSOLUTE ) <nl> - <nl> if __name__ = = ' __main__ ' : <nl> # Specify the target device to be used for computing <nl> target_device = DeviceDescriptor . gpu_device ( 0 ) <nl> mmm a / bindings / python / examples / Sequence2Sequence / Sequence2Sequence . py <nl> ppp b / bindings / python / examples / Sequence2Sequence / Sequence2Sequence . py <nl> def sequence_to_sequence_translator ( debug_output = False ) : <nl> <nl> if __name__ = = ' __main__ ' : <nl> # Specify the target device to be used for computing <nl> - target_device = DeviceDescriptor . cpu_device ( ) <nl> + target_device = DeviceDescriptor . gpu_device ( 0 ) <nl> + # If it is crashing , probably you don ' t have a GPU , so try with CPU : <nl> + # target_device = DeviceDescriptor . cpu_device ( ) <nl> DeviceDescriptor . set_default_device ( target_device ) <nl> <nl> error = sequence_to_sequence_translator ( ) <nl> mmm a / bindings / python / examples / conftest . py <nl> ppp b / bindings / python / examples / conftest . py <nl> <nl> import sys <nl> import pytest <nl> <nl> - # content of conftest . py <nl> _DEFAULT_DEVICE_ID = - 1 <nl> <nl> + import cntk . cntk_py <nl> + cntk . cntk_py . always_allow_setting_default_device ( ) <nl> + <nl> def pytest_addoption ( parser ) : <nl> parser . addoption ( " - - deviceid " , action = " append " , default = [ _DEFAULT_DEVICE_ID ] , <nl> help = " list of device ids to pass to test functions " ) <nl> mmm a / bindings / python / examples / test / cifar_resnet_test . py <nl> ppp b / bindings / python / examples / test / cifar_resnet_test . py <nl> def test_cifar_resnet_error ( device_id ) : <nl> target_device = DeviceDescriptor . gpu_device ( 0 ) <nl> DeviceDescriptor . set_default_device ( target_device ) <nl> <nl> - base_path = os . path . normpath ( os . path . join ( <nl> - * " . . / . . / . . / . . / Examples / Image / Miscellaneous / CIFAR - 10 / cifar - 10 - batches - py " . split ( " / " ) ) ) <nl> - <nl> + try : <nl> + base_path = os . path . join ( os . environ [ ' CNTK_EXTERNAL_TESTDATA_SOURCE_DIRECTORY ' ] , <nl> + * " Image / CIFAR / v0 / cifar - 10 - batches - py " . split ( " / " ) ) <nl> + except KeyError : <nl> + base_path = os . path . join ( <nl> + * " . . / . . / . . / . . / Examples / Image / Miscellaneous / CIFAR - 10 / cifar - 10 - batches - py " . split ( " / " ) ) <nl> + <nl> + base_path = os . path . normpath ( base_path ) <nl> os . chdir ( os . path . join ( base_path , ' . . ' ) ) <nl> <nl> test_error = cifar_resnet ( base_path ) <nl> mmm a / bindings / python / examples / test / feed_forward_net_test . py <nl> ppp b / bindings / python / examples / test / feed_forward_net_test . py <nl> <nl> TOLERANCE_ABSOLUTE = 1E - 03 <nl> <nl> def test_ffnet_error ( device_id ) : <nl> - # from cntk . utils import cntk_device <nl> - # DeviceDescriptor . set_default_device ( cntk_device ( device_id ) ) <nl> + from cntk . utils import cntk_device <nl> + DeviceDescriptor . set_default_device ( cntk_device ( device_id ) ) <nl> <nl> avg_error = ffnet ( debug_output = False ) <nl> expected_avg_error = 0 . 12 <nl> mmm a / bindings / python / examples / test / sequence_classification_test . py <nl> ppp b / bindings / python / examples / test / sequence_classification_test . py <nl> <nl> TOLERANCE_ABSOLUTE = 1E - 2 <nl> <nl> def test_seq_classification_error ( device_id ) : <nl> - # from cntk . utils import cntk_device <nl> - # DeviceDescriptor . set_default_device ( cntk_device ( device_id ) ) <nl> + from cntk . utils import cntk_device <nl> + DeviceDescriptor . set_default_device ( cntk_device ( device_id ) ) <nl> <nl> evaluation_avg , loss_avg = train_sequence_classifier ( ) <nl> <nl> mmm a / bindings / python / examples / test / sequence_to_sequence_test . py <nl> ppp b / bindings / python / examples / test / sequence_to_sequence_test . py <nl> <nl> TOLERANCE_ABSOLUTE = 1E - 1 <nl> <nl> def test_sequence_to_sequence ( device_id ) : <nl> - # from cntk . utils import cntk_device <nl> - # DeviceDescriptor . set_default_device ( cntk_device ( device_id ) ) <nl> + from cntk . utils import cntk_device <nl> + DeviceDescriptor . set_default_device ( cntk_device ( device_id ) ) <nl> <nl> error = sequence_to_sequence_translator ( ) <nl> expected_error = 0 . 758458 <nl> mmm a / bindings / python / examples / test / simple_mnist_test . py <nl> ppp b / bindings / python / examples / test / simple_mnist_test . py <nl> <nl> TOLERANCE_ABSOLUTE = 1E - 1 <nl> <nl> def test_simple_mnist_error ( device_id ) : <nl> - # from cntk . utils import cntk_device <nl> - # DeviceDescriptor . set_default_device ( cntk_device ( device_id ) ) <nl> + from cntk . utils import cntk_device <nl> + DeviceDescriptor . set_default_device ( cntk_device ( device_id ) ) <nl> <nl> test_error = simple_mnist ( ) <nl> expected_test_error = 0 . 09 <nl>
|
bindings / python / examples : fixes
|
microsoft/CNTK
|
7e7cc495aedd47b221cea9f494b873afd4e4bdf5
|
2016-09-30T19:58:31Z
|
mmm a / dbms / src / Functions / isValidUTF8 . cpp <nl> ppp b / dbms / src / Functions / isValidUTF8 . cpp <nl> SOFTWARE . <nl> } <nl> } ; <nl> <nl> - struct NameValidUTF8 <nl> + struct NameIsValidUTF8 <nl> { <nl> static constexpr auto name = " isValidUTF8 " ; <nl> } ; <nl> - using FunctionValidUTF8 = FunctionStringOrArrayToT < ValidUTF8Impl , NameValidUTF8 , UInt8 > ; <nl> + using FunctionValidUTF8 = FunctionStringOrArrayToT < ValidUTF8Impl , NameIsValidUTF8 , UInt8 > ; <nl> <nl> - void registerFunctionValidUTF8 ( FunctionFactory & factory ) <nl> + void registerFunctionIsValidUTF8 ( FunctionFactory & factory ) <nl> { <nl> factory . registerFunction < FunctionValidUTF8 > ( ) ; <nl> } <nl> mmm a / dbms / src / Functions / registerFunctionsString . cpp <nl> ppp b / dbms / src / Functions / registerFunctionsString . cpp <nl> void registerFunctionEmpty ( FunctionFactory & ) ; <nl> void registerFunctionNotEmpty ( FunctionFactory & ) ; <nl> void registerFunctionLength ( FunctionFactory & ) ; <nl> void registerFunctionLengthUTF8 ( FunctionFactory & ) ; <nl> - void registerFunctionValidUTF8 ( FunctionFactory & ) ; <nl> + void registerFunctionIsValidUTF8 ( FunctionFactory & ) ; <nl> + void registerFunctionToValidUTF8 ( FunctionFactory & ) ; <nl> void registerFunctionLower ( FunctionFactory & ) ; <nl> void registerFunctionUpper ( FunctionFactory & ) ; <nl> void registerFunctionLowerUTF8 ( FunctionFactory & ) ; <nl> void registerFunctionsString ( FunctionFactory & factory ) <nl> registerFunctionNotEmpty ( factory ) ; <nl> registerFunctionLength ( factory ) ; <nl> registerFunctionLengthUTF8 ( factory ) ; <nl> - registerFunctionValidUTF8 ( factory ) ; <nl> + registerFunctionIsValidUTF8 ( factory ) ; <nl> + registerFunctionToValidUTF8 ( factory ) ; <nl> registerFunctionLower ( factory ) ; <nl> registerFunctionUpper ( factory ) ; <nl> registerFunctionLowerUTF8 ( factory ) ; <nl> new file mode 100644 <nl> index 00000000000 . . 72e209f9703 <nl> mmm / dev / null <nl> ppp b / dbms / src / Functions / toValidUTF8 . cpp <nl> <nl> + # include < DataTypes / DataTypeString . h > <nl> + # include < Functions / FunctionFactory . h > <nl> + # include < Functions / FunctionStringToString . h > <nl> + # include < IO / WriteBufferFromVector . h > <nl> + # include < IO / WriteBufferValidUTF8 . h > <nl> + # include < IO / WriteHelpers . h > <nl> + # include < Poco / UTF8Encoding . h > <nl> + <nl> + # include < string_view > <nl> + <nl> + # ifdef __SSE2__ <nl> + # include < emmintrin . h > <nl> + # endif <nl> + <nl> + namespace DB <nl> + { <nl> + namespace ErrorCodes <nl> + { <nl> + extern const int ILLEGAL_COLUMN ; <nl> + } <nl> + <nl> + extern const UInt8 length_of_utf8_sequence [ 256 ] ; <nl> + <nl> + struct ToValidUTF8Impl <nl> + { <nl> + static void processOne ( const char * begin , const char * end , WriteBuffer & write_buffer ) <nl> + { <nl> + static constexpr std : : string_view replacement = " \ xEF \ xBF \ xBD " ; <nl> + <nl> + const char * p = begin ; <nl> + const char * valid_start = begin ; <nl> + <nl> + / / / The last recorded character was ` replacement ` . <nl> + bool just_put_replacement = false ; <nl> + <nl> + auto put_valid = [ & write_buffer , & just_put_replacement ] ( const char * data , size_t len ) <nl> + { <nl> + if ( len = = 0 ) <nl> + return ; <nl> + just_put_replacement = false ; <nl> + write_buffer . write ( data , len ) ; <nl> + } ; <nl> + <nl> + auto put_replacement = [ & write_buffer , & just_put_replacement ] ( ) <nl> + { <nl> + if ( just_put_replacement ) <nl> + return ; <nl> + just_put_replacement = true ; <nl> + write_buffer . write ( replacement . data ( ) , replacement . size ( ) ) ; <nl> + } ; <nl> + <nl> + while ( p < end ) <nl> + { <nl> + # ifdef __SSE2__ <nl> + / / / Fast skip of ASCII <nl> + static constexpr size_t SIMD_BYTES = 16 ; <nl> + const char * simd_end = p + ( end - p ) / SIMD_BYTES * SIMD_BYTES ; <nl> + <nl> + while ( p < simd_end & & ! _mm_movemask_epi8 ( _mm_loadu_si128 ( reinterpret_cast < const __m128i * > ( p ) ) ) ) <nl> + p + = SIMD_BYTES ; <nl> + <nl> + if ( ! ( p < end ) ) <nl> + break ; <nl> + # endif <nl> + <nl> + size_t len = length_of_utf8_sequence [ static_cast < unsigned char > ( * p ) ] ; <nl> + <nl> + if ( len > 4 ) <nl> + { <nl> + / / / Invalid start of sequence . Skip one byte . <nl> + put_valid ( valid_start , p - valid_start ) ; <nl> + put_replacement ( ) ; <nl> + + + p ; <nl> + valid_start = p ; <nl> + } <nl> + else if ( p + len > end ) <nl> + { <nl> + / / / Sequence was not fully written to this buffer . <nl> + break ; <nl> + } <nl> + else if ( Poco : : UTF8Encoding : : isLegal ( reinterpret_cast < const unsigned char * > ( p ) , len ) ) <nl> + { <nl> + / / / Valid sequence . <nl> + p + = len ; <nl> + } <nl> + else <nl> + { <nl> + / / / Invalid sequence . Skip just first byte . <nl> + put_valid ( valid_start , p - valid_start ) ; <nl> + put_replacement ( ) ; <nl> + + + p ; <nl> + valid_start = p ; <nl> + } <nl> + } <nl> + <nl> + put_valid ( valid_start , p - valid_start ) ; <nl> + <nl> + if ( p ! = end ) <nl> + put_replacement ( ) ; <nl> + } <nl> + <nl> + static void vector ( <nl> + const ColumnString : : Chars & data , <nl> + const ColumnString : : Offsets & offsets , <nl> + ColumnString : : Chars & res_data , <nl> + ColumnString : : Offsets & res_offsets ) <nl> + { <nl> + const size_t offsets_size = offsets . size ( ) ; <nl> + / / / It can be larger than that , but we believe it is unlikely to happen . <nl> + res_data . resize ( data . size ( ) ) ; <nl> + res_offsets . resize ( offsets_size ) ; <nl> + <nl> + size_t prev_offset = 0 ; <nl> + WriteBufferFromVector < ColumnString : : Chars > write_buffer ( res_data ) ; <nl> + for ( size_t i = 0 ; i < offsets_size ; + + i ) <nl> + { <nl> + const char * haystack_data = reinterpret_cast < const char * > ( & data [ prev_offset ] ) ; <nl> + const size_t haystack_size = offsets [ i ] - prev_offset - 1 ; <nl> + processOne ( haystack_data , haystack_data + haystack_size , write_buffer ) ; <nl> + writeChar ( 0 , write_buffer ) ; <nl> + res_offsets [ i ] = write_buffer . count ( ) ; <nl> + prev_offset = offsets [ i ] ; <nl> + } <nl> + write_buffer . finish ( ) ; <nl> + } <nl> + <nl> + static void vector_fixed ( const ColumnString : : Chars & , size_t , ColumnString : : Chars & ) <nl> + { <nl> + throw Exception ( " Column of type FixedString is not supported by toValidUTF8 function " , ErrorCodes : : ILLEGAL_COLUMN ) ; <nl> + } <nl> + } ; <nl> + <nl> + struct NameToValidUTF8 <nl> + { <nl> + static constexpr auto name = " toValidUTF8 " ; <nl> + } ; <nl> + using FunctionToValidUTF8 = FunctionStringToString < ToValidUTF8Impl , NameToValidUTF8 > ; <nl> + <nl> + void registerFunctionToValidUTF8 ( FunctionFactory & factory ) <nl> + { <nl> + factory . registerFunction < FunctionToValidUTF8 > ( ) ; <nl> + } <nl> + <nl> + } <nl> mmm a / dbms / src / IO / WriteBufferValidUTF8 . cpp <nl> ppp b / dbms / src / IO / WriteBufferValidUTF8 . cpp <nl> namespace DB <nl> <nl> const size_t WriteBufferValidUTF8 : : DEFAULT_SIZE = 4096 ; <nl> <nl> - namespace <nl> + / * * Index into the table below with the first byte of a UTF - 8 sequence to <nl> + * get the number of trailing bytes that are supposed to follow it . <nl> + * Note that * legal * UTF - 8 values can ' t have 4 or 5 - bytes . The table is <nl> + * left as - is for anyone who may want to do such conversion , which was <nl> + * allowed in earlier algorithms . <nl> + * / <nl> + extern const UInt8 length_of_utf8_sequence [ 256 ] = <nl> { <nl> - / * * Index into the table below with the first byte of a UTF - 8 sequence to <nl> - * get the number of trailing bytes that are supposed to follow it . <nl> - * Note that * legal * UTF - 8 values can ' t have 4 or 5 - bytes . The table is <nl> - * left as - is for anyone who may want to do such conversion , which was <nl> - * allowed in earlier algorithms . <nl> - * / <nl> - const UInt8 length_of_utf8_sequence [ 256 ] = <nl> - { <nl> - 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , <nl> - 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , <nl> - 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , <nl> - 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , <nl> - 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , <nl> - 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , <nl> - 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , <nl> - 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 5 , 5 , 5 , 5 , 6 , 6 , 6 , 6 <nl> - } ; <nl> - } <nl> + 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , <nl> + 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , <nl> + 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , <nl> + 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , <nl> + 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , <nl> + 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , <nl> + 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , <nl> + 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 5 , 5 , 5 , 5 , 6 , 6 , 6 , 6 <nl> + } ; <nl> <nl> <nl> WriteBufferValidUTF8 : : WriteBufferValidUTF8 ( <nl> new file mode 100644 <nl> index 00000000000 . . 4d31c78a12c <nl> mmm / dev / null <nl> ppp b / dbms / tests / queries / 0_stateless / 00948_to_valid_utf8 . reference <nl> <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + some text <nl> + some text <nl> + some text <nl> + some text <nl> + some text <nl> + some text <nl> + some text <nl> + some text <nl> + some text <nl> + some text <nl> + какой - то текст <nl> + какой - то текст <nl> + какой - то текст <nl> + какой - то текст <nl> + какой - то текст <nl> + какой - то текст <nl> + какой - то текст <nl> + какой - то текст <nl> + какой - то текст <nl> + какой - то текст <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + f <nl> + f <nl> + f <nl> + f <nl> + f <nl> + f <nl> + f <nl> + f <nl> + f <nl> + f <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + \ 0 <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + ߿ <nl> + ߿ <nl> + ߿ <nl> + ߿ <nl> + ߿ <nl> + ߿ <nl> + ߿ <nl> + ߿ <nl> + ߿ <nl> + ߿ <nl> + ࠀ <nl> + ࠀ <nl> + ࠀ <nl> + ࠀ <nl> + ࠀ <nl> + ࠀ <nl> + ࠀ <nl> + ࠀ <nl> + ࠀ <nl> + ࠀ <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + ퟀ <nl> + ퟀ <nl> + ퟀ <nl> + ퟀ <nl> + ퟀ <nl> + ퟀ <nl> + ퟀ <nl> + ퟀ <nl> + ퟀ <nl> + ퟀ <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + 𐿀 <nl> + 𐿀 <nl> + 𐿀 <nl> + 𐿀 <nl> + 𐿀 <nl> + 𐿀 <nl> + 𐿀 <nl> + 𐿀 <nl> + 𐿀 <nl> + 𐿀 <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + <nl> + a <nl> + a <nl> + a <nl> + a <nl> + a <nl> + a <nl> + a <nl> + a <nl> + a <nl> + a <nl> + ñ <nl> + ñ <nl> + ñ <nl> + ñ <nl> + ñ <nl> + ñ <nl> + ñ <nl> + ñ <nl> + ñ <nl> + ñ <nl> + ₡ <nl> + ₡ <nl> + ₡ <nl> + ₡ <nl> + ₡ <nl> + ₡ <nl> + ₡ <nl> + ₡ <nl> + ₡ <nl> + ₡ <nl> + 𐌼 <nl> + 𐌼 <nl> + 𐌼 <nl> + 𐌼 <nl> + 𐌼 <nl> + 𐌼 <nl> + 𐌼 <nl> + 𐌼 <nl> + 𐌼 <nl> + 𐌼 <nl> + 안녕하세요 , 세상 <nl> + 안녕하세요 , 세상 <nl> + 안녕하세요 , 세상 <nl> + 안녕하세요 , 세상 <nl> + 안녕하세요 , 세상 <nl> + 안녕하세요 , 세상 <nl> + 안녕하세요 , 세상 <nl> + 안녕하세요 , 세상 <nl> + 안녕하세요 , 세상 <nl> + 안녕하세요 , 세상 <nl> + � ( <nl> + � ( <nl> + � ( <nl> + � ( <nl> + � ( <nl> + � ( <nl> + � ( <nl> + � ( <nl> + � ( <nl> + � ( <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( <nl> + � ( <nl> + � ( <nl> + � ( <nl> + � ( <nl> + � ( <nl> + � ( <nl> + � ( <nl> + � ( <nl> + � ( <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � <nl> + � ( � ( <nl> + � ( � ( <nl> + � ( � ( <nl> + � ( � ( <nl> + � ( � ( <nl> + � ( � ( <nl> + � ( � ( <nl> + � ( � ( <nl> + � ( � ( <nl> + � ( � ( <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + 12345678901234 � <nl> + 12345678901234 � <nl> + 12345678901234 � <nl> + 12345678901234 � <nl> + 12345678901234 � <nl> + 12345678901234 � <nl> + 12345678901234 � <nl> + 12345678901234 � <nl> + 12345678901234 � <nl> + 12345678901234 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + 123456789012345 � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � \ 0 <nl> + � \ 0 <nl> + � \ 0 <nl> + � \ 0 <nl> + � \ 0 <nl> + � \ 0 <nl> + � \ 0 <nl> + � \ 0 <nl> + � \ 0 <nl> + � \ 0 <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � � <nl> + � � <nl> + � � <nl> + � � <nl> + � � <nl> + � � <nl> + � � <nl> + � � <nl> + � � <nl> + � � <nl> + � \ 0 <nl> + � \ 0 <nl> + � \ 0 <nl> + � \ 0 <nl> + � \ 0 <nl> + � \ 0 <nl> + � \ 0 <nl> + � \ 0 <nl> + � \ 0 <nl> + � \ 0 <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � <nl> + � \ 0 � <nl> + � \ 0 � <nl> + � \ 0 � <nl> + � \ 0 � <nl> + � \ 0 � <nl> + � \ 0 � <nl> + � \ 0 � <nl> + � \ 0 � <nl> + � \ 0 � <nl> + � \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0က \ 0 \ 0 � \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0က \ 0 \ 0 � \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0က \ 0 \ 0 � \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0က \ 0 \ 0 � \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0က \ 0 \ 0 � \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0က \ 0 \ 0 � \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0က \ 0 \ 0 � \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0က \ 0 \ 0 � \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0က \ 0 \ 0 � \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0က \ 0 \ 0 � \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 � \ 0 \ 0က \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 � \ 0 \ 0က \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 � \ 0 \ 0က \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 � \ 0 \ 0က \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 � \ 0 \ 0က \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 � \ 0 \ 0က \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 � \ 0 \ 0က \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 � \ 0 \ 0က \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 � \ 0 \ 0က \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 � \ 0 \ 0က \ 0 \ 0 \ 0 <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 � <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> + 1 <nl> new file mode 100644 <nl> index 00000000000 . . d5e5ccc4275 <nl> mmm / dev / null <nl> ppp b / dbms / tests / queries / 0_stateless / 00948_to_valid_utf8 . sql <nl> <nl> + select toValidUTF8 ( ' ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' some text ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' какой - то текст ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ x00 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ x66 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ x7F ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ x00 \ x7F ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ x7F \ x00 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xC2 \ x80 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xDF \ xBF ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xE0 \ xA0 \ x80 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xE0 \ xA0 \ xBF ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xED \ x9F \ x80 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xEF \ x80 \ xBF ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xF0 \ x90 \ xBF \ x80 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xF2 \ x81 \ xBE \ x99 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xF4 \ x8F \ x88 \ xAA ' ) from system . numbers limit 10 ; <nl> + <nl> + select toValidUTF8 ( ' a ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xc3 \ xb1 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xe2 \ x82 \ xa1 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xf0 \ x90 \ x8c \ xbc ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' 안녕하세요 , 세상 ' ) from system . numbers limit 10 ; <nl> + <nl> + select toValidUTF8 ( ' \ xc3 \ x28 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xa0 \ xa1 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xe2 \ x28 \ xa1 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xe2 \ x82 \ x28 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xf0 \ x28 \ x8c \ xbc ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xf0 \ x90 \ x28 \ xbc ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xf0 \ x28 \ x8c \ x28 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xc0 \ x9f ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xf5 \ xff \ xff \ xff ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xed \ xa0 \ x81 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xf8 \ x90 \ x80 \ x80 \ x80 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' 12345678901234 \ xed ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' 123456789012345 \ xed ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' 123456789012345 \ xed123456789012345 \ xed ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' 123456789012345 \ xed \ xed \ xed \ xed \ xed \ xed \ xff \ xff \ xff \ xff \ xff \ xff123456789012345 \ xed ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' 123456789012345 \ xf1 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' 123456789012345 \ xc2 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xC2 \ x7F ' ) from system . numbers limit 10 ; <nl> + <nl> + select toValidUTF8 ( ' \ x80 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xBF ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xC0 \ x80 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xC1 \ x00 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xC2 \ x7F ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xDF \ xC0 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xE0 \ x9F \ x80 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xE0 \ xC2 \ x80 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xED \ xA0 \ x80 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xED \ x7F \ x80 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xEF \ x80 \ x00 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xF0 \ x8F \ x80 \ x80 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xF0 \ xEE \ x80 \ x80 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xF2 \ x90 \ x91 \ x7F ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xF4 \ x90 \ x88 \ xAA ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ xF4 \ x00 \ xBF \ xBF ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ x00 \ x00 \ x00 \ x00 \ x00 \ xC2 \ x80 \ x00 \ x00 \ x00 \ xE1 \ x80 \ x80 \ x00 \ x00 \ xC2 \ xC2 \ x80 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ x00 \ x00 \ x00 \ x00 \ x00 \ xC2 \ xC2 \ x80 \ x00 \ x00 \ xE1 \ x80 \ x80 \ x00 \ x00 \ x00 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xF1 \ x80 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xF1 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xF1 \ x80 \ x80 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xF1 \ x80 \ xC2 \ x80 ' ) from system . numbers limit 10 ; <nl> + select toValidUTF8 ( ' \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xF0 \ x80 \ x80 \ x80 ' ) from system . numbers limit 10 ; <nl> + <nl> + <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' some text ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' какой - то текст ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ x00 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ x66 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ x7F ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ x00 \ x7F ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ x7F \ x00 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xC2 \ x80 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xDF \ xBF ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xE0 \ xA0 \ x80 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xE0 \ xA0 \ xBF ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xED \ x9F \ x80 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xEF \ x80 \ xBF ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xF0 \ x90 \ xBF \ x80 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xF2 \ x81 \ xBE \ x99 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xF4 \ x8F \ x88 \ xAA ' ) ) from system . numbers limit 10 ; <nl> + <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' a ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xc3 \ xb1 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xe2 \ x82 \ xa1 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xf0 \ x90 \ x8c \ xbc ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' 안녕하세요 , 세상 ' ) ) from system . numbers limit 10 ; <nl> + <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xc3 \ x28 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xa0 \ xa1 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xe2 \ x28 \ xa1 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xe2 \ x82 \ x28 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xf0 \ x28 \ x8c \ xbc ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xf0 \ x90 \ x28 \ xbc ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xf0 \ x28 \ x8c \ x28 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xc0 \ x9f ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xf5 \ xff \ xff \ xff ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xed \ xa0 \ x81 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xf8 \ x90 \ x80 \ x80 \ x80 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' 12345678901234 \ xed ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' 123456789012345 \ xed ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' 123456789012345 \ xed123456789012345 \ xed ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' 123456789012345 \ xed \ xed \ xed \ xed \ xed \ xed \ xff \ xff \ xff \ xff \ xff \ xff123456789012345 \ xed ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' 123456789012345 \ xf1 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' 123456789012345 \ xc2 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xC2 \ x7F ' ) ) from system . numbers limit 10 ; <nl> + <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ x80 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xBF ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xC0 \ x80 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xC1 \ x00 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xC2 \ x7F ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xDF \ xC0 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xE0 \ x9F \ x80 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xE0 \ xC2 \ x80 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xED \ xA0 \ x80 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xED \ x7F \ x80 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xEF \ x80 \ x00 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xF0 \ x8F \ x80 \ x80 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xF0 \ xEE \ x80 \ x80 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xF2 \ x90 \ x91 \ x7F ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xF4 \ x90 \ x88 \ xAA ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ xF4 \ x00 \ xBF \ xBF ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ x00 \ x00 \ x00 \ x00 \ x00 \ xC2 \ x80 \ x00 \ x00 \ x00 \ xE1 \ x80 \ x80 \ x00 \ x00 \ xC2 \ xC2 \ x80 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ x00 \ x00 \ x00 \ x00 \ x00 \ xC2 \ xC2 \ x80 \ x00 \ x00 \ xE1 \ x80 \ x80 \ x00 \ x00 \ x00 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xF1 \ x80 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xF1 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xF1 \ x80 \ x80 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xF1 \ x80 \ xC2 \ x80 ' ) ) from system . numbers limit 10 ; <nl> + select 1 = isValidUTF8 ( toValidUTF8 ( ' \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ xF0 \ x80 \ x80 \ x80 ' ) ) from system . numbers limit 10 ; <nl> + <nl> mmm a / docs / en / query_language / functions / string_functions . md <nl> ppp b / docs / en / query_language / functions / string_functions . md <nl> If the string contains a set of bytes that is not UTF - 8 , then the behavior is un <nl> <nl> Returns 1 , if the set of bytes is valid UTF - 8 encoded , otherwise 0 . <nl> <nl> + # # toValidUTF8 <nl> + <nl> + Returns string where all invalid UTF - 8 characters are replaced by replacement character ` � ` ( U + FFFD ) . If there are many invalid characters subsequently , it is collapsed them to one replacement character . <nl> + <nl> # # reverse <nl> <nl> Reverses the string ( as a sequence of bytes ) . <nl> mmm a / docs / ru / query_language / functions / string_functions . md <nl> ppp b / docs / ru / query_language / functions / string_functions . md <nl> <nl> # # isValidUTF8 <nl> Возвращает 1 , если набор байт является корректным в кодировке UTF - 8 , 0 иначе . <nl> <nl> + # # toValidUTF8 <nl> + Возвращает строку , где все некорректные UTF - 8 символы заменены на заменяющий символ ` � ` ( U + FFFD ) . Если много некорректных символов идут подряд , схлопывается до одного заменяющего символа . <nl> + <nl> # # reverse <nl> Разворачивает строку ( как последовательность байт ) . <nl> <nl>
|
toValidUTF8 function added
|
ClickHouse/ClickHouse
|
0d3422fa8a1ee51f341d4cf4b1355d6ce7aba4c2
|
2019-05-17T12:55:21Z
|
mmm a / src / Makefile <nl> ppp b / src / Makefile <nl> depclean : <nl> ifeq ( $ ( VERBOSE ) , 0 ) <nl> @ echo " RM - f $ ( BUILD_ROOT_DIR ) / * . d " <nl> endif <nl> - $ ( QUIET ) find $ ( BUILD_ROOT_DIR ) - name ' * . d ' - exec rm { } \ ; <nl> + $ ( QUIET ) if test - d $ ( BUILD_ROOT_DIR ) ; then find $ ( BUILD_ROOT_DIR ) - name ' * . d ' - exec rm { } \ ; ; fi <nl> <nl> clean : <nl> ifeq ( $ ( VERBOSE ) , 0 ) <nl>
|
make depclean check for existence of BUILD_ROOT_DIR
|
rethinkdb/rethinkdb
|
053a273f01017ae42cde3dc6ac494673051eb849
|
2011-07-29T22:19:50Z
|
mmm a / include / swift / SILOptimizer / Analysis / RCIdentityAnalysis . h <nl> ppp b / include / swift / SILOptimizer / Analysis / RCIdentityAnalysis . h <nl> class RCIdentityFunctionInfo { <nl> SILValue getRCIdentityRoot ( SILValue V ) ; <nl> <nl> / / / Return all recursive users of V , looking through users which propagate <nl> - / / / RCIdentity . * NOTE * This ignores obvious ARC escapes where the a potential <nl> + / / / RCIdentity . <nl> + / / / <nl> + / / / * NOTE * This ignores obvious ARC escapes where the a potential <nl> / / / user of the RC is not managed by ARC . For instance <nl> / / / unchecked_trivial_bit_cast . <nl> + void getRCUses ( SILValue V , llvm : : SmallVectorImpl < Operand * > & Uses ) ; <nl> + <nl> + / / / A helper method that calls getRCUses and then maps each operand to the <nl> + / / / operands user and then uniques the list . <nl> + / / / <nl> + / / / * NOTE * The routine asserts that the passed in Users array is empty for <nl> + / / / simplicity . If needed this can be changed , but it is not necessary given <nl> + / / / current uses . <nl> void getRCUsers ( SILValue V , llvm : : SmallVectorImpl < SILInstruction * > & Users ) ; <nl> <nl> void handleDeleteNotification ( SILNode * node ) { <nl> mmm a / lib / SILOptimizer / Analysis / RCIdentityAnalysis . cpp <nl> ppp b / lib / SILOptimizer / Analysis / RCIdentityAnalysis . cpp <nl> static bool isNonOverlappingTrivialAccess ( SILValue value ) { <nl> return false ; <nl> } <nl> <nl> + void RCIdentityFunctionInfo : : getRCUsers ( <nl> + SILValue V , llvm : : SmallVectorImpl < SILInstruction * > & Users ) { <nl> + / / We assume that Users is empty . <nl> + assert ( Users . empty ( ) & & " Expected an empty out variable . " ) ; <nl> + <nl> + / / First grab our RC uses . <nl> + llvm : : SmallVector < Operand * , 32 > TmpUsers ; <nl> + getRCUses ( V , TmpUsers ) ; <nl> + <nl> + / / Then map our operands out of TmpUsers into Users . <nl> + transform ( TmpUsers , std : : back_inserter ( Users ) , <nl> + [ ] ( Operand * Op ) { return Op - > getUser ( ) ; } ) ; <nl> + <nl> + / / Finally sort / unique our users array . <nl> + sortUnique ( Users ) ; <nl> + } <nl> + <nl> / / / Return all recursive users of V , looking through users which propagate <nl> / / / RCIdentity . * NOTE * This ignores obvious ARC escapes where the a potential <nl> / / / user of the RC is not managed by ARC . <nl> / / / <nl> / / / We only use the instruction analysis here . <nl> - void RCIdentityFunctionInfo : : getRCUsers ( <nl> - SILValue InputValue , llvm : : SmallVectorImpl < SILInstruction * > & Users ) { <nl> + void RCIdentityFunctionInfo : : getRCUses ( SILValue InputValue , <nl> + llvm : : SmallVectorImpl < Operand * > & Uses ) { <nl> + <nl> / / Add V to the worklist . <nl> llvm : : SmallVector < SILValue , 8 > Worklist ; <nl> Worklist . push_back ( InputValue ) ; <nl> <nl> - / / A set used to ensure we only visit users once . <nl> - llvm : : SmallPtrSet < SILInstruction * , 8 > VisitedInsts ; <nl> + / / A set used to ensure we only visit uses once . <nl> + llvm : : SmallPtrSet < Operand * , 8 > VisitedOps ; <nl> <nl> / / Then until we finish the worklist . . . <nl> while ( ! Worklist . empty ( ) ) { <nl> void RCIdentityFunctionInfo : : getRCUsers ( <nl> <nl> / / For each user of V . . . <nl> for ( auto * Op : V - > getUses ( ) ) { <nl> - SILInstruction * User = Op - > getUser ( ) ; <nl> - <nl> / / If we have already visited this user , continue . <nl> - if ( ! VisitedInsts . insert ( User ) . second ) <nl> + if ( ! VisitedOps . insert ( Op ) . second ) <nl> continue ; <nl> <nl> + auto * User = Op - > getUser ( ) ; <nl> + <nl> if ( auto * SVI = dyn_cast < SingleValueInstruction > ( User ) ) { <nl> / / Otherwise attempt to strip off one layer of RC identical instructions <nl> / / from User . <nl> void RCIdentityFunctionInfo : : getRCUsers ( <nl> / / it must still be RC identical to InputValue , so transitively search <nl> / / for more users . <nl> if ( StrippedRCID = = V ) { <nl> - Worklist . push_back ( SVI ) ; <nl> + Worklist . push_back ( SILValue ( SVI ) ) ; <nl> continue ; <nl> } <nl> + <nl> / / If the user is extracting a trivial field of an aggregate structure <nl> / / that does not overlap with the ref counted part of the aggregate , we <nl> / / can ignore it . <nl> if ( isNonOverlappingTrivialAccess ( SVI ) ) <nl> continue ; <nl> } <nl> - / / Otherwise , stop searching and report this RC user . <nl> - Users . push_back ( User ) ; <nl> + <nl> + / / Otherwise , stop searching and report this RC operand . <nl> + Uses . push_back ( Op ) ; <nl> } <nl> } <nl> } <nl>
|
[ rcid ] Add new method getRCUses ( ) and reimplement getRCUsers ( ) on top of it .
|
apple/swift
|
d71d69821f703b9c28277b1b39dc0cc968737979
|
2018-05-15T17:22:23Z
|
mmm a / doc / tesseract . 1 . asc <nl> ppp b / doc / tesseract . 1 . asc <nl> OPTIONS <nl> 3 = Default , based on what is available . <nl> <nl> ' configfile ' : : <nl> - The name of a config to use . A config is a plain text file which <nl> - contains a list of parameters and their values , one per line , <nl> - with a space separating parameter from value . + <nl> + The name of a config to use . The name can be a file in tessdata / configs <nl> + or tessdata / tessconfigs , or an absolute or relative file path . <nl> + A config is a plain text file which contains a list of parameters and <nl> + their values , one per line , with a space separating parameter from value . + <nl> Interesting config files include : <nl> <nl> * ` alto ` - Output in ALTO format ( ' outputbase ' ` . xml ` ) . <nl>
|
Merge pull request from cjmayo / man_configfile
|
tesseract-ocr/tesseract
|
fe5c82fd24fffb0b47d3c97dd643e4d94ff64506
|
2019-03-06T09:19:27Z
|
mmm a / tensorflow / lite / micro / kernels / svdf_test . cc <nl> ppp b / tensorflow / lite / micro / kernels / svdf_test . cc <nl> namespace tflite { <nl> namespace testing { <nl> namespace { <nl> <nl> - static float svdf_input [ ] = { <nl> + / / naming as follows : svdf_ < tensor name > _ < input size > x < batch size > x < batch count > <nl> + static float svdf_input_3x2x10 [ ] = { <nl> 0 . 12609188 , - 0 . 46347019 , - 0 . 89598465 , <nl> 0 . 35867718 , 0 . 36897406 , 0 . 73463392 , <nl> <nl> static float svdf_input [ ] = { <nl> - 0 . 6230064 , 0 . 29819036 , 1 . 06939757 , <nl> } ; <nl> <nl> - static float svdf_golden_output_rank_1 [ ] = { <nl> + static float svdf_input_2x2x10 [ ] = { <nl> + 0 . 12609188 , - 0 . 46347019 , 0 . 35867718 , 0 . 36897406 , <nl> + <nl> + 0 . 14278367 , - 1 . 64410412 , - 0 . 57290924 , 0 . 12729003 , <nl> + <nl> + 0 . 49837467 , 0 . 19278903 , 0 . 17660543 , 0 . 52949083 , <nl> + <nl> + - 0 . 11186574 , 0 . 13164264 , - 0 . 72674477 , - 0 . 5683046 , <nl> + <nl> + - 0 . 68892461 , 0 . 37783599 , - 0 . 63690937 , 0 . 44483393 , <nl> + <nl> + - 0 . 81299269 , - 0 . 86831826 , - 0 . 95760226 , 1 . 82078898 , <nl> + <nl> + - 1 . 45006323 , - 0 . 82251364 , - 1 . 65087092 , - 1 . 89238167 , <nl> + <nl> + 0 . 03966608 , - 0 . 24936394 , 2 . 06740379 , - 1 . 51439476 , <nl> + <nl> + 0 . 11771342 , - 0 . 23761693 , 0 . 31088525 , - 1 . 55601168 , <nl> + <nl> + - 0 . 89477462 , 1 . 67204106 , - 0 . 6230064 , 0 . 29819036 , <nl> + } ; <nl> + <nl> + static float svdf_golden_output_2x2x30_rank_1 [ ] = { <nl> + - 0 . 044205 , - 0 . 013757 , 0 . 050369 , - 0 . 018447 , 0 . 073010 , 0 . 025142 , - 0 . 021154 , <nl> + 0 . 013551 , - 0 . 209613 , - 0 . 062421 , 0 . 150209 , - 0 . 108334 , 0 . 028256 , - 0 . 006950 , <nl> + - 0 . 030885 , 0 . 009603 , - 0 . 076800 , - 0 . 037075 , - 0 . 087198 , - 0 . 155183 , 0 . 091069 , <nl> + 0 . 098446 , - 0 . 016083 , 0 . 106475 , - 0 . 082123 , - 0 . 162238 , - 0 . 084434 , - 0 . 141074 , <nl> + - 0 . 029340 , - 0 . 090685 , 0 . 053302 , - 0 . 030604 , - 0 . 201440 , 0 . 088424 , 0 . 139877 , <nl> + 0 . 012416 , - 0 . 113212 , 0 . 103893 , - 0 . 100842 , 0 . 122780 , - 0 . 166632 , - 0 . 116705 , <nl> + 0 . 175298 , - 0 . 047163 , 0 . 313077 , - 0 . 166485 , - 0 . 285860 , 0 . 129069 , - 0 . 625911 , <nl> + 0 . 046134 , 0 . 138081 , - 0 . 129581 , - 0 . 521455 , - 0 . 061579 , 0 . 230289 , 0 . 114963 , <nl> + - 0 . 216693 , - 0 . 161643 , - 0 . 179177 , - 0 . 052599 , - 0 . 213239 , 0 . 029502 , 0 . 260858 , <nl> + 0 . 275045 , - 0 . 213689 , - 0 . 323608 , - 0 . 285635 , - 0 . 317687 , - 0 . 324092 , - 0 . 317972 , <nl> + - 0 . 208450 , - 0 . 462504 , - 0 . 255126 , - 0 . 218576 , - 0 . 041528 , 0 . 179421 , - 0 . 440583 , <nl> + 0 . 072127 , - 0 . 284136 , 0 . 241570 , - 0 . 582490 , 0 . 253004 , 0 . 156972 , 0 . 132266 , <nl> + - 0 . 175340 , - 0 . 269495 , - 0 . 005782 , - 0 . 125683 , - 0 . 461215 , 0 . 257511 , 0 . 340125 , <nl> + 0 . 140569 , - 0 . 866940 , - 0 . 075565 , 0 . 484422 , 0 . 018665 , 0 . 059312 , - 0 . 006378 , <nl> + - 0 . 465532 , 0 . 291374 , - 0 . 182749 , 0 . 232608 , 0 . 479811 , 0 . 541274 , 0 . 286369 , <nl> + - 0 . 188810 , - 0 . 011561 , 0 . 022947 , 0 . 451862 , 0 . 214710 , - 0 . 367849 , - 0 . 722380 , <nl> + - 0 . 072298 , - 0 . 270524 , - 0 . 083401 , - 0 . 038342 , - 0 . 035884 , - 0 . 565247 , - 0 . 427794 , <nl> + 0 . 015071 } ; <nl> + <nl> + static float svdf_golden_output_3x2x10_rank_1 [ ] = { <nl> 0 . 014899 , - 0 . 0517661 , - 0 . 143725 , - 0 . 00271883 , <nl> - 0 . 03004015 , 0 . 09565311 , 0 . 1587342 , 0 . 00784263 , <nl> <nl> static float svdf_golden_output_rank_1 [ ] = { <nl> 0 . 17012937 , - 0 . 34447709 , 0 . 38505614 , - 0 . 28158101 , <nl> } ; <nl> <nl> - static float svdf_golden_output_rank_2 [ ] = { <nl> + static float svdf_golden_output_3x2x10_rank_2 [ ] = { <nl> - 0 . 09623547 , - 0 . 10193135 , 0 . 11083051 , - 0 . 0347917 , <nl> 0 . 1141196 , 0 . 12965347 , - 0 . 12652366 , 0 . 01007236 , <nl> <nl> void ValidateSVDFGoldens ( const int batch_size , const int num_units , <nl> node . custom_initial_data_size = 0 ; <nl> node . delegate = nullptr ; <nl> if ( registration - > prepare ) { <nl> - TF_LITE_MICRO_EXPECT_EQ ( kTfLiteOk , registration - > prepare ( & context , & node ) ) ; <nl> + TfLiteStatus prepare_status = registration - > prepare ( & context , & node ) ; <nl> + TF_LITE_MICRO_EXPECT_EQ ( kTfLiteOk , prepare_status ) ; <nl> + / / Abort early to make it clear prepare failed . <nl> + if ( prepare_status ! = kTfLiteOk ) { <nl> + return ; <nl> + } <nl> } <nl> TF_LITE_MICRO_EXPECT_NE ( nullptr , registration - > invoke ) ; <nl> <nl> void ValidateSVDFGoldens ( const int batch_size , const int num_units , <nl> float * input_batch_end = input_batch_start + input_size * batch_size ; <nl> <nl> PopulateFloatTensor ( & tensors [ 0 ] , input_batch_start , input_batch_end ) ; <nl> - TF_LITE_MICRO_EXPECT_EQ ( kTfLiteOk , registration - > invoke ( & context , & node ) ) ; <nl> - <nl> - int output_idx = 0 ; <nl> - int golden_idx = i * batch_size * num_units ; <nl> - for ( int j = golden_idx ; j < golden_idx + batch_size * num_units ; + + j ) { <nl> - TF_LITE_MICRO_EXPECT_NEAR ( expected_output [ j ] , output_data [ output_idx ] , <nl> - tolerance ) ; <nl> - output_idx + + ; <nl> + TfLiteStatus status = registration - > invoke ( & context , & node ) ; <nl> + TF_LITE_MICRO_EXPECT_EQ ( kTfLiteOk , status ) ; <nl> + <nl> + / / Only validate outputs when invoke has succeeded . <nl> + if ( status = = kTfLiteOk ) { <nl> + int output_idx = 0 ; <nl> + int golden_idx = i * batch_size * num_units ; <nl> + for ( int j = golden_idx ; j < golden_idx + batch_size * num_units ; + + j ) { <nl> + TF_LITE_MICRO_EXPECT_NEAR ( expected_output [ j ] , output_data [ output_idx ] , <nl> + tolerance ) ; <nl> + output_idx + + ; <nl> + } <nl> } <nl> } <nl> <nl> void ValidateIntegerSVDFGoldens ( const int batch_size , const int num_units , <nl> node . delegate = nullptr ; <nl> <nl> if ( registration - > prepare ) { <nl> - TF_LITE_MICRO_EXPECT_EQ ( kTfLiteOk , registration - > prepare ( & context , & node ) ) ; <nl> + TfLiteStatus prepare_status = registration - > prepare ( & context , & node ) ; <nl> + TF_LITE_MICRO_EXPECT_EQ ( kTfLiteOk , prepare_status ) ; <nl> + / / Abort early to make it clear prepare failed . <nl> + if ( prepare_status ! = kTfLiteOk ) { <nl> + return ; <nl> + } <nl> } <nl> TF_LITE_MICRO_EXPECT_NE ( nullptr , registration - > invoke ) ; <nl> <nl> inline void TestIntegerSVDF ( <nl> <nl> TF_LITE_MICRO_TESTS_BEGIN <nl> <nl> - TF_LITE_MICRO_TEST ( BlackBoxTestRank1 ) { <nl> + TF_LITE_MICRO_TEST ( SvdfFloatInputSize3Rank1ShouldMatchGolden ) { <nl> constexpr int batch_size = 2 ; <nl> constexpr int num_units = 4 ; <nl> constexpr int input_size = 3 ; <nl> TF_LITE_MICRO_TEST ( BlackBoxTestRank1 ) { <nl> tflite : : testing : : TestSVDF ( <nl> batch_size , num_units , input_size , memory_size , rank , input_data , <nl> weights_feature_data , weights_time_data , activation_state_data , <nl> - scratch_data , output_data , tflite : : testing : : svdf_input , <nl> - sizeof ( tflite : : testing : : svdf_input ) , <nl> - tflite : : testing : : svdf_golden_output_rank_1 ) ; <nl> + scratch_data , output_data , tflite : : testing : : svdf_input_3x2x10 , <nl> + sizeof ( tflite : : testing : : svdf_input_3x2x10 ) , <nl> + tflite : : testing : : svdf_golden_output_3x2x10_rank_1 ) ; <nl> } <nl> <nl> - TF_LITE_MICRO_TEST ( BlackBoxTestRank2 ) { <nl> + TF_LITE_MICRO_TEST ( SvdfFloatInputSize3Rank2ShouldMatchGolden ) { <nl> constexpr int batch_size = 2 ; <nl> constexpr int num_units = 4 ; <nl> constexpr int input_size = 3 ; <nl> TF_LITE_MICRO_TEST ( BlackBoxTestRank2 ) { <nl> tflite : : testing : : TestSVDF ( <nl> batch_size , num_units , input_size , memory_size , rank , input_data , <nl> weights_feature_data , weights_time_data , activation_state_data , <nl> - scratch_data , output_data , tflite : : testing : : svdf_input , <nl> - sizeof ( tflite : : testing : : svdf_input ) , <nl> - tflite : : testing : : svdf_golden_output_rank_2 ) ; <nl> + scratch_data , output_data , tflite : : testing : : svdf_input_3x2x10 , <nl> + sizeof ( tflite : : testing : : svdf_input_3x2x10 ) , <nl> + tflite : : testing : : svdf_golden_output_3x2x10_rank_2 ) ; <nl> } <nl> <nl> - TF_LITE_MICRO_TEST ( BlackBoxTestIntegerRank1 ) { <nl> + TF_LITE_MICRO_TEST ( SvdfFloatInputSize2Rank1ShouldMatchGolden ) { <nl> constexpr int batch_size = 2 ; <nl> constexpr int num_units = 4 ; <nl> - constexpr int input_size = 3 ; <nl> + constexpr int input_size = 2 ; <nl> + constexpr int memory_size = 10 ; <nl> + constexpr int rank = 2 ; <nl> + constexpr int num_filters = num_units * rank ; <nl> + <nl> + float weights_feature_data [ ] = { <nl> + - 0 . 31930989 , 0 . 0079667 , 0 . 39296314 , 0 . 37613347 , 0 . 12416199 , <nl> + 0 . 15785322 , 0 . 27901134 , 0 . 3905206 , 0 . 21931258 , - 0 . 36137494 , <nl> + - 0 . 10640851 , 0 . 31053296 , - 0 . 36118156 , - 0 . 0976817 , - 0 . 36916667 , <nl> + 0 . 22197971 , 0 . 15294972 , 0 . 38031587 , 0 . 27557442 , 0 . 39635518 , <nl> + - 0 . 21580373 , - 0 . 06634006 , - 0 . 02702999 , 0 . 27072677 } ; <nl> + <nl> + float weights_time_data [ ] = { <nl> + - 0 . 31930989 , 0 . 37613347 , 0 . 27901134 , - 0 . 36137494 , - 0 . 36118156 , <nl> + 0 . 22197971 , 0 . 27557442 , - 0 . 06634006 , 0 . 0079667 , 0 . 12416199 , <nl> + <nl> + 0 . 3905206 , - 0 . 10640851 , - 0 . 0976817 , 0 . 15294972 , 0 . 39635518 , <nl> + - 0 . 02702999 , 0 . 39296314 , 0 . 15785322 , 0 . 21931258 , 0 . 31053296 , <nl> + <nl> + - 0 . 36916667 , 0 . 38031587 , - 0 . 21580373 , 0 . 27072677 , 0 . 23622236 , <nl> + 0 . 34936687 , 0 . 18174365 , 0 . 35907319 , - 0 . 17493086 , 0 . 324846 , <nl> + <nl> + - 0 . 10781813 , 0 . 27201805 , 0 . 14324132 , - 0 . 23681851 , - 0 . 27115166 , <nl> + - 0 . 01580888 , - 0 . 14943552 , 0 . 15465137 , 0 . 09784451 , - 0 . 0337657 , <nl> + <nl> + - 0 . 14884081 , 0 . 19931212 , - 0 . 36002168 , 0 . 34663299 , - 0 . 11405486 , <nl> + 0 . 12672701 , 0 . 39463779 , - 0 . 07886535 , - 0 . 06384811 , 0 . 08249187 , <nl> + <nl> + - 0 . 26816407 , - 0 . 19905911 , 0 . 29211238 , 0 . 31264046 , - 0 . 28664589 , <nl> + 0 . 05698794 , 0 . 11613581 , 0 . 14078894 , 0 . 02187902 , - 0 . 21781836 , <nl> + <nl> + - 0 . 15567942 , 0 . 08693647 , - 0 . 38256618 , 0 . 36580828 , - 0 . 22922277 , <nl> + - 0 . 0226903 , 0 . 12878349 , - 0 . 28122205 , - 0 . 10850525 , - 0 . 11955214 , <nl> + <nl> + 0 . 27179423 , - 0 . 04710215 , 0 . 31069002 , 0 . 22672787 , 0 . 09580326 , <nl> + 0 . 08682203 , 0 . 1258215 , 0 . 1851041 , 0 . 29228821 , 0 . 12366763 } ; <nl> + <nl> + const int input_size_dims_count = batch_size * input_size ; <nl> + float input_data [ input_size_dims_count ] ; <nl> + <nl> + const int activation_state_dims_count = <nl> + batch_size * memory_size * num_filters ; <nl> + float activation_state_data [ activation_state_dims_count ] ; <nl> + const int scratch_dims_count = batch_size * num_filters ; <nl> + float scratch_data [ scratch_dims_count ] ; <nl> + <nl> + const int output_dims_count = batch_size * num_units ; <nl> + float output_data [ output_dims_count ] ; <nl> + <nl> + tflite : : testing : : TestSVDF ( <nl> + batch_size , num_units , input_size , memory_size , rank , input_data , <nl> + weights_feature_data , weights_time_data , activation_state_data , <nl> + scratch_data , output_data , tflite : : testing : : svdf_input_2x2x10 , <nl> + sizeof ( tflite : : testing : : svdf_input_2x2x10 ) , <nl> + tflite : : testing : : svdf_golden_output_2x2x30_rank_1 ) ; <nl> + } <nl> + <nl> + TF_LITE_MICRO_TEST ( SvdfIntegerInputSize2Rank1ShouldMatchGolden ) { <nl> + constexpr int batch_size = 2 ; <nl> + constexpr int num_units = 4 ; <nl> + constexpr int input_size = 2 ; <nl> constexpr int memory_size = 10 ; <nl> constexpr int rank = 1 ; <nl> constexpr int num_filters = num_units * rank ; <nl> TF_LITE_MICRO_TEST ( BlackBoxTestIntegerRank1 ) { <nl> } ; <nl> <nl> int8_t expected_output [ ] = { <nl> - - 9 , 24 , 31 , 1 , - 10 , 10 , - 3 , 0 , 2 , 4 , - 44 , - 7 , - 10 , 32 , <nl> - 52 , 1 , 12 , - 17 , 9 , - 8 , 7 , 16 , - 11 , - 8 , - 26 , 29 , 28 , 16 , <nl> - - 23 , 26 , 30 , - 6 , - 8 , - 25 , - 86 , - 5 , - 44 , 59 , 81 , 15 , 62 , - 16 , <nl> - - 37 , 3 , 27 , 14 , 34 , - 10 , 1 , 24 , - 25 , 23 , 31 , 61 , 67 , 11 , <nl> - - 64 , - 65 , - 128 , - 25 , - 53 , 59 , 127 , 20 , 20 , - 29 , - 20 , - 15 , - 28 , 0 , <nl> - 8 , - 27 , 54 , 61 , - 67 , 38 , 38 , 64 , 115 , 0 , - 44 , - 75 , - 128 , - 20 , <nl> - - 19 , 93 , 101 , 35 , - 5 , - 56 , 30 , - 18 , - 40 , - 9 , - 8 , - 31 , <nl> + - 9 , 9 , 18 , - 2 , - 6 , 8 , 13 , - 2 , 2 , - 16 , 2 , 5 , 2 , - 7 , <nl> + 0 , 3 , 7 , 0 , 5 , 7 , - 11 , 18 , 30 , 0 , - 9 , - 24 , 14 , - 12 , <nl> + - 1 , 1 , - 20 , 2 , - 19 , - 20 , 20 , - 13 , - 1 , - 10 , 50 , 4 , 26 , 32 , <nl> + 2 , - 12 , - 12 , 11 , - 10 , - 29 , 50 , - 61 , 4 , 15 , 19 , - 39 , 13 , 19 , <nl> + - 56 , 49 , 12 , 13 , 29 , - 3 , - 4 , - 22 , - 76 , - 29 , - 14 , 38 , - 30 , - 30 , <nl> + 27 , 0 , 39 , 16 , 49 , - 14 , - 18 , 28 , - 35 , 11 , 45 , 0 , - 13 , - 61 , <nl> + 34 , - 80 , 37 , 26 , 15 , - 23 , 12 , 15 , 18 , 83 , - 28 , - 21 , - 27 , - 48 , <nl> + 17 , 2 , - 113 , - 52 , 9 , 48 , - 4 , - 1 , 15 , - 7 , 39 , 16 , 49 , - 14 , <nl> + - 18 , 28 , - 35 , 11 , 45 , 0 , - 13 , - 61 , 34 , - 80 , 37 , 26 , 15 , - 23 , <nl> + 12 , 15 , 18 , 83 , - 28 , - 21 , - 27 , - 48 , 17 , 2 , - 113 , - 52 , 9 , 48 , <nl> + - 4 , - 1 , 15 , - 7 , <nl> } ; <nl> <nl> const int input_size_dims_count = batch_size * input_size ; <nl> mmm a / tensorflow / lite / micro / kernels / xtensa_hifi / svdf . cc <nl> ppp b / tensorflow / lite / micro / kernels / xtensa_hifi / svdf . cc <nl> TfLiteStatus Prepare ( TfLiteContext * context , TfLiteNode * node ) { <nl> const int rank = params - > rank ; <nl> const int input_size = input - > dims - > data [ 1 ] ; <nl> const int batch_size = input - > dims - > data [ 0 ] ; <nl> + / / Ensure the input size is a multiple of two . This is necessary since <nl> + / / optimized kernels access the memory in chunks of two , and all accesses <nl> + / / must be aligned to 16 bits . <nl> + / / TODO ( b / 153202598 ) : Remove when padding is allowed in TFLite tensors . <nl> + TF_LITE_ENSURE_EQ ( context , input_size % 2 , 0 ) ; <nl> + <nl> const int num_filters = weights_feature - > dims - > data [ 0 ] ; <nl> TF_LITE_ENSURE_EQ ( context , num_filters % rank , 0 ) ; <nl> const int num_units = num_filters / rank ; <nl> mmm a / tensorflow / lite / micro / kernels / xtensa_hifimini / svdf . cc <nl> ppp b / tensorflow / lite / micro / kernels / xtensa_hifimini / svdf . cc <nl> TfLiteStatus Prepare ( TfLiteContext * context , TfLiteNode * node ) { <nl> const int rank = params - > rank ; <nl> const int input_size = input - > dims - > data [ 1 ] ; <nl> const int batch_size = input - > dims - > data [ 0 ] ; <nl> + / / Ensure the input size is a multiple of two . This is necessary since <nl> + / / optimized kernels access the memory in chunks of two , and all accesses <nl> + / / must be aligned to 16 bits . <nl> + / / TODO ( b / 153202598 ) : Remove when padding is allowed in TFLite tensors . <nl> + TF_LITE_ENSURE_EQ ( context , input_size % 2 , 0 ) ; <nl> + <nl> const int num_filters = weights_feature - > dims - > data [ 0 ] ; <nl> TF_LITE_ENSURE_EQ ( context , num_filters % rank , 0 ) ; <nl> const int num_units = num_filters / rank ; <nl>
|
Add check to ensure SVDF input size is a multiple of two . This is required for optimized kernels for some platforms with alignment constraints .
|
tensorflow/tensorflow
|
157209a692281127c4303c3634e3f34a2470cf52
|
2020-04-07T19:16:18Z
|
mmm a / db / db_impl_write . cc <nl> ppp b / db / db_impl_write . cc <nl> Status DBImpl : : WriteImpl ( const WriteOptions & write_options , <nl> w . status = WriteBatchInternal : : InsertInto ( <nl> & w , w . sequence , & column_family_memtables , & flush_scheduler_ , <nl> write_options . ignore_missing_column_families , 0 / * log_number * / , this , <nl> - true / * concurrent_memtable_writes * / ) ; <nl> + true / * concurrent_memtable_writes * / , seq_per_batch_ ) ; <nl> } <nl> <nl> if ( write_thread_ . CompleteParallelMemTableWriter ( & w ) ) { <nl> Status DBImpl : : WriteImpl ( const WriteOptions & write_options , <nl> w . status = WriteBatchInternal : : InsertInto ( <nl> & w , w . sequence , & column_family_memtables , & flush_scheduler_ , <nl> write_options . ignore_missing_column_families , 0 / * log_number * / , <nl> - this , true / * concurrent_memtable_writes * / ) ; <nl> + this , true / * concurrent_memtable_writes * / , seq_per_batch_ ) ; <nl> } <nl> } <nl> if ( seq_used ! = nullptr ) { <nl> mmm a / db / write_batch . cc <nl> ppp b / db / write_batch . cc <nl> Status WriteBatchInternal : : InsertInto ( <nl> nullptr / * has_valid_writes * / , seq_per_batch ) ; <nl> for ( auto w : write_group ) { <nl> if ( ! w - > ShouldWriteToMemtable ( ) ) { <nl> - inserter . MaybeAdvanceSeq ( true ) ; <nl> w - > sequence = inserter . sequence ( ) ; <nl> + inserter . MaybeAdvanceSeq ( true ) ; <nl> continue ; <nl> } <nl> SetSequence ( w - > batch , inserter . sequence ( ) ) ; <nl> Status WriteBatchInternal : : InsertInto ( <nl> return Status : : OK ( ) ; <nl> } <nl> <nl> - Status WriteBatchInternal : : InsertInto ( WriteThread : : Writer * writer , <nl> - SequenceNumber sequence , <nl> - ColumnFamilyMemTables * memtables , <nl> - FlushScheduler * flush_scheduler , <nl> - bool ignore_missing_column_families , <nl> - uint64_t log_number , DB * db , <nl> - bool concurrent_memtable_writes ) { <nl> + Status WriteBatchInternal : : InsertInto ( <nl> + WriteThread : : Writer * writer , SequenceNumber sequence , <nl> + ColumnFamilyMemTables * memtables , FlushScheduler * flush_scheduler , <nl> + bool ignore_missing_column_families , uint64_t log_number , DB * db , <nl> + bool concurrent_memtable_writes , bool seq_per_batch ) { <nl> assert ( writer - > ShouldWriteToMemtable ( ) ) ; <nl> MemTableInserter inserter ( sequence , memtables , flush_scheduler , <nl> ignore_missing_column_families , log_number , db , <nl> - concurrent_memtable_writes ) ; <nl> + concurrent_memtable_writes , <nl> + nullptr / * has_valid_writes * / , seq_per_batch ) ; <nl> SetSequence ( writer - > batch , sequence ) ; <nl> inserter . set_log_number_ref ( writer - > log_ref ) ; <nl> Status s = writer - > batch - > Iterate ( & inserter ) ; <nl> mmm a / db / write_batch_internal . h <nl> ppp b / db / write_batch_internal . h <nl> class WriteBatchInternal { <nl> FlushScheduler * flush_scheduler , <nl> bool ignore_missing_column_families = false , <nl> uint64_t log_number = 0 , DB * db = nullptr , <nl> - bool concurrent_memtable_writes = false ) ; <nl> + bool concurrent_memtable_writes = false , <nl> + bool seq_per_batch = false ) ; <nl> <nl> static Status Append ( WriteBatch * dst , const WriteBatch * src , <nl> const bool WAL_only = false ) ; <nl> mmm a / utilities / transactions / transaction_base . cc <nl> ppp b / utilities / transactions / transaction_base . cc <nl> void TransactionBaseImpl : : Reinitialize ( DB * db , <nl> const WriteOptions & write_options ) { <nl> Clear ( ) ; <nl> ClearSnapshot ( ) ; <nl> + id_ = 0 ; <nl> db_ = db ; <nl> name_ . clear ( ) ; <nl> log_number_ = 0 ; <nl> mmm a / utilities / transactions / transaction_test . cc <nl> ppp b / utilities / transactions / transaction_test . cc <nl> using std : : string ; <nl> <nl> namespace rocksdb { <nl> <nl> - / / TODO ( myabandeh ) : Instantiate the tests with other write policies <nl> - INSTANTIATE_TEST_CASE_P ( DBAsBaseDB , TransactionTest , <nl> - : : testing : : Values ( std : : make_tuple ( false , false , <nl> - WRITE_COMMITTED ) ) ) ; <nl> - INSTANTIATE_TEST_CASE_P ( StackableDBAsBaseDB , TransactionTest , <nl> - : : testing : : Values ( std : : make_tuple ( true , false , <nl> - WRITE_COMMITTED ) ) ) ; <nl> + / / TODO ( myabandeh ) : Instantiate the tests with concurrent_prepare <nl> + INSTANTIATE_TEST_CASE_P ( <nl> + DBAsBaseDB , TransactionTest , <nl> + : : testing : : Values ( std : : make_tuple ( false , false , WRITE_COMMITTED ) , <nl> + std : : make_tuple ( false , false , WRITE_PREPARED ) ) ) ; <nl> + INSTANTIATE_TEST_CASE_P ( <nl> + StackableDBAsBaseDB , TransactionTest , <nl> + : : testing : : Values ( std : : make_tuple ( true , false , WRITE_COMMITTED ) , <nl> + std : : make_tuple ( true , false , WRITE_PREPARED ) ) ) ; <nl> INSTANTIATE_TEST_CASE_P ( <nl> MySQLStyleTransactionTest , MySQLStyleTransactionTest , <nl> : : testing : : Values ( std : : make_tuple ( false , false , WRITE_COMMITTED ) , <nl> std : : make_tuple ( false , true , WRITE_COMMITTED ) , <nl> std : : make_tuple ( true , false , WRITE_COMMITTED ) , <nl> - std : : make_tuple ( true , true , WRITE_COMMITTED ) ) ) ; <nl> - <nl> + std : : make_tuple ( true , true , WRITE_COMMITTED ) , <nl> + std : : make_tuple ( false , false , WRITE_PREPARED ) , <nl> + std : : make_tuple ( true , false , WRITE_PREPARED ) ) ) ; <nl> <nl> TEST_P ( TransactionTest , DoubleEmptyWrite ) { <nl> WriteOptions write_options ; <nl> TEST_P ( TransactionTest , SimpleTwoPhaseTransactionTest ) { <nl> / / heap should not care about prepared section anymore <nl> ASSERT_EQ ( db_impl - > TEST_FindMinLogContainingOutstandingPrep ( ) , 0 ) ; <nl> <nl> - / / but now our memtable should be referencing the prep section <nl> - ASSERT_EQ ( log_containing_prep , <nl> - db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) ) ; <nl> + switch ( txn_db_options . write_policy ) { <nl> + case WRITE_COMMITTED : <nl> + / / but now our memtable should be referencing the prep section <nl> + ASSERT_EQ ( log_containing_prep , <nl> + db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) ) ; <nl> + break ; <nl> + case WRITE_PREPARED : <nl> + case WRITE_UNPREPARED : <nl> + / / In these modes memtable do not ref the prep sections <nl> + ASSERT_EQ ( 0 , db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) ) ; <nl> + break ; <nl> + default : <nl> + assert ( false ) ; <nl> + } <nl> <nl> db_impl - > TEST_FlushMemTable ( true ) ; <nl> <nl> TEST_P ( TransactionTest , PersistentTwoPhaseTransactionTest ) { <nl> / / heap should not care about prepared section anymore <nl> ASSERT_EQ ( db_impl - > TEST_FindMinLogContainingOutstandingPrep ( ) , 0 ) ; <nl> <nl> - / / but now our memtable should be referencing the prep section <nl> - ASSERT_EQ ( log_containing_prep , <nl> - db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) ) ; <nl> + switch ( txn_db_options . write_policy ) { <nl> + case WRITE_COMMITTED : <nl> + / / but now our memtable should be referencing the prep section <nl> + ASSERT_EQ ( log_containing_prep , <nl> + db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) ) ; <nl> + break ; <nl> + case WRITE_PREPARED : <nl> + case WRITE_UNPREPARED : <nl> + / / In these modes memtable do not ref the prep sections <nl> + ASSERT_EQ ( 0 , db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) ) ; <nl> + break ; <nl> + default : <nl> + assert ( false ) ; <nl> + } <nl> <nl> db_impl - > TEST_FlushMemTable ( true ) ; <nl> <nl> TEST_P ( TransactionTest , TwoPhaseLogRollingTest ) { <nl> ASSERT_EQ ( db_impl - > TEST_FindMinLogContainingOutstandingPrep ( ) , <nl> txn2 - > GetLogNumber ( ) ) ; <nl> <nl> - / / we should see txn1s log refernced by the memtables <nl> - ASSERT_EQ ( db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) , <nl> - txn1 - > GetLogNumber ( ) ) ; <nl> + switch ( txn_db_options . write_policy ) { <nl> + case WRITE_COMMITTED : <nl> + / / we should see txn1s log refernced by the memtables <nl> + ASSERT_EQ ( txn1 - > GetLogNumber ( ) , <nl> + db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) ) ; <nl> + break ; <nl> + case WRITE_PREPARED : <nl> + case WRITE_UNPREPARED : <nl> + / / In these modes memtable do not ref the prep sections <nl> + ASSERT_EQ ( 0 , db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) ) ; <nl> + break ; <nl> + default : <nl> + assert ( false ) ; <nl> + } <nl> <nl> / / flush default cf to crate new log <nl> s = db - > Put ( wopts , " foo " , " bar2 " ) ; <nl> TEST_P ( TransactionTest , TwoPhaseLogRollingTest ) { <nl> / / heap should not show any logs <nl> ASSERT_EQ ( db_impl - > TEST_FindMinLogContainingOutstandingPrep ( ) , 0 ) ; <nl> <nl> - / / should show the first txn log <nl> - ASSERT_EQ ( db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) , <nl> - txn1 - > GetLogNumber ( ) ) ; <nl> + switch ( txn_db_options . write_policy ) { <nl> + case WRITE_COMMITTED : <nl> + / / should show the first txn log <nl> + ASSERT_EQ ( txn1 - > GetLogNumber ( ) , <nl> + db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) ) ; <nl> + break ; <nl> + case WRITE_PREPARED : <nl> + case WRITE_UNPREPARED : <nl> + / / In these modes memtable do not ref the prep sections <nl> + ASSERT_EQ ( 0 , db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) ) ; <nl> + break ; <nl> + default : <nl> + assert ( false ) ; <nl> + } <nl> <nl> / / flush only cfa memtable <nl> s = db_impl - > TEST_FlushMemTable ( true , cfa ) ; <nl> ASSERT_OK ( s ) ; <nl> <nl> - / / should show the first txn log <nl> - ASSERT_EQ ( db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) , <nl> - txn2 - > GetLogNumber ( ) ) ; <nl> + switch ( txn_db_options . write_policy ) { <nl> + case WRITE_COMMITTED : <nl> + / / should show the first txn log <nl> + ASSERT_EQ ( txn2 - > GetLogNumber ( ) , <nl> + db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) ) ; <nl> + break ; <nl> + case WRITE_PREPARED : <nl> + case WRITE_UNPREPARED : <nl> + / / In these modes memtable do not ref the prep sections <nl> + ASSERT_EQ ( 0 , db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) ) ; <nl> + break ; <nl> + default : <nl> + assert ( false ) ; <nl> + } <nl> <nl> / / flush only cfb memtable <nl> s = db_impl - > TEST_FlushMemTable ( true , cfb ) ; <nl> TEST_P ( TransactionTest , TwoPhaseLogRollingTest2 ) { <nl> ASSERT_OK ( s ) ; <nl> <nl> ASSERT_GT ( db_impl - > TEST_LogfileNumber ( ) , prepare_log_no ) ; <nl> - ASSERT_GT ( cfh_a - > cfd ( ) - > GetLogNumber ( ) , prepare_log_no ) ; <nl> - ASSERT_EQ ( cfh_a - > cfd ( ) - > GetLogNumber ( ) , db_impl - > TEST_LogfileNumber ( ) ) ; <nl> + switch ( txn_db_options . write_policy ) { <nl> + case WRITE_COMMITTED : <nl> + / / This cf is empty and should ref the latest log <nl> + ASSERT_GT ( cfh_a - > cfd ( ) - > GetLogNumber ( ) , prepare_log_no ) ; <nl> + ASSERT_EQ ( cfh_a - > cfd ( ) - > GetLogNumber ( ) , db_impl - > TEST_LogfileNumber ( ) ) ; <nl> + break ; <nl> + case WRITE_PREPARED : <nl> + / / This cf is not flushed yet and should ref the log that has its data <nl> + ASSERT_EQ ( cfh_a - > cfd ( ) - > GetLogNumber ( ) , prepare_log_no ) ; <nl> + break ; <nl> + case WRITE_UNPREPARED : <nl> + default : <nl> + assert ( false ) ; <nl> + } <nl> ASSERT_EQ ( db_impl - > TEST_FindMinLogContainingOutstandingPrep ( ) , <nl> prepare_log_no ) ; <nl> ASSERT_EQ ( db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) , 0 ) ; <nl> TEST_P ( TransactionTest , TwoPhaseLogRollingTest2 ) { <nl> s = txn1 - > Commit ( ) ; <nl> ASSERT_OK ( s ) ; <nl> <nl> - ASSERT_EQ ( db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) , prepare_log_no ) ; <nl> + switch ( txn_db_options . write_policy ) { <nl> + case WRITE_COMMITTED : <nl> + ASSERT_EQ ( db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) , <nl> + prepare_log_no ) ; <nl> + break ; <nl> + case WRITE_PREPARED : <nl> + case WRITE_UNPREPARED : <nl> + / / In these modes memtable do not ref the prep sections <nl> + ASSERT_EQ ( db_impl - > TEST_FindMinPrepLogReferencedByMemTable ( ) , 0 ) ; <nl> + break ; <nl> + default : <nl> + assert ( false ) ; <nl> + } <nl> <nl> ASSERT_TRUE ( ! db_impl - > TEST_UnableToFlushOldestLog ( ) ) ; <nl> <nl> TEST_P ( TransactionTest , TwoPhaseLogRollingTest2 ) { <nl> / / assert that cfa has a flush requested <nl> ASSERT_TRUE ( cfh_a - > cfd ( ) - > imm ( ) - > HasFlushRequested ( ) ) ; <nl> <nl> - / / cfb should not be flushed becuse it has no data from LOG A <nl> - ASSERT_TRUE ( ! cfh_b - > cfd ( ) - > imm ( ) - > HasFlushRequested ( ) ) ; <nl> + switch ( txn_db_options . write_policy ) { <nl> + case WRITE_COMMITTED : <nl> + / / cfb should not be flushed becuse it has no data from LOG A <nl> + ASSERT_TRUE ( ! cfh_b - > cfd ( ) - > imm ( ) - > HasFlushRequested ( ) ) ; <nl> + break ; <nl> + case WRITE_PREPARED : <nl> + case WRITE_UNPREPARED : <nl> + / / cfb should be flushed becuse it has prepared data from LOG A <nl> + ASSERT_TRUE ( cfh_b - > cfd ( ) - > imm ( ) - > HasFlushRequested ( ) ) ; <nl> + break ; <nl> + default : <nl> + assert ( false ) ; <nl> + } <nl> <nl> / / cfb now has data from LOG A <nl> s = txn2 - > Commit ( ) ; <nl> TEST_P ( TransactionTest , UntrackedWrites ) { <nl> / / Untracked writes should succeed even though key was written after snapshot <nl> s = txn - > PutUntracked ( " untracked " , " 1 " ) ; <nl> ASSERT_OK ( s ) ; <nl> - s = txn - > MergeUntracked ( " untracked " , " 2 " ) ; <nl> - ASSERT_OK ( s ) ; <nl> + if ( txn_db_options . write_policy ! = WRITE_PREPARED ) { <nl> + / / WRITE_PREPARED does not currently support dup merge keys . <nl> + / / TODO ( myabandeh ) : remove this if - then when the support is added <nl> + s = txn - > MergeUntracked ( " untracked " , " 2 " ) ; <nl> + ASSERT_OK ( s ) ; <nl> + } <nl> s = txn - > DeleteUntracked ( " untracked " ) ; <nl> ASSERT_OK ( s ) ; <nl> <nl> TEST_P ( TransactionTest , SingleDeleteTest ) { <nl> } <nl> <nl> TEST_P ( TransactionTest , MergeTest ) { <nl> + if ( txn_db_options . write_policy = = WRITE_PREPARED ) { <nl> + / / WRITE_PREPARED does not currently support dup merge keys . <nl> + / / TODO ( myabandeh ) : remove this if - then when the support is added <nl> + return ; <nl> + } <nl> WriteOptions write_options ; <nl> ReadOptions read_options ; <nl> string value ; <nl> mmm a / utilities / transactions / transaction_test . h <nl> ppp b / utilities / transactions / transaction_test . h <nl> class TransactionTest : public : : testing : : TestWithParam < <nl> std : : vector < ColumnFamilyHandle * > handles ; <nl> DB * root_db ; <nl> Options options_copy ( options ) ; <nl> + if ( txn_db_options . write_policy = = WRITE_PREPARED ) { <nl> + options_copy . seq_per_batch = true ; <nl> + } <nl> Status s = <nl> DB : : Open ( options_copy , dbname , column_families , & handles , & root_db ) ; <nl> if ( s . ok ( ) ) { <nl> mmm a / utilities / transactions / write_prepared_transaction_test . cc <nl> ppp b / utilities / transactions / write_prepared_transaction_test . cc <nl> TEST_P ( WritePreparedTransactionTest , CompactionShouldKeepSnapshotVisibleKeys ) { <nl> / / A more complex test to verify compaction / flush should keep keys visible <nl> / / to snapshots . <nl> TEST_P ( WritePreparedTransactionTest , <nl> - DISABLED_CompactionShouldKeepSnapshotVisibleKeysRandomized ) { <nl> + CompactionShouldKeepSnapshotVisibleKeysRandomized ) { <nl> constexpr size_t kNumTransactions = 10 ; <nl> constexpr size_t kNumIterations = 1000 ; <nl> <nl> mmm a / utilities / transactions / write_prepared_txn . cc <nl> ppp b / utilities / transactions / write_prepared_txn . cc <nl> WritePreparedTxn : : WritePreparedTxn ( WritePreparedTxnDB * txn_db , <nl> const TransactionOptions & txn_options ) <nl> : PessimisticTransaction ( txn_db , write_options , txn_options ) , <nl> wpt_db_ ( txn_db ) { <nl> - PessimisticTransaction : : Initialize ( txn_options ) ; <nl> GetWriteBatch ( ) - > DisableDuplicateMergeKeys ( ) ; <nl> } <nl> <nl> Status WritePreparedTxn : : Get ( const ReadOptions & read_options , <nl> ColumnFamilyHandle * column_family , <nl> const Slice & key , PinnableSlice * pinnable_val ) { <nl> - auto snapshot = GetSnapshot ( ) ; <nl> + auto snapshot = read_options . snapshot ; <nl> auto snap_seq = <nl> snapshot ! = nullptr ? snapshot - > GetSequenceNumber ( ) : kMaxSequenceNumber ; <nl> <nl> Status WritePreparedTxn : : CommitInternal ( ) { <nl> / / We take the commit - time batch and append the Commit marker . <nl> / / The Memtable will ignore the Commit marker in non - recovery mode <nl> WriteBatch * working_batch = GetCommitTimeWriteBatch ( ) ; <nl> - / / TODO ( myabandeh ) : prevent the users from writing to txn after the prepare <nl> - / / phase <nl> - assert ( working_batch - > Count ( ) = = 0 ) ; <nl> + const bool empty = working_batch - > Count ( ) = = 0 ; <nl> WriteBatchInternal : : MarkCommit ( working_batch , name_ ) ; <nl> <nl> / / any operations appended to this working_batch will be ignored from WAL <nl> Status WritePreparedTxn : : CommitInternal ( ) { <nl> / / a connection between the memtable and its WAL , so there is no need to <nl> / / redundantly reference the log that contains the prepared data . <nl> const uint64_t zero_log_number = 0ull ; <nl> - auto s = db_impl_ - > WriteImpl ( write_options_ , working_batch , nullptr , nullptr , <nl> - zero_log_number , disable_memtable , & seq_used ) ; <nl> + auto s = db_impl_ - > WriteImpl ( <nl> + write_options_ , working_batch , nullptr , nullptr , zero_log_number , <nl> + empty ? disable_memtable : ! disable_memtable , & seq_used ) ; <nl> assert ( seq_used ! = kMaxSequenceNumber ) ; <nl> uint64_t & commit_seq = seq_used ; <nl> / / TODO ( myabandeh ) : Reject a commit request if AddCommitted cannot encode <nl> / / commit_seq . This happens if prep_seq < < < commit_seq . <nl> auto prepare_seq = GetId ( ) ; <nl> wpt_db_ - > AddCommitted ( prepare_seq , commit_seq ) ; <nl> + if ( ! empty ) { <nl> + / / Commit the data that is accompnaied with the commit marker <nl> + / / TODO ( myabandeh ) : skip AddPrepared <nl> + wpt_db_ - > AddPrepared ( commit_seq ) ; <nl> + wpt_db_ - > AddCommitted ( commit_seq , commit_seq ) ; <nl> + } <nl> return s ; <nl> } <nl> <nl>
|
WritePrepared Txn : end - to - end tests
|
facebook/rocksdb
|
ec6c5383d0f2eb7aef2fd37195e77f5ed3520d08
|
2017-10-06T21:26:45Z
|
mmm a / tensorflow / lite / core / api / flatbuffer_conversions . cc <nl> ppp b / tensorflow / lite / core / api / flatbuffer_conversions . cc <nl> TfLiteStatus FlatBufferIntVectorToArray ( <nl> op_name ) ; <nl> return kTfLiteError ; <nl> } else { <nl> - int num_dimensions = flat_vector - > Length ( ) ; <nl> + int num_dimensions = flat_vector - > size ( ) ; <nl> if ( num_dimensions > max_size_of_buffer / sizeof ( int ) ) { <nl> error_reporter - > Report ( <nl> " Found too many dimensions in the input array of operation ' % s ' . \ n " , <nl> TfLiteStatus ParseOpData ( const Operator * op , BuiltinOperator op_type , <nl> TF_LITE_ENSURE_STATUS ( FlatBufferIntVectorToArray ( <nl> sizeof ( params - > shape ) , new_shape , params - > shape , error_reporter , <nl> " reshape " ) ) ; <nl> - params - > num_dimensions = new_shape - > Length ( ) ; <nl> + params - > num_dimensions = new_shape - > size ( ) ; <nl> } <nl> * builtin_data = reinterpret_cast < void * > ( params ) ; <nl> break ; <nl> TfLiteStatus ParseOpData ( const Operator * op , BuiltinOperator op_type , <nl> TF_LITE_ENSURE_STATUS ( FlatBufferIntVectorToArray ( <nl> sizeof ( params - > squeeze_dims ) , squeeze_dims , params - > squeeze_dims , <nl> error_reporter , " squeeze " ) ) ; <nl> - params - > num_squeeze_dims = squeeze_dims - > Length ( ) ; <nl> + params - > num_squeeze_dims = squeeze_dims - > size ( ) ; <nl> } <nl> * builtin_data = reinterpret_cast < void * > ( params ) ; <nl> break ; <nl>
|
Internal change .
|
tensorflow/tensorflow
|
3751264e3a1a91159c68603476461dfe164e92ce
|
2019-06-04T19:36:32Z
|
mmm a / Telegram / SourceFiles / title . cpp <nl> ppp b / Telegram / SourceFiles / title . cpp <nl> void TitleWidget : : updateCounter ( ) { <nl> style : : color bg = ( App : : histories ( ) . unreadMuted < counter ) ? st : : counterBG : st : : counterMuteBG ; <nl> <nl> if ( counter > 0 ) { <nl> - int32 size = - 16 ; <nl> + int32 size = cRetina ( ) ? - 32 : - 16 ; <nl> switch ( cScale ( ) ) { <nl> case dbisOneAndQuarter : size = - 20 ; break ; <nl> case dbisOneAndHalf : size = - 24 ; break ; <nl>
|
fixed new msg badge for retina
|
telegramdesktop/tdesktop
|
4ffefe76fc8cf5a86579ce7bcc8d47818a77b13d
|
2014-12-15T20:40:43Z
|
mmm a / atom . gyp <nl> ppp b / atom . gyp <nl> <nl> ' atom / browser / api / lib / atom - delegate . coffee ' , <nl> ' atom / browser / api / lib / auto - updater . coffee ' , <nl> ' atom / browser / api / lib / browser - window . coffee ' , <nl> + ' atom / browser / api / lib / content - tracing . coffee ' , <nl> ' atom / browser / api / lib / dialog . coffee ' , <nl> ' atom / browser / api / lib / ipc . coffee ' , <nl> ' atom / browser / api / lib / menu . coffee ' , <nl> <nl> ' atom / browser / api / atom_api_app . h ' , <nl> ' atom / browser / api / atom_api_auto_updater . cc ' , <nl> ' atom / browser / api / atom_api_auto_updater . h ' , <nl> + ' atom / browser / api / atom_api_content_tracing . cc ' , <nl> ' atom / browser / api / atom_api_dialog . cc ' , <nl> ' atom / browser / api / atom_api_menu . cc ' , <nl> ' atom / browser / api / atom_api_menu . h ' , <nl> new file mode 100644 <nl> index 000000000000 . . b5057a838a33 <nl> mmm / dev / null <nl> ppp b / atom / browser / api / atom_api_content_tracing . cc <nl> <nl> + / / Copyright ( c ) 2014 GitHub , Inc . All rights reserved . <nl> + / / Use of this source code is governed by the MIT license that can be <nl> + / / found in the LICENSE file . <nl> + <nl> + # include < set > <nl> + <nl> + # include " atom / common / native_mate_converters / file_path_converter . h " <nl> + # include " atom / common / native_mate_converters / function_converter . h " <nl> + # include " base / bind . h " <nl> + # include " content / public / browser / tracing_controller . h " <nl> + # include " native_mate / dictionary . h " <nl> + <nl> + # include " atom / common / node_includes . h " <nl> + <nl> + using content : : TracingController ; <nl> + <nl> + namespace mate { <nl> + <nl> + template < typename T > <nl> + struct Converter < std : : set < T > > { <nl> + static v8 : : Handle < v8 : : Value > ToV8 ( v8 : : Isolate * isolate , <nl> + const std : : set < T > & val ) { <nl> + v8 : : Handle < v8 : : Array > result = v8 : : Array : : New ( <nl> + isolate , static_cast < int > ( val . size ( ) ) ) ; <nl> + typename std : : set < T > : : const_iterator it ; <nl> + int i ; <nl> + for ( i = 0 , it = val . begin ( ) ; it ! = val . end ( ) ; + + it , + + i ) <nl> + result - > Set ( i , Converter < T > : : ToV8 ( isolate , * it ) ) ; <nl> + return result ; <nl> + } <nl> + } ; <nl> + <nl> + template < > <nl> + struct Converter < TracingController : : Options > { <nl> + static bool FromV8 ( v8 : : Isolate * isolate , <nl> + v8 : : Handle < v8 : : Value > val , <nl> + TracingController : : Options * out ) { <nl> + if ( ! val - > IsNumber ( ) ) <nl> + return false ; <nl> + * out = static_cast < TracingController : : Options > ( val - > IntegerValue ( ) ) ; <nl> + return true ; <nl> + } <nl> + } ; <nl> + <nl> + } / / namespace mate <nl> + <nl> + namespace { <nl> + <nl> + void Initialize ( v8 : : Handle < v8 : : Object > exports , v8 : : Handle < v8 : : Value > unused , <nl> + v8 : : Handle < v8 : : Context > context , void * priv ) { <nl> + TracingController * controller = TracingController : : GetInstance ( ) ; <nl> + mate : : Dictionary dict ( context - > GetIsolate ( ) , exports ) ; <nl> + dict . SetMethod ( " getCategories " , base : : Bind ( <nl> + & TracingController : : GetCategories , base : : Unretained ( controller ) ) ) ; <nl> + dict . SetMethod ( " startRecording " , base : : Bind ( <nl> + & TracingController : : EnableRecording , base : : Unretained ( controller ) ) ) ; <nl> + dict . SetMethod ( " stopRecording " , base : : Bind ( <nl> + & TracingController : : DisableRecording , base : : Unretained ( controller ) ) ) ; <nl> + dict . SetMethod ( " startMonitoring " , base : : Bind ( <nl> + & TracingController : : EnableMonitoring , base : : Unretained ( controller ) ) ) ; <nl> + dict . SetMethod ( " stopMonitoring " , base : : Bind ( <nl> + & TracingController : : DisableMonitoring , base : : Unretained ( controller ) ) ) ; <nl> + dict . SetMethod ( " captureMonitoringSnapshot " , base : : Bind ( <nl> + & TracingController : : CaptureMonitoringSnapshot , <nl> + base : : Unretained ( controller ) ) ) ; <nl> + dict . SetMethod ( " getTraceBufferPercentFull " , base : : Bind ( <nl> + & TracingController : : GetTraceBufferPercentFull , <nl> + base : : Unretained ( controller ) ) ) ; <nl> + dict . SetMethod ( " setWatchEvent " , base : : Bind ( <nl> + & TracingController : : SetWatchEvent , base : : Unretained ( controller ) ) ) ; <nl> + dict . SetMethod ( " cancelWatchEvent " , base : : Bind ( <nl> + & TracingController : : CancelWatchEvent , base : : Unretained ( controller ) ) ) ; <nl> + } <nl> + <nl> + } / / namespace <nl> + <nl> + NODE_MODULE_CONTEXT_AWARE_BUILTIN ( atom_browser_content_tracing , Initialize ) <nl> mmm a / atom / browser / api / atom_api_dialog . cc <nl> ppp b / atom / browser / api / atom_api_dialog . cc <nl> <nl> # include < string > <nl> # include < vector > <nl> <nl> - # include " base / bind . h " <nl> # include " atom / browser / api / atom_api_window . h " <nl> # include " atom / browser / native_window . h " <nl> # include " atom / browser / ui / file_dialog . h " <nl> # include " atom / browser / ui / message_box . h " <nl> # include " atom / common / native_mate_converters / file_path_converter . h " <nl> # include " atom / common / native_mate_converters / function_converter . h " <nl> + # include " base / bind . h " <nl> # include " native_mate / dictionary . h " <nl> <nl> # include " atom / common / node_includes . h " <nl> new file mode 100644 <nl> index 000000000000 . . 08cd36e4aa59 <nl> mmm / dev / null <nl> ppp b / atom / browser / api / lib / content - tracing . coffee <nl> @ @ - 0 , 0 + 1 @ @ <nl> + module . exports = process . atomBinding ' content_tracing ' <nl> mmm a / atom / common / node_bindings . cc <nl> ppp b / atom / common / node_bindings . cc <nl> REFERENCE_MODULE ( uv ) ; <nl> / / Atom Shell ' s builtin modules . <nl> REFERENCE_MODULE ( atom_browser_app ) ; <nl> REFERENCE_MODULE ( atom_browser_auto_updater ) ; <nl> + REFERENCE_MODULE ( atom_browser_content_tracing ) ; <nl> REFERENCE_MODULE ( atom_browser_dialog ) ; <nl> REFERENCE_MODULE ( atom_browser_menu ) ; <nl> REFERENCE_MODULE ( atom_browser_power_monitor ) ; <nl>
|
Add content - tracing module .
|
electron/electron
|
d993c92cea0e18e45857699759c9b1fbee3ffa31
|
2014-07-31T07:11:34Z
|
new file mode 100644 <nl> index 0000000000 . . c42dfc8bef <nl> mmm / dev / null <nl> ppp b / code / divide_conquer / quick_sort / qs . cpp <nl> <nl> + # include < bits / stdc + + . h > <nl> + using namespace std ; <nl> + <nl> + void swap ( int * a , int * b ) <nl> + { <nl> + int t = * a ; <nl> + * a = * b ; <nl> + * b = t ; <nl> + } <nl> + <nl> + / * This function takes last element as pivot , places <nl> + the pivot element at its correct position in sorted <nl> + array , and places all smaller ( smaller than pivot ) <nl> + to left of pivot and all greater elements to right <nl> + of pivot * / <nl> + int partition ( int arr [ ] , int low , int high ) <nl> + { <nl> + int pivot = arr [ high ] ; / / pivot <nl> + int i = ( low - 1 ) ; / / Index of smaller element <nl> + <nl> + for ( int j = low ; j < = high - 1 ; j + + ) <nl> + { <nl> + / / If current element is smaller than or <nl> + / / equal to pivot <nl> + if ( arr [ j ] < = pivot ) <nl> + { <nl> + i + + ; / / increment index of smaller element <nl> + swap ( & arr [ i ] , & arr [ j ] ) ; <nl> + } <nl> + } <nl> + swap ( & arr [ i + 1 ] , & arr [ high ] ) ; <nl> + return ( i + 1 ) ; <nl> + } <nl> + <nl> + void quickSort ( int arr [ ] , int low , int high ) <nl> + { <nl> + if ( low < high ) <nl> + { <nl> + / * pi is partitioning index , arr [ p ] is now <nl> + at right place * / <nl> + int pi = partition ( arr , low , high ) ; <nl> + <nl> + quickSort ( arr , low , pi - 1 ) ; <nl> + quickSort ( arr , pi + 1 , high ) ; <nl> + } <nl> + } <nl> + <nl> + void printArray ( int arr [ ] , int size ) <nl> + { <nl> + int i ; <nl> + for ( i = 0 ; i < size ; i + + ) <nl> + printf ( " % d " , arr [ i ] ) ; <nl> + printf ( " \ n " ) ; <nl> + } <nl> + <nl> + int main ( ) <nl> + { <nl> + int arr [ ] = { 10 , 7 , 8 , 9 , 1 , 5 } ; <nl> + int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; <nl> + quickSort ( arr , 0 , n - 1 ) ; <nl> + printf ( " Sorted array : \ n " ) ; <nl> + printArray ( arr , n ) ; <nl> + return 0 ; <nl> + } <nl>
|
added quick sort
|
OpenGenus/cosmos
|
973da78512ad7c28c73dd94575502653cff5e5fc
|
2017-10-06T20:44:30Z
|
mmm a / editor / editor_plugin . cpp <nl> ppp b / editor / editor_plugin . cpp <nl> void EditorPlugin : : save_global_state ( ) { } <nl> <nl> void EditorPlugin : : add_import_plugin ( const Ref < EditorImportPlugin > & p_importer ) { <nl> ResourceFormatImporter : : get_singleton ( ) - > add_importer ( p_importer ) ; <nl> - EditorFileSystem : : get_singleton ( ) - > scan_changes ( ) ; <nl> + EditorFileSystem : : get_singleton ( ) - > scan ( ) ; <nl> } <nl> <nl> void EditorPlugin : : remove_import_plugin ( const Ref < EditorImportPlugin > & p_importer ) { <nl> ResourceFormatImporter : : get_singleton ( ) - > remove_importer ( p_importer ) ; <nl> - EditorFileSystem : : get_singleton ( ) - > scan_changes ( ) ; <nl> + EditorFileSystem : : get_singleton ( ) - > scan ( ) ; <nl> } <nl> <nl> void EditorPlugin : : set_window_layout ( Ref < ConfigFile > p_layout ) { <nl>
|
Merge pull request from vnen / fix - import - plugin
|
godotengine/godot
|
7fad30fb9ab0ea19d67b2640668cbb88ebb1747c
|
2017-06-28T05:49:37Z
|
mmm a / tools / distrib / python / check_grpcio_tools . py <nl> ppp b / tools / distrib / python / check_grpcio_tools . py <nl> <nl> # See the License for the specific language governing permissions and <nl> # limitations under the License . <nl> <nl> - import cStringIO <nl> - <nl> - import make_grpcio_tools as make <nl> + import make_grpcio_tools as _make <nl> <nl> OUT_OF_DATE_MESSAGE = " " " file { } is out of date <nl> <nl> Have you called tools / distrib / python / make_grpcio_tools . py since upgrading protobuf ? " " " <nl> <nl> - check_protoc_lib_deps_content = make . get_deps ( ) <nl> + submodule_commit_hash = _make . protobuf_submodule_commit_hash ( ) <nl> + <nl> + with open ( _make . GRPC_PYTHON_PROTOC_LIB_DEPS , ' r ' ) as _protoc_lib_deps_file : <nl> + content = _protoc_lib_deps_file . read ( ) . splitlines ( ) <nl> + <nl> + testString = ( _make . COMMIT_HASH_PREFIX + <nl> + submodule_commit_hash + <nl> + _make . COMMIT_HASH_SUFFIX ) <nl> <nl> - with open ( make . GRPC_PYTHON_PROTOC_LIB_DEPS , ' r ' ) as protoc_lib_deps_file : <nl> - if protoc_lib_deps_file . read ( ) ! = check_protoc_lib_deps_content : <nl> - print ( OUT_OF_DATE_MESSAGE . format ( make . GRPC_PYTHON_PROTOC_LIB_DEPS ) ) <nl> - raise SystemExit ( 1 ) <nl> + if testString not in content : <nl> + print ( OUT_OF_DATE_MESSAGE . format ( _make . GRPC_PYTHON_PROTOC_LIB_DEPS ) ) <nl> + raise SystemExit ( 1 ) <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> <nl> - # Copyright 2016 gRPC authors . <nl> + # Copyright 2017 gRPC authors . <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> <nl> <nl> CC_INCLUDE = ' third_party / protobuf / src ' <nl> PROTO_INCLUDE = ' third_party / protobuf / src ' <nl> + <nl> + PROTOBUF_SUBMODULE_VERSION = " 80a37e0782d2d702d52234b62dd4b9ec74fd2c95 " <nl> mmm a / tools / distrib / python / make_grpcio_tools . py <nl> ppp b / tools / distrib / python / make_grpcio_tools . py <nl> <nl> import uuid <nl> <nl> DEPS_FILE_CONTENT = " " " <nl> - # Copyright 2016 gRPC authors . <nl> + # Copyright 2017 gRPC authors . <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> <nl> <nl> CC_INCLUDE = { cc_include } <nl> PROTO_INCLUDE = { proto_include } <nl> + <nl> + { commit_hash } <nl> " " " <nl> <nl> + COMMIT_HASH_PREFIX = ' PROTOBUF_SUBMODULE_VERSION = " ' <nl> + COMMIT_HASH_SUFFIX = ' " ' <nl> + <nl> # Bazel query result prefix for expected source files in protobuf . <nl> PROTOBUF_CC_PREFIX = ' / / : src / ' <nl> PROTOBUF_PROTO_PREFIX = ' / / : src / ' <nl> <nl> <nl> GRPC_PYTHON_PROTOBUF_RELATIVE_ROOT = os . path . join ( ' third_party ' , ' protobuf ' , ' src ' ) <nl> GRPC_PROTOBUF = os . path . join ( GRPC_ROOT , GRPC_PYTHON_PROTOBUF_RELATIVE_ROOT ) <nl> + GRPC_PROTOBUF_SUBMODULE_ROOT = os . path . join ( GRPC_ROOT , ' third_party ' , ' protobuf ' ) <nl> GRPC_PROTOC_PLUGINS = os . path . join ( GRPC_ROOT , ' src ' , ' compiler ' ) <nl> GRPC_PYTHON_PROTOBUF = os . path . join ( GRPC_PYTHON_ROOT , ' third_party ' , ' protobuf ' , <nl> ' src ' ) <nl> <nl> BAZEL_DEPS_PROTOC_LIB_QUERY = ' / / : protoc_lib ' <nl> BAZEL_DEPS_COMMON_PROTOS_QUERY = ' / / : well_known_protos ' <nl> <nl> + def protobuf_submodule_commit_hash ( ) : <nl> + " " " Gets the commit hash for the HEAD of the protobuf submodule currently <nl> + checked out . " " " <nl> + cwd = os . getcwd ( ) <nl> + os . chdir ( GRPC_PROTOBUF_SUBMODULE_ROOT ) <nl> + output = subprocess . check_output ( [ ' git ' , ' rev - parse ' , ' HEAD ' ] ) <nl> + os . chdir ( cwd ) <nl> + return output . splitlines ( ) [ 0 ] . strip ( ) <nl> <nl> def bazel_query ( query ) : <nl> output = subprocess . check_output ( [ BAZEL_DEPS , query ] ) <nl> def get_deps ( ) : <nl> proto_files = [ <nl> name [ len ( PROTOBUF_PROTO_PREFIX ) : ] for name in proto_files_output <nl> if name . endswith ( ' . proto ' ) and name . startswith ( PROTOBUF_PROTO_PREFIX ) ] <nl> + commit_hash = protobuf_submodule_commit_hash ( ) <nl> deps_file_content = DEPS_FILE_CONTENT . format ( <nl> cc_files = cc_files , <nl> proto_files = proto_files , <nl> cc_include = repr ( GRPC_PYTHON_PROTOBUF_RELATIVE_ROOT ) , <nl> - proto_include = repr ( GRPC_PYTHON_PROTOBUF_RELATIVE_ROOT ) ) <nl> + proto_include = repr ( GRPC_PYTHON_PROTOBUF_RELATIVE_ROOT ) , <nl> + commit_hash = COMMIT_HASH_PREFIX + commit_hash + COMMIT_HASH_SUFFIX ) <nl> return deps_file_content <nl> <nl> def long_path ( path ) : <nl>
|
Merge pull request from mehrdada / fix - check_grpcio_tools
|
grpc/grpc
|
61ea3e22a165fc7edda490ea38b2e97c0dd3e4c0
|
2017-11-20T21:50:39Z
|
mmm a / tensorflow / contrib / summary / summary_ops_test . py <nl> ppp b / tensorflow / contrib / summary / summary_ops_test . py <nl> def testSummaryGlobalStep ( self ) : <nl> self . assertEqual ( len ( events ) , 2 ) <nl> self . assertEqual ( events [ 1 ] . summary . value [ 0 ] . tag , ' scalar ' ) <nl> <nl> + def testRecordEveryNGlobalSteps ( self ) : <nl> + step = training_util . get_or_create_global_step ( ) <nl> + logdir = tempfile . mkdtemp ( ) <nl> + <nl> + def run_step ( ) : <nl> + summary_ops . scalar ( ' scalar ' , i , step = step ) <nl> + step . assign_add ( 1 ) <nl> + <nl> + with summary_ops . create_file_writer ( <nl> + logdir ) . as_default ( ) , summary_ops . record_summaries_every_n_global_steps ( <nl> + 2 , step ) : <nl> + for i in range ( 10 ) : <nl> + run_step ( ) <nl> + # And another 10 steps as a graph function . <nl> + run_step_fn = function . defun ( run_step ) <nl> + for i in range ( 10 ) : <nl> + run_step_fn ( ) <nl> + <nl> + events = summary_test_util . events_from_logdir ( logdir ) <nl> + self . assertEqual ( len ( events ) , 11 ) <nl> + <nl> def testMaxQueue ( self ) : <nl> logs = tempfile . mkdtemp ( ) <nl> with summary_ops . create_file_writer ( <nl> class EagerDbTest ( summary_test_util . SummaryDbTest ) : <nl> <nl> def testDbURIOpen ( self ) : <nl> tmpdb_path = os . path . join ( self . get_temp_dir ( ) , ' tmpDbURITest . sqlite ' ) <nl> - tmpdb_uri = six . moves . urllib_parse . urljoin ( " file : " , tmpdb_path ) <nl> - tmpdb_writer = summary_ops . create_db_writer ( <nl> - tmpdb_uri , <nl> - " experimentA " , <nl> - " run1 " , <nl> - " user1 " ) <nl> + tmpdb_uri = six . moves . urllib_parse . urljoin ( ' file : ' , tmpdb_path ) <nl> + tmpdb_writer = summary_ops . create_db_writer ( tmpdb_uri , ' experimentA ' , <nl> + ' run1 ' , ' user1 ' ) <nl> with summary_ops . always_record_summaries ( ) : <nl> with tmpdb_writer . as_default ( ) : <nl> summary_ops . scalar ( ' t1 ' , 2 . 0 ) <nl> mmm a / tensorflow / python / ops / summary_ops_v2 . py <nl> ppp b / tensorflow / python / ops / summary_ops_v2 . py <nl> <nl> from tensorflow . python . util import tf_contextlib <nl> <nl> <nl> - # A global dictionary mapping graph keys to boolean values indicating whether <nl> - # we should record summaries for this particular graph or not . <nl> + # Dictionary mapping graph keys to a boolean Tensor ( or callable returning <nl> + # a boolean Tensor ) indicating whether we should record summaries for the <nl> + # graph identified by the key of the dictionary . <nl> _SHOULD_RECORD_SUMMARIES = { } <nl> <nl> # A global dictionary mapping graph keys to a list of summary writer init ops . <nl> def should_record_summaries ( ) : <nl> " " " Returns boolean Tensor which is true if summaries should be recorded . " " " <nl> global _SHOULD_RECORD_SUMMARIES <nl> key = ops . get_default_graph ( ) . _graph_key # pylint : disable = protected - access <nl> - return _SHOULD_RECORD_SUMMARIES . setdefault ( key , False ) <nl> + should = _SHOULD_RECORD_SUMMARIES . setdefault ( key , False ) <nl> + return should ( ) if callable ( should ) else should <nl> <nl> <nl> # TODO ( apassos ) consider how to handle local step here . <nl> def record_summaries_every_n_global_steps ( n , global_step = None ) : <nl> old = _SHOULD_RECORD_SUMMARIES . setdefault ( key , False ) <nl> try : <nl> with ops . device ( " cpu : 0 " ) : <nl> - _SHOULD_RECORD_SUMMARIES [ key ] = math_ops . equal ( global_step % n , 0 ) <nl> + should = lambda : math_ops . equal ( global_step % n , 0 ) <nl> + if not context . executing_eagerly ( ) : <nl> + should = should ( ) <nl> + _SHOULD_RECORD_SUMMARIES [ key ] = should <nl> yield <nl> finally : <nl> _SHOULD_RECORD_SUMMARIES [ key ] = old <nl>
|
Correctly handle record_summaries_every_n_global_steps ( ) when eager execution
|
tensorflow/tensorflow
|
cbb06439c8b11dac918b3e83d1ac0fda1c346a99
|
2018-11-13T17:44:30Z
|
mmm a / tests / cpp - tests / Classes / Sprite3DTest / Sprite3DTest . cpp <nl> ppp b / tests / cpp - tests / Classes / Sprite3DTest / Sprite3DTest . cpp <nl> Sprite3DLightMapTest : : Sprite3DLightMapTest ( ) <nl> listener - > onTouchesMoved = CC_CALLBACK_2 ( Sprite3DLightMapTest : : onTouchesMoved , this ) ; <nl> _eventDispatcher - > addEventListenerWithSceneGraphPriority ( listener , this ) ; <nl> } <nl> - <nl> Sprite3DLightMapTest : : ~ Sprite3DLightMapTest ( ) <nl> { <nl> <nl> } <nl> - <nl> std : : string Sprite3DLightMapTest : : title ( ) const <nl> { <nl> return " light map test " ; <nl>
|
fix
|
cocos2d/cocos2d-x
|
3377c3ee533b6a12c1281ff4191aedc95a5c2461
|
2014-12-30T03:54:53Z
|
mmm a / src / mongo / util / log . cpp <nl> ppp b / src / mongo / util / log . cpp <nl> string errnoWithDescription ( int errNumber ) { <nl> size = utf8ErrorText . length ( ) ; <nl> } <nl> <nl> - if ( size > kBuflen ) { <nl> - size = kBuflen ; <nl> + if ( size > = kBuflen ) { <nl> + size = kBuflen - 1 ; <nl> } <nl> <nl> memcpy ( buf , utf8ErrorText . c_str ( ) , size ) ; <nl> + buf [ size ] = ' \ 0 ' ; <nl> msg = buf ; <nl> LocalFree ( errorText ) ; <nl> } else if ( strerror_s ( buf , kBuflen , errNumber ) ! = 0 ) { <nl>
|
Null - terminate error print on Windows
|
mongodb/mongo
|
6a00e2746082e71691d27b3be0b75fe3be89fda7
|
2016-06-06T17:15:13Z
|
mmm a / CMakeLists . txt <nl> ppp b / CMakeLists . txt <nl> OCV_OPTION ( WITH_ITT " Include Intel ITT support " ON <nl> OCV_OPTION ( BUILD_SHARED_LIBS " Build shared libraries ( . dll / . so ) instead of static ones ( . lib / . a ) " NOT ( ANDROID OR APPLE_FRAMEWORK ) ) <nl> OCV_OPTION ( BUILD_opencv_apps " Build utility applications ( used for example to train classifiers ) " ( NOT ANDROID AND NOT WINRT ) IF ( NOT APPLE_FRAMEWORK ) ) <nl> OCV_OPTION ( BUILD_opencv_js " Build JavaScript bindings by Emscripten " OFF ) <nl> + OCV_OPTION ( BUILD_ANDROID_PROJECTS " Build Android projects providing . apk files " ON IF ANDROID ) <nl> OCV_OPTION ( BUILD_ANDROID_EXAMPLES " Build examples for Android platform " ON IF ANDROID ) <nl> OCV_OPTION ( BUILD_DOCS " Create build rules for OpenCV Documentation " OFF IF ( NOT WINRT AND NOT APPLE_FRAMEWORK ) ) <nl> OCV_OPTION ( BUILD_EXAMPLES " Build all examples " OFF ) <nl> include ( cmake / OpenCVFindProtobuf . cmake ) <nl> <nl> # mmm Java Support mmm <nl> if ( BUILD_JAVA ) <nl> - include ( cmake / OpenCVDetectApacheAnt . cmake ) <nl> if ( ANDROID ) <nl> - include ( cmake / OpenCVDetectAndroidSDK . cmake ) <nl> - <nl> - if ( NOT ANDROID_TOOLS_Pkg_Revision GREATER 13 ) <nl> - message ( WARNING " OpenCV requires Android SDK tools revision 14 or newer . Otherwise tests and samples will no be compiled . " ) <nl> - endif ( ) <nl> + include ( cmake / android / OpenCVDetectAndroidSDK . cmake ) <nl> else ( ) <nl> + include ( cmake / OpenCVDetectApacheAnt . cmake ) <nl> find_package ( JNI ) <nl> endif ( ) <nl> endif ( ) <nl> status ( " Non - free algorithms : " OPENCV_ENABLE_NONFREE THEN " YES " ELSE " NO " ) <nl> # = = = = = = = = = = = = = = = = = = = = = = = = = = Android details = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> if ( ANDROID ) <nl> status ( " " ) <nl> - status ( " Android : " ) <nl> + if ( DEFINED ANDROID_NDK_REVISION ) <nl> + set ( __msg " $ { ANDROID_NDK } ( ver $ { ANDROID_NDK_REVISION } ) " ) <nl> + else ( ) <nl> + set ( __msg " location : $ { ANDROID_NDK } " ) <nl> + endif ( ) <nl> + status ( " Android NDK : " $ { __msg } ) <nl> status ( " Android ABI : " $ { ANDROID_ABI } ) <nl> + if ( BUILD_WITH_STANDALONE_TOOLCHAIN ) <nl> + status ( " NDK toolchain : " " standalone : $ { ANDROID_STANDALONE_TOOLCHAIN } " ) <nl> + elseif ( BUILD_WITH_ANDROID_NDK OR DEFINED ANDROID_TOOLCHAIN_NAME ) <nl> + status ( " NDK toolchain : " " $ { ANDROID_TOOLCHAIN_NAME } " ) <nl> + endif ( ) <nl> status ( " STL type : " $ { ANDROID_STL } ) <nl> - status ( " Native API level : " android - $ { ANDROID_NATIVE_API_LEVEL } ) <nl> - android_get_compatible_target ( android_sdk_target_status $ { ANDROID_NATIVE_API_LEVEL } $ { ANDROID_SDK_TARGET } 11 ) <nl> - status ( " SDK target : " " $ { android_sdk_target_status } " ) <nl> - if ( BUILD_WITH_ANDROID_NDK ) <nl> - status ( " Android NDK : " " $ { ANDROID_NDK } ( toolchain : $ { ANDROID_TOOLCHAIN_NAME } ) " ) <nl> - elseif ( BUILD_WITH_STANDALONE_TOOLCHAIN ) <nl> - status ( " Android toolchain : " " $ { ANDROID_STANDALONE_TOOLCHAIN } " ) <nl> + status ( " Native API level : " $ { ANDROID_NATIVE_API_LEVEL } ) <nl> + <nl> + if ( BUILD_ANDROID_PROJECTS ) <nl> + status ( " Android SDK : " " $ { ANDROID_SDK } ( tools : $ { ANDROID_SDK_TOOLS_VERSION } build tools : $ { ANDROID_SDK_BUILD_TOOLS_VERSION } ) " ) <nl> + if ( ANDROID_EXECUTABLE ) <nl> + status ( " android tool : " " $ { ANDROID_EXECUTABLE } " ) <nl> + endif ( ) <nl> + else ( ) <nl> + status ( " Android SDK : " " not used , projects are not built " ) <nl> + endif ( ) <nl> + if ( DEFINED ANDROID_SDK_COMPATIBLE_TARGET ) <nl> + status ( " SDK target : " " $ { ANDROID_SDK_COMPATIBLE_TARGET } " ) <nl> + endif ( ) <nl> + if ( DEFINED ANDROID_PROJECTS_BUILD_TYPE ) <nl> + if ( ANDROID_PROJECTS_BUILD_TYPE STREQUAL " ANT " ) <nl> + status ( " Projects build scripts : " " Ant / Eclipse compatible " ) <nl> + elseif ( ANDROID_PROJECTS_BUILD_TYPE STREQUAL " ANT " ) <nl> + status ( " Projects build scripts : " " Gradle " ) <nl> + endif ( ) <nl> endif ( ) <nl> - status ( " android tool : " ANDROID_EXECUTABLE THEN " $ { ANDROID_EXECUTABLE } ( $ { ANDROID_TOOLS_Pkg_Desc } ) " ELSE NO ) <nl> endif ( ) <nl> <nl> # = = = = = = = = = = = = = = = = = = Windows RT features = = = = = = = = = = = = = = = = = = <nl> mmm a / cmake / OpenCVUtils . cmake <nl> ppp b / cmake / OpenCVUtils . cmake <nl> macro ( ocv_path_join result_var P1 P2_ ) <nl> # message ( STATUS " ' $ { P1 } ' ' $ { P2_ } ' = > ' $ { $ { result_var } } ' " ) <nl> endmacro ( ) <nl> <nl> + <nl> + # Used to parse Android SDK ' source . properties ' files <nl> + # File lines format : <nl> + # - ' < var_name > = < value > ' ( with possible ' space ' symbols around ' = ' ) <nl> + # - ' # < any comment > ' <nl> + # Parsed values are saved into CMake variables : <nl> + # - ' $ { var_prefix } _ $ { var_name } ' <nl> + # Flags : <nl> + # - ' CACHE_VAR < var1 > < var2 > ' - put these properties into CMake internal cache <nl> + # - ' MSG_PREFIX < msg > ' - prefix string for emitted messages <nl> + # - flag ' VALIDATE ' - emit messages about missing values from required cached variables <nl> + # - flag ' WARNING ' - emit CMake WARNING instead of STATUS messages <nl> + function ( ocv_parse_properties_file file var_prefix ) <nl> + cmake_parse_arguments ( PARSE_PROPERTIES_PARAM " VALIDATE ; WARNING " " " " CACHE_VAR ; MSG_PREFIX " $ { ARGN } ) <nl> + <nl> + set ( __msg_type STATUS ) <nl> + if ( PARSE_PROPERTIES_PARAM_WARNING ) <nl> + set ( __msg_type WARNING ) <nl> + endif ( ) <nl> + <nl> + if ( EXISTS " $ { file } " ) <nl> + set ( SOURCE_PROPERTIES_REGEX " ^ [ ] * ( [ ^ = : \ n \ " ' ] + ) [ ] * = [ ] * ( . * ) $ " ) <nl> + file ( STRINGS " $ { file } " SOURCE_PROPERTIES_LINES REGEX " ^ [ ] * [ ^ # ] . * $ " ) <nl> + foreach ( line $ { SOURCE_PROPERTIES_LINES } ) <nl> + if ( line MATCHES " $ { SOURCE_PROPERTIES_REGEX } " ) <nl> + set ( __name " $ { CMAKE_MATCH_1 } " ) <nl> + set ( __value " $ { CMAKE_MATCH_2 } " ) <nl> + string ( REGEX REPLACE " [ ^ a - zA - Z0 - 9_ ] " " _ " __name $ { __name } ) <nl> + if ( " ; $ { PARSE_PROPERTIES_PARAM_CACHE_VAR } ; " MATCHES " ; $ { __name } ; " ) <nl> + set ( $ { var_prefix } _ $ { __name } " $ { __value } " CACHE INTERNAL " from $ { file } " ) <nl> + else ( ) <nl> + set ( $ { var_prefix } _ $ { __name } " $ { __value } " PARENT_SCOPE ) <nl> + endif ( ) <nl> + else ( ) <nl> + message ( $ { __msg_type } " $ { PARSE_PROPERTIES_PARAM_MSG_PREFIX } Can ' t parse source property : ' $ { line } ' ( from $ { file } ) " ) <nl> + endif ( ) <nl> + endforeach ( ) <nl> + if ( PARSE_PROPERTIES_PARAM_VALIDATE ) <nl> + set ( __missing " " ) <nl> + foreach ( __name $ { PARSE_PROPERTIES_PARAM_CACHE_VAR } ) <nl> + if ( NOT DEFINED $ { var_prefix } _ $ { __name } ) <nl> + list ( APPEND __missing $ { __name } ) <nl> + endif ( ) <nl> + endforeach ( ) <nl> + if ( __missing ) <nl> + message ( $ { __msg_type } " $ { PARSE_PROPERTIES_PARAM_MSG_PREFIX } Can ' t read properties ' $ { __missing } ' from ' $ { file } ' " ) <nl> + endif ( ) <nl> + endif ( ) <nl> + else ( ) <nl> + message ( $ { __msg_type } " $ { PARSE_PROPERTIES_PARAM_MSG_PREFIX } Can ' t find file : $ { file } " ) <nl> + endif ( ) <nl> + endfunction ( ) <nl> + <nl> + <nl> + <nl> # rename modules target to world if needed <nl> macro ( _ocv_fix_target target_var ) <nl> if ( BUILD_opencv_world ) <nl> new file mode 100644 <nl> index 00000000000 . . f2f21f5f70e <nl> mmm / dev / null <nl> ppp b / cmake / android / OpenCVDetectAndroidSDK . cmake <nl> <nl> + if ( EXISTS " $ { ANDROID_EXECUTABLE } " ) <nl> + set ( ANDROID_SDK_DETECT_QUIET TRUE ) <nl> + endif ( ) <nl> + <nl> + # fixup for https : / / github . com / android - ndk / ndk / issues / 596 <nl> + if ( DEFINED ANDROID_NDK_REVISION AND ANDROID_NDK_REVISION MATCHES " ( 1 [ 56 ] ) ( [ 0 - 9 ] + ) \ \ . ( [ ^ \ n ] + ) \ n " ) <nl> + set ( ANDROID_NDK_REVISION " $ { CMAKE_MATCH_1 } . $ { CMAKE_MATCH_2 } . $ { CMAKE_MATCH_3 } " ) <nl> + set ( ANDROID_NDK_REVISION " $ { ANDROID_NDK_REVISION } " CACHE INTERNAL " Android NDK revision " ) <nl> + endif ( ) <nl> + <nl> + # https : / / developer . android . com / studio / command - line / variables . html <nl> + ocv_check_environment_variables ( ANDROID_SDK_ROOT ANDROID_HOME ANDROID_SDK ) <nl> + <nl> + set ( __msg_BUILD_ANDROID_PROJECTS " Use BUILD_ANDROID_PROJECTS = OFF to prepare Android project files without building them " ) <nl> + <nl> + macro ( ocv_detect_android_sdk ) <nl> + if ( NOT DEFINED ANDROID_SDK ) <nl> + if ( DEFINED ANDROID_SDK AND EXISTS " $ { ANDROID_SDK } " ) <nl> + set ( ANDROID_SDK " $ { ANDROID_SDK } " CACHE INTERNAL " Android SDK path " ) <nl> + elseif ( DEFINED ANDROID_HOME AND EXISTS " $ { ANDROID_HOME } " ) <nl> + set ( ANDROID_SDK " $ { ANDROID_HOME } " CACHE INTERNAL " Android SDK path " ) <nl> + elseif ( DEFINED ANDROID_SDK_ROOT AND EXISTS " $ { ANDROID_SDK_ROOT } " ) <nl> + set ( ANDROID_SDK " $ { ANDROID_SDK_ROOT } " CACHE INTERNAL " Android SDK path " ) <nl> + endif ( ) <nl> + if ( DEFINED ANDROID_SDK ) <nl> + message ( STATUS " Android SDK : using location : $ { ANDROID_SDK } " ) <nl> + endif ( ) <nl> + endif ( ) <nl> + if ( NOT DEFINED ANDROID_SDK ) <nl> + message ( FATAL_ERROR " Android SDK : specify path to Android SDK via ANDROID_SDK_ROOT / ANDROID_HOME / ANDROID_SDK variables " ) <nl> + endif ( ) <nl> + if ( NOT EXISTS " $ { ANDROID_SDK } " ) <nl> + message ( FATAL_ERROR " Android SDK : specified path doesn ' t exist : $ { ANDROID_SDK } " ) <nl> + endif ( ) <nl> + endmacro ( ) <nl> + <nl> + macro ( ocv_detect_android_sdk_tools ) <nl> + # https : / / developer . android . com / studio / releases / sdk - tools . html <nl> + if ( NOT DEFINED ANDROID_SDK_TOOLS ) <nl> + if ( DEFINED ANDROID_SDK AND EXISTS " $ { ANDROID_SDK } / tools " ) <nl> + set ( ANDROID_SDK_TOOLS " $ { ANDROID_SDK } / tools " CACHE INTERNAL " Android SDK Tools path " ) <nl> + endif ( ) <nl> + endif ( ) <nl> + if ( NOT DEFINED ANDROID_SDK_TOOLS ) <nl> + message ( FATAL_ERROR " Android SDK Tools : can ' t automatically find Android SDK Tools . Specify path via ANDROID_SDK_TOOLS variable " ) <nl> + endif ( ) <nl> + if ( NOT EXISTS " $ { ANDROID_SDK_TOOLS } " ) <nl> + message ( FATAL_ERROR " Android SDK Tools : specified path doesn ' t exist : $ { ANDROID_SDK_TOOLS } " ) <nl> + endif ( ) <nl> + <nl> + if ( NOT DEFINED ANDROID_SDK_TOOLS_VERSION ) <nl> + ocv_parse_properties_file ( " $ { ANDROID_SDK_TOOLS } / source . properties " <nl> + ANDROID_TOOLS CACHE Pkg_Revision <nl> + MSG_PREFIX " Android SDK Tools : " <nl> + ) <nl> + <nl> + if ( NOT DEFINED ANDROID_TOOLS_Pkg_Revision ) <nl> + message ( FATAL_ERROR " Android SDK Tools : Can ' t determine package version : ANDROID_SDK_TOOLS = $ { ANDROID_SDK_TOOLS } \ n " <nl> + " Check specified parameters or force version via ' ANDROID_SDK_TOOLS_VERSION ' variable . \ n " <nl> + " $ { __msg_BUILD_ANDROID_PROJECTS } " ) <nl> + elseif ( NOT ANDROID_SDK_DETECT_QUIET ) <nl> + set ( __info " " ) <nl> + if ( DEFINED ANDROID_TOOLS_Pkg_Desc ) <nl> + set ( __info " ( description : ' $ { ANDROID_TOOLS_Pkg_Desc } ' ) " ) <nl> + endif ( ) <nl> + message ( STATUS " Android SDK Tools : ver . $ { ANDROID_TOOLS_Pkg_Revision } $ { __info } " ) <nl> + endif ( ) <nl> + set ( ANDROID_SDK_TOOLS_VERSION " $ { ANDROID_TOOLS_Pkg_Revision } " CACHE INTERNAL " Android SDK Tools version " ) <nl> + endif ( ) <nl> + if ( NOT DEFINED ANDROID_TOOLS_Pkg_Revision ) <nl> + set ( ANDROID_TOOLS_Pkg_Revision " $ { ANDROID_SDK_TOOLS_VERSION } " CACHE INTERNAL " Android SDK Tools version ( deprecated ) " ) <nl> + endif ( ) <nl> + set ( ANDROID_SDK_TOOLS_PATH " $ { ANDROID_SDK_TOOLS } " CACHE INTERNAL " Android SDK Tools path ( deprecated ) " ) <nl> + endmacro ( ) # ocv_detect_android_sdk_tools <nl> + <nl> + macro ( ocv_detect_android_sdk_build_tools ) <nl> + # https : / / developer . android . com / studio / releases / build - tools . html <nl> + if ( NOT DEFINED ANDROID_SDK_BUILD_TOOLS_VERSION ) <nl> + if ( NOT DEFINED ANDROID_SDK_BUILD_TOOLS ) <nl> + set ( __search_dir $ { ANDROID_SDK } / build - tools ) <nl> + if ( NOT EXISTS " $ { __search_dir } " ) <nl> + message ( FATAL_ERROR " Android SDK Build Tools : directory doesn ' t exist : $ { __search_dir } " <nl> + " $ { __msg_BUILD_ANDROID_PROJECTS } " ) <nl> + endif ( ) <nl> + <nl> + if ( NOT DEFINED ANDROID_SDK_BUILD_TOOLS_SUBDIR ) <nl> + file ( GLOB __found RELATIVE " $ { __search_dir } " $ { __search_dir } / * ) <nl> + set ( __dirlist " " ) <nl> + set ( __selected 0 ) <nl> + set ( __versions " " ) <nl> + foreach ( d $ { __found } ) <nl> + if ( IS_DIRECTORY " $ { __search_dir } / $ { d } " ) <nl> + list ( APPEND __dirlist $ { d } ) <nl> + if ( d MATCHES " [ 0 - 9 ] + ( \ \ . [ 0 - 9 ] + ) * " ) <nl> + list ( APPEND __versions " $ { d } " ) <nl> + endif ( ) <nl> + if ( __selected VERSION_LESS d ) <nl> + set ( __selected " $ { d } " ) <nl> + endif ( ) <nl> + endif ( ) <nl> + endforeach ( ) <nl> + if ( __selected VERSION_GREATER 0 ) <nl> + set ( ANDROID_SDK_BUILD_TOOLS_SUBDIR " $ { __selected } " ) <nl> + elseif ( __dirlist ) <nl> + set ( __versions " " ) <nl> + foreach ( d $ { __dirlist } ) <nl> + if ( EXISTS " $ { __search_dir } / $ { d } / source . properties " ) <nl> + ocv_clear_vars ( ANDROID_BUILD_TOOLS_Pkg_Revision ) <nl> + ocv_parse_properties_file ( " $ { __search_dir } / $ { d } / source . properties " <nl> + ANDROID_BUILD_TOOLS <nl> + MSG_PREFIX " Android SDK Tools : " <nl> + ) <nl> + if ( DEFINED ANDROID_BUILD_TOOLS_Pkg_Revision ) <nl> + list ( APPEND __versions " $ { ANDROID_BUILD_TOOLS_Pkg_Revision } " ) <nl> + if ( __selected VERSION_LESS ANDROID_BUILD_TOOLS_Pkg_Revision ) <nl> + set ( ANDROID_SDK_BUILD_TOOLS_SUBDIR " $ { d } " ) <nl> + set ( __selected " $ { ANDROID_BUILD_TOOLS_Pkg_Revision } " ) <nl> + endif ( ) <nl> + endif ( ) <nl> + endif ( ) <nl> + endforeach ( ) <nl> + endif ( ) <nl> + if ( DEFINED ANDROID_SDK_BUILD_TOOLS_SUBDIR ) <nl> + set ( ANDROID_SDK_BUILD_TOOLS_VERSION " $ { __selected } " CACHE STRING " Android SDK Build Tools version " ) <nl> + set_property ( CACHE ANDROID_SDK_BUILD_TOOLS_VERSION PROPERTY STRINGS $ { __versions } ) <nl> + set ( ANDROID_SDK_BUILD_TOOLS " $ { __search_dir } / $ { d } " CACHE INTERNAL " Android SDK Build Tools path " ) <nl> + message ( STATUS " Android SDK Build Tools : ver . $ { ANDROID_SDK_BUILD_TOOLS_VERSION } ( subdir $ { ANDROID_SDK_BUILD_TOOLS_SUBDIR } from $ { __dirlist } ) " ) <nl> + else ( ) <nl> + message ( FATAL_ERROR " Android SDK Build Tools : autodetection failed . " <nl> + " Specify ANDROID_SDK_BUILD_TOOLS_VERSION / ANDROID_SDK_BUILD_TOOLS_SUBDIR / ANDROID_SDK_BUILD_TOOLS variable to bypass autodetection . \ n " <nl> + " $ { __msg_BUILD_ANDROID_PROJECTS } " ) <nl> + endif ( ) <nl> + endif ( ) <nl> + else ( ) <nl> + ocv_parse_properties_file ( " $ { ANDROID_SDK_BUILD_TOOLS } / source . properties " <nl> + ANDROID_BUILD_TOOLS <nl> + MSG_PREFIX " Android SDK Tools : " <nl> + ) <nl> + if ( NOT DEFINED ANDROID_BUILD_TOOLS_Pkg_Revision ) <nl> + message ( FATAL_ERROR " Android SDK Build Tools : Can ' t detect version : ANDROID_SDK_BUILD_TOOLS = $ { ANDROID_SDK_BUILD_TOOLS } \ n " <nl> + " Specify ANDROID_SDK_BUILD_TOOLS_VERSION variable to bypass autodetection . \ n " <nl> + " $ { __msg_BUILD_ANDROID_PROJECTS } " ) <nl> + else ( ) <nl> + set ( ANDROID_SDK_BUILD_TOOLS_VERSION " $ { ANDROID_BUILD_TOOLS_Pkg_Revision } " CACHE INTERNAL " Android SDK Build Tools version " ) <nl> + message ( STATUS " Android SDK Build Tools : ver . $ { ANDROID_SDK_BUILD_TOOLS_VERSION } ( ANDROID_SDK_BUILD_TOOLS = $ { ANDROID_SDK_BUILD_TOOLS } ) " ) <nl> + endif ( ) <nl> + endif ( ) # ANDROID_SDK_BUILD_TOOLS <nl> + endif ( ) # ANDROID_SDK_BUILD_TOOLS_VERSION <nl> + endmacro ( ) # ocv_detect_android_sdk_build_tools <nl> + <nl> + <nl> + if ( BUILD_ANDROID_PROJECTS ) <nl> + ocv_detect_android_sdk ( ) <nl> + ocv_detect_android_sdk_tools ( ) <nl> + ocv_detect_android_sdk_build_tools ( ) <nl> + <nl> + if ( ANDROID_SDK_TOOLS_VERSION VERSION_LESS 14 ) <nl> + message ( FATAL_ERROR " Android SDK Tools : OpenCV requires Android SDK Tools revision 14 or newer . \ n " <nl> + " $ { __msg_BUILD_ANDROID_PROJECTS } " ) <nl> + endif ( ) <nl> + <nl> + if ( NOT ANDROID_SDK_TOOLS_VERSION VERSION_LESS 25 . 3 . 0 ) <nl> + message ( STATUS " Android SDK Tools : Ant ( Eclipse ) builds are NOT supported by Android SDK " ) <nl> + ocv_update ( ANDROID_PROJECTS_SUPPORT_ANT OFF ) <nl> + if ( NOT ANDROID_SDK_BUILD_TOOLS_VERSION VERSION_LESS 26 . 0 . 2 ) <nl> + # https : / / developer . android . com / studio / releases / gradle - plugin . html <nl> + message ( STATUS " Android SDK Build Tools : Gradle 3 . 0 . 0 + builds support is available " ) <nl> + ocv_update ( ANDROID_PROJECTS_SUPPORT_GRADLE ON ) <nl> + endif ( ) <nl> + else ( ) <nl> + include ( $ { CMAKE_CURRENT_LIST_DIR } / . . / OpenCVDetectApacheAnt . cmake ) <nl> + if ( ANT_EXECUTABLE AND NOT ANT_VERSION VERSION_LESS 1 . 7 ) <nl> + message ( STATUS " Android SDK Tools : Ant ( Eclipse ) builds are supported " ) <nl> + ocv_update ( ANDROID_PROJECTS_SUPPORT_ANT ON ) <nl> + endif ( ) <nl> + endif ( ) <nl> + <nl> + if ( NOT DEFINED ANDROID_PROJECTS_BUILD_TYPE ) <nl> + if ( ANDROID_PROJECTS_SUPPORT_ANT ) <nl> + ocv_update ( ANDROID_PROJECTS_BUILD_TYPE " ANT " ) <nl> + elseif ( ANDROID_PROJECTS_SUPPORT_GRADLE ) <nl> + ocv_update ( ANDROID_PROJECTS_BUILD_TYPE " GRADLE " ) <nl> + else ( ) <nl> + message ( FATAL_ERROR " Android SDK : Can ' t build Android projects as requested by BUILD_ANDROID_PROJECTS = ON variable . \ n " <nl> + " $ { __msg_BUILD_ANDROID_PROJECTS } " ) <nl> + endif ( ) <nl> + endif ( ) <nl> + <nl> + if ( ANDROID_PROJECTS_BUILD_TYPE STREQUAL " ANT " ) <nl> + message ( STATUS " Android SDK Tools : Prepare Android projects for using Ant build scripts ( deprecated ) " ) <nl> + elseif ( ANDROID_PROJECTS_BUILD_TYPE STREQUAL " GRADLE " ) <nl> + message ( STATUS " Android SDK Tools : Prepare Android projects for using Gradle 3 . 0 . 0 + build scripts " ) <nl> + endif ( ) <nl> + <nl> + else ( ) <nl> + message ( " Android : Projects builds are DISABLED " ) <nl> + macro ( add_android_project ) <nl> + endmacro ( ) <nl> + endif ( ) # BUILD_ANDROID_PROJECTS <nl> + <nl> + if ( ANDROID_PROJECTS_BUILD_TYPE STREQUAL " ANT " ) <nl> + include ( $ { CMAKE_CURRENT_LIST_DIR } / android_ant_projects . cmake ) <nl> + elseif ( ANDROID_PROJECTS_BUILD_TYPE STREQUAL " GRADLE " ) <nl> + include ( $ { CMAKE_CURRENT_LIST_DIR } / android_gradle_projects . cmake ) <nl> + elseif ( BUILD_ANDROID_PROJECTS ) <nl> + message ( FATAL_ERROR " Internal error " ) <nl> + else ( ) <nl> + # TODO <nl> + # include ( $ { CMAKE_CURRENT_LIST_DIR } / android_disabled_projects . cmake ) <nl> + endif ( ) <nl> similarity index 71 % <nl> rename from cmake / OpenCVDetectAndroidSDK . cmake <nl> rename to cmake / android / android_ant_projects . cmake <nl> mmm a / cmake / OpenCVDetectAndroidSDK . cmake <nl> ppp b / cmake / android / android_ant_projects . cmake <nl> <nl> - if ( EXISTS " $ { ANDROID_EXECUTABLE } " ) <nl> - set ( ANDROID_SDK_DETECT_QUIET TRUE ) <nl> - endif ( ) <nl> - <nl> - file ( TO_CMAKE_PATH " $ ENV { ProgramFiles } " ProgramFiles_ENV_PATH ) <nl> - file ( TO_CMAKE_PATH " $ ENV { HOME } " HOME_ENV_PATH ) <nl> - <nl> - if ( CMAKE_HOST_WIN32 ) <nl> - set ( ANDROID_SDK_OS windows ) <nl> - elseif ( CMAKE_HOST_APPLE ) <nl> - set ( ANDROID_SDK_OS macosx ) <nl> - else ( ) <nl> - set ( ANDROID_SDK_OS linux ) <nl> - endif ( ) <nl> - <nl> - # find android SDK : search in ANDROID_SDK first <nl> - find_host_program ( ANDROID_EXECUTABLE <nl> - NAMES android . bat android <nl> - PATH_SUFFIXES tools <nl> - PATHS <nl> - ENV ANDROID_SDK <nl> - DOC " Android SDK location " <nl> - NO_DEFAULT_PATH <nl> - ) <nl> - <nl> - # Now search default paths <nl> find_host_program ( ANDROID_EXECUTABLE <nl> NAMES android . bat android <nl> - PATH_SUFFIXES android - sdk - $ { ANDROID_SDK_OS } / tools <nl> - android - sdk - $ { ANDROID_SDK_OS } _x86 / tools <nl> - android - sdk - $ { ANDROID_SDK_OS } _86 / tools <nl> - android - sdk / tools <nl> - PATHS / opt <nl> - " $ { HOME_ENV_PATH } / NVPACK " <nl> - " $ ENV { SystemDrive } / NVPACK " <nl> - " $ { ProgramFiles_ENV_PATH } / Android " <nl> - DOC " Android SDK location " <nl> - ) <nl> - <nl> - if ( ANDROID_EXECUTABLE ) <nl> - if ( NOT ANDROID_SDK_DETECT_QUIET ) <nl> - message ( STATUS " Found android tool : $ { ANDROID_EXECUTABLE } " ) <nl> - endif ( ) <nl> - <nl> - get_filename_component ( ANDROID_SDK_TOOLS_PATH " $ { ANDROID_EXECUTABLE } " PATH ) <nl> - <nl> - # read source . properties <nl> - if ( EXISTS " $ { ANDROID_SDK_TOOLS_PATH } / source . properties " ) <nl> - file ( STRINGS " $ { ANDROID_SDK_TOOLS_PATH } / source . properties " ANDROID_SDK_TOOLS_SOURCE_PROPERTIES_LINES REGEX " ^ [ ] * [ ^ # ] . * $ " ) <nl> - foreach ( line $ { ANDROID_SDK_TOOLS_SOURCE_PROPERTIES_LINES } ) <nl> - string ( REPLACE " \ \ : " " : " line $ { line } ) <nl> - string ( REPLACE " = " " ; " line $ { line } ) <nl> - list ( GET line 0 line_name ) <nl> - list ( GET line 1 line_value ) <nl> - string ( REPLACE " . " " _ " line_name $ { line_name } ) <nl> - SET ( ANDROID_TOOLS_ $ { line_name } " $ { line_value } " CACHE INTERNAL " from $ { ANDROID_SDK_TOOLS_PATH } / source . properties " ) <nl> - MARK_AS_ADVANCED ( ANDROID_TOOLS_ $ { line_name } ) <nl> - endforeach ( ) <nl> - endif ( ) <nl> - <nl> - # fix missing revision ( SDK tools before r9 don ' t set revision number correctly ) <nl> - if ( NOT ANDROID_TOOLS_Pkg_Revision ) <nl> - SET ( ANDROID_TOOLS_Pkg_Revision " Unknown " CACHE INTERNAL " " ) <nl> - MARK_AS_ADVANCED ( ANDROID_TOOLS_Pkg_Revision ) <nl> - endif ( ) <nl> - <nl> - # fix missing description <nl> - if ( NOT ANDROID_TOOLS_Pkg_Desc ) <nl> - SET ( ANDROID_TOOLS_Pkg_Desc " Android SDK Tools , revision $ { ANDROID_TOOLS_Pkg_Revision } . " CACHE INTERNAL " " ) <nl> - MARK_AS_ADVANCED ( ANDROID_TOOLS_Pkg_Desc ) <nl> - endif ( ) <nl> + PATHS " $ { ANDROID_SDK_TOOLS } " <nl> + DOC " Android ' android ' tool location " <nl> + ) <nl> <nl> - # warn about outdated SDK <nl> - if ( NOT ANDROID_TOOLS_Pkg_Revision GREATER 13 ) <nl> - SET ( ANDROID_TOOLS_Pkg_Desc " $ { ANDROID_TOOLS_Pkg_Desc } It is recommended to update your SDK tools to revision 14 or newer . " CACHE INTERNAL " " ) <nl> - endif ( ) <nl> + if ( NOT ANDROID_EXECUTABLE ) <nl> + message ( FATAL_ERROR " Android SDK Tools : Can ' t find ' android ' tool " ) <nl> + elseif ( NOT ANDROID_SDK_DETECT_QUIET ) <nl> + message ( STATUS " Android SDK Tools : Found ' android ' tool : $ { ANDROID_EXECUTABLE } " ) <nl> + endif ( ) <nl> <nl> - if ( ANDROID_TOOLS_Pkg_Revision GREATER 13 ) <nl> - SET ( ANDROID_PROJECT_PROPERTIES_FILE project . properties ) <nl> - SET ( ANDROID_ANT_PROPERTIES_FILE ant . properties ) <nl> - else ( ) <nl> - SET ( ANDROID_PROJECT_PROPERTIES_FILE default . properties ) <nl> - SET ( ANDROID_ANT_PROPERTIES_FILE build . properties ) <nl> - endif ( ) <nl> + set ( ANDROID_PROJECT_PROPERTIES_FILE project . properties ) <nl> + set ( ANDROID_ANT_PROPERTIES_FILE ant . properties ) <nl> <nl> - set ( ANDROID_MANIFEST_FILE AndroidManifest . xml ) <nl> - set ( ANDROID_LIB_PROJECT_FILES build . xml local . properties proguard - project . txt $ { ANDROID_PROJECT_PROPERTIES_FILE } ) <nl> - set ( ANDROID_PROJECT_FILES $ { ANDROID_LIB_PROJECT_FILES } ) <nl> - <nl> - # get installed targets <nl> - if ( ANDROID_TOOLS_Pkg_Revision GREATER 11 ) <nl> - execute_process ( COMMAND $ { ANDROID_EXECUTABLE } list target - c <nl> - RESULT_VARIABLE ANDROID_PROCESS <nl> - OUTPUT_VARIABLE ANDROID_SDK_TARGETS <nl> - ERROR_VARIABLE ANDROID_PROCESS_ERRORS <nl> - OUTPUT_STRIP_TRAILING_WHITESPACE <nl> - ) <nl> - string ( REGEX MATCHALL " [ ^ \ n ] + " ANDROID_SDK_TARGETS " $ { ANDROID_SDK_TARGETS } " ) <nl> - else ( ) <nl> - # old SDKs ( r11 and older ) don ' t provide compact list <nl> - execute_process ( COMMAND $ { ANDROID_EXECUTABLE } list target <nl> - RESULT_VARIABLE ANDROID_PROCESS <nl> - OUTPUT_VARIABLE ANDROID_SDK_TARGETS_FULL <nl> - ERROR_VARIABLE ANDROID_PROCESS_ERRORS <nl> - OUTPUT_STRIP_TRAILING_WHITESPACE <nl> - ) <nl> - string ( REGEX MATCHALL " ( ^ | \ n ) id : [ 0 - 9 ] + or \ " ( [ ^ \ n ] + [ 0 - 9 + ] ) \ " ( \ n | $ ) " ANDROID_SDK_TARGETS_FULL " $ { ANDROID_SDK_TARGETS_FULL } " ) <nl> - <nl> - SET ( ANDROID_SDK_TARGETS " " ) <nl> - if ( ANDROID_PROCESS EQUAL 0 ) <nl> - foreach ( line $ { ANDROID_SDK_TARGETS_FULL } ) <nl> - string ( REGEX REPLACE " ( ^ | \ n ) id : [ 0 - 9 ] + or \ " ( [ ^ \ n ] + [ 0 - 9 + ] ) \ " ( \ n | $ ) " " \ \ 2 " line " $ { line } " ) <nl> - list ( APPEND ANDROID_SDK_TARGETS " $ { line } " ) <nl> - endforeach ( ) <nl> - endif ( ) <nl> - endif ( ) <nl> + set ( ANDROID_MANIFEST_FILE AndroidManifest . xml ) <nl> + set ( ANDROID_LIB_PROJECT_FILES build . xml local . properties proguard - project . txt $ { ANDROID_PROJECT_PROPERTIES_FILE } ) <nl> + set ( ANDROID_PROJECT_FILES $ { ANDROID_LIB_PROJECT_FILES } ) <nl> <nl> - if ( NOT ANDROID_PROCESS EQUAL 0 ) <nl> - message ( ERROR " Failed to get list of installed Android targets . " ) <nl> - set ( ANDROID_EXECUTABLE " ANDROID_EXECUTABLE - NOTFOUND " ) <nl> - endif ( ) <nl> + execute_process ( COMMAND $ { ANDROID_EXECUTABLE } list target - c <nl> + RESULT_VARIABLE ANDROID_PROCESS <nl> + OUTPUT_VARIABLE ANDROID_SDK_TARGETS <nl> + ERROR_VARIABLE ANDROID_PROCESS_ERRORS <nl> + OUTPUT_STRIP_TRAILING_WHITESPACE <nl> + ) <nl> + if ( NOT ANDROID_PROCESS EQUAL 0 ) <nl> + set ( ANDROID_EXECUTABLE " ANDROID_EXECUTABLE - NOTFOUND " CACHE INTERNAL ) <nl> + message ( FATAL_ERROR " Android : Failed to get list of installed Android targets . " ) <nl> + endif ( ) <nl> + string ( REGEX MATCHALL " [ ^ \ n ] + " ANDROID_SDK_TARGETS " $ { ANDROID_SDK_TARGETS } " ) <nl> <nl> - # clear ANDROID_SDK_TARGET if no target is provided by user <nl> - if ( NOT ANDROID_SDK_TARGET ) <nl> - set ( ANDROID_SDK_TARGET " " CACHE STRING " Android SDK target for the OpenCV Java API and samples " ) <nl> - endif ( ) <nl> - if ( ANDROID_SDK_TARGETS ) <nl> - set_property ( CACHE ANDROID_SDK_TARGET PROPERTY STRINGS $ { ANDROID_SDK_TARGETS } ) <nl> - endif ( ) <nl> - endif ( ANDROID_EXECUTABLE ) <nl> + # clear ANDROID_SDK_TARGET if no target is provided by user <nl> + if ( NOT ANDROID_SDK_TARGET ) <nl> + set ( ANDROID_SDK_TARGET " " CACHE STRING " Android SDK target for the OpenCV Java API and samples " ) <nl> + endif ( ) <nl> + if ( ANDROID_SDK_TARGETS ) <nl> + message ( STATUS " Android SDK Tools : Available targets : $ { ANDROID_SDK_TARGETS } " ) <nl> + set_property ( CACHE ANDROID_SDK_TARGET PROPERTY STRINGS $ { ANDROID_SDK_TARGETS } ) <nl> + else ( ) <nl> + message ( FATAL_ERROR " Android : List of installed Android targets is empty " ) <nl> + endif ( ) <nl> <nl> # finds minimal installed SDK target compatible with provided names or API levels <nl> # usage : <nl> new file mode 100644 <nl> index 00000000000 . . 1ca752f8b25 <nl> mmm / dev / null <nl> ppp b / cmake / android / android_gradle_projects . cmake <nl> <nl> + message ( FATAL_ERROR " <nl> + Android gradle - based build / projects are not supported in this version of OpenCV . <nl> + You need to downgrade Android SDK Tools to version 25 . 2 . 5 . <nl> + Details : https : / / github . com / opencv / opencv / issues / 8460 <nl> + " ) <nl> mmm a / modules / java / android_sdk / CMakeLists . txt <nl> ppp b / modules / java / android_sdk / CMakeLists . txt <nl> ocv_copyfiles_append_dir ( JAVA_SRC_COPY " $ { OPENCV_JAVA_BINDINGS_DIR } / gen / java " " $ <nl> ocv_copyfiles_append_dir ( JAVA_SRC_COPY " $ { OPENCV_JAVA_BINDINGS_DIR } / gen / android / java " " $ { java_src_dir } " ) <nl> <nl> # calc default SDK Target <nl> - android_get_compatible_target ( android_sdk_target $ { ANDROID_NATIVE_API_LEVEL } $ { ANDROID_SDK_TARGET } 14 ) <nl> - string ( REGEX REPLACE " android - " " " android_sdk_target_num $ { android_sdk_target } ) <nl> + android_get_compatible_target ( ANDROID_SDK_COMPATIBLE_TARGET $ { ANDROID_NATIVE_API_LEVEL } $ { ANDROID_SDK_TARGET } 14 ) <nl> + if ( ANDROID_SDK_COMPATIBLE_TARGET ) <nl> + set ( ANDROID_SDK_COMPATIBLE_TARGET " $ { ANDROID_SDK_COMPATIBLE_TARGET } " CACHE INTERNAL " " ) <nl> + endif ( ) <nl> + string ( REGEX REPLACE " android - " " " android_sdk_target_num $ { ANDROID_SDK_COMPATIBLE_TARGET } ) <nl> if ( ( ANDROID_SDK_TARGET AND ANDROID_SDK_TARGET LESS 21 ) OR ( android_sdk_target_num LESS 21 ) ) <nl> message ( STATUS " [ OpenCV for Android SDK ] : A new OpenGL Camera Bridge ( CameraGLSurfaceView , CameraGLRendererBase , CameraRenderer , Camera2Renderer ) is disabled , because ANDROID_SDK_TARGET ( $ { android_sdk_target_num } ) < 21 " ) <nl> else ( ) <nl> add_custom_command ( <nl> OUTPUT $ { android_sdk_project_files } " $ { OPENCV_JAVA_DIR } / $ { ANDROID_MANIFEST_FILE } " <nl> COMMAND $ { CMAKE_COMMAND } - E remove $ { android_sdk_project_files } <nl> COMMAND $ { CMAKE_COMMAND } - E copy_if_different " $ { CMAKE_CURRENT_BINARY_DIR } / $ { ANDROID_MANIFEST_FILE } " " $ { OPENCV_JAVA_DIR } / $ { ANDROID_MANIFEST_FILE } " <nl> - COMMAND $ { ANDROID_EXECUTABLE } - - silent create lib - project - - path \ " $ { OPENCV_JAVA_DIR } \ " - - target \ " $ { android_sdk_target } \ " - - name OpenCV - - package org . opencv 2 > \ " $ { CMAKE_CURRENT_BINARY_DIR } / create_lib_project . log \ " <nl> + COMMAND $ { ANDROID_EXECUTABLE } - - silent create lib - project - - path \ " $ { OPENCV_JAVA_DIR } \ " - - target \ " $ { ANDROID_SDK_COMPATIBLE_TARGET } \ " - - name OpenCV - - package org . opencv 2 > \ " $ { CMAKE_CURRENT_BINARY_DIR } / create_lib_project . log \ " <nl> COMMAND $ { CMAKE_COMMAND } - E copy_if_different " $ { CMAKE_CURRENT_BINARY_DIR } / $ { ANDROID_MANIFEST_FILE } " " $ { OPENCV_JAVA_DIR } / $ { ANDROID_MANIFEST_FILE } " <nl> WORKING_DIRECTORY " $ { OPENCV_JAVA_DIR } " <nl> MAIN_DEPENDENCY " $ { CMAKE_CURRENT_BINARY_DIR } / $ { ANDROID_MANIFEST_FILE } " <nl>
|
android : refactor Android SDK detection
|
opencv/opencv
|
6abfc6761e5a58c12ef69d7f6efca3c8a96b9184
|
2018-04-05T19:19:31Z
|
mmm a / test / lit . cfg <nl> ppp b / test / lit . cfg <nl> if hasattr ( config , ' target_swift_autolink_extract ' ) : <nl> config . substitutions . append ( ( ' % target - swift - modulewrap ' , <nl> config . target_swift_modulewrap ) ) <nl> <nl> - platform_module_dir = make_path ( test_resource_dir , ' % target - sdk - name ' , run_cpu ) <nl> + platform_module_dir = make_path ( test_resource_dir , config . target_sdk_name , run_cpu ) <nl> lit_config . note ( ' Using platform module dir : ' + platform_module_dir ) <nl> if test_sdk_overlay_dir is not None : <nl> platform_sdk_overlay_dir = make_path ( test_sdk_overlay_dir , run_cpu ) <nl>
|
Merge remote - tracking branch ' origin / master ' into master - next
|
apple/swift
|
15b1e6fdf480af8d938cef2c17c9a29f255b9dcd
|
2019-01-17T21:32:21Z
|
mmm a / examples / cpp / helloworld / greeter_async_client . cc <nl> ppp b / examples / cpp / helloworld / greeter_async_client . cc <nl> <nl> # include < string > <nl> <nl> # include < grpc + + / grpc + + . h > <nl> + # include < grpc / support / log . h > <nl> <nl> # include " helloworld . grpc . pb . h " <nl> <nl> mmm a / examples / cpp / helloworld / greeter_async_client2 . cc <nl> ppp b / examples / cpp / helloworld / greeter_async_client2 . cc <nl> <nl> # include < string > <nl> <nl> # include < grpc + + / grpc + + . h > <nl> + # include < grpc / support / log . h > <nl> # include < thread > <nl> <nl> # include " helloworld . grpc . pb . h " <nl> mmm a / examples / cpp / helloworld / greeter_async_server . cc <nl> ppp b / examples / cpp / helloworld / greeter_async_server . cc <nl> <nl> # include < thread > <nl> <nl> # include < grpc + + / grpc + + . h > <nl> + # include < grpc / support / log . h > <nl> <nl> # include " helloworld . grpc . pb . h " <nl> <nl> mmm a / src / core / ext / lb_policy / grpclb / proto / grpc / lb / v1 / load_balancer . pb . c <nl> ppp b / src / core / ext / lb_policy / grpclb / proto / grpc / lb / v1 / load_balancer . pb . c <nl> const pb_field_t grpc_lb_v1_LoadBalanceResponse_fields [ 3 ] = { <nl> <nl> const pb_field_t grpc_lb_v1_InitialLoadBalanceResponse_fields [ 3 ] = { <nl> PB_FIELD ( 1 , STRING , OPTIONAL , STATIC , FIRST , grpc_lb_v1_InitialLoadBalanceResponse , load_balancer_delegate , load_balancer_delegate , 0 ) , <nl> - PB_FIELD ( 3 , MESSAGE , OPTIONAL , STATIC , OTHER , grpc_lb_v1_InitialLoadBalanceResponse , client_stats_report_interval , load_balancer_delegate , & grpc_lb_v1_Duration_fields ) , <nl> + PB_FIELD ( 2 , MESSAGE , OPTIONAL , STATIC , OTHER , grpc_lb_v1_InitialLoadBalanceResponse , client_stats_report_interval , load_balancer_delegate , & grpc_lb_v1_Duration_fields ) , <nl> PB_LAST_FIELD <nl> } ; <nl> <nl> mmm a / src / core / ext / lb_policy / grpclb / proto / grpc / lb / v1 / load_balancer . pb . h <nl> ppp b / src / core / ext / lb_policy / grpclb / proto / grpc / lb / v1 / load_balancer . pb . h <nl> typedef struct _grpc_lb_v1_LoadBalanceResponse { <nl> # define grpc_lb_v1_Server_load_balance_token_tag 3 <nl> # define grpc_lb_v1_Server_drop_request_tag 4 <nl> # define grpc_lb_v1_InitialLoadBalanceResponse_load_balancer_delegate_tag 1 <nl> - # define grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval_tag 3 <nl> + # define grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval_tag 2 <nl> # define grpc_lb_v1_LoadBalanceRequest_initial_request_tag 1 <nl> # define grpc_lb_v1_LoadBalanceRequest_client_stats_tag 2 <nl> # define grpc_lb_v1_ServerList_servers_tag 1 <nl> mmm a / src / proto / grpc / lb / v1 / load_balancer . proto <nl> ppp b / src / proto / grpc / lb / v1 / load_balancer . proto <nl> message InitialLoadBalanceResponse { <nl> / / This interval defines how often the client should send the client stats <nl> / / to the load balancer . Stats should only be reported when the duration is <nl> / / positive . <nl> - Duration client_stats_report_interval = 3 ; <nl> + Duration client_stats_report_interval = 2 ; <nl> } <nl> <nl> message ServerList { <nl>
|
Merge github . com : grpc / grpc into direct - calls
|
grpc/grpc
|
ab43cd9790fce92883da268d53a83473b7baef31
|
2016-09-16T18:08:20Z
|
mmm a / src / CMakeLists . txt <nl> ppp b / src / CMakeLists . txt <nl> else ( ) <nl> - Wmissing - declarations <nl> - Wno - attributes <nl> - Wno - unused - parameter <nl> - - fconcepts <nl> ) <nl> <nl> + # TODO : Remove when we update to a GCC compiler that enables this <nl> + # by default ( i . e . GCC 10 or newer ) . <nl> + if ( CMAKE_CXX_COMPILER_ID STREQUAL GNU ) <nl> + add_compile_options ( - fconcepts ) <nl> + endif ( ) <nl> + <nl> if ( ARCHITECTURE_x86_64 ) <nl> add_compile_options ( " - mcx16 " ) <nl> endif ( ) <nl>
|
CMakeLists : Resolve
|
yuzu-emu/yuzu
|
dd2ff236217cb02275cbfa66f50c265a578d1f1e
|
2020-08-03T15:21:24Z
|
mmm a / caffe2 / operators / onnxifi_op . cc <nl> ppp b / caffe2 / operators / onnxifi_op . cc <nl> bool OnnxifiOp < float , CPUContext > : : RunOnDevice ( ) { <nl> tensor_descriptor . dataType = ONNXIFI_DATATYPE_FLOAT32 ; <nl> tensor_descriptor . memoryType = ONNXIFI_MEMORY_TYPE_CPU ; <nl> tensor_descriptor . dimensions = tensor_dims . size ( ) ; <nl> + CAFFE_ENFORCE ( <nl> + tensor_descriptor . dimensions ! = 0 , <nl> + tensor_descriptor . name , <nl> + " has 0 dim " ) ; <nl> output_shapes_ . emplace_back ( tensor_dims . cbegin ( ) , tensor_dims . cend ( ) ) ; <nl> tensor_descriptor . shape = output_shapes_ . back ( ) . data ( ) ; <nl> tensor_descriptor . buffer = <nl> mmm a / caffe2 / operators / onnxifi_op . h <nl> ppp b / caffe2 / operators / onnxifi_op . h <nl> class OnnxifiOp final : public Operator < Context > { <nl> auto weight_descs = BuildInitializationList ( <nl> & mapped_ws , & initializer_set , & weight_names , & weight_shapes ) ; <nl> <nl> - : : ONNX_NAMESPACE : : ModelProto onnx_model ; <nl> - ParseProtoFromLargeString ( onnx_model_str , & onnx_model ) ; <nl> - onnx_model_str . clear ( ) ; <nl> - onnx_model . SerializeToString ( & onnx_model_str ) ; <nl> - <nl> / / Build the Onnxifi engine <nl> / / TODO : In spec , backends are hot - pluggable , so two calls to <nl> / / onnxGetBackendIDs may result in different number of backend . And we <nl> new file mode 100644 <nl> index 000000000000 . . c1c6c310786c <nl> mmm / dev / null <nl> ppp b / caffe2 / opt / onnxifi_transformer . cc <nl> <nl> + # include " caffe2 / opt / onnxifi_transformer . h " <nl> + <nl> + # include < iostream > <nl> + # include < unordered_set > <nl> + <nl> + # include < google / protobuf / text_format . h > <nl> + <nl> + # include " caffe2 / core / context . h " <nl> + # include " caffe2 / core / logging . h " <nl> + # include " caffe2 / core / operator . h " <nl> + # include " caffe2 / core / tensor . h " <nl> + # include " caffe2 / onnx / onnx_exporter . h " <nl> + # include " caffe2 / opt / backend_cutting . h " <nl> + <nl> + namespace caffe2 { <nl> + <nl> + namespace { <nl> + <nl> + / / TODO ( yinghai ) : Remove the awkward conversion between unordered_map and map <nl> + std : : unordered_map < std : : string , TensorShape > InferShapes ( <nl> + Workspace * ws , <nl> + NetDef * pred_net , <nl> + CaffeMap < std : : string , TensorShape > * shape_hints_ordered ) { <nl> + / / Populate shapes from workplace <nl> + const std : : vector < std : : string > & ws_blobs = ws - > Blobs ( ) ; <nl> + for ( const auto & s : ws_blobs ) { <nl> + auto shape = GetTensorShapeOfBlob ( ws - > GetBlob ( s ) ) ; <nl> + if ( ! shape . unknown_shape ( ) ) { <nl> + shape_hints_ordered - > emplace ( s , std : : move ( shape ) ) ; <nl> + } <nl> + } <nl> + <nl> + std : : vector < NetDef * > nets ; <nl> + nets . emplace_back ( pred_net ) ; <nl> + InferBlobShapesAndTypes ( * shape_hints_ordered , nets ) ; <nl> + std : : unordered_map < std : : string , TensorShape > shape_hints ; <nl> + for ( const auto & kv : * shape_hints_ordered ) { <nl> + shape_hints . emplace ( kv . first , kv . second ) ; <nl> + } <nl> + <nl> + return shape_hints ; <nl> + } <nl> + <nl> + void DumpModel ( <nl> + const : : ONNX_NAMESPACE : : ModelProto & model , <nl> + const std : : string & fname ) { <nl> + std : : ofstream ff ( fname ) ; <nl> + std : : string body ; <nl> + : : google : : protobuf : : TextFormat : : PrintToString ( model . graph ( ) , & body ) ; <nl> + ff < < body < < std : : endl ; <nl> + ff . close ( ) ; <nl> + } <nl> + <nl> + std : : vector < : : ONNX_NAMESPACE : : ValueInfoProto > ConvertToValueInfo ( <nl> + const std : : vector < std : : string > & names , <nl> + const std : : unordered_map < std : : string , TensorShape > & shape_hints ) { <nl> + std : : vector < : : ONNX_NAMESPACE : : ValueInfoProto > r ; <nl> + for ( const auto & s : names ) { <nl> + r . emplace_back ( ) ; <nl> + auto & value_info = r . back ( ) ; <nl> + value_info . set_name ( s ) ; <nl> + const auto it = shape_hints . find ( s ) ; <nl> + if ( it = = shape_hints . end ( ) ) { <nl> + LOG ( WARNING ) < < " Cannot get shape of " < < s ; <nl> + } else { <nl> + auto * tensor_type = value_info . mutable_type ( ) - > mutable_tensor_type ( ) ; <nl> + tensor_type - > set_elem_type ( <nl> + : : ONNX_NAMESPACE : : TensorProto_DataType : : TensorProto_DataType_FLOAT ) ; <nl> + auto * shape = tensor_type - > mutable_shape ( ) ; <nl> + for ( int i = 0 ; i < it - > second . dims ( ) . size ( ) ; + + i ) { <nl> + shape - > add_dim ( ) - > set_dim_value ( it - > second . dims ( i ) ) ; <nl> + } <nl> + } <nl> + } <nl> + return r ; <nl> + } <nl> + <nl> + void FillModelInfo ( : : ONNX_NAMESPACE : : ModelProto * model ) { <nl> + model - > set_ir_version ( : : ONNX_NAMESPACE : : Version : : IR_VERSION ) ; <nl> + model - > set_producer_name ( " caffe2 " ) ; <nl> + auto * opset_id = model - > add_opset_import ( ) ; <nl> + opset_id - > set_domain ( " " ) ; <nl> + opset_id - > set_version ( 3 ) ; <nl> + } <nl> + } / / namespace <nl> + <nl> + OnnxifiTransformer : : OnnxifiTransformer ( bool debug ) : debug_ ( debug ) { <nl> + lib_ = onnx : : initOnnxifiLibrary ( ) ; <nl> + CAFFE_ENFORCE ( lib_ , " Cannot initialize ONNXIFI library " ) ; <nl> + CAFFE_ENFORCE_EQ ( <nl> + lib_ - > onnxGetBackendIDs ( nullptr , & num_backends_ ) , <nl> + ONNXIFI_STATUS_FALLBACK ) ; <nl> + CAFFE_ENFORCE_GT ( <nl> + num_backends_ , 0 , " At least 1 onnxifi backend should be available " ) ; <nl> + backend_ids_ . resize ( num_backends_ ) ; <nl> + CAFFE_ENFORCE_EQ ( <nl> + lib_ - > onnxGetBackendIDs ( backend_ids_ . data ( ) , & num_backends_ ) , <nl> + ONNXIFI_STATUS_SUCCESS ) ; <nl> + } <nl> + <nl> + OperatorDef OnnxifiTransformer : : BuildOnnxifiOp ( <nl> + const std : : string & onnx_model_str , <nl> + const std : : unordered_map < std : : string , std : : vector < int > > & output_size_hints , <nl> + const std : : unordered_set < std : : string > & initialization_list , <nl> + const caffe2 : : NetDef & net ) { <nl> + OperatorDef op ; <nl> + op . set_type ( " Onnxifi " ) ; <nl> + auto * onnx_model_arg = op . add_arg ( ) ; <nl> + onnx_model_arg - > set_name ( " onnx_model " ) ; <nl> + onnx_model_arg - > set_s ( onnx_model_str ) ; <nl> + <nl> + / / Add the names of the initializer blobs that we want to fetch from the <nl> + / / workspace later <nl> + auto * initializers_arg = op . add_arg ( ) ; <nl> + initializers_arg - > set_name ( " initializers " ) ; <nl> + for ( const auto & s : initialization_list ) { <nl> + initializers_arg - > add_strings ( s ) ; <nl> + initializers_arg - > add_strings ( input_mapping_ . at ( s ) ) ; <nl> + } <nl> + <nl> + / / Add the input / output <nl> + for ( const auto & input : net . external_input ( ) ) { <nl> + if ( ! initialization_list . count ( input ) ) { <nl> + op . add_input ( input ) ; <nl> + } <nl> + } <nl> + for ( const auto & output : net . external_output ( ) ) { <nl> + op . add_output ( output ) ; <nl> + } <nl> + <nl> + / / Add output size hints <nl> + for ( int i = 0 ; i < op . output_size ( ) ; + + i ) { <nl> + const auto & o = op . output ( i ) ; <nl> + const auto it = output_size_hints . find ( o ) ; <nl> + if ( it ! = output_size_hints . end ( ) ) { <nl> + const auto & dims = it - > second ; <nl> + auto * output_size_hint_arg = op . add_arg ( ) ; <nl> + output_size_hint_arg - > set_name ( MakeString ( " output_size_hint_ " , i ) ) ; <nl> + for ( const auto & d : dims ) { <nl> + output_size_hint_arg - > add_ints ( d ) ; <nl> + } <nl> + <nl> + VLOG ( 2 ) < < " Adding output hint : " < < o ; <nl> + } <nl> + } <nl> + return op ; <nl> + } <nl> + <nl> + NetDef OnnxifiTransformer : : SubnetToOnnxifiOp ( <nl> + const caffe2 : : NetDef & net , <nl> + Workspace * ws , <nl> + onnx : : OnnxExporter * exporter , <nl> + std : : unordered_map < std : : string , TensorShape > * shape_hints ) { <nl> + : : ONNX_NAMESPACE : : ModelProto onnx_model ; <nl> + FillModelInfo ( & onnx_model ) ; <nl> + <nl> + / / Convert c2 ops to onnx ops , add const weights if there are any <nl> + DeviceOption option ; <nl> + CPUContext context ( option ) ; <nl> + context . SwitchToDevice ( ) ; <nl> + for ( const auto & op : net . op ( ) ) { <nl> + const auto results = exporter - > Caffe2OpToOnnxNodes ( op , * shape_hints ) ; <nl> + for ( const auto & n : results . first ) { <nl> + onnx_model . mutable_graph ( ) - > add_node ( ) - > CopyFrom ( n ) ; <nl> + } <nl> + for ( const auto & t : results . second ) { <nl> + VLOG ( 2 ) < < " Adding extra init tensor : " < < t . name ( ) ; <nl> + CAFFE_ENFORCE_EQ ( <nl> + t . data_type ( ) , <nl> + : : ONNX_NAMESPACE : : TensorProto : : FLOAT , <nl> + " Only supports conversion of float type for now " ) ; <nl> + TensorShape shape ; <nl> + shape . mutable_dims ( ) - > CopyFrom ( t . dims ( ) ) ; <nl> + shape_hints - > emplace ( t . name ( ) , std : : move ( shape ) ) ; <nl> + <nl> + / / Feed into workspace as CPU Tensors <nl> + auto * blob = ws - > CreateBlob ( t . name ( ) ) ; <nl> + auto * cpu_tensor = blob - > GetMutable < TensorCPU > ( ) ; <nl> + std : : vector < TIndex > dims ; <nl> + std : : copy ( t . dims ( ) . begin ( ) , t . dims ( ) . end ( ) , dims . begin ( ) ) ; <nl> + cpu_tensor - > Resize ( dims ) ; <nl> + context . template CopyBytes < CPUContext , CPUContext > ( <nl> + cpu_tensor - > size ( ) * sizeof ( float ) , <nl> + static_cast < const void * > ( t . raw_data ( ) . data ( ) ) , <nl> + cpu_tensor - > raw_mutable_data ( TypeMeta : : Make < float > ( ) ) ) ; <nl> + context . FinishDeviceComputation ( ) ; <nl> + <nl> + / / Add mappings <nl> + CAFFE_ENFORCE ( <nl> + input_mapping_ . emplace ( t . name ( ) , t . name ( ) ) . second , <nl> + MakeString ( " Tensor " , t . name ( ) , " already exists in the workspace " ) ) ; <nl> + } <nl> + } <nl> + <nl> + / / Convert outputs and compute output shape hints <nl> + std : : vector < std : : string > io_names ; <nl> + for ( const auto & output : net . external_output ( ) ) { <nl> + io_names . emplace_back ( output ) ; <nl> + } <nl> + auto io_vec = ConvertToValueInfo ( io_names , * shape_hints ) ; <nl> + std : : unordered_map < std : : string , std : : vector < int > > output_shape_hints ; <nl> + for ( const auto & i : io_vec ) { <nl> + onnx_model . mutable_graph ( ) - > add_output ( ) - > CopyFrom ( i ) ; <nl> + auto ret = output_shape_hints . emplace ( i . name ( ) , std : : vector < int > ( ) ) ; <nl> + auto & vec = ret . first - > second ; <nl> + const auto it = shape_hints - > find ( i . name ( ) ) ; <nl> + CAFFE_ENFORCE ( <nl> + it ! = shape_hints - > end ( ) , <nl> + " Cannot find shape info for output " , <nl> + i . name ( ) ) ; <nl> + const auto & shape = it - > second ; <nl> + for ( int k = 0 ; k < shape . dims ( ) . size ( ) ; + + k ) { <nl> + vec . push_back ( shape . dims ( k ) ) ; <nl> + } <nl> + } <nl> + <nl> + / / Convert inputs and figure out weights <nl> + std : : unordered_set < std : : string > weights ; <nl> + const std : : vector < string > & ws_blobs = ws - > Blobs ( ) ; <nl> + for ( const auto & s : ws_blobs ) { <nl> + VLOG ( 2 ) < < " Add weights : " < < s ; <nl> + weights . emplace ( s ) ; <nl> + } <nl> + <nl> + std : : unordered_set < std : : string > total_inputs ; <nl> + std : : unordered_set < std : : string > initialization_list ; <nl> + std : : vector < std : : string > total_inputs_vec ; <nl> + <nl> + / / Extra intermediate weights created during conversion <nl> + for ( const auto & extra_weight : onnx_model . graph ( ) . initializer ( ) ) { <nl> + if ( total_inputs . emplace ( extra_weight . name ( ) ) . second ) { <nl> + total_inputs_vec . emplace_back ( extra_weight . name ( ) ) ; <nl> + } <nl> + } <nl> + / / Boundary inputs , should not be weights <nl> + std : : unordered_set < std : : string > boundary_inputs ; <nl> + for ( const auto & i : net . external_input ( ) ) { <nl> + boundary_inputs . emplace ( i ) ; <nl> + } <nl> + <nl> + for ( const auto & op : net . op ( ) ) { <nl> + for ( const auto & input : op . input ( ) ) { <nl> + if ( total_inputs . emplace ( input ) . second & & weights . count ( input ) ) { <nl> + / / We add weights as inputs too <nl> + total_inputs_vec . emplace_back ( input ) ; <nl> + initialization_list . emplace ( input ) ; <nl> + VLOG ( 2 ) < < " Add input weights : " < < input ; <nl> + } else if ( boundary_inputs . count ( input ) ) { <nl> + VLOG ( 2 ) < < " Adding boundary input : " < < input ; <nl> + total_inputs_vec . emplace_back ( input ) ; <nl> + } <nl> + } <nl> + } <nl> + io_vec = ConvertToValueInfo ( total_inputs_vec , * shape_hints ) ; <nl> + for ( const auto & i : io_vec ) { <nl> + onnx_model . mutable_graph ( ) - > add_input ( ) - > CopyFrom ( i ) ; <nl> + } <nl> + <nl> + / / Debugging stuff <nl> + if ( debug_ ) { <nl> + DumpModel ( onnx_model , " debug . onnxtxt " ) ; <nl> + } <nl> + <nl> + / / Onnx model is ready . Build ONNXIFI Op <nl> + std : : string model_str ; <nl> + onnx_model . SerializeToString ( & model_str ) ; <nl> + NetDef net_opt ; <nl> + auto * op = net_opt . add_op ( ) ; <nl> + * op = BuildOnnxifiOp ( model_str , output_shape_hints , initialization_list , net ) ; <nl> + for ( const auto & i : op - > input ( ) ) { <nl> + net_opt . add_external_input ( i ) ; <nl> + } <nl> + for ( const auto & i : op - > output ( ) ) { <nl> + net_opt . add_external_output ( i ) ; <nl> + } <nl> + <nl> + return net_opt ; <nl> + } <nl> + <nl> + CaffeMap < std : : string , TensorShape > OnnxifiTransformer : : SsaRewriteAndMapNames ( <nl> + Workspace * ws , <nl> + NetDef * pred_net , <nl> + const std : : unordered_map < std : : string , TensorShape > & input_shape_hints ) { <nl> + input_mapping_ = onnx : : SsaRewrite ( nullptr , pred_net ) ; <nl> + std : : unordered_map < std : : string , std : : string > input_reverse_mapping ; <nl> + std : : vector < std : : string > external_inputs ; <nl> + for ( const auto kv : input_mapping_ ) { <nl> + input_reverse_mapping . emplace ( kv . second , kv . first ) ; <nl> + if ( ! ws - > HasBlob ( kv . second ) ) { <nl> + external_inputs . emplace_back ( kv . first ) ; <nl> + } <nl> + } <nl> + for ( const auto & i : external_inputs ) { <nl> + input_mapping_ . erase ( i ) ; <nl> + } <nl> + CaffeMap < std : : string , TensorShape > shape_hints_ordered ; <nl> + for ( const auto & kv : input_shape_hints ) { <nl> + const auto it = input_reverse_mapping . find ( kv . first ) ; <nl> + if ( it ! = input_reverse_mapping . end ( ) ) { <nl> + LOG ( INFO ) < < " Adding input hint : " < < it - > second ; <nl> + shape_hints_ordered . emplace ( it - > second , kv . second ) ; <nl> + } else { <nl> + shape_hints_ordered . emplace ( kv . first , kv . second ) ; <nl> + } <nl> + } <nl> + return shape_hints_ordered ; <nl> + } <nl> + <nl> + / / Cutting off the runnable part and replace with ONNXIFI ops . Asssume the nets <nl> + / / were topologically sorted <nl> + void OnnxifiTransformer : : Transform ( <nl> + Workspace * ws , <nl> + NetDef * pred_net , <nl> + const std : : unordered_map < std : : string , TensorShape > & input_shape_hints ) { <nl> + CAFFE_ENFORCE ( ws ) ; <nl> + auto shape_hints_ordered = <nl> + SsaRewriteAndMapNames ( ws , pred_net , input_shape_hints ) ; <nl> + Workspace mapped_ws ( ws , input_mapping_ ) ; <nl> + auto shape_hints = InferShapes ( & mapped_ws , pred_net , & shape_hints_ordered ) ; <nl> + <nl> + CAFFE_ENFORCE ( pred_net , " Predict net cannot be nullptr " ) ; <nl> + onnx : : OnnxExporter exporter ( nullptr , true ) ; <nl> + <nl> + / / function to tell whether the ONNXIFI backend supports a given C2 op or not <nl> + / / TODO : choose backend id <nl> + auto supports = <nl> + [ & exporter , & shape_hints , backend = lib_ , backend_id = backend_ids_ [ 0 ] ] ( <nl> + const caffe2 : : OperatorDef & op ) { <nl> + const OpSchema * schema = OpSchemaRegistry : : Schema ( op . type ( ) ) ; <nl> + / / NB : this might not be a hard constraint as we can just export C2 <nl> + / / domain specific ops to ONNX <nl> + if ( ! schema | | schema - > onnx_schema ( ) . empty ( ) ) { <nl> + LOG ( INFO ) < < " Cannot export c2 op " < < op . type ( ) <nl> + < < " to onnx as there is no corresponding ONNX schema . " ; <nl> + return false ; <nl> + } <nl> + <nl> + : : ONNX_NAMESPACE : : ModelProto onnx_model ; <nl> + FillModelInfo ( & onnx_model ) ; <nl> + auto results = exporter . Caffe2OpToOnnxNodes ( op , shape_hints ) ; <nl> + for ( const auto & n : results . first ) { <nl> + onnx_model . mutable_graph ( ) - > add_node ( ) - > CopyFrom ( n ) ; <nl> + } <nl> + std : : string onnx_model_str ; <nl> + onnx_model . SerializeToString ( & onnx_model_str ) ; <nl> + auto ret = backend - > onnxGetBackendCompatibility ( <nl> + backend_id , onnx_model_str . size ( ) , onnx_model_str . c_str ( ) ) ; <nl> + if ( ret ! = ONNXIFI_STATUS_SUCCESS ) { <nl> + LOG ( INFO ) < < " Don ' t support onnx for " < < op . type ( ) < < " c2 op ( " <nl> + < < ret < < " ) " ; <nl> + return false ; <nl> + } else { <nl> + return true ; <nl> + } <nl> + } ; <nl> + <nl> + / / function to convert runnbale subgraph into a trt op . Note that to keep the <nl> + / / interface clean , we do the double conversion from C2 op to Onnx ops here <nl> + / / but it should be OK as the cost is really small . We also need to keep the <nl> + / / same exporter throughout the process to avoid duplicated dummy name <nl> + / / generation <nl> + onnx : : OnnxExporter exporter2 ( nullptr , true ) ; <nl> + auto trt_converter = [ this , & mapped_ws , & shape_hints , & exporter2 ] ( <nl> + const caffe2 : : NetDef & net ) mutable { <nl> + return SubnetToOnnxifiOp ( net , & mapped_ws , & exporter2 , & shape_hints ) ; <nl> + } ; <nl> + <nl> + NetDef net_opt = opt : : OptimizeForBackend ( * pred_net , supports , trt_converter ) ; <nl> + <nl> + / / Need to figure out a proper place to handle device option <nl> + net_opt . mutable_device_option ( ) - > CopyFrom ( pred_net - > device_option ( ) ) ; <nl> + pred_net - > Swap ( & net_opt ) ; <nl> + } <nl> + <nl> + } / / namespace caffe2 <nl> new file mode 100644 <nl> index 000000000000 . . 197a026e3a8b <nl> mmm / dev / null <nl> ppp b / caffe2 / opt / onnxifi_transformer . h <nl> <nl> + # pragma once <nl> + <nl> + # include < cstdint > <nl> + # include < string > <nl> + # include < unordered_map > <nl> + # include < vector > <nl> + <nl> + # include " onnx / onnx_pb . h " <nl> + <nl> + # include " caffe2 / core / common . h " <nl> + # include " caffe2 / core / operator . h " <nl> + # include " caffe2 / core / workspace . h " <nl> + # include " caffe2 / onnx / onnxifi_init . h " <nl> + # include " caffe2 / proto / caffe2 . pb . h " <nl> + <nl> + namespace caffe2 { <nl> + namespace onnx { <nl> + class OnnxExporter ; <nl> + } <nl> + <nl> + class OnnxifiTransformer { <nl> + public : <nl> + explicit OnnxifiTransformer ( bool debug ) ; <nl> + <nl> + void Transform ( <nl> + Workspace * ws , <nl> + NetDef * pred_net , <nl> + const std : : unordered_map < std : : string , TensorShape > & shape_hints ) ; <nl> + <nl> + private : <nl> + caffe2 : : NetDef SubnetToOnnxifiOp ( <nl> + const caffe2 : : NetDef & net , <nl> + Workspace * ws , <nl> + onnx : : OnnxExporter * exporter , <nl> + std : : unordered_map < std : : string , TensorShape > * shape_hints ) ; <nl> + <nl> + OperatorDef BuildOnnxifiOp ( <nl> + const std : : string & onnx_model_str , <nl> + const std : : unordered_map < std : : string , std : : vector < int > > & <nl> + output_size_hints , <nl> + const std : : unordered_set < std : : string > & initialization_list , <nl> + const caffe2 : : NetDef & net ) ; <nl> + <nl> + CaffeMap < std : : string , TensorShape > SsaRewriteAndMapNames ( <nl> + Workspace * ws , <nl> + NetDef * pred_net , <nl> + const std : : unordered_map < std : : string , TensorShape > & input_shape_hints ) ; <nl> + <nl> + / / Dump onnx model for debugging <nl> + bool debug_ { false } ; <nl> + <nl> + / / Pointer to loaded onnxifi library <nl> + onnxifi_library * lib_ { nullptr } ; <nl> + <nl> + / / Number of backends <nl> + size_t num_backends_ { 0 } ; <nl> + <nl> + / / Backned IDs <nl> + std : : vector < onnxBackendID > backend_ids_ ; <nl> + / / Input mapping <nl> + std : : unordered_map < std : : string , std : : string > input_mapping_ ; <nl> + } ; <nl> + } / / namespace caffe2 <nl> new file mode 100644 <nl> index 000000000000 . . 8a132698e76d <nl> mmm / dev / null <nl> ppp b / caffe2 / python / onnx / onnxifi . py <nl> <nl> + # # @ package onnx <nl> + # Module caffe2 . python . onnx . onnxifi <nl> + <nl> + " " " <nl> + ONNXIFI a Caffe2 net <nl> + " " " <nl> + <nl> + from __future__ import absolute_import <nl> + from __future__ import division <nl> + from __future__ import print_function <nl> + from __future__ import unicode_literals <nl> + <nl> + from caffe2 . proto import caffe2_pb2 <nl> + from caffe2 . python import core , workspace <nl> + import caffe2 . python . _import_c_extension as C <nl> + import numpy as np <nl> + <nl> + <nl> + def _infer_shapes ( pred_net , inputs ) : <nl> + workspace . RunNetOnce ( pred_net ) <nl> + hints = { } <nl> + for op in pred_net . op : <nl> + for o in op . output : <nl> + if o not in hints : <nl> + blob = workspace . FetchBlob ( o ) <nl> + if hasattr ( blob , ' shape ' ) : <nl> + hints [ o ] = blob . shape <nl> + for i in op . input : <nl> + if i not in hints : <nl> + blob = workspace . FetchBlob ( i ) <nl> + if hasattr ( blob , ' shape ' ) : <nl> + hints [ i ] = blob . shape <nl> + <nl> + return hints <nl> + <nl> + <nl> + def onnxifi_caffe2_net ( <nl> + pred_net , <nl> + input_shapes , <nl> + populate_shapes = False , <nl> + debug = False ) : <nl> + " " " <nl> + Transfrom the caffe2_net by collapsing ONNXIFI - runnable nodes into Onnxifi c2 ops <nl> + " " " <nl> + # Hacky way to infer shapes as not all our operators have shape inference function . <nl> + # Normally this is not needed <nl> + shape_hints = { } <nl> + if populate_shapes : <nl> + input_data = { } <nl> + for k , v in input_shapes . items ( ) : <nl> + input_data [ k ] = np . random . randn ( * v ) . astype ( np . float32 ) <nl> + shape_hints = _infer_shapes ( pred_net , input_data ) <nl> + <nl> + for k , v in input_shapes . items ( ) : <nl> + shape_hints [ k ] = v <nl> + pred_net_str = C . onnxifi ( pred_net . SerializeToString ( ) , <nl> + shape_hints , <nl> + debug ) <nl> + pred_net_cut = caffe2_pb2 . NetDef ( ) <nl> + pred_net_cut . ParseFromString ( pred_net_str ) <nl> + return pred_net_cut <nl> mmm a / caffe2 / python / onnx / test_onnxifi . py <nl> ppp b / caffe2 / python / onnx / test_onnxifi . py <nl> <nl> from __future__ import print_function <nl> from __future__ import unicode_literals <nl> <nl> + import json <nl> import numpy as np <nl> + import os <nl> + import time <nl> import unittest <nl> <nl> import onnx <nl> import onnx . defs <nl> + from onnx . backend . base import namedtupledict <nl> from onnx . helper import make_node , make_graph , make_tensor , make_tensor_value_info , make_model <nl> from caffe2 . proto import caffe2_pb2 <nl> from caffe2 . python import core , workspace <nl> + from caffe2 . python . models . download import downloadFromURLToFile , getURLFromName , deleteDirectory <nl> + from caffe2 . python . onnx . onnxifi import onnxifi_caffe2_net <nl> from caffe2 . python . onnx . tests . test_utils import TestCase <nl> <nl> + <nl> + def _print_net ( net ) : <nl> + for i in net . external_input : <nl> + print ( " Input : { } " . format ( i ) ) <nl> + for i in net . external_output : <nl> + print ( " Output : { } " . format ( i ) ) <nl> + for op in net . op : <nl> + print ( " Op { } " . format ( op . type ) ) <nl> + for x in op . input : <nl> + print ( " input : { } " . format ( x ) ) <nl> + for y in op . output : <nl> + print ( " output : { } " . format ( y ) ) <nl> + <nl> + <nl> class OnnxifiTest ( TestCase ) : <nl> @ unittest . skip ( " Need ONNXIFI backend support " ) <nl> def test_relu_graph ( self ) : <nl> def test_conv_graph ( self ) : <nl> np . testing . assert_almost_equal ( Y , Y_without_padding ) <nl> <nl> <nl> + class OnnxifiTransformTest ( TestCase ) : <nl> + def _model_dir ( self , model ) : <nl> + caffe2_home = os . path . expanduser ( os . getenv ( ' CAFFE2_HOME ' , ' ~ / . caffe2 ' ) ) <nl> + models_dir = os . getenv ( ' CAFFE2_MODELS ' , os . path . join ( caffe2_home , ' models ' ) ) <nl> + return os . path . join ( models_dir , model ) <nl> + <nl> + def _download ( self , model ) : <nl> + model_dir = self . _model_dir ( model ) <nl> + assert not os . path . exists ( model_dir ) <nl> + os . makedirs ( model_dir ) <nl> + for f in [ ' predict_net . pb ' , ' init_net . pb ' , ' value_info . json ' ] : <nl> + url = getURLFromName ( model , f ) <nl> + dest = os . path . join ( model_dir , f ) <nl> + try : <nl> + try : <nl> + downloadFromURLToFile ( url , dest , <nl> + show_progress = False ) <nl> + except TypeError : <nl> + # show_progress not supported prior to <nl> + # Caffe2 78c014e752a374d905ecfb465d44fa16e02a28f1 <nl> + # ( Sep 17 , 2017 ) <nl> + downloadFromURLToFile ( url , dest ) <nl> + except Exception as e : <nl> + print ( " Abort : { reason } " . format ( reason = e ) ) <nl> + print ( " Cleaning up . . . " ) <nl> + deleteDirectory ( model_dir ) <nl> + exit ( 1 ) <nl> + <nl> + # TODO : we need to modulize this function <nl> + def _get_c2_model ( self , model_name ) : <nl> + model_dir = self . _model_dir ( model_name ) <nl> + if not os . path . exists ( model_dir ) : <nl> + self . _download ( model_name ) <nl> + c2_predict_pb = os . path . join ( model_dir , ' predict_net . pb ' ) <nl> + c2_predict_net = caffe2_pb2 . NetDef ( ) <nl> + with open ( c2_predict_pb , ' rb ' ) as f : <nl> + c2_predict_net . ParseFromString ( f . read ( ) ) <nl> + c2_predict_net . name = model_name <nl> + <nl> + c2_init_pb = os . path . join ( model_dir , ' init_net . pb ' ) <nl> + c2_init_net = caffe2_pb2 . NetDef ( ) <nl> + with open ( c2_init_pb , ' rb ' ) as f : <nl> + c2_init_net . ParseFromString ( f . read ( ) ) <nl> + c2_init_net . name = model_name + ' _init ' <nl> + <nl> + value_info = json . load ( open ( os . path . join ( model_dir , ' value_info . json ' ) ) ) <nl> + return c2_init_net , c2_predict_net , value_info <nl> + <nl> + def _add_head_tail ( self , pred_net , new_head , new_tail ) : <nl> + orig_head = pred_net . external_input [ 0 ] <nl> + orig_tail = pred_net . external_output [ 0 ] <nl> + <nl> + # Add head <nl> + head = caffe2_pb2 . OperatorDef ( ) <nl> + head . type = " Copy " <nl> + head . input . append ( new_head ) <nl> + head . output . append ( orig_head ) <nl> + dummy = caffe2_pb2 . NetDef ( ) <nl> + dummy . op . extend ( pred_net . op ) <nl> + del pred_net . op [ : ] <nl> + pred_net . op . extend ( [ head ] ) <nl> + pred_net . op . extend ( dummy . op ) <nl> + pred_net . external_input [ 0 ] = new_head <nl> + <nl> + # Add tail <nl> + tail = caffe2_pb2 . OperatorDef ( ) <nl> + tail . type = " Copy " <nl> + tail . input . append ( orig_tail ) <nl> + tail . output . append ( new_tail ) <nl> + pred_net . op . extend ( [ tail ] ) <nl> + pred_net . external_output [ 0 ] = new_tail <nl> + <nl> + @ unittest . skip ( " Need ONNXIFI backend support " ) <nl> + def test_resnet50_core ( self ) : <nl> + N = 1 <nl> + repeat = 1 <nl> + print ( " Batch size : { } , repeat inference { } times " . format ( N , repeat ) ) <nl> + init_net , pred_net , _ = self . _get_c2_model ( ' resnet50 ' ) <nl> + self . _add_head_tail ( pred_net , ' real_data ' , ' real_softmax ' ) <nl> + input_blob_dims = ( N , 3 , 224 , 224 ) <nl> + input_name = " real_data " <nl> + <nl> + device_option = core . DeviceOption ( caffe2_pb2 . CPU , 0 ) <nl> + init_net . device_option . CopyFrom ( device_option ) <nl> + pred_net . device_option . CopyFrom ( device_option ) <nl> + for op in pred_net . op : <nl> + op . device_option . CopyFrom ( device_option ) <nl> + net_outputs = pred_net . external_output <nl> + Y_c2 = None <nl> + data = np . random . randn ( * input_blob_dims ) . astype ( np . float32 ) <nl> + c2_time = 1 <nl> + workspace . SwitchWorkspace ( " onnxifi_test " , True ) <nl> + with core . DeviceScope ( device_option ) : <nl> + workspace . FeedBlob ( input_name , data ) <nl> + workspace . RunNetOnce ( init_net ) <nl> + workspace . CreateNet ( pred_net ) <nl> + start = time . time ( ) <nl> + for _ in range ( repeat ) : <nl> + workspace . RunNet ( pred_net . name ) <nl> + end = time . time ( ) <nl> + c2_time = end - start <nl> + output_values = [ workspace . FetchBlob ( name ) for name in net_outputs ] <nl> + Y_c2 = namedtupledict ( ' Outputs ' , net_outputs ) ( * output_values ) <nl> + workspace . ResetWorkspace ( ) <nl> + <nl> + # Fill the workspace with the weights <nl> + with core . DeviceScope ( device_option ) : <nl> + workspace . RunNetOnce ( init_net ) <nl> + <nl> + # Cut the graph <nl> + start = time . time ( ) <nl> + pred_net_cut = onnxifi_caffe2_net ( pred_net , <nl> + { input_name : input_blob_dims } ) <nl> + del init_net , pred_net <nl> + # _print_net ( pred_net_cut ) <nl> + <nl> + Y_trt = None <nl> + input_name = pred_net_cut . external_input [ 0 ] <nl> + print ( " C2 runtime : { } s " . format ( c2_time ) ) <nl> + with core . DeviceScope ( device_option ) : <nl> + workspace . FeedBlob ( input_name , data ) <nl> + workspace . CreateNet ( pred_net_cut ) <nl> + end = time . time ( ) <nl> + print ( " Conversion time : { : . 2f } s " . format ( end - start ) ) <nl> + <nl> + start = time . time ( ) <nl> + for _ in range ( repeat ) : <nl> + workspace . RunNet ( pred_net_cut . name ) <nl> + end = time . time ( ) <nl> + trt_time = end - start <nl> + print ( " Onnxifi runtime : { } s , improvement : { } % " . format ( trt_time , ( c2_time - trt_time ) / c2_time * 100 ) ) <nl> + output_values = [ workspace . FetchBlob ( name ) for name in net_outputs ] <nl> + Y_trt = namedtupledict ( ' Outputs ' , net_outputs ) ( * output_values ) <nl> + np . testing . assert_allclose ( Y_c2 , Y_trt , rtol = 1e - 3 ) <nl> + <nl> + <nl> mmm a / caffe2 / python / pybind_state . cc <nl> ppp b / caffe2 / python / pybind_state . cc <nl> <nl> # include " caffe2 / opt / converter . h " <nl> # include " caffe2 / opt / fusion . h " <nl> # include " caffe2 / opt / mobile . h " <nl> + # include " caffe2 / opt / onnxifi_transformer . h " <nl> # include " caffe2 / opt / optimize_ideep . h " <nl> # include " caffe2 / opt / passes . h " <nl> # include " caffe2 / opt / sink . h " <nl> void addGlobalMethods ( py : : module & m ) { <nl> new_proto . SerializeToString ( & out ) ; <nl> return py : : bytes ( out ) ; <nl> } ) ; <nl> + m . def ( <nl> + " onnxifi " , <nl> + [ ] ( const py : : bytes & pred_net_str , <nl> + const std : : unordered_map < std : : string , std : : vector < int > > & shapes , <nl> + bool debug_builder ) - > py : : bytes { <nl> + caffe2 : : NetDef pred_net ; <nl> + CAFFE_ENFORCE ( <nl> + ParseProtoFromLargeString ( <nl> + pred_net_str . cast < std : : string > ( ) , & pred_net ) , <nl> + " broken pred_net protobuf " ) ; <nl> + std : : unordered_map < std : : string , TensorShape > tensor_shapes ; <nl> + for ( const auto & it : shapes ) { <nl> + tensor_shapes . emplace ( <nl> + it . first , CreateTensorShape ( it . second , TensorProto : : FLOAT ) ) ; <nl> + } <nl> + OnnxifiTransformer ts ( debug_builder ) ; <nl> + ts . Transform ( GetCurrentWorkspace ( ) , & pred_net , tensor_shapes ) ; <nl> + std : : string pred_net_str2 ; <nl> + pred_net . SerializeToString ( & pred_net_str2 ) ; <nl> + return py : : bytes ( pred_net_str2 ) ; <nl> + } ) ; <nl> m . def ( <nl> " run_workspace_transform " , <nl> [ ] ( const std : : string & transform_name , py : : bytes def ) { <nl> mmm a / caffe2 / python / trt / transform . py <nl> ppp b / caffe2 / python / trt / transform . py <nl> def convert_onnx_model_to_trt_op ( onnx_model , <nl> op . ParseFromString ( trt_str ) <nl> return op <nl> <nl> - def _infer_shapes ( init_net , pred_net , inputs ) : <nl> - ws , outputs = c2_native_run_net ( init_net , pred_net , inputs ) <nl> + <nl> + # Assume the workspace is already filled with init weights <nl> + def _infer_shapes ( pred_net , inputs ) : <nl> + workspace . RunNetOnce ( pred_net ) <nl> hints = { } <nl> for op in pred_net . op : <nl> for o in op . output : <nl> if o not in hints : <nl> - blob = ws . FetchBlob ( o ) <nl> + blob = workspace . FetchBlob ( o ) <nl> if hasattr ( blob , ' shape ' ) : <nl> hints [ o ] = blob . shape <nl> for i in op . input : <nl> if i not in hints : <nl> - blob = ws . FetchBlob ( i ) <nl> + blob = workspace . FetchBlob ( i ) <nl> if hasattr ( blob , ' shape ' ) : <nl> hints [ i ] = blob . shape <nl> <nl> return hints <nl> <nl> + <nl> def transform_caffe2_net ( <nl> pred_net , <nl> input_shapes , <nl> def transform_caffe2_net ( <nl> input_data = { } <nl> for k , v in input_shapes . items ( ) : <nl> input_data [ k ] = np . random . randn ( * v ) . astype ( np . float32 ) <nl> - shape_hints = _infer_shapes ( init_net , pred_net , input_data ) <nl> + shape_hints = _infer_shapes ( pred_net , input_data ) <nl> <nl> for k , v in input_shapes . items ( ) : <nl> shape_hints [ k ] = v <nl>
|
ONNXIFI transform ( )
|
pytorch/pytorch
|
45e5c17ecfbe00708e2c61488d688b3d651ab8ca
|
2018-07-20T22:09:59Z
|
mmm a / PowerEditor / installer / nativeLang / brazilian_portuguese . xml <nl> ppp b / PowerEditor / installer / nativeLang / brazilian_portuguese . xml <nl> <nl> < ? xml version = " 1 . 0 " encoding = " Windows - 1252 " ? > <nl> < NotepadPlus > <nl> - < Native - Langue name = " Brazilian Portuguese " filename = " brazilian_portuguese . xml " > <nl> + < Native - Langue name = " Brazilian Portuguese " filename = " brazilian_portuguese . xml " > <nl> < Menu > <nl> < Main > <nl> < ! - - Main Menu Entries - - > <nl> < Entries > <nl> - < Item id = " 0 " name = " & amp ; Arquivo " / > <nl> - < Item id = " 1 " name = " & amp ; Editar " / > <nl> - < Item id = " 2 " name = " Locali & amp ; zar " / > <nl> - < Item id = " 3 " name = " & amp ; Visualizar " / > <nl> - < Item id = " 4 " name = " & amp ; Formatar " / > <nl> - < Item id = " 5 " name = " & amp ; Linguagem " / > <nl> - < Item id = " 6 " name = " Confi & amp ; gurações " / > <nl> - < Item id = " 7 " name = " & amp ; Macro " / > <nl> - < Item id = " 8 " name = " Executa & amp ; r " / > <nl> - < Item idName = " Plugins " name = " & amp ; Plugins " / > <nl> - < Item idName = " Window " name = " & amp ; Janela " / > <nl> + < Item id = " 0 " name = " & amp ; Arquivo " / > <nl> + < Item id = " 1 " name = " & amp ; Editar " / > <nl> + < Item id = " 2 " name = " Locali & amp ; zar " / > <nl> + < Item id = " 3 " name = " & amp ; Visualizar " / > <nl> + < Item id = " 4 " name = " & amp ; Formatar " / > <nl> + < Item id = " 5 " name = " & amp ; Linguagem " / > <nl> + < Item id = " 6 " name = " Confi & amp ; gurações " / > <nl> + < Item id = " 7 " name = " & amp ; Macro " / > <nl> + < Item id = " 8 " name = " Executa & amp ; r " / > <nl> + < Item idName = " Plugins " name = " & amp ; Plugins " / > <nl> + < Item idName = " Window " name = " & amp ; Janela " / > <nl> < / Entries > <nl> <nl> < ! - - Sub Menu Entries - - > <nl> < SubEntries > <nl> - < Item posX = " 1 " posY = " 9 " name = " Área de transferência " / > <nl> - < Item posX = " 1 " posY = " 10 " name = " Indentar " / > <nl> - < Item posX = " 1 " posY = " 11 " name = " Converter letras para " / > <nl> - < Item posX = " 1 " posY = " 12 " name = " Operações com linhas " / > <nl> - < Item posX = " 1 " posY = " 13 " name = " Inserir / Remover comentário " / > <nl> - < Item posX = " 1 " posY = " 14 " name = " Auto completar " / > <nl> - < Item posX = " 1 " posY = " 15 " name = " Conversão final de linha " / > <nl> - < Item posX = " 1 " posY = " 16 " name = " Operações com espaços " / > <nl> - < Item posX = " 1 " posY = " 17 " name = " Colar Especial " / > <nl> - < Item posX = " 2 " posY = " 16 " name = " Marcar todos " / > <nl> - < Item posX = " 2 " posY = " 17 " name = " Desmarcar todos " / > <nl> - < Item posX = " 2 " posY = " 18 " name = " Saltar acima " / > <nl> - < Item posX = " 2 " posY = " 19 " name = " Saltar abaixo " / > <nl> - < Item posX = " 2 " posY = " 21 " name = " Marcadores " / > <nl> - < Item posX = " 3 " posY = " 4 " name = " Mostrar símbolo " / > <nl> - < Item posX = " 3 " posY = " 5 " name = " Zoom " / > <nl> - < Item posX = " 3 " posY = " 6 " name = " Mover / Clonar documento atual " / > <nl> - < Item posX = " 3 " posY = " 16 " name = " Recolher os níveis " / > <nl> - < Item posX = " 3 " posY = " 17 " name = " Expandir os níveis " / > <nl> - < Item posX = " 3 " posY = " 21 " name = " Projeto " / > <nl> - < Item posX = " 4 " posY = " 5 " name = " Conjunto de caracteres " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 0 " name = " Árabe " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 1 " name = " Báltico " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 2 " name = " Celta " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 3 " name = " Cirílico " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 4 " name = " Europa Central " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 5 " name = " Chinês " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 6 " name = " Europa Oriental " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 7 " name = " Grego " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 8 " name = " Hebraico " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 9 " name = " Japonês " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 10 " name = " Coreano " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 11 " name = " Norte Europeu " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 12 " name = " Tailandês " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 13 " name = " Turco " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 14 " name = " Europa Ocidental " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 15 " name = " Vietnamita " / > <nl> - < Item posX = " 6 " posY = " 4 " name = " Importar " / > <nl> + < Item posX = " 1 " posY = " 9 " name = " Área de transferência " / > <nl> + < Item posX = " 1 " posY = " 10 " name = " Indentar " / > <nl> + < Item posX = " 1 " posY = " 11 " name = " Converter letras para " / > <nl> + < Item posX = " 1 " posY = " 12 " name = " Operações com linhas " / > <nl> + < Item posX = " 1 " posY = " 13 " name = " Inserir / Remover comentário " / > <nl> + < Item posX = " 1 " posY = " 14 " name = " Auto completar " / > <nl> + < Item posX = " 1 " posY = " 15 " name = " Conversão final de linha " / > <nl> + < Item posX = " 1 " posY = " 16 " name = " Operações com espaços " / > <nl> + < Item posX = " 1 " posY = " 17 " name = " Colar especial " / > <nl> + < Item posX = " 2 " posY = " 16 " name = " Marcar todos " / > <nl> + < Item posX = " 2 " posY = " 17 " name = " Desmarcar todos " / > <nl> + < Item posX = " 2 " posY = " 18 " name = " Saltar acima " / > <nl> + < Item posX = " 2 " posY = " 19 " name = " Saltar abaixo " / > <nl> + < Item posX = " 2 " posY = " 21 " name = " Marcadores " / > <nl> + < Item posX = " 3 " posY = " 4 " name = " Mostrar símbolo " / > <nl> + < Item posX = " 3 " posY = " 5 " name = " Zoom " / > <nl> + < Item posX = " 3 " posY = " 6 " name = " Mover / Clonar documento atual " / > <nl> + < Item posX = " 3 " posY = " 16 " name = " Recolher os níveis " / > <nl> + < Item posX = " 3 " posY = " 17 " name = " Expandir os níveis " / > <nl> + < Item posX = " 3 " posY = " 21 " name = " Projeto " / > <nl> + < Item posX = " 4 " posY = " 5 " name = " Conjunto de caracteres " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 0 " name = " Árabe " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 1 " name = " Báltico " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 2 " name = " Celta " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 3 " name = " Cirílico " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 4 " name = " Europa Central " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 5 " name = " Chinês " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 6 " name = " Europa Oriental " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 7 " name = " Grego " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 8 " name = " Hebraico " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 9 " name = " Japonês " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 10 " name = " Coreano " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 11 " name = " Norte Europeu " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 12 " name = " Tailandês " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 13 " name = " Turco " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 14 " name = " Europa Ocidental " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 15 " name = " Vietnamita " / > <nl> + < Item posX = " 6 " posY = " 4 " name = " Importar " / > <nl> < / SubEntries > <nl> <nl> < ! - - all menu item - - > <nl> < Commands > <nl> - < Item id = " 41001 " name = " & amp ; Novo " / > <nl> - < Item id = " 41002 " name = " & amp ; Abrir " / > <nl> - < Item id = " 41003 " name = " Fechar " / > <nl> - < Item id = " 41004 " name = " F & amp ; echar todos " / > <nl> - < Item id = " 41005 " name = " Fechar todos exceto o atual " / > <nl> - < Item id = " 41006 " name = " & amp ; Salvar " / > <nl> - < Item id = " 41007 " name = " Salvar todos " / > <nl> - < Item id = " 41008 " name = " Salvar & amp ; como . . . " / > <nl> - < Item id = " 41010 " name = " Imprimir . . . " / > <nl> - < Item id = " 1001 " name = " Imprima Agora ! " / > <nl> - < Item id = " 41011 " name = " Sai & amp ; r " / > <nl> - < Item id = " 41012 " name = " Carregar sessão . . . " / > <nl> - < Item id = " 41013 " name = " Salvar sessão . . . " / > <nl> - < Item id = " 41014 " name = " Recarregar do disco " / > <nl> - < Item id = " 41015 " name = " Salvar uma cópia como . . . " / > <nl> - < Item id = " 41016 " name = " Apagar do disco " / > <nl> - < Item id = " 41017 " name = " Renomear . . . " / > <nl> - <nl> - < Item id = " 42001 " name = " Recor & amp ; tar " / > <nl> - < Item id = " 42002 " name = " & amp ; Copiar " / > <nl> - < Item id = " 42003 " name = " & amp ; Desfazer " / > <nl> - < Item id = " 42004 " name = " & amp ; Refazer " / > <nl> - < Item id = " 42005 " name = " C & amp ; olar " / > <nl> - < Item id = " 42006 " name = " & amp ; Apagar " / > <nl> - < Item id = " 42007 " name = " Se & amp ; lecionar tudo " / > <nl> - < Item id = " 42008 " name = " Inserir tabulação " / > <nl> - < Item id = " 42009 " name = " Remover tabulação " / > <nl> - < Item id = " 42010 " name = " Duplicar linha atual " / > <nl> - < Item id = " 42012 " name = " Dividir linhas " / > <nl> - < Item id = " 42013 " name = " Unir linhas " / > <nl> - < Item id = " 42014 " name = " Mover linha atual para cima " / > <nl> - < Item id = " 42015 " name = " Mover linha atual para baixo " / > <nl> - < Item id = " 42016 " name = " MAIÚSCULO " / > <nl> - < Item id = " 42017 " name = " minúsculo " / > <nl> - < Item id = " 42018 " name = " Iniciar gravação " / > <nl> - < Item id = " 42019 " name = " Parar gravação " / > <nl> - < Item id = " 42021 " name = " & amp ; Reproduzir " / > <nl> - < Item id = " 42022 " name = " Alternar comentário no bloco " / > <nl> - < Item id = " 42023 " name = " Comentário de documentação " / > <nl> - < Item id = " 42042 " name = " Limpar espaços à esquerda " / > <nl> - < Item id = " 42043 " name = " Limpar espaços à direita e à esquerda " / > <nl> - < Item id = " 42044 " name = " EOL para Espaços " / > <nl> - < Item id = " 42045 " name = " Remover Espaços e EOL desnecessários " / > <nl> - < Item id = " 42046 " name = " TAB para Espaço " / > <nl> - < Item id = " 42047 " name = " Espaço para TAB " / > <nl> - < Item id = " 42024 " name = " Limpar espaços à direita " / > <nl> - < Item id = " 42025 " name = " Salvar macro atual " / > <nl> - < Item id = " 42026 " name = " Alinhar texto à direita " / > <nl> - < Item id = " 42027 " name = " Alinhar texto à esquerda " / > <nl> - < Item id = " 42028 " name = " Definir como somente leitura " / > <nl> - < Item id = " 42029 " name = " Copiar caminho completo do arquivo " / > <nl> - < Item id = " 42030 " name = " Copiar nome do arquivo " / > <nl> - < Item id = " 42031 " name = " Copiar caminho da pasta atual " / > <nl> - < Item id = " 42032 " name = " Executar macro múltiplas vezes . . . " / > <nl> - < Item id = " 42033 " name = " Desmarcar somente leitura " / > <nl> - < Item id = " 42035 " name = " Inserir comentário no bloco " / > <nl> - < Item id = " 42036 " name = " Remover comentário do bloco " / > <nl> - <nl> - < Item id = " 43001 " name = " Localizar . . . " / > <nl> - < Item id = " 43002 " name = " Localizar próximo " / > <nl> - < Item id = " 43003 " name = " Substituir . . . " / > <nl> - < Item id = " 43004 " name = " Ir para a linha . . . " / > <nl> - < Item id = " 43005 " name = " Alternar marcador " / > <nl> - < Item id = " 43006 " name = " Próximo marcador " / > <nl> - < Item id = " 43007 " name = " Marcador anterior " / > <nl> - < Item id = " 43008 " name = " Excluir todos marcadores " / > <nl> - < Item id = " 43009 " name = " Ir para o braço correpondente " / > <nl> - < Item id = " 43010 " name = " Localizar anterior " / > <nl> - < Item id = " 43011 " name = " Busca & amp ; incremental " / > <nl> - < Item id = " 43013 " name = " Localizar em arquivos " / > <nl> - < Item id = " 43014 " name = " Localizar próximo ( temporário ) " / > <nl> - < Item id = " 43015 " name = " Localizar anterior ( temporário ) " / > <nl> - < Item id = " 43016 " name = " Marcar todos " / > <nl> - < Item id = " 43017 " name = " Desmarcar todos " / > <nl> - < Item id = " 43018 " name = " Recortar linhas marcadas " / > <nl> - < Item id = " 43019 " name = " Copiar linhas marcadas " / > <nl> - < Item id = " 43020 " name = " Colar ( Substituir ) linhas marcadas " / > <nl> - < Item id = " 43021 " name = " Apagar linhas marcadas " / > <nl> - < Item id = " 43022 " name = " Usando 1 ° estilo " / > <nl> - < Item id = " 43023 " name = " Limpar 1 ° estilo " / > <nl> - < Item id = " 43024 " name = " Usando 2 ° estilo " / > <nl> - < Item id = " 43025 " name = " Limpar 2 ° estilo " / > <nl> - < Item id = " 43026 " name = " Usando 3 ° estilo " / > <nl> - < Item id = " 43027 " name = " Limpar 3 ° estilo " / > <nl> - < Item id = " 43028 " name = " Usando 4 ° estilo " / > <nl> - < Item id = " 43029 " name = " Limpar 4 ° estilo " / > <nl> - < Item id = " 43030 " name = " Usando 5 ° estilo " / > <nl> - < Item id = " 43031 " name = " Limpar 5 ° estilo " / > <nl> - < Item id = " 43032 " name = " Limpar todos estilos " / > <nl> - < Item id = " 43033 " name = " 1 ° estilo " / > <nl> - < Item id = " 43034 " name = " 2 ° estilo " / > <nl> - < Item id = " 43035 " name = " 3 ° estilo " / > <nl> - < Item id = " 43036 " name = " 4 ° estilo " / > <nl> - < Item id = " 43037 " name = " 5 ° estilo " / > <nl> - < Item id = " 43038 " name = " Localizar estilo " / > <nl> - < Item id = " 43039 " name = " 1 ° estilo " / > <nl> - < Item id = " 43040 " name = " 2 ° estilo " / > <nl> - < Item id = " 43041 " name = " 3 ° estilo " / > <nl> - < Item id = " 43042 " name = " 4 ° estilo " / > <nl> - < Item id = " 43043 " name = " 5 ° estilo " / > <nl> - < Item id = " 43044 " name = " Localizar estilo " / > <nl> - < Item id = " 43045 " name = " Janela do resultado de pesquisa " / > <nl> - < Item id = " 43046 " name = " Próximo resultado da pesquisa " / > <nl> - < Item id = " 43047 " name = " Resultado anterior da pesquisa " / > <nl> - < Item id = " 43048 " name = " Selecionar e localizar próximo " / > <nl> - < Item id = " 43049 " name = " Selecionar e localizar anterior " / > <nl> - < Item id = " 43050 " name = " Inverter marcadores " / > <nl> - < Item id = " 44009 " name = " Exibir somente o código " / > <nl> - < Item id = " 44010 " name = " Recolher todos níveis " / > <nl> - < Item id = " 44011 " name = " Definições do usuário . . . " / > <nl> - < Item id = " 44019 " name = " Exibir todos os caracteres " / > <nl> - < Item id = " 44020 " name = " Exibir guia de indentação " / > <nl> - < Item id = " 44022 " name = " Quebrar linhas automaticamente " / > <nl> - < Item id = " 44023 " name = " Zoom ( + ) " / > <nl> - < Item id = " 44024 " name = " Zoom ( - ) " / > <nl> - < Item id = " 44025 " name = " Exibir espaços e tabulações " / > <nl> - < Item id = " 44026 " name = " Exibir final de linha " / > <nl> - < Item id = " 44029 " name = " Expandir todos níveis " / > <nl> - < Item id = " 44030 " name = " Recolher nível atual " / > <nl> - < Item id = " 44031 " name = " Expandir nível atual " / > <nl> - < Item id = " 44032 " name = " Modo Tela Inteira " / > <nl> - < Item id = " 44033 " name = " Retornar ao zoom padrão " / > <nl> - < Item id = " 44034 " name = " Manter sobre as outras janelas " / > <nl> - < Item id = " 44049 " name = " Resumo . . . " / > <nl> - < Item id = " 44035 " name = " Sincronizar rolagem vertical " / > <nl> - < Item id = " 44036 " name = " Sincronizar rolagem horizontal " / > <nl> - < Item id = " 44041 " name = " Mostrar símbolo de quebra de linha " / > <nl> - < Item id = " 44072 " name = " Focar visão principal " / > <nl> + < Item id = " 41001 " name = " & amp ; Novo " / > <nl> + < Item id = " 41002 " name = " & amp ; Abrir " / > <nl> + < Item id = " 41003 " name = " Fechar " / > <nl> + < Item id = " 41004 " name = " F & amp ; echar todos " / > <nl> + < Item id = " 41005 " name = " Fechar todos exceto o atual " / > <nl> + < Item id = " 41006 " name = " & amp ; Salvar " / > <nl> + < Item id = " 41007 " name = " Salvar todos " / > <nl> + < Item id = " 41008 " name = " Salvar & amp ; como . . . " / > <nl> + < Item id = " 41010 " name = " Imprimir . . . " / > <nl> + < Item id = " 1001 " name = " Imprima Agora ! " / > <nl> + < Item id = " 41011 " name = " Sai & amp ; r " / > <nl> + < Item id = " 41012 " name = " Carregar sessão . . . " / > <nl> + < Item id = " 41013 " name = " Salvar sessão . . . " / > <nl> + < Item id = " 41014 " name = " Recarregar do disco " / > <nl> + < Item id = " 41015 " name = " Salvar uma cópia como . . . " / > <nl> + < Item id = " 41016 " name = " Apagar do disco " / > <nl> + < Item id = " 41017 " name = " Renomear . . . " / > <nl> + <nl> + < Item id = " 42001 " name = " Recor & amp ; tar " / > <nl> + < Item id = " 42002 " name = " & amp ; Copiar " / > <nl> + < Item id = " 42003 " name = " & amp ; Desfazer " / > <nl> + < Item id = " 42004 " name = " & amp ; Refazer " / > <nl> + < Item id = " 42005 " name = " C & amp ; olar " / > <nl> + < Item id = " 42006 " name = " & amp ; Apagar " / > <nl> + < Item id = " 42007 " name = " Se & amp ; lecionar tudo " / > <nl> + < Item id = " 42008 " name = " Inserir tabulação " / > <nl> + < Item id = " 42009 " name = " Remover tabulação " / > <nl> + < Item id = " 42010 " name = " Duplicar linha atual " / > <nl> + < Item id = " 42012 " name = " Dividir linhas " / > <nl> + < Item id = " 42013 " name = " Unir linhas " / > <nl> + < Item id = " 42014 " name = " Mover linha atual para cima " / > <nl> + < Item id = " 42015 " name = " Mover linha atual para baixo " / > <nl> + < Item id = " 42016 " name = " MAIÚSCULO " / > <nl> + < Item id = " 42017 " name = " minúsculo " / > <nl> + < Item id = " 42018 " name = " Iniciar gravação " / > <nl> + < Item id = " 42019 " name = " Parar gravação " / > <nl> + < Item id = " 42021 " name = " & amp ; Reproduzir " / > <nl> + < Item id = " 42022 " name = " Alternar comentário no bloco " / > <nl> + < Item id = " 42023 " name = " Comentário de documentação " / > <nl> + < Item id = " 42042 " name = " Limpar espaços à esquerda " / > <nl> + < Item id = " 42043 " name = " Limpar espaços à direita e à esquerda " / > <nl> + < Item id = " 42044 " name = " EOL para Espaços " / > <nl> + < Item id = " 42045 " name = " Remover Espaços e EOL desnecessários " / > <nl> + < Item id = " 42046 " name = " TAB para Espaço " / > <nl> + < Item id = " 42047 " name = " Espaço para TAB " / > <nl> + < Item id = " 42024 " name = " Limpar espaços à direita " / > <nl> + < Item id = " 42025 " name = " Salvar macro atual " / > <nl> + < Item id = " 42026 " name = " Alinhar texto à direita " / > <nl> + < Item id = " 42027 " name = " Alinhar texto à esquerda " / > <nl> + < Item id = " 42028 " name = " Definir como somente leitura " / > <nl> + < Item id = " 42029 " name = " Copiar caminho completo do arquivo " / > <nl> + < Item id = " 42030 " name = " Copiar nome do arquivo " / > <nl> + < Item id = " 42031 " name = " Copiar caminho da pasta atual " / > <nl> + < Item id = " 42032 " name = " Executar macro múltiplas vezes . . . " / > <nl> + < Item id = " 42033 " name = " Desmarcar somente leitura " / > <nl> + < Item id = " 42035 " name = " Inserir comentário no bloco " / > <nl> + < Item id = " 42036 " name = " Remover comentário do bloco " / > <nl> + <nl> + < Item id = " 42037 " name = " Modo coluna . . . " / > <nl> + < Item id = " 42038 " name = " Colar como HTML " / > <nl> + < Item id = " 42039 " name = " Colar como RTF " / > <nl> + < Item id = " 42048 " name = " Copiar conteúdo binário " / > <nl> + < Item id = " 42049 " name = " Recortar conteúdo binário " / > <nl> + < Item id = " 42050 " name = " Colar conteúdo binário " / > <nl> + < Item id = " 42051 " name = " Painel de caracteres " / > <nl> + < Item id = " 42052 " name = " Histórico da área de transferência " / > <nl> + <nl> + < Item id = " 43001 " name = " Localizar . . . " / > <nl> + < Item id = " 43002 " name = " Localizar próximo " / > <nl> + < Item id = " 43003 " name = " Substituir . . . " / > <nl> + < Item id = " 43004 " name = " Ir para a linha . . . " / > <nl> + < Item id = " 43005 " name = " Alternar marcador " / > <nl> + < Item id = " 43006 " name = " Próximo marcador " / > <nl> + < Item id = " 43007 " name = " Marcador anterior " / > <nl> + < Item id = " 43008 " name = " Excluir todos marcadores " / > <nl> + < Item id = " 43009 " name = " Ir para o braço correpondente " / > <nl> + < Item id = " 43010 " name = " Localizar anterior " / > <nl> + < Item id = " 43011 " name = " Busca & amp ; incremental " / > <nl> + < Item id = " 43013 " name = " Localizar em arquivos " / > <nl> + < Item id = " 43014 " name = " Localizar próximo ( temporário ) " / > <nl> + < Item id = " 43015 " name = " Localizar anterior ( temporário ) " / > <nl> + < Item id = " 43016 " name = " Marcar todos " / > <nl> + < Item id = " 43017 " name = " Desmarcar todos " / > <nl> + < Item id = " 43018 " name = " Recortar linhas marcadas " / > <nl> + < Item id = " 43019 " name = " Copiar linhas marcadas " / > <nl> + < Item id = " 43020 " name = " Colar ( Substituir ) linhas marcadas " / > <nl> + < Item id = " 43021 " name = " Apagar linhas marcadas " / > <nl> + < Item id = " 43022 " name = " Usando 1 ° estilo " / > <nl> + < Item id = " 43023 " name = " Limpar 1 ° estilo " / > <nl> + < Item id = " 43024 " name = " Usando 2 ° estilo " / > <nl> + < Item id = " 43025 " name = " Limpar 2 ° estilo " / > <nl> + < Item id = " 43026 " name = " Usando 3 ° estilo " / > <nl> + < Item id = " 43027 " name = " Limpar 3 ° estilo " / > <nl> + < Item id = " 43028 " name = " Usando 4 ° estilo " / > <nl> + < Item id = " 43029 " name = " Limpar 4 ° estilo " / > <nl> + < Item id = " 43030 " name = " Usando 5 ° estilo " / > <nl> + < Item id = " 43031 " name = " Limpar 5 ° estilo " / > <nl> + < Item id = " 43032 " name = " Limpar todos estilos " / > <nl> + < Item id = " 43033 " name = " 1 ° estilo " / > <nl> + < Item id = " 43034 " name = " 2 ° estilo " / > <nl> + < Item id = " 43035 " name = " 3 ° estilo " / > <nl> + < Item id = " 43036 " name = " 4 ° estilo " / > <nl> + < Item id = " 43037 " name = " 5 ° estilo " / > <nl> + < Item id = " 43038 " name = " Localizar estilo " / > <nl> + < Item id = " 43039 " name = " 1 ° estilo " / > <nl> + < Item id = " 43040 " name = " 2 ° estilo " / > <nl> + < Item id = " 43041 " name = " 3 ° estilo " / > <nl> + < Item id = " 43042 " name = " 4 ° estilo " / > <nl> + < Item id = " 43043 " name = " 5 ° estilo " / > <nl> + < Item id = " 43044 " name = " Localizar estilo " / > <nl> + < Item id = " 43045 " name = " Janela do resultado de pesquisa " / > <nl> + < Item id = " 43046 " name = " Próximo resultado da pesquisa " / > <nl> + < Item id = " 43047 " name = " Resultado anterior da pesquisa " / > <nl> + < Item id = " 43048 " name = " Selecionar e localizar próximo " / > <nl> + < Item id = " 43049 " name = " Selecionar e localizar anterior " / > <nl> + < Item id = " 43050 " name = " Inverter marcadores " / > <nl> + < Item id = " 43052 " name = " Localizar caracteres numa faixa . . . " / > <nl> + <nl> + < Item id = " 44009 " name = " Exibir somente o código " / > <nl> + < Item id = " 44010 " name = " Recolher todos níveis " / > <nl> + < Item id = " 44011 " name = " Definições do usuário . . . " / > <nl> + < Item id = " 44019 " name = " Exibir todos os caracteres " / > <nl> + < Item id = " 44020 " name = " Exibir guia de indentação " / > <nl> + < Item id = " 44022 " name = " Quebrar linhas automaticamente " / > <nl> + < Item id = " 44023 " name = " Zoom ( + ) " / > <nl> + < Item id = " 44024 " name = " Zoom ( - ) " / > <nl> + < Item id = " 44025 " name = " Exibir espaços e tabulações " / > <nl> + < Item id = " 44026 " name = " Exibir final de linha " / > <nl> + < Item id = " 44029 " name = " Expandir todos níveis " / > <nl> + < Item id = " 44030 " name = " Recolher nível atual " / > <nl> + < Item id = " 44031 " name = " Expandir nível atual " / > <nl> + < Item id = " 44032 " name = " Modo Tela Inteira " / > <nl> + < Item id = " 44033 " name = " Retornar ao zoom padrão " / > <nl> + < Item id = " 44034 " name = " Manter sobre as outras janelas " / > <nl> + < Item id = " 44049 " name = " Informações sobre o arquivo . . . " / > <nl> + < Item id = " 44035 " name = " Sincronizar rolagem vertical " / > <nl> + < Item id = " 44036 " name = " Sincronizar rolagem horizontal " / > <nl> + < Item id = " 44041 " name = " Mostrar símbolo de quebra de linha " / > <nl> + < Item id = " 44072 " name = " Focar visão principal " / > <nl> < Item id = " 44081 " name = " Painel de Projeto 1 " / > <nl> < Item id = " 44082 " name = " Painel de Projeto 2 " / > <nl> < Item id = " 44083 " name = " Painel de Projeto 3 " / > <nl> - < Item id = " 45001 " name = " Converter para formato Windows " / > <nl> - < Item id = " 45002 " name = " Converter para formato UNIX " / > <nl> - < Item id = " 45003 " name = " Converter para formato MAC " / > <nl> - < Item id = " 45004 " name = " Codificação em ANSI " / > <nl> - < Item id = " 45005 " name = " Codificação em UTF - 8 " / > <nl> - < Item id = " 45006 " name = " Codificação em UCS - 2 Big Endian " / > <nl> - < Item id = " 45007 " name = " Codificação em UCS - 2 Little Endian " / > <nl> - < Item id = " 45008 " name = " Codificação em UTF - 8 ( sem BOM ) " / > <nl> - < Item id = " 45009 " name = " Converter para ANSI " / > <nl> - < Item id = " 45010 " name = " Converter para UTF - 8 ( sem BOM ) " / > <nl> - < Item id = " 45011 " name = " Converter para UTF - 8 " / > <nl> - < Item id = " 45012 " name = " Converter para UCS - 2 Big Endian " / > <nl> - < Item id = " 45013 " name = " Converter para UCS - 2 Little Endian " / > <nl> - <nl> - < Item id = " 10001 " name = " Mover para outra tela " / > <nl> - < Item id = " 10002 " name = " Duplicar tela ( clonar ) " / > <nl> - < Item id = " 10003 " name = " Mover para uma nova janela " / > <nl> - < Item id = " 10004 " name = " Abrir em uma nova janela " / > <nl> - <nl> - <nl> - < Item id = " 46001 " name = " Configurador de estilos . . . " / > <nl> - < Item id = " 46080 " name = " Definida pelo usuário " / > <nl> - < Item id = " 47000 " name = " Sobre . . . " / > <nl> - < Item id = " 47001 " name = " HomePage Notepad + + " / > <nl> - < Item id = " 47002 " name = " Página do Projeto Notepad + + " / > <nl> - < Item id = " 47003 " name = " NpWiki + + ( Ajuda Online ) " / > <nl> - < Item id = " 47004 " name = " Fórum " / > <nl> - < Item id = " 47005 " name = " Obter mais plugins " / > <nl> - < Item id = " 47006 " name = " Atualizar o Notepad + + " / > <nl> - < Item id = " 47008 " name = " Ajuda . . . " / > <nl> - < Item id = " 48005 " name = " Importar Plugin ( s ) . . . " / > <nl> - < Item id = " 48006 " name = " Importar Tema ( s ) . . . " / > <nl> - < Item id = " 48009 " name = " Mapa de atalhos . . . " / > <nl> - < Item id = " 48011 " name = " Preferências . . . " / > <nl> - < Item id = " 49000 " name = " Executa & amp ; r . . . " / > <nl> - <nl> - < Item id = " 50000 " name = " Completar função " / > <nl> - < Item id = " 50001 " name = " Completar palavra " / > <nl> - < Item id = " 50002 " name = " Dica de parâmetros da função " / > <nl> - < Item id = " 42034 " name = " Editor de coluna . . . " / > <nl> - < Item id = " 44042 " name = " Ocultar linhas " / > <nl> - < Item id = " 42040 " name = " Abrir todos arquivos recentes " / > <nl> - < Item id = " 42041 " name = " Limpar lista de arquivos recentes " / > <nl> - < Item id = " 48016 " name = " Modificar atalho / Apagar macro . . . " / > <nl> - < Item id = " 48017 " name = " Modificar atalho / Apagar comando . . . " / > <nl> - < Item id = " 48018 " name = " Editar Menu de Contexto " / > <nl> + < Item id = " 45001 " name = " Converter para formato Windows " / > <nl> + < Item id = " 45002 " name = " Converter para formato UNIX " / > <nl> + < Item id = " 45003 " name = " Converter para formato MAC " / > <nl> + < Item id = " 45004 " name = " Codificação em ANSI " / > <nl> + < Item id = " 45005 " name = " Codificação em UTF - 8 " / > <nl> + < Item id = " 45006 " name = " Codificação em UCS - 2 Big Endian " / > <nl> + < Item id = " 45007 " name = " Codificação em UCS - 2 Little Endian " / > <nl> + < Item id = " 45008 " name = " Codificação em UTF - 8 ( sem BOM ) " / > <nl> + < Item id = " 45009 " name = " Converter para ANSI " / > <nl> + < Item id = " 45010 " name = " Converter para UTF - 8 ( sem BOM ) " / > <nl> + < Item id = " 45011 " name = " Converter para UTF - 8 " / > <nl> + < Item id = " 45012 " name = " Converter para UCS - 2 Big Endian " / > <nl> + < Item id = " 45013 " name = " Converter para UCS - 2 Little Endian " / > <nl> + <nl> + < Item id = " 10001 " name = " Mover para outra tela " / > <nl> + < Item id = " 10002 " name = " Duplicar tela ( clonar ) " / > <nl> + < Item id = " 10003 " name = " Mover para uma nova janela " / > <nl> + < Item id = " 10004 " name = " Abrir em uma nova janela " / > <nl> + <nl> + < Item id = " 46001 " name = " Configurador de estilos . . . " / > <nl> + < Item id = " 46080 " name = " Definida pelo usuário " / > <nl> + < Item id = " 47000 " name = " Sobre . . . " / > <nl> + < Item id = " 47001 " name = " HomePage Notepad + + " / > <nl> + < Item id = " 47002 " name = " Página do Projeto Notepad + + " / > <nl> + < Item id = " 47003 " name = " NpWiki + + ( Ajuda Online ) " / > <nl> + < Item id = " 47004 " name = " Fórum " / > <nl> + < Item id = " 47005 " name = " Obter mais plugins " / > <nl> + < Item id = " 47006 " name = " Atualizar o Notepad + + " / > <nl> + < Item id = " 47008 " name = " Ajuda . . . " / > <nl> + <nl> + < Item id = " 48005 " name = " Importar Plugin ( s ) . . . " / > <nl> + < Item id = " 48006 " name = " Importar Tema ( s ) . . . " / > <nl> + < Item id = " 48009 " name = " Mapa de atalhos . . . " / > <nl> + < Item id = " 48011 " name = " Preferências . . . " / > <nl> + < Item id = " 49000 " name = " Executa & amp ; r . . . " / > <nl> + <nl> + < Item id = " 50000 " name = " Completar função " / > <nl> + < Item id = " 50001 " name = " Completar palavra " / > <nl> + < Item id = " 50002 " name = " Dica de parâmetros da função " / > <nl> + < Item id = " 42034 " name = " Editor de coluna . . . " / > <nl> + < Item id = " 44042 " name = " Ocultar linhas " / > <nl> + < Item id = " 42040 " name = " Abrir todos arquivos recentes " / > <nl> + < Item id = " 42041 " name = " Limpar lista de arquivos recentes " / > <nl> + < Item id = " 48016 " name = " Modificar atalho / Deletar macro . . . " / > <nl> + < Item id = " 48017 " name = " Modificar atalho / Deletar comando . . . " / > <nl> + < Item id = " 48018 " name = " Editar Menu de contexto " / > <nl> < / Commands > <nl> < / Main > <nl> + <nl> < Splitter > <nl> < / Splitter > <nl> + <nl> < TabBar > <nl> - < Item order = " 0 " name = " Fechar esta aba " / > <nl> - < Item order = " 1 " name = " Fechar todas exceto esta " / > <nl> - < Item order = " 2 " name = " Salvar " / > <nl> - < Item order = " 3 " name = " Salvar como . . . " / > <nl> - < Item order = " 4 " name = " Imprimir " / > <nl> - < Item order = " 5 " name = " Mover para outra tela " / > <nl> - < Item order = " 6 " name = " Duplicar tela ( clonar ) " / > <nl> - < Item order = " 7 " name = " Copiar caminho completo " / > <nl> - < Item order = " 8 " name = " Copiar nome do arquivo " / > <nl> - < Item order = " 9 " name = " Copiar caminho da pasta " / > <nl> - < Item order = " 10 " name = " Renomear " / > <nl> - < Item order = " 11 " name = " Apagar " / > <nl> - < Item order = " 12 " name = " Somente leitura " / > <nl> - < Item order = " 13 " name = " Desmarcar somente leitura " / > <nl> - < Item order = " 14 " name = " Mover para nova janela " / > <nl> - < Item order = " 15 " name = " Abrir em uma nova janela " / > <nl> + < Item order = " 0 " name = " Fechar esta aba " / > <nl> + < Item order = " 1 " name = " Fechar todas exceto esta " / > <nl> + < Item order = " 2 " name = " Salvar " / > <nl> + < Item order = " 3 " name = " Salvar como . . . " / > <nl> + < Item order = " 4 " name = " Imprimir " / > <nl> + < Item order = " 5 " name = " Mover para outra tela " / > <nl> + < Item order = " 6 " name = " Duplicar tela ( clonar ) " / > <nl> + < Item order = " 7 " name = " Copiar caminho completo " / > <nl> + < Item order = " 8 " name = " Copiar nome do arquivo " / > <nl> + < Item order = " 9 " name = " Copiar caminho da pasta " / > <nl> + < Item order = " 10 " name = " Renomear " / > <nl> + < Item order = " 11 " name = " Deletar " / > <nl> + < Item order = " 12 " name = " Somente leitura " / > <nl> + < Item order = " 13 " name = " Desmarcar somente leitura " / > <nl> + < Item order = " 14 " name = " Mover para nova janela " / > <nl> + < Item order = " 15 " name = " Abrir em uma nova janela " / > <nl> < / TabBar > <nl> < / Menu > <nl> <nl> < Dialog > <nl> - < Find title = " " titleFind = " Localizar " titleReplace = " Substituir " titleFindInFiles = " Localizar em arquivos " > <nl> - < Item id = " 1 " name = " Localizar próximo " / > <nl> - < Item id = " 2 " name = " Fechar " / > <nl> - < Item id = " 1620 " name = " Localizar : " / > <nl> - < Item id = " 1603 " name = " Coincidir palavra inteira " / > <nl> - < Item id = " 1604 " name = " Diferen & amp ; ciar maiúsculas / minúsculas " / > <nl> - < Item id = " 1605 " name = " & amp ; Expressão regular " / > <nl> - < Item id = " 1606 " name = " & amp ; Pesquisa circular " / > <nl> - < Item id = " 1612 " name = " Acima " / > <nl> - < Item id = " 1613 " name = " Abaixo " / > <nl> - < Item id = " 1614 " name = " Contar " / > <nl> - < Item id = " 1615 " name = " Localizar todos " / > <nl> - < Item id = " 1616 " name = " Marcar linha " / > <nl> - < Item id = " 1617 " name = " Procurar como símbolos " / > <nl> - < Item id = " 1618 " name = " Limpar marcadores " / > <nl> - < Item id = " 1621 " name = " Direção " / > <nl> - < Item id = " 1611 " name = " Substituir por : " / > <nl> - < Item id = " 1608 " name = " Substitui & amp ; r " / > <nl> - < Item id = " 1609 " name = " Substituir todos " / > <nl> - < Item id = " 1623 " name = " Transparência " / > <nl> - < Item id = " 1687 " name = " Ao perder o foco " / > <nl> - < Item id = " 1688 " name = " Sempre " / > <nl> - < Item id = " 1632 " name = " Na seleção " / > <nl> - < Item id = " 1633 " name = " Limpar " / > <nl> - < Item id = " 1635 " name = " Substituir todos em todos documentos abertos " / > <nl> - < Item id = " 1636 " name = " Localizar todos em todos documentos abertos " / > <nl> - < Item id = " 1637 " name = " Localizar em arquivos " / > <nl> - < Item id = " 1654 " name = " Filtros : " / > <nl> - < Item id = " 1655 " name = " Pasta : " / > <nl> - < Item id = " 1656 " name = " Localizar todos " / > <nl> - < Item id = " 1658 " name = " Incluir sub - pastas " / > <nl> - < Item id = " 1659 " name = " Incluir pastas ocultas " / > <nl> - < Item id = " 1624 " name = " Modo de busca " / > <nl> - < Item id = " 1625 " name = " Normal " / > <nl> - < Item id = " 1626 " name = " Extendido ( \ n , \ r , \ t , \ 0 , \ x . . . ) " / > <nl> - < Item id = " 1660 " name = " Substituir nos arquivos " / > <nl> - < Item id = " 1661 " name = " Acompanhar doc . atual " / > <nl> - < Item id = " 1641 " name = " Localizar todos no documento atual " / > <nl> - < Item id = " 1686 " name = " Transparência " / > <nl> + < Find title = " " titleFind = " Localizar " titleReplace = " Substituir " titleFindInFiles = " Localizar em arquivos " > <nl> + < Item id = " 1 " name = " Localizar próximo " / > <nl> + < Item id = " 2 " name = " Fechar " / > <nl> + < Item id = " 1620 " name = " Localizar : " / > <nl> + < Item id = " 1603 " name = " Coincidir palavra inteira " / > <nl> + < Item id = " 1604 " name = " Diferen & amp ; ciar maiúsculas / minúsculas " / > <nl> + < Item id = " 1605 " name = " & amp ; Expressão regular " / > <nl> + < Item id = " 1606 " name = " & amp ; Pesquisa circular " / > <nl> + < Item id = " 1612 " name = " Acima " / > <nl> + < Item id = " 1613 " name = " Abaixo " / > <nl> + < Item id = " 1614 " name = " Contar " / > <nl> + < Item id = " 1615 " name = " Localizar todos " / > <nl> + < Item id = " 1616 " name = " Marcar linha " / > <nl> + < Item id = " 1617 " name = " Procurar como símbolos " / > <nl> + < Item id = " 1618 " name = " Limpar marcadores " / > <nl> + < Item id = " 1621 " name = " Direção " / > <nl> + < Item id = " 1611 " name = " Substituir por : " / > <nl> + < Item id = " 1608 " name = " Substitui & amp ; r " / > <nl> + < Item id = " 1609 " name = " Substituir todos " / > <nl> + < Item id = " 1623 " name = " Transparência " / > <nl> + < Item id = " 1687 " name = " Ao perder o foco " / > <nl> + < Item id = " 1688 " name = " Sempre " / > <nl> + < Item id = " 1632 " name = " Na seleção " / > <nl> + < Item id = " 1633 " name = " Limpar " / > <nl> + < Item id = " 1635 " name = " Substituir todos em todos documentos abertos " / > <nl> + < Item id = " 1636 " name = " Localizar todos em todos documentos abertos " / > <nl> + < Item id = " 1637 " name = " Localizar em arquivos " / > <nl> + < Item id = " 1654 " name = " Filtros : " / > <nl> + < Item id = " 1655 " name = " Pasta : " / > <nl> + < Item id = " 1656 " name = " Localizar todos " / > <nl> + < Item id = " 1658 " name = " Incluir sub - pastas " / > <nl> + < Item id = " 1659 " name = " Incluir pastas ocultas " / > <nl> + < Item id = " 1624 " name = " Modo de busca " / > <nl> + < Item id = " 1625 " name = " Normal " / > <nl> + < Item id = " 1626 " name = " Extendido ( \ n , \ r , \ t , \ 0 , \ x . . . ) " / > <nl> + < Item id = " 1660 " name = " Substituir nos arquivos " / > <nl> + < Item id = " 1661 " name = " Acompanhar doc . atual " / > <nl> + < Item id = " 1641 " name = " Localizar todos no documento atual " / > <nl> + < Item id = " 1686 " name = " Transparência " / > <nl> < / Find > <nl> - < GoToLine title = " Ir para linha . . . " > <nl> - < Item id = " 2007 " name = " Linha " / > <nl> - < Item id = " 2008 " name = " Caractere " / > <nl> - < Item id = " 1 " name = " & amp ; Vai " / > <nl> - < Item id = " 2 " name = " Cancelar " / > <nl> - < Item id = " 2004 " name = " Você está aqui : " / > <nl> - < Item id = " 2005 " name = " Você quer ir para : " / > <nl> - < Item id = " 2006 " name = " Você não pode exceder : " / > <nl> + <nl> + < GoToLine title = " Ir para linha . . . " > <nl> + < Item id = " 2007 " name = " Linha " / > <nl> + < Item id = " 2008 " name = " Caractere " / > <nl> + < Item id = " 1 " name = " & amp ; Vai " / > <nl> + < Item id = " 2 " name = " Cancelar " / > <nl> + < Item id = " 2004 " name = " Você está aqui : " / > <nl> + < Item id = " 2005 " name = " Você quer ir para : " / > <nl> + < Item id = " 2006 " name = " Você não pode exceder : " / > <nl> < / GoToLine > <nl> <nl> - < Run title = " Executar . . . " > <nl> - < Item id = " 1903 " name = " Programa que deseja executar " / > <nl> - < Item id = " 1 " name = " Executar " / > <nl> - < Item id = " 2 " name = " Cancelar " / > <nl> - < Item id = " 1904 " name = " Salvar . . . " / > <nl> + < Run title = " Executar . . . " > <nl> + < Item id = " 1903 " name = " Programa que deseja executar " / > <nl> + < Item id = " 1 " name = " Executar " / > <nl> + < Item id = " 2 " name = " Cancelar " / > <nl> + < Item id = " 1904 " name = " Salvar . . . " / > <nl> < / Run > <nl> <nl> - < StyleConfig title = " Configurar Estilos " > <nl> - < Item id = " 2 " name = " Cancelar " / > <nl> - < Item id = " 2301 " name = " Salvar & amp ; & amp ; Fechar " / > <nl> - < Item id = " 2303 " name = " Transparência " / > <nl> - < Item id = " 2306 " name = " Selecionar tema : " / > <nl> + < StyleConfig title = " Configurar Estilos " > <nl> + < Item id = " 2 " name = " Cancelar " / > <nl> + < Item id = " 2301 " name = " Salvar & amp ; & amp ; Fechar " / > <nl> + < Item id = " 2303 " name = " Transparência " / > <nl> + < Item id = " 2306 " name = " Selecionar tema : " / > <nl> < SubDialog > <nl> - < Item id = " 2204 " name = " Negrito " / > <nl> - < Item id = " 2205 " name = " Itálico " / > <nl> - < Item id = " 2206 " name = " Cor da fonte " / > <nl> - < Item id = " 2207 " name = " Cor do fundo " / > <nl> - < Item id = " 2208 " name = " Fonte : " / > <nl> - < Item id = " 2209 " name = " Tamanho : " / > <nl> - < Item id = " 2212 " name = " Estilo de cores " / > <nl> - < Item id = " 2213 " name = " Estilo de fontes " / > <nl> - < Item id = " 2214 " name = " Extensão padrão : " / > <nl> - < Item id = " 2216 " name = " Extensão do usuário : " / > <nl> - < Item id = " 2218 " name = " Sublinhado " / > <nl> - < Item id = " 2219 " name = " Palavras - chave padrão " / > <nl> - < Item id = " 2221 " name = " Palavras - chave definidas pelo usuário " / > <nl> - < Item id = " 2225 " name = " Linguagem : " / > <nl> - < Item id = " 2226 " name = " Habilitar cor de fonte global " / > <nl> - < Item id = " 2227 " name = " Habilitar cor de fundo global " / > <nl> - < Item id = " 2228 " name = " Habilitar fonte global " / > <nl> - < Item id = " 2229 " name = " Habilitar tamanho de fonte global " / > <nl> - < Item id = " 2230 " name = " Habilitar fonte em negrito global " / > <nl> - < Item id = " 2231 " name = " Habilitar fonte em itálico global " / > <nl> - < Item id = " 2232 " name = " Habilitar fonte sublinhada global " / > <nl> + < Item id = " 2204 " name = " Negrito " / > <nl> + < Item id = " 2205 " name = " Itálico " / > <nl> + < Item id = " 2206 " name = " Cor da fonte " / > <nl> + < Item id = " 2207 " name = " Cor do fundo " / > <nl> + < Item id = " 2208 " name = " Fonte : " / > <nl> + < Item id = " 2209 " name = " Tamanho : " / > <nl> + < Item id = " 2211 " name = " Local do estilo : " / > <nl> + < Item id = " 2212 " name = " Estilo de cores " / > <nl> + < Item id = " 2213 " name = " Estilo de fontes " / > <nl> + < Item id = " 2214 " name = " Extensão padrão : " / > <nl> + < Item id = " 2216 " name = " Extensão do usuário : " / > <nl> + < Item id = " 2218 " name = " Sublinhado " / > <nl> + < Item id = " 2219 " name = " Palavras - chave padrão " / > <nl> + < Item id = " 2221 " name = " Palavras - chave definidas pelo usuário " / > <nl> + < Item id = " 2225 " name = " Linguagem : " / > <nl> + < Item id = " 2226 " name = " Habilitar cor de fonte global " / > <nl> + < Item id = " 2227 " name = " Habilitar cor de fundo global " / > <nl> + < Item id = " 2228 " name = " Habilitar fonte global " / > <nl> + < Item id = " 2229 " name = " Habilitar tamanho de fonte global " / > <nl> + < Item id = " 2230 " name = " Habilitar fonte em negrito global " / > <nl> + < Item id = " 2231 " name = " Habilitar fonte em itálico global " / > <nl> + < Item id = " 2232 " name = " Habilitar fonte sublinhada global " / > <nl> < / SubDialog > <nl> - <nl> < / StyleConfig > <nl> <nl> - < UserDefine title = " Definições do Usuário " > <nl> - < Item id = " 20002 " name = " Renomear " / > <nl> - < Item id = " 20003 " name = " Criar novo . . . " / > <nl> - < Item id = " 20004 " name = " Remover " / > <nl> - < Item id = " 20005 " name = " Salvar como . . . " / > <nl> - < Item id = " 20007 " name = " Linguagem do usuário : " / > <nl> - < Item id = " 20009 " name = " Ext . : " / > <nl> - < Item id = " 20012 " name = " Não dif . maiúsc / minúsc " / > <nl> - < Item id = " 20011 " name = " Transparência " / > <nl> - < Item id = " 20016 " name = " Importar . . . " / > <nl> - < Item id = " 20015 " name = " Exportar . . . " / > <nl> - < Item id = " 0 " name = " Estilo de cores " / > <nl> - < Item id = " 1 " name = " Cor da fonte " / > <nl> - < Item id = " 2 " name = " Cor do fundo " / > <nl> - < Item id = " 3 " name = " Estilo da fonte " / > <nl> - < Item id = " 4 " name = " Fonte : " / > <nl> - < Item id = " 5 " name = " Tamanho da fonte : " / > <nl> - < Item id = " 6 " name = " Negrito " / > <nl> - < Item id = " 7 " name = " Itálico " / > <nl> - < Item id = " 8 " name = " Sublinhado " / > <nl> - < Folder title = " Blocos & amp ; & amp ; Padrão " > <nl> - < Item id = " 21101 " name = " Configurações de estilo padrão " / > <nl> - < Item id = " 21201 " name = " Configuração dos blocos de abertura " / > <nl> - < Item id = " 21301 " name = " Configuração dos blocos de fechamento " / > <nl> + < UserDefine title = " Definições do Usuário " > <nl> + < Item id = " 20002 " name = " Renomear " / > <nl> + < Item id = " 20003 " name = " Criar novo . . . " / > <nl> + < Item id = " 20004 " name = " Remover " / > <nl> + < Item id = " 20005 " name = " Salvar como . . . " / > <nl> + < Item id = " 20007 " name = " Linguagem do usuário : " / > <nl> + < Item id = " 20009 " name = " Ext . : " / > <nl> + < Item id = " 20012 " name = " Não dif . maiúsc / minúsc " / > <nl> + < Item id = " 20011 " name = " Transparência " / > <nl> + < Item id = " 20016 " name = " Importar . . . " / > <nl> + < Item id = " 20015 " name = " Exportar . . . " / > <nl> + < Item id = " 0 " name = " Estilo de cores " / > <nl> + < Item id = " 1 " name = " Cor da fonte " / > <nl> + < Item id = " 2 " name = " Cor do fundo " / > <nl> + < Item id = " 3 " name = " Estilo da fonte " / > <nl> + < Item id = " 4 " name = " Fonte : " / > <nl> + < Item id = " 5 " name = " Tamanho da fonte : " / > <nl> + < Item id = " 6 " name = " Negrito " / > <nl> + < Item id = " 7 " name = " Itálico " / > <nl> + < Item id = " 8 " name = " Sublinhado " / > <nl> + < Folder title = " Blocos & amp ; & amp ; Padrão " > <nl> + < Item id = " 21101 " name = " Configurações de estilo padrão " / > <nl> + < Item id = " 21201 " name = " Configuração dos blocos de abertura " / > <nl> + < Item id = " 21301 " name = " Configuração dos blocos de fechamento " / > <nl> < / Folder > <nl> - < Keywords title = " Listas de palavras - chave " > <nl> - < Item id = " 22101 " name = " 1º grupo " / > <nl> - < Item id = " 22201 " name = " 2º grupo " / > <nl> - < Item id = " 22301 " name = " 3º grupo " / > <nl> - < Item id = " 22401 " name = " 4º grupo " / > <nl> - < Item id = " 22113 " name = " Modo prefixo " / > <nl> - < Item id = " 22213 " name = " Modo prefixo " / > <nl> - < Item id = " 22313 " name = " Modo prefixo " / > <nl> - < Item id = " 22413 " name = " Modo prefixo " / > <nl> + < Keywords title = " Listas de palavras - chave " > <nl> + < Item id = " 22101 " name = " 1º grupo " / > <nl> + < Item id = " 22201 " name = " 2º grupo " / > <nl> + < Item id = " 22301 " name = " 3º grupo " / > <nl> + < Item id = " 22401 " name = " 4º grupo " / > <nl> + < Item id = " 22113 " name = " Modo prefixo " / > <nl> + < Item id = " 22213 " name = " Modo prefixo " / > <nl> + < Item id = " 22313 " name = " Modo prefixo " / > <nl> + < Item id = " 22413 " name = " Modo prefixo " / > <nl> < / Keywords > <nl> - < Comment title = " Comentários & amp ; & amp ; Números " > <nl> - < Item id = " 23301 " name = " Comentar linha " / > <nl> - < Item id = " 23101 " name = " Comentar bloco " / > <nl> - < Item id = " 23113 " name = " Abrir comentário : " / > <nl> - < Item id = " 23115 " name = " Fechar comentário : " / > <nl> - < Item id = " 23116 " name = " Palavra chave como símbolo " / > <nl> - < Item id = " 23117 " name = " Palavras chave como símbolos " / > <nl> - < Item id = " 23201 " name = " Número " / > <nl> + < Comment title = " Comentários & amp ; & amp ; Números " > <nl> + < Item id = " 23301 " name = " Comentar linha " / > <nl> + < Item id = " 23101 " name = " Comentar bloco " / > <nl> + < Item id = " 23113 " name = " Abrir comentário : " / > <nl> + < Item id = " 23115 " name = " Fechar comentário : " / > <nl> + < Item id = " 23116 " name = " Palavra chave como símbolo " / > <nl> + < Item id = " 23117 " name = " Palavras chave como símbolos " / > <nl> + < Item id = " 23201 " name = " Número " / > <nl> < / Comment > <nl> - < Operator title = " Operadores " > <nl> - < Item id = " 24107 " name = " Operador " / > <nl> - < Item id = " 24103 " name = " Símbolos disponíveis " / > <nl> - < Item id = " 24101 " name = " Operadores ativos " / > <nl> - < Item id = " 24201 " name = " Delimitador 1 " / > <nl> - < Item id = " 24211 " name = " Limite aberto : " / > <nl> - < Item id = " 24214 " name = " Limite fechado : " / > <nl> - < Item id = " 24301 " name = " Delimitador 2 " / > <nl> - < Item id = " 24311 " name = " Limite aberto : " / > <nl> - < Item id = " 24314 " name = " Limite fechado : " / > <nl> - < Item id = " 24001 " name = " Habilitar caractere de escape : " / > <nl> + < Operator title = " Operadores " > <nl> + < Item id = " 24107 " name = " Operador " / > <nl> + < Item id = " 24103 " name = " Símbolos disponíveis " / > <nl> + < Item id = " 24101 " name = " Operadores ativos " / > <nl> + < Item id = " 24201 " name = " Delimitador 1 " / > <nl> + < Item id = " 24211 " name = " Limite aberto : " / > <nl> + < Item id = " 24214 " name = " Limite fechado : " / > <nl> + < Item id = " 24301 " name = " Delimitador 2 " / > <nl> + < Item id = " 24311 " name = " Limite aberto : " / > <nl> + < Item id = " 24314 " name = " Limite fechado : " / > <nl> + < Item id = " 24001 " name = " Habilitar caractere de escape : " / > <nl> < / Operator > <nl> < / UserDefine > <nl> - < Preference title = " Preferências " > <nl> - < Item id = " 6001 " name = " Fechar " / > <nl> - < Global title = " Global " > <nl> - < Item id = " 6101 " name = " Barra de ferramentas " / > <nl> - < Item id = " 6102 " name = " Ocultar " / > <nl> - < Item id = " 6103 " name = " Ícones pequenos " / > <nl> - < Item id = " 6104 " name = " Ícones grandes " / > <nl> - < Item id = " 6105 " name = " Ícones padrão " / > <nl> - <nl> - < Item id = " 6106 " name = " Barra das abas " / > <nl> - < Item id = " 6107 " name = " Reduzir " / > <nl> - < Item id = " 6108 " name = " Travar ( sem Arrastar e Soltar ) " / > <nl> - < Item id = " 6109 " name = " Escurecer abas inativas " / > <nl> - < Item id = " 6110 " name = " Destacar topo da aba ativa " / > <nl> - <nl> - < Item id = " 6111 " name = " Exibir barra de estado " / > <nl> - < Item id = " 6112 " name = " Habilitar o botão fechar em cada aba " / > <nl> - < Item id = " 6113 " name = " Fechar documento com duplo clique " / > <nl> - < Item id = " 6118 " name = " Ocultar " / > <nl> - < Item id = " 6119 " name = " Multi linhas " / > <nl> - < Item id = " 6120 " name = " Vertical " / > <nl> - <nl> - < Item id = " 6121 " name = " Barra de menus " / > <nl> - < Item id = " 6122 " name = " Ocultar ( use Alt ou F10 para alternar ) " / > <nl> - < Item id = " 6123 " name = " Idioma " / > <nl> - < / Global > <nl> - < Scintillas title = " Editor " > <nl> - < Item id = " 6216 " name = " Configurações do cursor " / > <nl> - < Item id = " 6217 " name = " Largura : " / > <nl> - < Item id = " 6219 " name = " Veloc . piscada : " / > <nl> - < Item id = " 6221 " name = " R " / > <nl> - < Item id = " 6222 " name = " L " / > <nl> - < Item id = " 6224 " name = " Multiedição " / > <nl> - < Item id = " 6225 " name = " Habilitar ( Ctrl + Mouse ) " / > <nl> - < Item id = " 6201 " name = " Marcador de margem " / > <nl> - < Item id = " 6202 " name = " Simples " / > <nl> - < Item id = " 6203 " name = " Seta " / > <nl> - < Item id = " 6204 " name = " Círculo " / > <nl> - < Item id = " 6205 " name = " Caixa " / > <nl> - < Item id = " 6226 " name = " Nenhum " / > <nl> + <nl> + < Preference title = " Preferências " > <nl> + < Item id = " 6001 " name = " Fechar " / > <nl> + < Global title = " Global " > <nl> + < Item id = " 6101 " name = " Barra de ferramentas " / > <nl> + < Item id = " 6102 " name = " Ocultar " / > <nl> + < Item id = " 6103 " name = " Ícones pequenos " / > <nl> + < Item id = " 6104 " name = " Ícones grandes " / > <nl> + < Item id = " 6105 " name = " Ícones padrão " / > <nl> + <nl> + < Item id = " 6106 " name = " Barra das abas " / > <nl> + < Item id = " 6107 " name = " Reduzir " / > <nl> + < Item id = " 6108 " name = " Travar ( sem Arrastar e Soltar ) " / > <nl> + < Item id = " 6109 " name = " Escurecer abas inativas " / > <nl> + < Item id = " 6110 " name = " Destacar topo da aba ativa " / > <nl> + <nl> + < Item id = " 6111 " name = " Exibir barra de estado " / > <nl> + < Item id = " 6112 " name = " Habilitar o botão fechar em cada aba " / > <nl> + < Item id = " 6113 " name = " Fechar documento com duplo clique " / > <nl> + < Item id = " 6118 " name = " Ocultar " / > <nl> + < Item id = " 6119 " name = " Multi linhas " / > <nl> + < Item id = " 6120 " name = " Vertical " / > <nl> + <nl> + < Item id = " 6121 " name = " Barra de menus " / > <nl> + < Item id = " 6122 " name = " Ocultar ( use Alt ou F10 para alternar ) " / > <nl> + < Item id = " 6123 " name = " Idioma " / > <nl> + < / Global > <nl> + <nl> + < Scintillas title = " Editor " > <nl> + < Item id = " 6216 " name = " Configurações do cursor " / > <nl> + < Item id = " 6217 " name = " Largura : " / > <nl> + < Item id = " 6219 " name = " Veloc . piscada : " / > <nl> + < Item id = " 6221 " name = " R " / > <nl> + < Item id = " 6222 " name = " L " / > <nl> + < Item id = " 6224 " name = " Multiedição " / > <nl> + < Item id = " 6225 " name = " Habilitar ( Ctrl + Mouse ) " / > <nl> + <nl> + < Item id = " 6201 " name = " Marcador de margem " / > <nl> + < Item id = " 6202 " name = " Simples " / > <nl> + < Item id = " 6203 " name = " Seta " / > <nl> + < Item id = " 6204 " name = " Círculo " / > <nl> + < Item id = " 6205 " name = " Caixa " / > <nl> + < Item id = " 6226 " name = " Nenhum " / > <nl> <nl> < Item id = " 6227 " name = " Quebra de linha " / > <nl> < Item id = " 6228 " name = " Padrão " / > <nl> < Item id = " 6229 " name = " Alinhado " / > <nl> < Item id = " 6230 " name = " Indentado " / > <nl> <nl> - < Item id = " 6206 " name = " Exibir número das linhas " / > <nl> - < Item id = " 6207 " name = " Exibir margem de marcadores " / > <nl> - < Item id = " 6208 " name = " Exibir linha vertical " / > <nl> - < Item id = " 6209 " name = " Número da coluna : " / > <nl> + < Item id = " 6206 " name = " Exibir número das linhas " / > <nl> + < Item id = " 6207 " name = " Exibir margem de marcadores " / > <nl> + < Item id = " 6208 " name = " Exibir linha vertical " / > <nl> + < Item id = " 6209 " name = " Número da coluna : " / > <nl> <nl> - < Item id = " 6211 " name = " Delimitador de colunas " / > <nl> - < Item id = " 6212 " name = " Modo linha " / > <nl> - < Item id = " 6213 " name = " Modo plano de fundo " / > <nl> - < Item id = " 6214 " name = " Realçar linha atual " / > <nl> + < Item id = " 6211 " name = " Delimitador de colunas " / > <nl> + < Item id = " 6212 " name = " Modo linha " / > <nl> + < Item id = " 6213 " name = " Modo plano de fundo " / > <nl> + < Item id = " 6214 " name = " Realçar linha atual " / > <nl> < / Scintillas > <nl> - < NewDoc title = " Novo Documento / Diretório Padrão " > <nl> - < Item id = " 6401 " name = " Formato " / > <nl> - < Item id = " 6402 " name = " Windows " / > <nl> - < Item id = " 6403 " name = " Unix " / > <nl> - < Item id = " 6404 " name = " Mac " / > <nl> - < Item id = " 6405 " name = " Codificação " / > <nl> - < Item id = " 6406 " name = " ANSI " / > <nl> - < Item id = " 6407 " name = " UTF - 8 sem BOM " / > <nl> - < Item id = " 6408 " name = " UTF - 8 " / > <nl> - < Item id = " 6409 " name = " UCS2 Big endian " / > <nl> - < Item id = " 6410 " name = " UCS2 small endian " / > <nl> - < Item id = " 6411 " name = " Linguagem padrão : " / > <nl> - < Item id = " 6413 " name = " Pasta Padrão ( Abrir / Salvar ) " / > <nl> - < Item id = " 6414 " name = " Acompanhar o documento atual " / > <nl> - < Item id = " 6415 " name = " Lembrar a última pasta utilizada " / > <nl> - < Item id = " 6419 " name = " Novo Documento " / > <nl> - < Item id = " 6420 " name = " Aplicar ao abrir arquivo ANSI " / > <nl> + <nl> + < NewDoc title = " Novo Documento / Diretório Padrão " > <nl> + < Item id = " 6401 " name = " Formato " / > <nl> + < Item id = " 6402 " name = " Windows " / > <nl> + < Item id = " 6403 " name = " Unix " / > <nl> + < Item id = " 6404 " name = " Mac " / > <nl> + < Item id = " 6405 " name = " Codificação " / > <nl> + < Item id = " 6406 " name = " ANSI " / > <nl> + < Item id = " 6407 " name = " UTF - 8 sem BOM " / > <nl> + < Item id = " 6408 " name = " UTF - 8 " / > <nl> + < Item id = " 6409 " name = " UCS2 Big endian " / > <nl> + < Item id = " 6410 " name = " UCS2 small endian " / > <nl> + < Item id = " 6411 " name = " Linguagem padrão : " / > <nl> + < Item id = " 6413 " name = " Pasta Padrão ( Abrir / Salvar ) " / > <nl> + < Item id = " 6414 " name = " Acompanhar o documento atual " / > <nl> + < Item id = " 6415 " name = " Lembrar a última pasta utilizada " / > <nl> + < Item id = " 6418 " name = " . . . " / > <nl> + < Item id = " 6419 " name = " Novo Documento " / > <nl> + < Item id = " 6420 " name = " Aplicar ao abrir arquivo ANSI " / > <nl> < / NewDoc > <nl> - < FileAssoc title = " Tipos de Arquivos " > <nl> - < Item id = " 4009 " name = " Extensões suportadas : " / > <nl> - < Item id = " 4010 " name = " Extensões registradas : " / > <nl> + <nl> + < FileAssoc title = " Tipos de Arquivos " > <nl> + < Item id = " 4009 " name = " Extensões suportadas : " / > <nl> + < Item id = " 4010 " name = " Extensões registradas : " / > <nl> < / FileAssoc > <nl> - < LangMenu title = " Menu de Linguagem / Configuração de Abas " > <nl> - < Item id = " 6505 " name = " Itens disponíveis " / > <nl> - < Item id = " 6506 " name = " Itens desabilitados " / > <nl> - < Item id = " 6507 " name = " Tornar o menu de linguagens compacto " / > <nl> - < Item id = " 6508 " name = " Menu de linguagens " / > <nl> - < Item id = " 6510 " name = " Usar padrão " / > <nl> - < Item id = " 6301 " name = " Configurações de tabulação " / > <nl> - < Item id = " 6302 " name = " Substituir por espaços " / > <nl> - < Item id = " 6303 " name = " Tamanho do Tab : " / > <nl> + <nl> + < LangMenu title = " Menu de Linguagem / Configuração de Abas " > <nl> + < Item id = " 6505 " name = " Itens disponíveis " / > <nl> + < Item id = " 6506 " name = " Itens desabilitados " / > <nl> + < Item id = " 6507 " name = " Tornar o menu de linguagens compacto " / > <nl> + < Item id = " 6508 " name = " Menu de linguagens " / > <nl> + < Item id = " 6510 " name = " Usar padrão " / > <nl> + < Item id = " 6301 " name = " Configurações de tabulação " / > <nl> + < Item id = " 6302 " name = " Substituir por espaços " / > <nl> + < Item id = " 6303 " name = " Tamanho do Tab : " / > <nl> < / LangMenu > <nl> - < Print title = " Impressão " > <nl> - < Item id = " 6601 " name = " Imprimir número da linha " / > <nl> - < Item id = " 6602 " name = " Opções de cores " / > <nl> - < Item id = " 6603 " name = " Colorido ( com cor de fundo ) " / > <nl> - < Item id = " 6604 " name = " Inverter " / > <nl> - < Item id = " 6605 " name = " Preto e branco " / > <nl> - < Item id = " 6606 " name = " Colorido ( sem cor de fundo ) " / > <nl> - < Item id = " 6607 " name = " Configurar margens ( Unid : mm ) " / > <nl> - < Item id = " 6612 " name = " Esquerda " / > <nl> - < Item id = " 6613 " name = " Topo " / > <nl> - < Item id = " 6614 " name = " Direita " / > <nl> - < Item id = " 6615 " name = " Base " / > <nl> - < Item id = " 6706 " name = " Negrito " / > <nl> - < Item id = " 6707 " name = " Itálico " / > <nl> - < Item id = " 6708 " name = " Cabeçalho " / > <nl> - < Item id = " 6709 " name = " Esquerda " / > <nl> - < Item id = " 6710 " name = " Centro " / > <nl> - < Item id = " 6711 " name = " Direita " / > <nl> - < Item id = " 6717 " name = " Negrito " / > <nl> - < Item id = " 6718 " name = " Itálico " / > <nl> - < Item id = " 6719 " name = " Rodapé " / > <nl> - < Item id = " 6720 " name = " Esquerda " / > <nl> - < Item id = " 6721 " name = " Centro " / > <nl> - < Item id = " 6722 " name = " Direita " / > <nl> - < Item id = " 6723 " name = " Adicionar " / > <nl> - < Item id = " 6725 " name = " Variável : " / > <nl> - < Item id = " 6728 " name = " Cabeçalho e rodapé " / > <nl> + <nl> + < Print title = " Impressão " > <nl> + < Item id = " 6601 " name = " Imprimir número da linha " / > <nl> + < Item id = " 6602 " name = " Opções de cores " / > <nl> + < Item id = " 6603 " name = " Colorido ( com cor de fundo ) " / > <nl> + < Item id = " 6604 " name = " Inverter " / > <nl> + < Item id = " 6605 " name = " Preto e branco " / > <nl> + < Item id = " 6606 " name = " Colorido ( sem cor de fundo ) " / > <nl> + < Item id = " 6607 " name = " Configurar margens ( Unid : mm ) " / > <nl> + < Item id = " 6612 " name = " Esquerda " / > <nl> + < Item id = " 6613 " name = " Topo " / > <nl> + < Item id = " 6614 " name = " Direita " / > <nl> + < Item id = " 6615 " name = " Base " / > <nl> + < Item id = " 6706 " name = " Negrito " / > <nl> + < Item id = " 6707 " name = " Itálico " / > <nl> + < Item id = " 6708 " name = " Cabeçalho " / > <nl> + < Item id = " 6709 " name = " Esquerda " / > <nl> + < Item id = " 6710 " name = " Centro " / > <nl> + < Item id = " 6711 " name = " Direita " / > <nl> + < Item id = " 6717 " name = " Negrito " / > <nl> + < Item id = " 6718 " name = " Itálico " / > <nl> + < Item id = " 6719 " name = " Rodapé " / > <nl> + < Item id = " 6720 " name = " Esquerda " / > <nl> + < Item id = " 6721 " name = " Centro " / > <nl> + < Item id = " 6722 " name = " Direita " / > <nl> + < Item id = " 6723 " name = " Adicionar " / > <nl> + < Item id = " 6725 " name = " Variável : " / > <nl> + < Item id = " 6728 " name = " Cabeçalho e rodapé " / > <nl> < / Print > <nl> - < MISC title = " Outras " > <nl> - < Item id = " 6304 " name = " Histórico de arquivos " / > <nl> - < Item id = " 6305 " name = " Não verificar ao iniciar " / > <nl> - < Item id = " 6306 " name = " Número máximo de arquivos : " / > <nl> - < Item id = " 6307 " name = " Habilitar " / > <nl> - < Item id = " 6308 " name = " Minimizar na bandeja " / > <nl> - < Item id = " 6309 " name = " Lembrar última sessão ao inicializar " / > <nl> - < Item id = " 6312 " name = " Auto detectar estado de arquivos " / > <nl> - < Item id = " 6313 " name = " Atualização silenciosa " / > <nl> - < Item id = " 6318 " name = " Configurações de hiperlink " / > <nl> - < Item id = " 6325 " name = " Ir para a última linha depois de atualizar " / > <nl> - < Item id = " 6319 " name = " Habilitar " / > <nl> - < Item id = " 6320 " name = " Não sublinhar " / > <nl> - < Item id = " 6322 " name = " Extensão sessão : " / > <nl> - < Item id = " 6323 " name = " Habilitar auto - atualização do Notepad + + " / > <nl> - < Item id = " 6324 " name = " Troca de documentos ( Ctrl + Tab ) " / > <nl> - < Item id = " 6326 " name = " Habilitar destaque inteligente " / > <nl> - < Item id = " 6329 " name = " Destacador de tags " / > <nl> - < Item id = " 6327 " name = " Habilitar " / > <nl> - < Item id = " 6328 " name = " Destacar tags de atributos " / > <nl> - < Item id = " 6330 " name = " Destacar áreas comentário / php / asp " / > <nl> - <nl> - < Item id = " 6331 " name = " Mostrar somente o nome do arquivo no título " / > <nl> - < Item id = " 6114 " name = " Habilitar " / > <nl> - < Item id = " 6115 " name = " Auto - indentar " / > <nl> - < Item id = " 6117 " name = " Habilitar troca inteligente " / > <nl> - <nl> - < / MISC > <nl> - < Backup title = " Backup / Auto Completar " > <nl> - < Item id = " 6801 " name = " Backup " / > <nl> - < Item id = " 6315 " name = " Nenhum " / > <nl> - < Item id = " 6316 " name = " Backup Simples " / > <nl> - < Item id = " 6317 " name = " Backup Completo " / > <nl> - < Item id = " 6804 " name = " Definir pasta de Backup " / > <nl> - < Item id = " 6803 " name = " Pasta : " / > <nl> - < Item id = " 6807 " name = " Auto completar " / > <nl> - < Item id = " 6808 " name = " Habilitar auto completar para cada entrada " / > <nl> - < Item id = " 6809 " name = " Completar função " / > <nl> - < Item id = " 6810 " name = " Completar palavra " / > <nl> - < Item id = " 6811 " name = " A partir do " / > <nl> - < Item id = " 6813 " name = " º caractere " / > <nl> - < Item id = " 6814 " name = " Valor válido : 1 - 9 " / > <nl> - < Item id = " 6815 " name = " Mostrar dica de parâmetro a cada entrada " / > <nl> + <nl> + < MISC title = " Outras " > <nl> + < Item id = " 6304 " name = " Histórico de arquivos " / > <nl> + < Item id = " 6305 " name = " Não verificar ao iniciar " / > <nl> + < Item id = " 6306 " name = " Número máximo de arquivos : " / > <nl> + < Item id = " 6307 " name = " Habilitar " / > <nl> + < Item id = " 6308 " name = " Minimizar na bandeja " / > <nl> + < Item id = " 6309 " name = " Lembrar última sessão ao inicializar " / > <nl> + < Item id = " 6312 " name = " Auto detectar estado de arquivos " / > <nl> + < Item id = " 6313 " name = " Atualização silenciosa " / > <nl> + < Item id = " 6318 " name = " Configurações de hiperlink " / > <nl> + < Item id = " 6325 " name = " Ir para a última linha depois de atualizar " / > <nl> + < Item id = " 6319 " name = " Habilitar " / > <nl> + < Item id = " 6320 " name = " Não sublinhar " / > <nl> + < Item id = " 6322 " name = " Extensão sessão : " / > <nl> + < Item id = " 6323 " name = " Habilitar auto - atualização do Notepad + + " / > <nl> + < Item id = " 6324 " name = " Troca de documentos ( Ctrl + Tab ) " / > <nl> + < Item id = " 6326 " name = " Habilitar destaque inteligente " / > <nl> + < Item id = " 6329 " name = " Destacador de tags " / > <nl> + < Item id = " 6327 " name = " Habilitar " / > <nl> + < Item id = " 6328 " name = " Destacar tags de atributos " / > <nl> + < Item id = " 6330 " name = " Destacar áreas comentário / php / asp " / > <nl> + <nl> + < Item id = " 6331 " name = " Mostrar somente o nome do arquivo no título " / > <nl> + < Item id = " 6114 " name = " Habilitar " / > <nl> + < Item id = " 6115 " name = " Auto - indentar " / > <nl> + < Item id = " 6117 " name = " Habilitar troca inteligente " / > <nl> + < / MISC > <nl> + <nl> + < Backup title = " Backup / Auto Completar " > <nl> + < Item id = " 6801 " name = " Backup " / > <nl> + < Item id = " 6315 " name = " Nenhum " / > <nl> + < Item id = " 6316 " name = " Backup Simples " / > <nl> + < Item id = " 6317 " name = " Backup Completo " / > <nl> + < Item id = " 6804 " name = " Definir pasta de Backup " / > <nl> + < Item id = " 6803 " name = " Pasta : " / > <nl> + < Item id = " 6807 " name = " Auto completar " / > <nl> + < Item id = " 6808 " name = " Habilitar auto completar para cada entrada " / > <nl> + < Item id = " 6809 " name = " Completar função " / > <nl> + < Item id = " 6810 " name = " Completar palavra " / > <nl> + < Item id = " 6811 " name = " A partir do " / > <nl> + < Item id = " 6813 " name = " º caractere " / > <nl> + < Item id = " 6814 " name = " Valor válido : 1 - 9 " / > <nl> + < Item id = " 6815 " name = " Mostrar dica de parâmetro a cada entrada " / > <nl> < / Backup > <nl> - < / Preference > <nl> - < MultiMacro title = " Executar macro múltiplas vezes " > <nl> - < Item id = " 1 " name = " Executar " / > <nl> - < Item id = " 2 " name = " Cancelar " / > <nl> - < Item id = " 8006 " name = " Macro a executar : " / > <nl> - < Item id = " 8001 " name = " Executar " / > <nl> - < Item id = " 8005 " name = " vez ( es ) " / > <nl> - < Item id = " 8002 " name = " Executar até o final da linha " / > <nl> + < / Preference > <nl> + <nl> + < MultiMacro title = " Executar macro múltiplas vezes " > <nl> + < Item id = " 1 " name = " Executar " / > <nl> + < Item id = " 2 " name = " Cancelar " / > <nl> + < Item id = " 8006 " name = " Macro a executar : " / > <nl> + < Item id = " 8001 " name = " Executar " / > <nl> + < Item id = " 8005 " name = " vez ( es ) " / > <nl> + < Item id = " 8002 " name = " Executar até o final da linha " / > <nl> < / MultiMacro > <nl> - < Window title = " Janelas " > <nl> - < Item id = " 1 " name = " Ativar " / > <nl> - < Item id = " 2 " name = " OK " / > <nl> - < Item id = " 7002 " name = " Salvar " / > <nl> - < Item id = " 7003 " name = " Fechar janela ( s ) " / > <nl> - < Item id = " 7004 " name = " Ordenar abas " / > <nl> + <nl> + < Window title = " Janelas " > <nl> + < Item id = " 1 " name = " Ativar " / > <nl> + < Item id = " 2 " name = " OK " / > <nl> + < Item id = " 7002 " name = " Salvar " / > <nl> + < Item id = " 7003 " name = " Fechar janela ( s ) " / > <nl> + < Item id = " 7004 " name = " Ordenar abas " / > <nl> < / Window > <nl> - < ColumnEditor title = " Editor de Coluna " > <nl> - < Item id = " 2023 " name = " Texto para inserir " / > <nl> - < Item id = " 2033 " name = " Número para inserir " / > <nl> - < Item id = " 2030 " name = " Número inicial : " / > <nl> - < Item id = " 2031 " name = " Incrementar em : " / > <nl> - < Item id = " 2035 " name = " Usar zeros " / > <nl> - < Item id = " 2032 " name = " Formato " / > <nl> - < Item id = " 2024 " name = " Decimal " / > <nl> - < Item id = " 2025 " name = " Octa " / > <nl> - < Item id = " 2026 " name = " Hexa " / > <nl> - < Item id = " 2027 " name = " Binário " / > <nl> - < Item id = " 1 " name = " OK " / > <nl> - < Item id = " 2 " name = " Cancelar " / > <nl> + <nl> + < ColumnEditor title = " Editor de Coluna " > <nl> + < Item id = " 2023 " name = " Texto para inserir " / > <nl> + < Item id = " 2033 " name = " Número para inserir " / > <nl> + < Item id = " 2030 " name = " Número inicial : " / > <nl> + < Item id = " 2031 " name = " Incrementar em : " / > <nl> + < Item id = " 2035 " name = " Usar zeros " / > <nl> + < Item id = " 2032 " name = " Formato " / > <nl> + < Item id = " 2024 " name = " Decimal " / > <nl> + < Item id = " 2025 " name = " Octa " / > <nl> + < Item id = " 2026 " name = " Hexa " / > <nl> + < Item id = " 2027 " name = " Binário " / > <nl> + < Item id = " 1 " name = " OK " / > <nl> + < Item id = " 2 " name = " Cancelar " / > <nl> < / ColumnEditor > <nl> < / Dialog > <nl> < MessageBox > <nl> - < ContextMenuXmlEditWaring title = " Editar contextMenu " message = " Editar contextMenu . xml lhe permite modificar seu menu de contexto do Notepad + + . \ rVocê deve reiniciar seu Notepad + + para as modificações no contextMenu . xml terem efeito . " / > <nl> - < NppHelpAbsentWaring title = " Arquivo não existe " message = " \ rnão exite . Por favor , baixe - o no site do Notepad + + . " / > <nl> - < SaveCurrentModifWaring title = " Salvar Modificações Atuais " message = " Você deve salvar as modificações atuais . \ rTodas as modificações salvar não podem ser desfeitas . \ r \ rContinuar ? " / > <nl> - < LoseUndoAbilityWaring title = " Aviso de Perda de Habilidade de Desfazer " message = " Você deve salvar as modificações atuais . \ rTodas as modificações salvar não podem ser desfeitas . \ r \ rContinuar ? " / > <nl> - < CannotMoveDoc title = " Mover para nova Instância do Notepad + + " message = " O documento foi modificado , salve - o e tente novamente . " / > <nl> - < DocReloadWarning title = " Recarregar " message = " Você tem certeza que deseja recarregar o arquivo atual e perder todas as modificações feitas no Notepad + + ? " / > <nl> - < FileLockedWarning title = " Falha ao Salvar " message = " Por favor , verifique se esse arquivo está aberto em outro programa " / > <nl> - < FileAlreadyOpenedInNpp title = " " message = " O arquivo já está aberto no Notepad + + . " / > <nl> - < DeleteFileFailed title = " Apagar Arquivo " message = " Falha ao Apagar Arquivo " / > <nl> + < ContextMenuXmlEditWaring title = " Edititando contextMenu " message = " Editar o arquivo contextMenu . xml permite que você modifique as mensagens do menu de contexto . \ rÉ necessário reiniciar o Notepad + + para que as modificações tenham efeito . " / > <nl> + < NppHelpAbsentWaring title = " Arquivo não existe " message = " \ rnão existe . Por favor baixe o arquivo no site do Notepad + + . " / > <nl> + < SaveCurrentModifWaring title = " Salvar modificações atuais " message = " Você deve salvar a modificação atual . \ rAs modificações salvas não poderão ser desfeitas . \ r \ rDeseja continuar ? " / > <nl> + < LoseUndoAbilityWaring title = " Impossível desfazer " message = " Você deve salvar a modificação atual . \ rAs modificações salvas não poderão ser desfeitas . \ r \ rDeseja continuar ? " / > <nl> + < CannotMoveDoc title = " Mover para nova instância do Notepad + + " message = " Documento alterado , salve - o e tente novamente . " / > <nl> + < DocReloadWarning title = " Recarregar " message = " Você tem certeza que quer recarregar o arquivo atual e perder as modificações feitas no Notepad + + ? " / > <nl> + < FileLockedWarning title = " Falha ao salvar " message = " Por favor verifique se este arquivo está aberto em outro programa " / > <nl> + < FileAlreadyOpenedInNpp title = " " message = " O arquivo já está aberto no Notepad + + . " / > <nl> + < DeleteFileFailed title = " Excluir Arquivo " message = " Falha ao excluir arquivo " / > <nl> < / MessageBox > <nl> < ProjectManager > <nl> - < PanelTitle name = " Projeto " / > <nl> - < WorkspaceRootName name = " " / > <nl> + < PanelTitle name = " Projeto " / > <nl> + < WorkspaceRootName name = " Área de trabalho " / > <nl> < Menus > <nl> < Entries > <nl> - < Item id = " 0 " name = " Espaço de Trabalho " / > <nl> + < Item id = " 0 " name = " Área de trabalho " / > <nl> < Item id = " 1 " name = " Editar " / > <nl> < / Entries > <nl> < WorkspaceMenu > <nl> - < Item id = " 3122 " name = " Novo Espaço de Trabalho " / > <nl> - < Item id = " 3123 " name = " Abrir Espaço de Trabalho " / > <nl> - < Item id = " 3124 " name = " Recarregar Espaço de Trabalho " / > <nl> + < Item id = " 3122 " name = " Nova área de trabalho " / > <nl> + < Item id = " 3123 " name = " Abrir área de trabalho " / > <nl> + < Item id = " 3124 " name = " Recarregar área de trabalho " / > <nl> < Item id = " 3125 " name = " Salvar " / > <nl> < Item id = " 3126 " name = " Salvar como . . . " / > <nl> < Item id = " 3127 " name = " Salvar uma cópia como . . . " / > <nl> - < Item id = " 3121 " name = " Adicionar Novo Projeto " / > <nl> + < Item id = " 3121 " name = " Adicionar novo projeto " / > <nl> < / WorkspaceMenu > <nl> < ProjectMenu > <nl> < Item id = " 3111 " name = " Renomear " / > <nl> - < Item id = " 3112 " name = " Adicionar Pasta " / > <nl> - < Item id = " 3113 " name = " Adicionar Arquivos . . . " / > <nl> + < Item id = " 3112 " name = " Adicionar pastas " / > <nl> + < Item id = " 3113 " name = " Adicionar arquivos . . . " / > <nl> < Item id = " 3114 " name = " Remover " / > <nl> < / ProjectMenu > <nl> < FolderMenu > <nl> < Item id = " 3111 " name = " Renomear " / > <nl> - < Item id = " 3112 " name = " Adicionar Pasta " / > <nl> - < Item id = " 3113 " name = " Adicionar Arquivos . . . " / > <nl> + < Item id = " 3112 " name = " Adicionar pastas " / > <nl> + < Item id = " 3113 " name = " Adicionar arquivos . . . " / > <nl> < Item id = " 3114 " name = " Remover " / > <nl> < / FolderMenu > <nl> < FileMenu > <nl> < Item id = " 3111 " name = " Renomear " / > <nl> < Item id = " 3115 " name = " Remover " / > <nl> - < Item id = " 3116 " name = " Modificar Caminho " / > <nl> + < Item id = " 3116 " name = " Alterar caminho do arquivo " / > <nl> < / FileMenu > <nl> < / Menus > <nl> - < / ProjectManager > <nl> + < / ProjectManager > <nl> < / Native - Langue > <nl> - < / NotepadPlus > <nl> \ No newline at end of file <nl> + < / NotepadPlus > <nl> mmm a / PowerEditor / installer / nativeLang / croatian . xml <nl> ppp b / PowerEditor / installer / nativeLang / croatian . xml <nl> <nl> < ? xml version = " 1 . 0 " encoding = " Windows - 1250 " ? > <nl> < ! - - <nl> - Croatian localization for Notepad + + <nl> - Last modified Thursday , March 12th 2009 15 : 40 GMT by Dominko A dajiæ . <nl> - Please e - mail errors , suggestions etc . to domazd ( at ) mail ( dot ) ru . <nl> + Croatian localization for Notepad + + v . 5 . 9 . 6 . 1 <nl> + Last modified 11 . 11 . 2011 by Elvis Gambira a <nl> - - > <nl> < NotepadPlus > <nl> - < Native - Langue name = " Hrvatski jezik " filename = " croatian . xml " > <nl> - < Menu > <nl> - < Main > <nl> + < Native - Langue name = " Hrvatski ( Croatian ) " filename = " croatian . xml " > <nl> + < Menu > <nl> + < Main > <nl> < ! - - Main Menu Entries - - > <nl> - < Entries > <nl> - < Item id = " 0 " name = " & amp ; Datoteka " / > <nl> - < Item id = " 1 " name = " & amp ; Ureðivanje " / > <nl> - < Item id = " 2 " name = " & amp ; Pretra ivanje " / > <nl> - < Item id = " 3 " name = " Pri & amp ; kaz " / > <nl> - < Item id = " 4 " name = " For & amp ; mat " / > <nl> - < Item id = " 5 " name = " & amp ; Jezik sintaksi " / > <nl> - < Item id = " 6 " name = " Po & amp ; stavke " / > <nl> - < Item id = " 7 " name = " Makro " / > <nl> - < Item id = " 8 " name = " Pokrenuti " / > <nl> - < Item idName = " Plugins " name = " Prikljuèci " / > <nl> - < Item idName = " Window " name = " Okno " / > <nl> - < / Entries > <nl> + < Entries > <nl> + < Item id = " 0 " name = " & amp ; Datoteka " / > <nl> + < Item id = " 1 " name = " & amp ; Uredi " / > <nl> + < Item id = " 2 " name = " & amp ; Tra i " / > <nl> + < Item id = " 3 " name = " & amp ; Prikaz " / > <nl> + < Item id = " 4 " name = " & amp ; Format " / > <nl> + < Item id = " 5 " name = " & amp ; Jezik sintaksi " / > <nl> + < Item id = " 6 " name = " P & amp ; ostavke " / > <nl> + < Item id = " 7 " name = " & amp ; Makro " / > <nl> + < Item id = " 8 " name = " Po & amp ; kreni " / > <nl> + < Item idName = " Plugins " name = " P & amp ; rikljuèci " / > <nl> + < Item idName = " Window " name = " Pro & amp ; zor " / > <nl> + < / Entries > <nl> <nl> < ! - - Sub Menu Entries - - > <nl> < SubEntries > <nl> - < Item posX = " 3 " posY = " 16 " name = " Skupiti razinu " / > <nl> - < Item posX = " 3 " posY = " 17 " name = " Ra iriti razinu " / > <nl> + < Item posX = " 1 " posY = " 9 " name = " Kopiraj u meðuspremnik " / > <nl> + < Item posX = " 1 " posY = " 10 " name = " Uvlaka retka " / > <nl> + < Item posX = " 1 " posY = " 11 " name = " Velika / mala slova " / > <nl> + < Item posX = " 1 " posY = " 12 " name = " Retci " / > <nl> + < Item posX = " 1 " posY = " 13 " name = " Komentari " / > <nl> + < Item posX = " 1 " posY = " 14 " name = " Automatsko dovr avanje " / > <nl> + < Item posX = " 1 " posY = " 15 " name = " Kraj retka " / > <nl> + < Item posX = " 1 " posY = " 16 " name = " Praznine " / > <nl> + < Item posX = " 1 " posY = " 17 " name = " Umetanje posebno " / > <nl> + < Item posX = " 2 " posY = " 16 " name = " Oznaèi sve " / > <nl> + < Item posX = " 2 " posY = " 17 " name = " Poni ti oznake " / > <nl> + < Item posX = " 2 " posY = " 18 " name = " Skoèi gore " / > <nl> + < Item posX = " 2 " posY = " 19 " name = " Skoèi dolje " / > <nl> + < Item posX = " 2 " posY = " 21 " name = " Knji ne oznake " / > <nl> + < Item posX = " 3 " posY = " 4 " name = " Prika i znakove " / > <nl> + < Item posX = " 3 " posY = " 5 " name = " Uveæanje " / > <nl> + < Item posX = " 3 " posY = " 6 " name = " Premjesti / kloniraj tekuæi dokument " / > <nl> + < Item posX = " 3 " posY = " 16 " name = " Suzi razinu " / > <nl> + < Item posX = " 3 " posY = " 17 " name = " Pro iri razinu " / > <nl> + < Item posX = " 3 " posY = " 21 " name = " Projekt " / > <nl> + < Item posX = " 4 " posY = " 5 " name = " Set znakovlja " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 0 " name = " Arapski " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 1 " name = " Baltièki " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 2 " name = " Keltski " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 3 " name = " Æirilica " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 4 " name = " Srednja Europa " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 5 " name = " Kineski " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 6 " name = " Istoèna Europa " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 7 " name = " Grèki " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 8 " name = " Hebrejski " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 9 " name = " Japanski " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 10 " name = " Korejski " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 11 " name = " Sjeverna Europa " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 12 " name = " Tajlandski " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 13 " name = " Turski " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 14 " name = " Zapadna Europa " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 15 " name = " Vijetnamski " / > <nl> + < Item posX = " 6 " posY = " 4 " name = " Uvoz " / > <nl> < / SubEntries > <nl> <nl> < ! - - all menu item - - > <nl> < Commands > <nl> - < Item id = " 41001 " name = " & amp ; Novo " / > <nl> - < Item id = " 41002 " name = " & amp ; Otvoriti " / > <nl> - < Item id = " 41003 " name = " Zatvoriti " / > <nl> - < Item id = " 41004 " name = " Zatvo & amp ; riti sve " / > <nl> - < Item id = " 41005 " name = " Zatvoriti sve OSIM TEKUÆEG dokumenta " / > <nl> - < Item id = " 41006 " name = " & amp ; Pohraniti " / > <nl> - < Item id = " 41007 " name = " Pohra & amp ; niti sve " / > <nl> - < Item id = " 41008 " name = " Pohraniti & amp ; kao . . . " / > <nl> - < Item id = " 41010 " name = " Ispisati . . . " / > <nl> - < Item id = " 1001 " name = " Ispisati odmah ! " / > <nl> - < Item id = " 41011 " name = " Iz & amp ; laz " / > <nl> - < Item id = " 41012 " name = " Uèitati zasjedanje . . . " / > <nl> - < Item id = " 41013 " name = " Pohraniti zasjedanje . . . " / > <nl> - < Item id = " 41014 " name = " Ponovno uèitati s diska " / > <nl> - < Item id = " 41015 " name = " Presliku pohraniti kao . . . " / > <nl> - < Item id = " 41016 " name = " Izbrisati s diska " / > <nl> - < Item id = " 41017 " name = " Preimenovati . . . " / > <nl> - <nl> - < Item id = " 42001 " name = " Iz & amp ; rezati " / > <nl> - < Item id = " 42002 " name = " Pre & amp ; slikati " / > <nl> - < Item id = " 42003 " name = " Poni & amp ; titi " / > <nl> - < Item id = " 42004 " name = " Pono & amp ; viti " / > <nl> - < Item id = " 42005 " name = " Zalije & amp ; piti " / > <nl> - < Item id = " 42006 " name = " Izbri & amp ; sati " / > <nl> - < Item id = " 42007 " name = " Odabrati s & amp ; ve " / > <nl> - < Item id = " 42008 " name = " Umetnuti TAB ( odmaknuti ) " / > <nl> - < Item id = " 42009 " name = " Odstraniti TAB ( primaknuti ) " / > <nl> - < Item id = " 42010 " name = " Udvostruèiti trenutni redak " / > <nl> - < Item id = " 42012 " name = " Redak prelomiti na rubu okna " / > <nl> - < Item id = " 42013 " name = " Spojiti retke " / > <nl> - < Item id = " 42014 " name = " Tekuæi redak posunuti na gore " / > <nl> - < Item id = " 42015 " name = " Tekuæi redak posunuti na dolje " / > <nl> - < Item id = " 42016 " name = " Velikim slovima " / > <nl> - < Item id = " 42017 " name = " Malim slovima " / > <nl> - < Item id = " 42018 " name = " & amp ; Zapoèeti snimanje " / > <nl> - < Item id = " 42019 " name = " & amp ; Obustaviti snimanje " / > <nl> - < Item id = " 42021 " name = " & amp ; Prikazati snimljeno " / > <nl> - < Item id = " 42022 " name = " Komentirati / odkomentirati razinu " / > <nl> - < Item id = " 42023 " name = " Tekuæi komentar " / > <nl> - < Item id = " 42024 " name = " Odstraniti oznake preostalog prostora " / > <nl> - < Item id = " 42025 " name = " Pohraniti upravo snimljeni makro " / > <nl> - < Item id = " 42026 " name = " Smjer teksta s desna na lijevo " / > <nl> - < Item id = " 42027 " name = " Smjer teksta s lijeva na desno " / > <nl> - < Item id = " 42028 " name = " Zadati samo za èitanje " / > <nl> - < Item id = " 42029 " name = " Potpunu stazu tekuæe datoteke u meðuspremnik " / > <nl> - < Item id = " 42030 " name = " Tekuæi naziv datoteke u meðuspremnik " / > <nl> - < Item id = " 42031 " name = " Tekuæu stazu mape u meðuspremnik " / > <nl> - < Item id = " 42032 " name = " Vi estruko pokretanje makro - naredbi . . . " / > <nl> - < Item id = " 42033 " name = " Odstraniti za titu od pisanja " / > <nl> - < Item id = " 42035 " name = " Komentirati razinu " / > <nl> - < Item id = " 42036 " name = " Odkomentirati razinu " / > <nl> + < Item id = " 41001 " name = " & amp ; Novo " / > <nl> + < Item id = " 41002 " name = " & amp ; Otvori " / > <nl> + < Item id = " 41003 " name = " & amp ; Zatvori " / > <nl> + < Item id = " 41004 " name = " Z & amp ; atvori sve " / > <nl> + < Item id = " 41005 " name = " Zatvori sv & amp ; e osim tekuæeg " / > <nl> + < Item id = " 41006 " name = " & amp ; Spremi " / > <nl> + < Item id = " 41007 " name = " Spremi s & amp ; ve " / > <nl> + < Item id = " 41008 " name = " Spremi & amp ; kao . . . " / > <nl> + < Item id = " 41010 " name = " Is & amp ; pi i . . . " / > <nl> + < Item id = " 1001 " name = " Ispi i odma & amp ; h " / > <nl> + < Item id = " 41011 " name = " Iz & amp ; laz " / > <nl> + < Item id = " 41012 " name = " & amp ; Uèitaj sesiju . . . " / > <nl> + < Item id = " 41013 " name = " Sp & amp ; remi sesiju . . . " / > <nl> + < Item id = " 41014 " name = " Ponovno uèi & amp ; taj " / > <nl> + < Item id = " 41015 " name = " Spre & amp ; mi kopiju kao . . . " / > <nl> + < Item id = " 41016 " name = " Izbri i s & amp ; diska " / > <nl> + < Item id = " 41017 " name = " Pre & amp ; imenuj . . . " / > <nl> <nl> - < Item id = " 43001 " name = " & amp ; Pronaæi . . . " / > <nl> - < Item id = " 43002 " name = " Pronaæi & amp ; slijedeæe " / > <nl> - < Item id = " 43003 " name = " Nadomjestiti . . . " / > <nl> - < Item id = " 43004 " name = " Skoèiti na redak . . . " / > <nl> - < Item id = " 43005 " name = " Staviti / odstraniti tionik " / > <nl> - < Item id = " 43006 " name = " Slijedeæi tionik " / > <nl> - < Item id = " 43007 " name = " Prethodni tionik " / > <nl> - < Item id = " 43008 " name = " Odstraniti sve tionike " / > <nl> - < Item id = " 43009 " name = " Pronaæi shodnu spojnicu " / > <nl> - < Item id = " 43010 " name = " Pronaæi prethodno " / > <nl> - < Item id = " 43011 " name = " & amp ; Inkrementalno pretra ivanje . . . " / > <nl> - < Item id = " 43013 " name = " Pronaæi u datotekama " / > <nl> - < Item id = " 43014 " name = " Pronaæi ( izraz pod pokazivaèem ) slijedeæe " / > <nl> - < Item id = " 43015 " name = " Pronaæi ( izraz pod pokazivaèem ) prethodno " / > <nl> - < Item id = " 43016 " name = " Oznaèiti sve " / > <nl> - < Item id = " 43017 " name = " Odznaèiti sve " / > <nl> - < Item id = " 43018 " name = " Izrezati tionicima oznaèene retke " / > <nl> - < Item id = " 43019 " name = " Preslikati tionicima oznaèene retke " / > <nl> - < Item id = " 43020 " name = " tionicima oznaèene retke nadomjestiti sadr ajem meðuspremnika " / > <nl> - < Item id = " 43021 " name = " Izbrisati tionicima oznaèene retke " / > <nl> - < Item id = " 44009 " name = " Preko zaslona prikazati samo okno dokumenta " / > <nl> - < Item id = " 44010 " name = " Smotati sve razine " / > <nl> - < Item id = " 44011 " name = " Korisnikom zadani dijalog " / > <nl> - < Item id = " 44019 " name = " Prikaz svih znakova " / > <nl> - < Item id = " 44020 " name = " Prikaz voðice razinskih uvlaka " / > <nl> - < Item id = " 44022 " name = " Prijelom teksta " / > <nl> - < Item id = " 44023 " name = " Uve & amp ; æati Ctrl - Kotaèiæ mi a na gore " / > <nl> - < Item id = " 44024 " name = " Uma & amp ; njiti Ctrl - Kotaèiæ mi a na dolje " / > <nl> - < Item id = " 44025 " name = " Prikaz znakova razmaka i tabulatora " / > <nl> - < Item id = " 44026 " name = " Prikaz kraja retka " / > <nl> - < Item id = " 44029 " name = " Razmotati sve razine " / > <nl> - < Item id = " 44030 " name = " Smotati tekuæu razinu " / > <nl> - < Item id = " 44031 " name = " Razmotati tekuæu razinu " / > <nl> - < Item id = " 44032 " name = " Ukljuèiti / iskljuèiti cijelozaslonski prikaz " / > <nl> - < Item id = " 44033 " name = " Vratiti izvorne postavke uveæavanja Ctrl + / ( num . tipk . ) " / > <nl> - < Item id = " 44034 " name = " Uvijek u prvom planu " / > <nl> - < Item id = " 44035 " name = " Sinkronizirati okomiti posun " / > <nl> - < Item id = " 44036 " name = " Sinkronizirati vodoravni posun " / > <nl> - < Item id = " 44041 " name = " Prikazati simbol prijeloma redaka " / > <nl> - < Item id = " 44072 " name = " Aktivirati glavni prikaz " / > <nl> + < Item id = " 42001 " name = " Iz & amp ; re i " / > <nl> + < Item id = " 42002 " name = " & amp ; Kopiraj " / > <nl> + < Item id = " 42003 " name = " Po & amp ; ni ti " / > <nl> + < Item id = " 42004 " name = " Vra & amp ; ti poni teno " / > <nl> + < Item id = " 42005 " name = " Za & amp ; lijepi " / > <nl> + < Item id = " 42006 " name = " Iz & amp ; bri i " / > <nl> + < Item id = " 42007 " name = " Odaberi s & amp ; ve " / > <nl> + < Item id = " 42008 " name = " Poveæaj uvlaku retka " / > <nl> + < Item id = " 42009 " name = " Smanji uvlaku retka " / > <nl> + < Item id = " 42010 " name = " Udvostruèi tekuæi redak " / > <nl> + < Item id = " 42012 " name = " Prelomi retke " / > <nl> + < Item id = " 42013 " name = " Spoji retke " / > <nl> + < Item id = " 42014 " name = " Tekuæi redak pomakni Gore " / > <nl> + < Item id = " 42015 " name = " Tekuæi redak pomakni Dolje " / > <nl> + < Item id = " 42016 " name = " VELIKA SLOVA " / > <nl> + < Item id = " 42017 " name = " mala slova " / > <nl> + < Item id = " 42018 " name = " & amp ; Zapoèni snimanje " / > <nl> + < Item id = " 42019 " name = " Za & amp ; ustavi snimanje " / > <nl> + < Item id = " 42021 " name = " & amp ; Prika i snimljeno " / > <nl> + < Item id = " 42022 " name = " Prikaz komentara bloka " / > <nl> + < Item id = " 42023 " name = " Komentar toka " / > <nl> + < Item id = " 42042 " name = " Odstrani vodeæe razmake " / > <nl> + < Item id = " 42043 " name = " Odstrani vodeæe i prateæe razmake " / > <nl> + < Item id = " 42044 " name = " Kraj retka u razmak " / > <nl> + < Item id = " 42045 " name = " Odstrani nepotrebne praznine i krajeve retka " / > <nl> + < Item id = " 42046 " name = " Tab . u razmak " / > <nl> + < Item id = " 42047 " name = " Razmak u tab . " / > <nl> + < Item id = " 42024 " name = " Odstrani prateæe razmake " / > <nl> + < Item id = " 42025 " name = " Spremi upravo snimljeni makro " / > <nl> + < Item id = " 42026 " name = " Smjer teksta s desna na lijevo " / > <nl> + < Item id = " 42027 " name = " Smjer teksta s lijeva na desno " / > <nl> + < Item id = " 42028 " name = " Postavi samo za èitanje " / > <nl> + < Item id = " 42029 " name = " Kopiraj put datoteke u meðuspremnik " / > <nl> + < Item id = " 42030 " name = " Kopiraj naziv datoteke u meðuspremnik " / > <nl> + < Item id = " 42031 " name = " Kopiraj put mape u meðuspremnik " / > <nl> + < Item id = " 42032 " name = " Pokreni makro - naredbu vi e puta . . . " / > <nl> + < Item id = " 42033 " name = " Odstrani za titu od pisanja " / > <nl> + < Item id = " 42035 " name = " Komentiraj blok " / > <nl> + < Item id = " 42036 " name = " Ukloni komentar s bloka " / > <nl> <nl> - < Item id = " 45001 " name = " Pretvoriti u Windowsov format " / > <nl> - < Item id = " 45002 " name = " Pretvoriti u UNIXov format " / > <nl> - < Item id = " 45003 " name = " Pretvoriti u Macov format " / > <nl> - < Item id = " 45004 " name = " Kodirati u ANSI " / > <nl> - < Item id = " 45005 " name = " Kodirati u UTF - 8 " / > <nl> - < Item id = " 45006 " name = " Kodirati u UCS - 2 Big - Endian " / > <nl> - < Item id = " 45007 " name = " Kodirati u UCS - 2 Little - Endian " / > <nl> - < Item id = " 45008 " name = " Kodirati u UTF - 8 bez BOM - a " / > <nl> - < Item id = " 45009 " name = " Pretvoriti u ANSI " / > <nl> - < Item id = " 45010 " name = " Pretvoriti u UTF - 8 bez BOM - a " / > <nl> - < Item id = " 45011 " name = " Pretvoriti u UTF - 8 " / > <nl> - < Item id = " 45012 " name = " Pretvoriti u UCS - 2 Big - Endian " / > <nl> - < Item id = " 45013 " name = " Pretvoriti u UCS - 2 Little - Endian " / > <nl> + < Item id = " 43001 " name = " & amp ; Pronaði . . . " / > <nl> + < Item id = " 43002 " name = " Pronaði & amp ; sljedeæe " / > <nl> + < Item id = " 43003 " name = " Zamijeni . . . " / > <nl> + < Item id = " 43004 " name = " Idi na redak . . . " / > <nl> + < Item id = " 43005 " name = " Stavi / odstrani oznaku " / > <nl> + < Item id = " 43006 " name = " Sljedeæa oznaka " / > <nl> + < Item id = " 43007 " name = " Prethodna oznaka " / > <nl> + < Item id = " 43008 " name = " Odstrani sve oznake " / > <nl> + < Item id = " 43009 " name = " Pronaði kraj zagrade " / > <nl> + < Item id = " 43010 " name = " Pronaði prethodno " / > <nl> + < Item id = " 43011 " name = " & amp ; Inkrementalno pretra ivanje . . . " / > <nl> + < Item id = " 43013 " name = " Pronaði u datotekama . . . " / > <nl> + < Item id = " 43014 " name = " Pronaði ( oznaèeno ) sljedeæe " / > <nl> + < Item id = " 43015 " name = " Pronaði ( oznaèeno ) prethodno " / > <nl> + < Item id = " 43016 " name = " Oznaèi sve " / > <nl> + < Item id = " 43017 " name = " Poni ti oznaèavanje svega " / > <nl> + < Item id = " 43018 " name = " Izre i retke s oznakama " / > <nl> + < Item id = " 43019 " name = " Kopiraj retke s oznakama " / > <nl> + < Item id = " 43020 " name = " Retke s oznakama zamijeni sadr ajem meðuspremnika " / > <nl> + < Item id = " 43021 " name = " Izbri i retke s oznakama " / > <nl> + < Item id = " 43022 " name = " Koristi 1 . stil " / > <nl> + < Item id = " 43023 " name = " Oèisti 1 . stil " / > <nl> + < Item id = " 43024 " name = " Koristi 2 . stil " / > <nl> + < Item id = " 43025 " name = " Oèisti 2 . stil " / > <nl> + < Item id = " 43026 " name = " Koristi 3 . stil " / > <nl> + < Item id = " 43027 " name = " Oèisti 3 . stil " / > <nl> + < Item id = " 43028 " name = " Koristi 4 . stil " / > <nl> + < Item id = " 43029 " name = " Oèisti 4 . stil " / > <nl> + < Item id = " 43030 " name = " Koristi 5 . stil " / > <nl> + < Item id = " 43031 " name = " Oèisti 5 . stil " / > <nl> + < Item id = " 43032 " name = " Oèisti sve stilove " / > <nl> + < Item id = " 43033 " name = " 1 . stil " / > <nl> + < Item id = " 43034 " name = " 2 . stil " / > <nl> + < Item id = " 43035 " name = " 3 . stil " / > <nl> + < Item id = " 43036 " name = " 4 . stil " / > <nl> + < Item id = " 43037 " name = " 5 . stil " / > <nl> + < Item id = " 43038 " name = " Naði stil " / > <nl> + < Item id = " 43039 " name = " 1 . stil " / > <nl> + < Item id = " 43040 " name = " 2 . stil " / > <nl> + < Item id = " 43041 " name = " 3 . stil " / > <nl> + < Item id = " 43042 " name = " 4 . stil " / > <nl> + < Item id = " 43043 " name = " 5 . stil " / > <nl> + < Item id = " 43044 " name = " Naði stil " / > <nl> + < Item id = " 43045 " name = " Prozor rezultata pretra ivanja " / > <nl> + < Item id = " 43046 " name = " Sljedeæi rezultat pretra ivanja " / > <nl> + < Item id = " 43047 " name = " Prethodni rezultat pretra ivanja " / > <nl> + < Item id = " 43048 " name = " Izaberi i pronaði sljedeæe " / > <nl> + < Item id = " 43049 " name = " Izaberi i pronaði prethodno " / > <nl> + < Item id = " 43050 " name = " Preokreni oznake " / > <nl> + < Item id = " 44009 " name = " Post - It " / > <nl> + < Item id = " 44010 " name = " Smotaj sve " / > <nl> + < Item id = " 44011 " name = " Korisnièki zadani dijalog . . . " / > <nl> + < Item id = " 44019 " name = " Prikaz svih znakova " / > <nl> + < Item id = " 44020 " name = " Prikaz vodilice uvlaka " / > <nl> + < Item id = " 44022 " name = " Prijelom teksta " / > <nl> + < Item id = " 44023 " name = " U & amp ; veæaj ( Ctrl - Kotaèiæ mi a na gore ) " / > <nl> + < Item id = " 44024 " name = " U & amp ; manji ( Ctrl - Kotaèiæ mi a na dolje ) " / > <nl> + < Item id = " 44025 " name = " Prika i razmake i tabulatore " / > <nl> + < Item id = " 44026 " name = " Prika i kraj retka " / > <nl> + < Item id = " 44029 " name = " Razmotaj sve razine " / > <nl> + < Item id = " 44030 " name = " Smotaj tekuæu razinu " / > <nl> + < Item id = " 44031 " name = " Razmotaj tekuæu razinu " / > <nl> + < Item id = " 44032 " name = " Cijeli zaslon " / > <nl> + < Item id = " 44033 " name = " Vrati izvorne postavke uveæavanja " / > <nl> + < Item id = " 44034 " name = " Uvijek na vrhu " / > <nl> + < Item id = " 44049 " name = " Kratki pregled . . . " / > <nl> + < Item id = " 44035 " name = " Sinkroniziraj okomiti pomak " / > <nl> + < Item id = " 44036 " name = " Sinkroniziraj vodoravni pomak " / > <nl> + < Item id = " 44041 " name = " Prika i prijelome redaka " / > <nl> + < Item id = " 44072 " name = " Fokus na drugi prikaz " / > <nl> + < Item id = " 44081 " name = " Projekt Panel 1 " / > <nl> + < Item id = " 44082 " name = " Projekt Panel 2 " / > <nl> + < Item id = " 44083 " name = " Projekt Panel 3 " / > <nl> + < Item id = " 45001 " name = " Pretvori u Windows format " / > <nl> + < Item id = " 45002 " name = " Pretvori u UNIX format " / > <nl> + < Item id = " 45003 " name = " Pretvori u Mac format " / > <nl> + < Item id = " 45004 " name = " Kodiraj u ANSI " / > <nl> + < Item id = " 45005 " name = " Kodiraj u UTF - 8 " / > <nl> + < Item id = " 45006 " name = " Kodiraj u UCS - 2 Big Endian " / > <nl> + < Item id = " 45007 " name = " Kodiraj u UCS - 2 Little Endian " / > <nl> + < Item id = " 45008 " name = " Kodiraj u UTF - 8 bez BOM - a " / > <nl> + < Item id = " 45009 " name = " Pretvori u ANSI " / > <nl> + < Item id = " 45010 " name = " Pretvori u UTF - 8 bez BOM - a " / > <nl> + < Item id = " 45011 " name = " Pretvori u UTF - 8 " / > <nl> + < Item id = " 45012 " name = " Pretvori u UCS - 2 Big Endian " / > <nl> + < Item id = " 45013 " name = " Pretvori u UCS - 2 Little Endian " / > <nl> <nl> - < Item id = " 10001 " name = " Premjestiti u drugi prikaz " / > <nl> - < Item id = " 10002 " name = " Preslikati u drugi prikaz " / > <nl> - < Item id = " 10003 " name = " Prebaciti u novu razinu " / > <nl> - < Item id = " 10004 " name = " Otvoriti u novoj razini " / > <nl> + < Item id = " 10001 " name = " Premjesti u drugi prikaz " / > <nl> + < Item id = " 10002 " name = " Kloniraj u drugi prikaz " / > <nl> + < Item id = " 10003 " name = " Premjesti u novu instancu " / > <nl> + < Item id = " 10004 " name = " Otvori u novoj instanci " / > <nl> <nl> <nl> - < Item id = " 46001 " name = " Prilagodba slogova . . . " / > <nl> - < Item id = " 47000 " name = " O programu . . . " / > <nl> - < Item id = " 47001 " name = " Domovska stranica Notepad + + " / > <nl> - < Item id = " 47002 " name = " Stranica projekta Notepad + + " / > <nl> - < Item id = " 47003 " name = " Pomoæ putem Interneta " / > <nl> - < Item id = " 47004 " name = " Forum " / > <nl> - < Item id = " 47005 " name = " Dodatni prikljuèci " / > <nl> - < Item id = " 47007 " name = " Uèestalo postavljana & amp ; pitanja " / > <nl> - < Item id = " 47008 " name = " Kazalo i pri & amp ; ruènik ( na Engleskom ) " / > <nl> - < Item id = " 48009 " name = " Upravitelj tipkovnih preèica . . . " / > <nl> - < Item id = " 48011 " name = " Postavke . . . " / > <nl> - < Item id = " 49000 " name = " & amp ; Pokrenuti . . . " / > <nl> - <nl> - < Item id = " 50000 " name = " Dopuna funkcija " / > <nl> - < Item id = " 50001 " name = " Dopuna rijeèi " / > <nl> - < Item id = " 50002 " name = " Naznaka funkcijskih parametara " / > <nl> - < Item id = " 42034 " name = " Ureðivanje stupaca . . . " / > <nl> - < Item id = " 44042 " name = " Sakriti retke " / > <nl> - < Item id = " 42040 " name = " Otvoriti sve nedavno otvarane datoteke " / > <nl> - < Item id = " 42041 " name = " Oèistiti popis nedavno otvaranih datoteka " / > <nl> + < Item id = " 46001 " name = " Postavke stilova . . . " / > <nl> + < Item id = " 46080 " name = " Korisnièki definirano " / > <nl> + < Item id = " 47000 " name = " O programu . . . " / > <nl> + < Item id = " 47001 " name = " Web stranica Notepad + + " / > <nl> + < Item id = " 47002 " name = " Stranica projekta Notepad + + " / > <nl> + < Item id = " 47003 " name = " Online dokumentacija " / > <nl> + < Item id = " 47004 " name = " Forum " / > <nl> + < Item id = " 47005 " name = " Dodatni prikljuèci " / > <nl> + < Item id = " 47006 " name = " A uriraj Notepad + + " / > <nl> + < Item id = " 47008 " name = " Kazalo pomoæi " / > <nl> + < Item id = " 48005 " name = " Uvoz dodatnih prikljuèaka . . . " / > <nl> + < Item id = " 48006 " name = " Uvoz tema . . . " / > <nl> + < Item id = " 48009 " name = " Tipkovni preèaci . . . " / > <nl> + < Item id = " 48011 " name = " Postavke . . . " / > <nl> + < Item id = " 49000 " name = " & amp ; Pokreni . . . " / > <nl> <nl> + < Item id = " 50000 " name = " Dopuna funkcija " / > <nl> + < Item id = " 50001 " name = " Dopuna rijeèi " / > <nl> + < Item id = " 50002 " name = " Podsjetnik funkcijskih parametara " / > <nl> + < Item id = " 42034 " name = " Ureðivanje stupaca . . . " / > <nl> + < Item id = " 44042 " name = " Sakrij retke " / > <nl> + < Item id = " 42040 " name = " Otvori sve nedavno otvarane datoteke " / > <nl> + < Item id = " 42041 " name = " Obri i popis nedavno otvaranih datoteka " / > <nl> + < Item id = " 48016 " name = " Modificiraj preèac / Izbri i Makro . . . " / > <nl> + < Item id = " 48017 " name = " Modificiraj preèac / Izbri i naredbu . . . " / > <nl> + < Item id = " 48018 " name = " Uredi skoèni kontekstni izbornik " / > <nl> < / Commands > <nl> < / Main > <nl> < Splitter > <nl> < / Splitter > <nl> < TabBar > <nl> - < Item order = " 0 " name = " Zatvoriti " / > <nl> - < Item order = " 1 " name = " Zatvoriti sve ostale " / > <nl> - < Item order = " 2 " name = " Pohraniti " / > <nl> - < Item order = " 3 " name = " Pohraniti kao . . . " / > <nl> - < Item order = " 4 " name = " Ispisati " / > <nl> - < Item order = " 5 " name = " Premjestiti u drugi prikaz " / > <nl> - < Item order = " 6 " name = " Preslikati u drugi prikaz " / > <nl> - < Item order = " 7 " name = " Potpunu stazu datoteke u meðuspremnik " / > <nl> - < Item order = " 8 " name = " Naziv datoteke u meðuspremnik " / > <nl> - < Item order = " 9 " name = " Stazu tekuæe datoteke u meðuspremnik " / > <nl> - < Item order = " 10 " name = " Preimenovati " / > <nl> - < Item order = " 11 " name = " Izbrisati " / > <nl> - < Item order = " 12 " name = " Samo za èitanje " / > <nl> - < Item order = " 13 " name = " Odstraniti za titu od pisanja " / > <nl> - < Item order = " 14 " name = " Prebaciti u novu razinu " / > <nl> - < Item order = " 15 " name = " Otvoriti u novoj razini " / > <nl> + < Item order = " 0 " name = " Zatvori " / > <nl> + < Item order = " 1 " name = " Zatvori sve osim ovoga " / > <nl> + < Item order = " 2 " name = " Spremi " / > <nl> + < Item order = " 3 " name = " Spremi kao . . . " / > <nl> + < Item order = " 4 " name = " Ispi i " / > <nl> + < Item order = " 5 " name = " Idi u drugi prikaz " / > <nl> + < Item order = " 6 " name = " Kloniraj u drugi prikaz " / > <nl> + < Item order = " 7 " name = " Kopiraj put datoteke u meðuspremnik " / > <nl> + < Item order = " 8 " name = " Kopiraj naziv datoteke u meðuspremnik " / > <nl> + < Item order = " 9 " name = " Kopiraj put mape u meðuspremnik " / > <nl> + < Item order = " 10 " name = " Preimenuj " / > <nl> + < Item order = " 11 " name = " Izbri i " / > <nl> + < Item order = " 12 " name = " Samo za èitanje " / > <nl> + < Item order = " 13 " name = " Odstrani za titu od pisanja " / > <nl> + < Item order = " 14 " name = " Idi u novu instancu " / > <nl> + < Item order = " 15 " name = " Otvori u novoj instanci " / > <nl> < / TabBar > <nl> < / Menu > <nl> <nl> < Dialog > <nl> - < Find title = " " titleFind = " Find " titleReplace = " Nadomjestiti " titleFindInFiles = " Pronaæi u datotekama " > <nl> - < Item id = " 1 " name = " Pronaæi slijedeæe " / > <nl> - < Item id = " 2 " name = " Zatvoriti " / > <nl> - < Item id = " 1603 " name = " Samo shodno & amp ; potpunim rijeèima " / > <nl> - < Item id = " 1604 " name = " Shodno velikim / & amp ; malim slovima " / > <nl> - < Item id = " 1605 " name = " Uobièajeni & amp ; izrazi " / > <nl> - < Item id = " 1606 " name = " Pri koncu retka & amp ; zapoèeti novi " / > <nl> - < Item id = " 1612 " name = " Prema & amp ; gore " / > <nl> - < Item id = " 1613 " name = " Prema & amp ; dolje " / > <nl> - < Item id = " 1614 " name = " Prebrojati " / > <nl> - < Item id = " 1615 " name = " Pronaæi sve " / > <nl> - < Item id = " 1616 " name = " Redak oznaèiti tionikom " / > <nl> - < Item id = " 1617 " name = " Istaknuti pronaðeno " / > <nl> - < Item id = " 1618 " name = " Pri svakom pretra ivanju oèistiti " / > <nl> - < Item id = " 1620 " name = " Pronaæi : " / > <nl> - < Item id = " 1621 " name = " Usmjerenje " / > <nl> - < Item id = " 1624 " name = " Naèin pretra ivanja " / > <nl> - < Item id = " 1625 " name = " Normalno " / > <nl> - < Item id = " 1626 " name = " Pro ireno ( \ n , \ r , \ t , \ 0 , \ x . . . ) " / > <nl> - < Item id = " 1611 " name = " Nado & amp ; mjestiti sa : " / > <nl> - < Item id = " 1608 " name = " & amp ; Nadomjestiti " / > <nl> - < Item id = " 1609 " name = " Nadomjestiti & amp ; sve " / > <nl> - < Item id = " 1623 " name = " Prozirnost " / > <nl> - < Item id = " 1687 " name = " Pri neaktivnosti " / > <nl> - < Item id = " 1688 " name = " Uvijek " / > <nl> - < Item id = " 1632 " name = " U odabranom dijelu " / > <nl> - < Item id = " 1633 " name = " Oèistiti " / > <nl> - < Item id = " 1635 " name = " Nadomjestiti sve u svim otvorenim dokumentima " / > <nl> - < Item id = " 1636 " name = " Pronaæi sve u svim otvorenim dokumentima " / > <nl> - < Item id = " 1637 " name = " Pronaæi u datotekama " / > <nl> - < Item id = " 1640 " name = " Zamijeniti dijalog " / > <nl> - < Item id = " 1654 " name = " Filteri : " / > <nl> - < Item id = " 1655 " name = " Staza : " / > <nl> - < Item id = " 1656 " name = " Pronaæi sve " / > <nl> - < Item id = " 1658 " name = " U svim podmapama " / > <nl> - < Item id = " 1659 " name = " U skrivenim mapama " / > <nl> + < Find title = " " titleFind = " Pronaði " titleReplace = " Zamijeni " titleFindInFiles = " Pronaði u datotekama " > <nl> + < Item id = " 1 " name = " Pronaði sljedeæe " / > <nl> + < Item id = " 2 " name = " Zatvori " / > <nl> + < Item id = " 1620 " name = " Pronaði : " / > <nl> + < Item id = " 1603 " name = " Samo & amp ; cijele rijeèi " / > <nl> + < Item id = " 1604 " name = " Razlikuj & amp ; velika i mala slova " / > <nl> + < Item id = " 1605 " name = " Regularni & amp ; izrazi " / > <nl> + < Item id = " 1606 " name = " Omotaj & amp ; oko kraja retka " / > <nl> + < Item id = " 1612 " name = " Na & amp ; gore " / > <nl> + < Item id = " 1613 " name = " Na & amp ; dolje " / > <nl> + < Item id = " 1614 " name = " Prebroji " / > <nl> + < Item id = " 1615 " name = " Pronaði sve " / > <nl> + < Item id = " 1616 " name = " Oznaèi redak " / > <nl> + < Item id = " 1617 " name = " Istakni pronaðeno " / > <nl> + < Item id = " 1618 " name = " Pri svakoj pretrazi proèisti " / > <nl> + < Item id = " 1621 " name = " Smjer " / > <nl> + < Item id = " 1611 " name = " Za & amp ; mijeni sa : " / > <nl> + < Item id = " 1608 " name = " & amp ; Zamijeni " / > <nl> + < Item id = " 1609 " name = " Zamijeni & amp ; sve " / > <nl> + < Item id = " 1623 " name = " Prozirnost " / > <nl> + < Item id = " 1687 " name = " Pri neaktivnosti " / > <nl> + < Item id = " 1688 " name = " Uvijek " / > <nl> + < Item id = " 1632 " name = " Oznaèeni dio " / > <nl> + < Item id = " 1633 " name = " Oèisti " / > <nl> + < Item id = " 1635 " name = " Zamijeni sve u svim otvorenim dokumentima " / > <nl> + < Item id = " 1636 " name = " Pronaði sve u svim otvorenim dokumentima " / > <nl> + < Item id = " 1637 " name = " Pronaði u datotekama " / > <nl> + < Item id = " 1654 " name = " Filtri : " / > <nl> + < Item id = " 1655 " name = " Mapa : " / > <nl> + < Item id = " 1656 " name = " Pronaði sve " / > <nl> + < Item id = " 1658 " name = " U svim podmapama " / > <nl> + < Item id = " 1659 " name = " U skrivenim mapama " / > <nl> + < Item id = " 1624 " name = " Naèin pretra ivanja " / > <nl> + < Item id = " 1625 " name = " Normalno " / > <nl> + < Item id = " 1626 " name = " Pro ireno ( \ n , \ r , \ t , \ 0 , \ x . . . ) " / > <nl> + < Item id = " 1660 " name = " Zamijeni u datotekama " / > <nl> + < Item id = " 1661 " name = " Put tekuæeg dokumenta " / > <nl> + < Item id = " 1641 " name = " Pronaði sve u tekuæem dokumentu " / > <nl> + < Item id = " 1686 " name = " Prozirnost " / > <nl> < / Find > <nl> - < GoToLine title = " Skoèiti na redak # " > <nl> - < Item id = " 2007 " name = " Redak " / > <nl> - < Item id = " 2008 " name = " Pozicija " / > <nl> - < Item id = " 1 " name = " & amp ; Krenuti ! " / > <nl> - < Item id = " 2 " name = " Prekinuti " / > <nl> - < Item id = " 2004 " name = " Vi ste u retku broj : " / > <nl> - < Item id = " 2005 " name = " elite u redak broj : " / > <nl> - < Item id = " 2006 " name = " Ne mo ete iæi dalje od : " / > <nl> + < GoToLine title = " Skoèi na redak . . . " > <nl> + < Item id = " 2007 " name = " Redak " / > <nl> + < Item id = " 2008 " name = " Pozicija " / > <nl> + < Item id = " 1 " name = " & amp ; Kreni " / > <nl> + < Item id = " 2 " name = " Prekini " / > <nl> + < Item id = " 2004 " name = " Vi ste u retku broj : " / > <nl> + < Item id = " 2005 " name = " elite u redak broj : " / > <nl> + < Item id = " 2006 " name = " Ne mo ete iæi dalje od : " / > <nl> < / GoToLine > <nl> <nl> - < Run title = " Pokrenuti . . . " > <nl> - < Item id = " 1903 " name = " Ovdje unesite naziv Va eg izvr nog programa " / > <nl> - < Item id = " 1 " name = " Pokrenuti ! " / > <nl> - < Item id = " 2 " name = " Poni titi " / > <nl> - < Item id = " 1904 " name = " Pohraniti . . . " / > <nl> + < Run title = " Pokreni . . . " > <nl> + < Item id = " 1903 " name = " Program za pokretanje " / > <nl> + < Item id = " 1 " name = " Pokreni " / > <nl> + < Item id = " 2 " name = " Poni ti " / > <nl> + < Item id = " 1904 " name = " Spremi . . . " / > <nl> < / Run > <nl> <nl> - < StyleConfig title = " Prilagodba slogova " > <nl> - < Item id = " 1 " name = " Poku ati ! " / > <nl> - < Item id = " 2 " name = " Poni titi " / > <nl> - < Item id = " 2301 " name = " Pohraniti & amp ; & amp ; Zatvoriti " / > <nl> - < Item id = " 2303 " name = " Prozirnost " / > <nl> - <nl> + < StyleConfig title = " Prilagodba stilova " > <nl> + < Item id = " 2 " name = " Poni ti " / > <nl> + < Item id = " 2301 " name = " Spremi i zatvori " / > <nl> + < Item id = " 2303 " name = " Prozirnost " / > <nl> + < Item id = " 2306 " name = " Izaberi temu : " / > <nl> < SubDialog > <nl> - < Item id = " 2204 " name = " Podebljano " / > <nl> - < Item id = " 2205 " name = " Kurziv " / > <nl> - < Item id = " 2206 " name = " Boja teksta " / > <nl> - < Item id = " 2207 " name = " Boja pozadine " / > <nl> - < Item id = " 2208 " name = " Naziv pisma : " / > <nl> - < Item id = " 2209 " name = " Velièina pisma : " / > <nl> - < ! - - <nl> - < Item id = " 2210 " name = " Pozor : Odreðivanjem ovog sloga æe biti zadano i odreðivanje svih drugih neodreðenih slogova " / > \ <nl> - - - > <nl> - < Item id = " 2211 " name = " Opis sloga : " / > <nl> - < Item id = " 2212 " name = " Boje " / > <nl> - < Item id = " 2213 " name = " Vrste pisma " / > <nl> - < Item id = " 2214 " name = " Zadani nastavci : " / > <nl> - < Item id = " 2216 " name = " Vlastiti nastavci : " / > <nl> - < Item id = " 2218 " name = " Podcrtano " / > <nl> - < Item id = " 2219 " name = " Zadane kljuène rijeèi " / > <nl> - < Item id = " 2221 " name = " Korisnikom odreðene kljuène rijeèi " / > <nl> - < Item id = " 2225 " name = " Jezik : " / > <nl> - < Item id = " 2226 " name = " Ukljuèiti standardnu boju teksta " / > <nl> - < Item id = " 2227 " name = " Zadati standardnu boju pozadine " / > <nl> - < Item id = " 2228 " name = " Ukljuèiti standardno pismo " / > <nl> - < Item id = " 2229 " name = " Zadati standardnu velièinu pisma " / > <nl> - < Item id = " 2230 " name = " Zadati podebljano pismo kao standard " / > <nl> - < Item id = " 2231 " name = " Zadati kurzivno pismo kao standard " / > <nl> - < Item id = " 2232 " name = " Zadati podcrtano pismo kao standard " / > <nl> + < Item id = " 2204 " name = " Podebljano " / > <nl> + < Item id = " 2205 " name = " Kurziv " / > <nl> + < Item id = " 2206 " name = " Boja teksta " / > <nl> + < Item id = " 2207 " name = " Boja pozadine " / > <nl> + < Item id = " 2208 " name = " Naziv fonta : " / > <nl> + < Item id = " 2209 " name = " Velièina fonta : " / > <nl> + < Item id = " 2212 " name = " Boja stila " / > <nl> + < Item id = " 2213 " name = " Font stila " / > <nl> + < Item id = " 2214 " name = " Zadani nastavci : " / > <nl> + < Item id = " 2216 " name = " Vlastiti nastavci : " / > <nl> + < Item id = " 2218 " name = " Podcrtano " / > <nl> + < Item id = " 2219 " name = " Zadane kljuène rijeèi " / > <nl> + < Item id = " 2221 " name = " Korisnièki odreðene kljuène rijeèi " / > <nl> + < Item id = " 2225 " name = " Sintaksa : " / > <nl> + < Item id = " 2226 " name = " Ukljuèi standardnu boju teksta " / > <nl> + < Item id = " 2227 " name = " Zadaj standardnu boju pozadine " / > <nl> + < Item id = " 2228 " name = " Ukljuèi standardni font " / > <nl> + < Item id = " 2229 " name = " Postavi standardnu velièinu fonta " / > <nl> + < Item id = " 2230 " name = " Postavi podebljani font kao standard " / > <nl> + < Item id = " 2231 " name = " Postavi kurzivni font kao standard " / > <nl> + < Item id = " 2232 " name = " Postavi podcrtani font kao standard " / > <nl> < / SubDialog > <nl> <nl> < / StyleConfig > <nl> <nl> - < UserDefine title = " Korisnikom odreðeni jezik " > <nl> - < Item id = " 20002 " name = " Preimenovati " / > <nl> - < Item id = " 20003 " name = " Napraviti nove . . . " / > <nl> - < Item id = " 20004 " name = " Odstraniti " / > <nl> - < Item id = " 20005 " name = " Pohraniti kao . . . " / > <nl> - < Item id = " 20007 " name = " Korisnikov jezik : " / > <nl> - < Item id = " 20009 " name = " Nastavak : " / > <nl> - < Item id = " 20012 " name = " Zanemariti velika / mala slova " / > <nl> - < Item id = " 20011 " name = " Prozirnost " / > <nl> - < Item id = " 0 " name = " Slog boje " / > <nl> - < Item id = " 1 " name = " Boja teksta " / > <nl> - < Item id = " 2 " name = " Boja pozadine " / > <nl> - < Item id = " 3 " name = " Slog pisma " / > <nl> - < Item id = " 4 " name = " Naziv pisma : " / > <nl> - < Item id = " 5 " name = " Velièina pisma : " / > <nl> - < Item id = " 6 " name = " Podebljano " / > <nl> - < Item id = " 7 " name = " Kurziv " / > <nl> - < Item id = " 8 " name = " Podcrtano " / > <nl> - < Folder title = " Mapa & amp ; & amp ; Izvorno " > <nl> - < Item id = " 21101 " name = " Izvorne postavke sloga " / > <nl> - < Item id = " 21201 " name = " Postavke kljuènih rijeèi na poèetku tekstualnog bloka " / > <nl> - < Item id = " 21301 " name = " Postavke kljuènih rijeèi na koncu tekstualnog bloka " / > <nl> + < UserDefine title = " Korisnièki odreðeno " > <nl> + < Item id = " 20002 " name = " Preimenuj " / > <nl> + < Item id = " 20003 " name = " Napravi novi . . . " / > <nl> + < Item id = " 20004 " name = " Odstrani " / > <nl> + < Item id = " 20005 " name = " Spremi kao . . . " / > <nl> + < Item id = " 20007 " name = " Korisnièka sintaksa : " / > <nl> + < Item id = " 20009 " name = " Nastavak : " / > <nl> + < Item id = " 20012 " name = " Zanemari velika / mala slova " / > <nl> + < Item id = " 20011 " name = " Prozirnost " / > <nl> + < Item id = " 20016 " name = " Uvoz . . . " / > <nl> + < Item id = " 20015 " name = " Izvoz . . . " / > <nl> + < Item id = " 0 " name = " Stil boja " / > <nl> + < Item id = " 1 " name = " Boja teksta " / > <nl> + < Item id = " 2 " name = " Boja pozadine " / > <nl> + < Item id = " 3 " name = " Stil fonta " / > <nl> + < Item id = " 4 " name = " Naziv fonta : " / > <nl> + < Item id = " 5 " name = " Velièina fonta : " / > <nl> + < Item id = " 6 " name = " Podebljano " / > <nl> + < Item id = " 7 " name = " Kurziv " / > <nl> + < Item id = " 8 " name = " Podcrtano " / > <nl> + < Folder title = " Mapa / Izvorno " > <nl> + < Item id = " 21101 " name = " Izvorne postavke stila " / > <nl> + < Item id = " 21201 " name = " Postavke kljuènih rijeèi na poèetku tekstualnog bloka " / > <nl> + < Item id = " 21301 " name = " Postavke kljuènih rijeèi na kraju tekstualnog bloka " / > <nl> < / Folder > <nl> - < Keywords title = " Spiskovi kljuènih rijeèi " > <nl> - < Item id = " 22101 " name = " 1 . skupina " / > <nl> - < Item id = " 22201 " name = " 2 . skupina " / > <nl> - < Item id = " 22301 " name = " 3 . skupina " / > <nl> - < Item id = " 22401 " name = " 4 . skupina " / > <nl> - < Item id = " 22113 " name = " Prefiksi " / > <nl> - < Item id = " 22213 " name = " Prefiksi " / > <nl> - < Item id = " 22313 " name = " Prefiksi " / > <nl> - < Item id = " 22413 " name = " Prefiksi " / > <nl> + < Keywords title = " Popisi kljuènih rijeèi " > <nl> + < Item id = " 22101 " name = " 1 . skupina " / > <nl> + < Item id = " 22201 " name = " 2 . skupina " / > <nl> + < Item id = " 22301 " name = " 3 . skupina " / > <nl> + < Item id = " 22401 " name = " 4 . skupina " / > <nl> + < Item id = " 22113 " name = " Prefiksi " / > <nl> + < Item id = " 22213 " name = " Prefiksi " / > <nl> + < Item id = " 22313 " name = " Prefiksi " / > <nl> + < Item id = " 22413 " name = " Prefiksi " / > <nl> < / Keywords > <nl> - < Comment title = " Komentar & amp ; & amp ; Brojevi " > <nl> - < Item id = " 23301 " name = " Komentarski redak " / > <nl> - < Item id = " 23101 " name = " Komentarski blok " / > <nl> - < Item id = " 23113 " name = " Poèetak komentara : " / > <nl> - < Item id = " 23115 " name = " Svr etak komentara : " / > <nl> - < Item id = " 23116 " name = " Kljuènu rijeè obravnavati kao simbol " / > <nl> - < Item id = " 23117 " name = " Kljuène rijeèi obravnavati kao simbole " / > <nl> - < Item id = " 23201 " name = " Broj " / > <nl> + < Comment title = " Komentar / Brojevi " > <nl> + < Item id = " 23301 " name = " Komentarski redak " / > <nl> + < Item id = " 23101 " name = " Komentarski blok " / > <nl> + < Item id = " 23113 " name = " Poèetak komentara : " / > <nl> + < Item id = " 23115 " name = " Kraj komentara : " / > <nl> + < Item id = " 23116 " name = " Kljuènu rijeè tretiraj kao simbol " / > <nl> + < Item id = " 23117 " name = " Kljuène rijeèi tretiraj kao simbole " / > <nl> + < Item id = " 23201 " name = " Broj " / > <nl> < / Comment > <nl> - < Operator title = " Operatori " > <nl> - < Item id = " 24107 " name = " Operator " / > <nl> - < Item id = " 24103 " name = " Raspolo ivi simboli " / > <nl> - < Item id = " 24101 " name = " Aktivirani operatori " / > <nl> - < Item id = " 24201 " name = " Razdjelnik 1 " / > <nl> - < Item id = " 24211 " name = " Poèetni znak : " / > <nl> - < Item id = " 24214 " name = " Zavr ni znak : " / > <nl> - < Item id = " 24301 " name = " Razdjelnik 2 " / > <nl> - < Item id = " 24311 " name = " Poèetni znak : " / > <nl> - < Item id = " 24314 " name = " Zavr ni znak : " / > <nl> + < Operator title = " Simboli " > <nl> + < Item id = " 24107 " name = " Operator " / > <nl> + < Item id = " 24103 " name = " Raspolo ivi simboli " / > <nl> + < Item id = " 24101 " name = " Aktivirani simboli " / > <nl> + < Item id = " 24201 " name = " Razdjelnik 1 " / > <nl> + < Item id = " 24211 " name = " Poèetni znak : " / > <nl> + < Item id = " 24214 " name = " Zavr ni znak : " / > <nl> + < Item id = " 24301 " name = " Razdjelnik 2 " / > <nl> + < Item id = " 24311 " name = " Poèetni znak : " / > <nl> + < Item id = " 24314 " name = " Zavr ni znak : " / > <nl> < / Operator > <nl> + < Item id = " 24001 " name = " Omoguæi escape znak : " / > <nl> < / UserDefine > <nl> - < Preference title = " Postavke " > <nl> - < Item id = " 6001 " name = " Zatvoriti " / > <nl> - < Global title = " Opæenito " > <nl> - < Item id = " 6101 " name = " Alatna traka " / > <nl> - < Item id = " 6102 " name = " Sakriti " / > <nl> - < Item id = " 6103 " name = " Male ikone " / > <nl> - < Item id = " 6104 " name = " Velike ikone " / > <nl> - < Item id = " 6105 " name = " Male standardne ikone " / > <nl> + < Preference title = " Postavke " > <nl> + < Item id = " 6001 " name = " Zatvori " / > <nl> + < Global title = " Opæenito " > <nl> + < Item id = " 6101 " name = " Alatna vrpca " / > <nl> + < Item id = " 6102 " name = " Sakrij " / > <nl> + < Item id = " 6103 " name = " Male ikone " / > <nl> + < Item id = " 6104 " name = " Velike ikone " / > <nl> + < Item id = " 6105 " name = " Male standardne ikone " / > <nl> <nl> - < Item id = " 6106 " name = " Traka s kartiènim jahaèima " / > <nl> - < Item id = " 6107 " name = " Smanjiti " / > <nl> - < Item id = " 6108 " name = " Zakljuèati ( Bez funkcije povuæi - i - spustiti ) " / > <nl> - < Item id = " 6109 " name = " Neaktivne jahaèe osjenèiti sivo " / > <nl> - < Item id = " 6110 " name = " Vrh jahaèa osjenèiti naranèasto " / > <nl> + < Item id = " 6106 " name = " Vrpca s kartiènim jeziècima " / > <nl> + < Item id = " 6107 " name = " Smanji " / > <nl> + < Item id = " 6108 " name = " Zakljuèaj ( bez funkcije povuci i ispusti ) " / > <nl> + < Item id = " 6109 " name = " Neaktivne jezièke osjenèaj sivo " / > <nl> + < Item id = " 6110 " name = " Vrh jezièka osjenèaj naranèasto " / > <nl> <nl> - < Item id = " 6111 " name = " Prikazati traku stanja " / > <nl> - < Item id = " 6112 " name = " Dodati gumb za zatvaranje na svakom jezièku " / > <nl> - < Item id = " 6113 " name = " Zatvaranje dokumenta dvoklikom " / > <nl> - < Item id = " 6118 " name = " Sakriti " / > <nl> - < Item id = " 6119 " name = " U vi e redaka " / > <nl> - < Item id = " 6120 " name = " Okomito " / > <nl> + < Item id = " 6111 " name = " Prika i statusnu vrpcu " / > <nl> + < Item id = " 6112 " name = " Gumb za zatvaranje na svakom jezièku " / > <nl> + < Item id = " 6113 " name = " Zatvori dokument dvoklikom " / > <nl> + < Item id = " 6118 " name = " Sakrij " / > <nl> + < Item id = " 6119 " name = " U vi e redaka " / > <nl> + < Item id = " 6120 " name = " Okomito " / > <nl> <nl> - < Item id = " 6121 " name = " Izbornièka traka " / > <nl> - < Item id = " 6122 " name = " Sakriti ( za promjenu koristite tipke Alt ili F10 ) " / > <nl> - < Item id = " 6123 " name = " Jezik korisnièkog suèelja " / > <nl> - < / Global > <nl> - < Scintillas title = " Ureðivanje komponenti " > <nl> - < Item id = " 6216 " name = " Postavke pokazivaèa " / > <nl> - < Item id = " 6217 " name = " irina : " / > <nl> - < Item id = " 6219 " name = " Uèestalost bila : " / > <nl> - < Item id = " 6221 " name = " F " / > <nl> - < Item id = " 6222 " name = " S " / > <nl> + < Item id = " 6121 " name = " Izbornièka vrpca " / > <nl> + < Item id = " 6122 " name = " Sakrij ( za promjenu koristite Alt ili F10 ) " / > <nl> + < Item id = " 6123 " name = " Jezik korisnièkog suèelja " / > <nl> + < / Global > <nl> + < Scintillas title = " Ureðivanje komponenti " > <nl> + < Item id = " 6216 " name = " Postavke pokazivaèa " / > <nl> + < Item id = " 6217 " name = " irina : " / > <nl> + < Item id = " 6219 " name = " Uèestalost miganja : " / > <nl> + < Item id = " 6221 " name = " F " / > <nl> + < Item id = " 6222 " name = " S " / > <nl> + < Item id = " 6224 " name = " Postavke vi estrukog ureðivanja " / > <nl> + < Item id = " 6225 " name = " Omoguæi ( Ctrl + Mi klik / oznaèavanje ) " / > <nl> + < Item id = " 6201 " name = " Stil rubova tekstualnih blokova " / > <nl> + < Item id = " 6202 " name = " Crtice " / > <nl> + < Item id = " 6203 " name = " Strelice " / > <nl> + < Item id = " 6204 " name = " Kru iæi " / > <nl> + < Item id = " 6205 " name = " Kvadratiæi " / > <nl> + < Item id = " 6226 " name = " Ni ta " / > <nl> + <nl> + < Item id = " 6227 " name = " Prijelom teksta " / > <nl> + < Item id = " 6228 " name = " Izvorne postavke " / > <nl> + < Item id = " 6229 " name = " Poravnato " / > <nl> + < Item id = " 6230 " name = " Uvlaka " / > <nl> <nl> - < Item id = " 6301 " name = " Postavke tabulatora " / > <nl> - < Item id = " 6302 " name = " Nadomjestiti razmakom " / > <nl> - < Item id = " 6303 " name = " irina tabulatora : " / > <nl> + < Item id = " 6206 " name = " Prikaz ruba s brojevima redaka " / > <nl> + < Item id = " 6207 " name = " Prikaz rubne oznake " / > <nl> + < Item id = " 6208 " name = " Prikaz desnog ruba " / > <nl> + < Item id = " 6209 " name = " Broj stupaca : " / > <nl> <nl> - < Item id = " 6201 " name = " Slog rubova tekstualnih blokova " / > <nl> - < Item id = " 6202 " name = " Jednostavno " / > <nl> - < Item id = " 6203 " name = " Strijelice " / > <nl> - < Item id = " 6204 " name = " Kru iæi " / > <nl> - < Item id = " 6205 " name = " Kvadratiæi " / > <nl> - <nl> - < Item id = " 6206 " name = " Prikaz ruba s brojevima redaka " / > <nl> - < Item id = " 6207 " name = " Prikaz rubnog tionika " / > <nl> - < Item id = " 6208 " name = " Prikaz okomitog poruba " / > <nl> - < Item id = " 6209 " name = " Broj stupaca : " / > <nl> - <nl> - < Item id = " 6211 " name = " Postavke okomitog poruba " / > <nl> - < Item id = " 6212 " name = " okomita crta " / > <nl> - < Item id = " 6213 " name = " pozadina u boji " / > <nl> - < Item id = " 6214 " name = " Istaknuti trenutno aktivni redak " / > <nl> + < Item id = " 6211 " name = " Postavke desnog ruba " / > <nl> + < Item id = " 6212 " name = " Okomita crta " / > <nl> + < Item id = " 6213 " name = " Pozadina u boji " / > <nl> + < Item id = " 6214 " name = " Istakni trenutno aktivni redak " / > <nl> < / Scintillas > <nl> - < NewDoc title = " Novi dokument / otvaranje / pohranjivanje " > <nl> - < Item id = " 6419 " name = " Novi dokument " / > <nl> - < Item id = " 6401 " name = " Format " / > <nl> - < Item id = " 6402 " name = " Windows " / > <nl> - < Item id = " 6403 " name = " UNIX " / > <nl> - < Item id = " 6404 " name = " Mac " / > <nl> - < Item id = " 6405 " name = " Kodiranje " / > <nl> - < Item id = " 6406 " name = " ANSI " / > <nl> - < Item id = " 6407 " name = " UTF - 8 bez BOM - a " / > <nl> - < Item id = " 6408 " name = " UTF - 8 " / > <nl> - < Item id = " 6409 " name = " UCS - 2 Big - Endian " / > <nl> - < Item id = " 6410 " name = " UCS - 2 Little - Endian " / > <nl> - < Item id = " 6411 " name = " Standardni jezik : " / > <nl> - < Item id = " 6413 " name = " Spisak mapa za otvaranje / pohranjivanje " / > <nl> - < Item id = " 6414 " name = " Sukladno trenutnom dokumentu " / > <nl> - < Item id = " 6415 " name = " Upamtiti naposlijed kori teni spisak mapa " / > <nl> + < NewDoc title = " Novi dokument / zadana mapa " > <nl> + < Item id = " 6401 " name = " Format " / > <nl> + < Item id = " 6402 " name = " Windows " / > <nl> + < Item id = " 6403 " name = " UNIX " / > <nl> + < Item id = " 6404 " name = " Mac " / > <nl> + < Item id = " 6405 " name = " Kodiranje " / > <nl> + < Item id = " 6406 " name = " ANSI " / > <nl> + < Item id = " 6407 " name = " UTF - 8 bez BOM - a " / > <nl> + < Item id = " 6408 " name = " UTF - 8 " / > <nl> + < Item id = " 6409 " name = " UCS - 2 Big Endian " / > <nl> + < Item id = " 6410 " name = " UCS - 2 Little Endian " / > <nl> + < Item id = " 6411 " name = " Zadana sintaksa : " / > <nl> + < Item id = " 6413 " name = " Popis mapa za otvaranje / spremanje " / > <nl> + < Item id = " 6414 " name = " Sukladno tekuæem dokumentu " / > <nl> + < Item id = " 6415 " name = " Upamti popis posljednje kori tenih mapa " / > <nl> + < Item id = " 6419 " name = " Novi dokument " / > <nl> + < Item id = " 6420 " name = " Primijeni na otvorene ANSI datoteke " / > <nl> < / NewDoc > <nl> - < FileAssoc title = " Udru ivanje datoteka " > <nl> - < Item id = " 4009 " name = " Podr avana pro irenja : " / > <nl> - < Item id = " 4010 " name = " Registrirana pro irenja : " / > <nl> + < FileAssoc title = " Pridru ivanje datoteka " > <nl> + < Item id = " 4009 " name = " Podr ani nastavci : " / > <nl> + < Item id = " 4010 " name = " Registrirani nastavci : " / > <nl> < / FileAssoc > <nl> - < LangMenu title = " Jezièni izbornik " > <nl> - < Item id = " 6505 " name = " Dostupno . . . " / > <nl> - < Item id = " 6506 " name = " Iskljuèeno . . . " / > <nl> + < LangMenu title = " Sintaksa / Tabulatori " > <nl> + < Item id = " 6301 " name = " Postavke tabulatora " / > <nl> + < Item id = " 6302 " name = " Zamijeni razmacima " / > <nl> + < Item id = " 6303 " name = " Velièina tabulatora : " / > <nl> + < Item id = " 6505 " name = " Dostupno . . . " / > <nl> + < Item id = " 6506 " name = " Iskljuèeno . . . " / > <nl> + < Item id = " 6507 " name = " Uèini izbornik kompaktnim " / > <nl> + < Item id = " 6508 " name = " Izbornik jezika sintaksi " / > <nl> + < Item id = " 6510 " name = " Koristi zadanu vrijednost " / > <nl> < / LangMenu > <nl> - < Print title = " Ispis " > <nl> - < Item id = " 6601 " name = " Ispisivati brojeve redaka " / > <nl> - < Item id = " 6602 " name = " Moguænosti bôja " / > <nl> - < Item id = " 6603 " name = " WYSIWYG " / > <nl> - < Item id = " 6604 " name = " Izokrenuti boje " / > <nl> - < Item id = " 6605 " name = " Crno na bijelom " / > <nl> - < Item id = " 6606 " name = " Bez pozadinske boje " / > <nl> - < Item id = " 6607 " name = " Postavke straniènih rubova ( Mjerilo : mm ) " / > <nl> - < Item id = " 6612 " name = " Lijevo " / > <nl> - < Item id = " 6613 " name = " Na vrhu " / > <nl> - < Item id = " 6614 " name = " Desno " / > <nl> - < Item id = " 6615 " name = " Na dnu " / > <nl> - < Item id = " 6706 " name = " Podebljano " / > <nl> - < Item id = " 6707 " name = " Kurziv " / > <nl> - < Item id = " 6708 " name = " Zaglavlje " / > <nl> - < Item id = " 6709 " name = " Lijevi dio " / > <nl> - < Item id = " 6710 " name = " Srednji dio " / > <nl> - < Item id = " 6711 " name = " Desni dio " / > <nl> - < Item id = " 6717 " name = " Podebljano " / > <nl> - < Item id = " 6718 " name = " Kurziv " / > <nl> - < Item id = " 6719 " name = " Podno je " / > <nl> - < Item id = " 6720 " name = " Lijevi dio " / > <nl> - < Item id = " 6721 " name = " Srednji dio " / > <nl> - < Item id = " 6722 " name = " Desni dio " / > <nl> - < Item id = " 6723 " name = " Dodati " / > <nl> - < Item id = " 6725 " name = " Koji dio : " / > <nl> + < Print title = " Ispis " > <nl> + < Item id = " 6601 " name = " Ispi i brojeve redaka " / > <nl> + < Item id = " 6602 " name = " Moguænosti boja " / > <nl> + < Item id = " 6603 " name = " WYSIWYG " / > <nl> + < Item id = " 6604 " name = " Preokreni boje " / > <nl> + < Item id = " 6605 " name = " Crno na bijelom " / > <nl> + < Item id = " 6606 " name = " Bez pozadinske boje " / > <nl> + < Item id = " 6607 " name = " Postavke margina ( Mjera : mm ) " / > <nl> + < Item id = " 6612 " name = " Lijevo " / > <nl> + < Item id = " 6613 " name = " Gore " / > <nl> + < Item id = " 6614 " name = " Desno " / > <nl> + < Item id = " 6615 " name = " Dolje " / > <nl> + < Item id = " 6706 " name = " Podebljano " / > <nl> + < Item id = " 6707 " name = " Kurziv " / > <nl> + < Item id = " 6708 " name = " Zaglavlje " / > <nl> + < Item id = " 6709 " name = " Lijevo " / > <nl> + < Item id = " 6710 " name = " Sredina " / > <nl> + < Item id = " 6711 " name = " Desno " / > <nl> + < Item id = " 6717 " name = " Podebljano " / > <nl> + < Item id = " 6718 " name = " Kurziv " / > <nl> + < Item id = " 6719 " name = " Podno je " / > <nl> + < Item id = " 6720 " name = " Lijevi dio " / > <nl> + < Item id = " 6721 " name = " Srednji dio " / > <nl> + < Item id = " 6722 " name = " Desni dio " / > <nl> + < Item id = " 6723 " name = " Dodati " / > <nl> + < Item id = " 6725 " name = " Varijabla : " / > <nl> + < Item id = " 6728 " name = " Zaglavlje i podno je " / > <nl> < / Print > <nl> - < MISC title = " Razno " > <nl> - < Item id = " 6304 " name = " Postavke povijesti datoteka " / > <nl> - < Item id = " 6305 " name = " Tijekom pokretanja ne provjeravati " / > <nl> - < Item id = " 6306 " name = " Najveæi broj povijesti : " / > <nl> - < Item id = " 6307 " name = " Ukljuèiti " / > <nl> - < Item id = " 6308 " name = " Minimizirati u traci zadaæa sustava " / > <nl> - < Item id = " 6309 " name = " Tekuæe zasjedanje upamtiti do slijedeæeg pokretanja " / > <nl> - < Item id = " 6312 " name = " Samoprepoznavanje stanja datoteke " / > <nl> - < Item id = " 6313 " name = " Tiho nadograðivanje " / > <nl> - < Item id = " 6318 " name = " Hipertekstualne poveznice " / > <nl> - < Item id = " 6325 " name = " Po nadograðivanju prijeæi na posljednji redak " / > <nl> - < Item id = " 6319 " name = " Ukljuèiti " / > <nl> - < Item id = " 6320 " name = " Poveznice ne podcrtavati " / > <nl> - < Item id = " 6322 " name = " Pro irenje datoteke zasjedanja : " / > <nl> - < Item id = " 6323 " name = " Ukljuèiti samonadogradnju Notepada + + " / > <nl> - < Item id = " 6324 " name = " Sklopka dokumenata ( Ctrl + TAB ) " / > <nl> - < Item id = " 6326 " name = " Ukljuèiti pametno nagla avanje " / > <nl> - < Item id = " 6329 " name = " Istaknuti shodne oznake " / > <nl> - < Item id = " 6327 " name = " Ukljuèiti " / > <nl> - < Item id = " 6328 " name = " Istaknuti atribute oznaka " / > <nl> - < Item id = " 6330 " name = " Istaknuti podruèje php / asp " / > <nl> + < MISC title = " Razno " > <nl> + < Item id = " 6304 " name = " Postavke povijesti datoteka " / > <nl> + < Item id = " 6305 " name = " Tijekom pokretanja ne provjeravaj " / > <nl> + < Item id = " 6306 " name = " Najveæi broj upisa : " / > <nl> + < Item id = " 6307 " name = " Ukljuèi " / > <nl> + < Item id = " 6308 " name = " Minimiziraj u paletu sustava " / > <nl> + < Item id = " 6309 " name = " Tekuæu sesiju upamti do sljedeæeg pokretanja " / > <nl> + < Item id = " 6312 " name = " Automatsko prepoznavanje stanja datoteke " / > <nl> + < Item id = " 6313 " name = " Tiho a uriranje " / > <nl> + < Item id = " 6318 " name = " Hipertekstualne poveznice " / > <nl> + < Item id = " 6325 " name = " Po a uriranju prijeði na posljednji redak " / > <nl> + < Item id = " 6319 " name = " Ukljuèi " / > <nl> + < Item id = " 6320 " name = " Ne podcrtavaj poveznice " / > <nl> + < Item id = " 6322 " name = " Pro irenje datot . sesije : " / > <nl> + < Item id = " 6323 " name = " Ukljuèiti automatsku nadogradnju Notepada + + " / > <nl> + < Item id = " 6324 " name = " Sklopka dokumenata ( Ctrl + Tab ) " / > <nl> + < Item id = " 6326 " name = " Ukljuèi pametno nagla avanje " / > <nl> + < Item id = " 6329 " name = " Istakni odgovarajuæe oznake " / > <nl> + < Item id = " 6327 " name = " Ukljuèi " / > <nl> + < Item id = " 6328 " name = " Istakni atribute oznaka " / > <nl> + < Item id = " 6330 " name = " Istakni podruèje php / asp " / > <nl> <nl> - < Item id = " 6331 " name = " U naslovnoj traci prikazivati samo naziv datoteke " / > <nl> - < Item id = " 6114 " name = " Ukljuèiti sklopku dokumenata ( Ctrl + Tab ) " / > <nl> - < Item id = " 6115 " name = " Automatska uvlaka redaka " / > <nl> - < Item id = " 6117 " name = " Ukljuèiti MRU za sklopku dokumenata " / > <nl> + < Item id = " 6331 " name = " U naslovnoj vrpci prika i samo naziv datoteke " / > <nl> + < Item id = " 6114 " name = " Ukljuèi sklopku " / > <nl> + < Item id = " 6115 " name = " Automatska uvlaka redaka " / > <nl> + < Item id = " 6117 " name = " Ukljuèi MRU za sklopku dokumenata " / > <nl> <nl> < / MISC > <nl> - < Backup title = " Sigurnosna pohrana / Samodopuna " > <nl> - < Item id = " 6801 " name = " Sigurnosna pohrana " / > <nl> - < Item id = " 6315 " name = " Iskljuèeno " / > <nl> - < Item id = " 6316 " name = " Jednostavno pohranjivanje " / > <nl> - < Item id = " 6317 " name = " Pohranjivanje s dojavama " / > <nl> - < Item id = " 6804 " name = " Korisnikom zadana mapa sigurnosnih pohrana " / > <nl> - < Item id = " 6803 " name = " Mapa : " / > <nl> - < Item id = " 6807 " name = " Samodopunjavanje " / > <nl> - < Item id = " 6808 " name = " Samodopunu omoguæiti pri svakom unosu " / > <nl> - < Item id = " 6809 " name = " Dopunjavanje funkcija " / > <nl> - < Item id = " 6810 " name = " Dopunjavanje rijeèi " / > <nl> - < Item id = " 6811 " name = " od " / > <nl> - < Item id = " 6813 " name = " - og znaka " / > <nl> - < Item id = " 6814 " name = " Moguæa vrijednost : 1 - 9 " / > <nl> - < Item id = " 6815 " name = " Naznake funkcijskih parametara pri zadavanju " / > <nl> + < Backup title = " Sigurnosna kopija / Samodopuna " > <nl> + < Item id = " 6801 " name = " Sigurnosna kopija " / > <nl> + < Item id = " 6315 " name = " Iskljuèeno " / > <nl> + < Item id = " 6316 " name = " Jednostavno spremanje kopija " / > <nl> + < Item id = " 6317 " name = " Spremanje s dojavama " / > <nl> + < Item id = " 6804 " name = " Korisnièki zadana mapa sigurnosnih kopija " / > <nl> + < Item id = " 6803 " name = " Mapa : " / > <nl> + < Item id = " 6807 " name = " Automatsko dopunjavanje " / > <nl> + < Item id = " 6808 " name = " Auto . dopuna pri svakom unosu " / > <nl> + < Item id = " 6809 " name = " Dopunjavanje funkcija " / > <nl> + < Item id = " 6810 " name = " Dopunjavanje rijeèi " / > <nl> + < Item id = " 6811 " name = " Od " / > <nl> + < Item id = " 6813 " name = " - og znaka " / > <nl> + < Item id = " 6814 " name = " Moguæa vrijednost : 1 - 9 " / > <nl> + < Item id = " 6815 " name = " Funkcijski parametri pri zadavanju " / > <nl> < / Backup > <nl> < / Preference > <nl> - < MultiMacro title = " Makro pokrenuti vi e puta " > <nl> - < Item id = " 1 " name = " Pokrenuti " / > <nl> - < Item id = " 2 " name = " Prekinuti " / > <nl> - < Item id = " 8006 " name = " Makro za pokrenuti : " / > <nl> - < Item id = " 8001 " name = " Pokrenuti " / > <nl> - < Item id = " 8005 " name = " puta " / > <nl> - < Item id = " 8002 " name = " Pokrenuti sve do konca datoteke " / > <nl> + < MultiMacro title = " Makro pokrenuti vi e puta " > <nl> + < Item id = " 1 " name = " Pokreni " / > <nl> + < Item id = " 2 " name = " Prekini " / > <nl> + < Item id = " 8006 " name = " Makro za pokretanje : " / > <nl> + < Item id = " 8001 " name = " Pokreni " / > <nl> + < Item id = " 8005 " name = " puta " / > <nl> + < Item id = " 8002 " name = " Pokreni sve do kraja datoteke " / > <nl> < / MultiMacro > <nl> - < Window title = " Okna " > <nl> - < Item id = " 1 " name = " & amp ; Aktivirati " / > <nl> - < Item id = " 2 " name = " & amp ; U redu " / > <nl> - < Item id = " 7002 " name = " & amp ; Pohraniti " / > <nl> - < Item id = " 7003 " name = " & amp ; Zatvoriti okno ( - a ) " / > <nl> - < Item id = " 7004 " name = " & amp ; Razvrstati tabulatore " / > <nl> + < Window title = " Prozori " > <nl> + < Item id = " 1 " name = " & amp ; Aktiviraj " / > <nl> + < Item id = " 2 " name = " & amp ; U redu " / > <nl> + < Item id = " 7002 " name = " & amp ; Spremi " / > <nl> + < Item id = " 7003 " name = " & amp ; Zatvori prozor " / > <nl> + < Item id = " 7004 " name = " & amp ; Sortiraj kartice " / > <nl> < / Window > <nl> - < ColumnEditor title = " Ureðivanje stupaca " > <nl> - < Item id = " 2023 " name = " Tekst za umetnuti " / > <nl> - < Item id = " 2033 " name = " Znamenke za umetnuti " / > <nl> - < Item id = " 2030 " name = " Poèetna znamenka : " / > <nl> - < Item id = " 2031 " name = " Povisiti za : " / > <nl> - < Item id = " 2035 " name = " Vodeæe ni tice " / > <nl> - < Item id = " 2032 " name = " Format " / > <nl> - < Item id = " 2024 " name = " Dec " / > <nl> - < Item id = " 2025 " name = " Oct " / > <nl> - < Item id = " 2026 " name = " Hex " / > <nl> - < Item id = " 2027 " name = " Bin " / > <nl> - < Item id = " 1 " name = " U redu " / > <nl> - < Item id = " 2 " name = " Poni titi " / > <nl> + < ColumnEditor title = " Ureðivanje stupaca " > <nl> + < Item id = " 2023 " name = " Tekst za umetnuti " / > <nl> + < Item id = " 2033 " name = " Znamenke za umetnuti " / > <nl> + < Item id = " 2030 " name = " Poèetna znamenka : " / > <nl> + < Item id = " 2031 " name = " Poveæavanje za : " / > <nl> + < Item id = " 2035 " name = " Vodeæe nule " / > <nl> + < Item id = " 2032 " name = " Format " / > <nl> + < Item id = " 2024 " name = " Dec " / > <nl> + < Item id = " 2025 " name = " Oct " / > <nl> + < Item id = " 2026 " name = " Hex " / > <nl> + < Item id = " 2027 " name = " Bin " / > <nl> + < Item id = " 1 " name = " U redu " / > <nl> + < Item id = " 2 " name = " Poni ti " / > <nl> < / ColumnEditor > <nl> - < / Dialog > <nl> + < / Dialog > <nl> + < MessageBox > <nl> + < ContextMenuXmlEditWaring title = " Ureðivanje contextMenu " message = " Ureðivanje contextMenu . xml omoguæuje izmjenu Notepad + + skoènog kontekstnog izbornika . \ rTrebate restartati Notepad + + kako bi se uèitao izmijenjen contextMenu . xml . " / > <nl> + < NppHelpAbsentWaring title = " Datoteka ne postoji " message = " \ rne postoji . Molim preuzmite ju s Notepad + + web stranica . " / > <nl> + < SaveCurrentModifWaring title = " Snimi trenutne izmjene " message = " Trebate snimiti trenutnu izmjenu . \ rSnimljene izmjene ne mogu biti poni tene . \ r \ rNastaviti ? " / > <nl> + < LoseUndoAbilityWaring title = " Upozorenje Nema povratka " message = " Trebate snimiti trenutnu izmjenu . \ rSnimljene izmjene ne mogu biti poni tene . \ r \ rNastaviti ? " / > <nl> + < CannotMoveDoc title = " Premjesti u novu Notepad + + instancu " message = " Dokument is izmijenjen , snimite ga i onda poku ajte ponovo . " / > <nl> + < DocReloadWarning title = " Ponovo uèitaj " message = " Jeste li sigurni da elite ponovo uèitati trenutnu datoteku i izgubite sve izmjene koje ste uèinili u Notepadu + + ? " / > <nl> + < FileLockedWarning title = " Neuspjelo snimanje " message = " Molim provjerite da ta datoteka nije otvorena u k + nekom drugom programu " / > <nl> + < FileAlreadyOpenedInNpp title = " " message = " Datoteka je veæ otvorena u Notepadu + + . " / > <nl> + < DeleteFileFailed title = " Neuspjelo brisanje " message = " Brisanje datoteke nije uspjelo " / > <nl> + < / MessageBox > <nl> + < ProjectManager > <nl> + < PanelTitle name = " Projekt " / > <nl> + < WorkspaceRootName name = " Radna povr ina " / > <nl> + < NewProjectName name = " Ime projekta " / > <nl> + < NewFolderName name = " Ime mape " / > <nl> + < Menus > <nl> + < Entries > <nl> + < Item id = " 0 " name = " Radna povr ina " / > <nl> + < Item id = " 1 " name = " Edit " / > <nl> + < / Entries > <nl> + < WorkspaceMenu > <nl> + < Item id = " 3122 " name = " Nova radna povr ina " / > <nl> + < Item id = " 3123 " name = " Otvori radnu povr inu " / > <nl> + < Item id = " 3124 " name = " Ponovo uèitaj radnu povr inu " / > <nl> + < Item id = " 3125 " name = " Snimi " / > <nl> + < Item id = " 3126 " name = " Snimi kao . . . " / > <nl> + < Item id = " 3127 " name = " Snimi kopiju kao . . . " / > <nl> + < Item id = " 3121 " name = " Dodaj novi projekt " / > <nl> + < / WorkspaceMenu > <nl> + < ProjectMenu > <nl> + < Item id = " 3111 " name = " Preimenuj " / > <nl> + < Item id = " 3112 " name = " Dodaj mapu " / > <nl> + < Item id = " 3113 " name = " Dodaj datoteke . . . " / > <nl> + < Item id = " 3117 " name = " Dodaj datoteke iz mape . . . " / > <nl> + < Item id = " 3114 " name = " Ukloni " / > <nl> + < / ProjectMenu > <nl> + < FolderMenu > <nl> + < Item id = " 3111 " name = " Preimenuj " / > <nl> + < Item id = " 3112 " name = " Dodaj mapu " / > <nl> + < Item id = " 3113 " name = " Dodaj datoteke . . . " / > <nl> + < Item id = " 3117 " name = " Dodaj datoteke iz mape . . . " / > <nl> + < Item id = " 3114 " name = " Ukloni " / > <nl> + < / FolderMenu > <nl> + < FileMenu > <nl> + < Item id = " 3111 " name = " Preimenuj " / > <nl> + < Item id = " 3115 " name = " Ukloni " / > <nl> + < Item id = " 3116 " name = " Modificiraj put datoteke " / > <nl> + < / FileMenu > <nl> + < / Menus > <nl> + < / ProjectManager > <nl> < / Native - Langue > <nl> < / NotepadPlus > <nl> + <nl> mmm a / PowerEditor / installer / nativeLang / esperanto . xml <nl> ppp b / PowerEditor / installer / nativeLang / esperanto . xml <nl> <nl> < ? xml version = " 1 . 0 " encoding = " UTF - 8 " ? > <nl> <nl> < ! - - <nl> - Esperantigo de Notepad + + 5 . 9 . 2 <nl> - Ä isdatiÄ ita la 12an de aÅ gusto 2011 <nl> + Esperantigo de Notepad + + 5 . 9 . 6 <nl> + Ä isdatiÄ ita la 7an de decembro 2011 <nl> Farita de Francesco Costanzo . <nl> - Korajn dankojn al Daniele Binaghi pro liaj sugestoj kaj korektaĵoj , kaj al John kaj Patrick pro ilia notigo pri eraro ( " malfermu " anstataÅ " fermu " ) . <nl> + Korajn dankojn al Daniele Binaghi pro liaj sugestoj kaj korektaĵoj , kaj al John kaj Patrick pro iliaj notigoj . <nl> <nl> Por komentoj aÅ por informi min pri eraroj en la traduko : invincibile ( Ä e ) users . sourceforge . net <nl> - Kelkaj eroj estas ankoraÅ en la angla , Ä ar ilin ne eblas traduki . Mi esperas , ke eblos traduki almenaÅ iujn el ili en la estonto . <nl> + Kelkaj eroj estas ankoraÅ en la angla , Ä ar ilin ne eblas traduki . Mi esperas , ke eblos traduki almenaÅ iujn el ili . <nl> <nl> Fontoj : Komputeko kaj la traduko de OpenOffice estis uzitaj por elekti radikojn , kiuj estas uzataj ankaÅ en aliaj programoj . <nl> AnkaÅ la vortaro de Carlo Minnaja ( ITA - EO ) en Ä ia Ä isdatigata versio hVortaro ( hvortaro . altervista . org ) estis tre utila , por klarigi signifojn kaj rekoni la Fundamentajn vortojn kaj la aldonojn de " Baza Radikaro Oficiala " , kiujn mi preferas antastaÅ la postaj aldonoj kaj " novaj vortoj " ( kiam eblas elekti ) . <nl> <nl> < Item id = " 2 " name = " & amp ; SerÄ ado " / > <nl> < Item id = " 3 " name = " & amp ; Vido " / > <nl> < Item id = " 4 " name = " Signar & amp ; kodo " / > <nl> - < Item id = " 5 " name = " & amp ; Programlingvo " / > <nl> + < Item id = " 5 " name = " & amp ; ( Program ) lingvo " / > <nl> < Item id = " 6 " name = " & amp ; Agordoj " / > <nl> < Item id = " 7 " name = " & amp ; Makroo " / > <nl> < Item id = " 8 " name = " & amp ; LanÄ ado " / > <nl> <nl> < / Entries > <nl> < ! - - SubÄ efaj menuoj - - > <nl> < SubEntries > <nl> + < Item posX = " 0 " posY = " 19 " name = " PlejLaste Uzitaj dosieroj ( PLUa dosieraro ) . . . " / > <nl> < Item posX = " 1 " posY = " 9 " name = " Kopiu en la tondejon " / > <nl> < Item posX = " 1 " posY = " 10 " name = " KrommarÄ eno " / > <nl> < Item posX = " 1 " posY = " 11 " name = " Uskleco " / > <nl> <nl> < Item posX = " 1 " posY = " 13 " name = " Komentigu / malkomentigu " / > <nl> < Item posX = " 1 " posY = " 14 " name = " Kompletigo " / > <nl> < Item posX = " 1 " posY = " 15 " name = " Konvertu linifinojn " / > <nl> - < Item posX = " 1 " posY = " 16 " name = " Operacioj pri blanksignoj " / > <nl> - < Item posX = " 1 " posY = " 17 " name = " Speciala algluo " / > <nl> + < Item posX = " 1 " posY = " 16 " name = " Operacioj pri blanksignoj " / > <nl> + < Item posX = " 1 " posY = " 17 " name = " Speciala algluo " / > <nl> <nl> < Item posX = " 2 " posY = " 16 " name = " Marku Ä iujn trovitaĵojn " / > <nl> < Item posX = " 2 " posY = " 17 " name = " Forigu markon " / > <nl> < Item posX = " 2 " posY = " 18 " name = " Saltu supren " / > <nl> < Item posX = " 2 " posY = " 19 " name = " Saltu malsupren " / > <nl> < Item posX = " 2 " posY = " 21 " name = " Legosignoj " / > <nl> - < Item posX = " 3 " posY = " 4 " name = " Montru signojn " / > <nl> - < Item posX = " 3 " posY = " 5 " name = " Zomo " / > <nl> + < Item posX = " 3 " posY = " 4 " name = " Montru signojn . . . " / > <nl> + < Item posX = " 3 " posY = " 5 " name = " Zomo ( tekstogrando ) " / > <nl> < Item posX = " 3 " posY = " 6 " name = " Deloku / Montru la aktivan dokumenton . . . " / > < ! - - LaÅ hVortaro ( bazita sur vort . de Carlo Minnaja ) " movi " = " igi ne - senmova " , " doni " movon al ion . Do se iu manÄ as , tiu movas sian buÅ on , tamen la buÅ o restas Ä iam en la sama loko ; deloku = Ä anÄ i lokon al io ; do openoffice eraras ( ? ) - - > <nl> - < Item posX = " 3 " posY = " 16 " name = " [ - ] Faldu Ä iun blokon je nivelo : " / > <nl> - < Item posX = " 3 " posY = " 17 " name = " [ + ] Malfaldu Ä iun blokon je nivelo : " / > <nl> + < Item posX = " 3 " posY = " 16 " name = " [ - ] Faldu blokojn je nivelo . . . " / > <nl> + < Item posX = " 3 " posY = " 17 " name = " [ + ] Malfaldu blokojn je nivelo . . . " / > <nl> + < Item posX = " 3 " posY = " 21 " name = " Projektoj " / > <nl> < Item posX = " 4 " posY = " 5 " name = " Regionaj signaroj " / > <nl> < Item posX = " 4 " posY = " 5 " posZ = " 0 " name = " Araba " / > <nl> < Item posX = " 4 " posY = " 5 " posZ = " 1 " name = " Balta " / > <nl> <nl> < Item id = " 41001 " name = " & amp ; Nova " / > <nl> < Item id = " 41002 " name = " & amp ; Malfermu . . . " / > <nl> < Item id = " 41003 " name = " Fermu " / > <nl> - < Item id = " 41004 " name = " Fermu & amp ; Ä iujn " / > <nl> + < Item id = " 41004 " name = " Fermu & amp ; Ä iujn dokumentojn " / > <nl> < Item id = " 41005 " name = " Fermu Ä iujn dokumentojn KROM tiu Ä i " / > <nl> < Item id = " 41006 " name = " Kon & amp ; servu " / > <nl> < Item id = " 41007 " name = " Kons & amp ; ervu Ä iujn " / > <nl> <nl> < Item id = " 41010 " name = " Presu . . . " / > <nl> < Item id = " 1001 " name = " Presu nun ! " / > <nl> < Item id = " 41011 " name = " Eli & amp ; ro " / > <nl> - < Item id = " 41012 " name = " Å argu seancon . . . " / > <nl> - < Item id = " 41013 " name = " Konservu la seancon . . . " / > <nl> + < Item id = " 41012 " name = " Malfermu dosierojn de konservita seanco . . . " / > <nl> + < Item id = " 41013 " name = " Konservu la dosierliston de tiu Ä i seanco . . . " / > <nl> < Item id = " 41014 " name = " ReÅ argu el la disko " / > <nl> < Item id = " 41015 " name = " Konservu kopion kiel . . . " / > <nl> < Item id = " 41016 " name = " Forigu de la disko " / > <nl> <nl> < Item id = " 42038 " name = " Algluu enhavon HTML - an " / > <nl> < Item id = " 42039 " name = " Algluu enhavon RTF - an " / > <nl> < Item id = " 42040 " name = " Malfermu Ä iujn plejlaste uzitajn dosierojn " / > <nl> - < Item id = " 42041 " name = " Forgesu la plejlaste uzitajn dosierojn " / > <nl> + < Item id = " 42041 " name = " Forgesu la liston de plejlaste uzitaj dosieroj " / > <nl> <nl> < Item id = " 42042 " name = " Forigu blanksignojn komencajn " / > <nl> < Item id = " 42043 " name = " Forigu blanksignojn kaj komencajn kaj finajn " / > <nl> <nl> < Item id = " 43051 " name = " Forigu neelektitajn lineojn " / > <nl> < Item id = " 43052 " name = " SerÄ u signojn . . . " / > <nl> < Item id = " 44009 " name = " Montru la aktivan dosieron tutfenestre " / > <nl> - < Item id = " 44010 " name = " [ - ] Faldu la dokumentan strukturon " / > < ! - - Malfaldi kontraÅ etendi . . . Elektita malfaldi Ä ar estas en Fundamento - - > <nl> - < Item id = " 44011 " name = " Aspekto de propre difinitaj programlingvoj . . . " / > <nl> + < Item id = " 44011 " name = " Aspekto de propre difinitaj ( program ) lingvoj . . . " / > <nl> < Item id = " 44019 " name = " Montru Ä iujn signojn " / > <nl> < Item id = " 44020 " name = " Montru krommarÄ enan gvidilon " / > <nl> - < Item id = " 44022 " name = " Rompu la liniojn ( laÅ la fenestra larÄ o ) " / > <nl> - < Item id = " 44023 " name = " Zom & amp ; u ( Ctrl + Musrulumilo AntaÅ en ) " / > <nl> - < Item id = " 44024 " name = " Malz & amp ; omu ( Ctrl + Musrulumilo MalantaÅ en ) " / > <nl> + < Item id = " 44022 " name = " Rompu la liniojn ( laÅ la fenestra larÄ o ) " / > < ! - - Rompi kontraÅ faldi : mi uzis faldi por alia celo ( en menuo " vido " ) - - > <nl> + < Item id = " 44023 " name = " Pligrandigu ( Ctrl + Musrulumilo AntaÅ en ) " / > <nl> + < Item id = " 44024 " name = " Malpligrandigu ( Ctrl + Musrulumilo MalantaÅ en ) " / > <nl> < Item id = " 44025 " name = " Montru blanksignojn " / > <nl> < Item id = " 44026 " name = " Montru linifinojn " / > <nl> + < Item id = " 44010 " name = " [ - ] Faldu la dokumentan strukturon " / > <nl> < Item id = " 44029 " name = " [ + ] Malfaldu la dokumentan strukturon " / > <nl> - < Item id = " 44030 " name = " [ - ] Faldu la aktualan nivelon " / > <nl> - < Item id = " 44031 " name = " [ + ] Malfaldu la aktualan nivelon " / > <nl> + < Item id = " 44030 " name = " [ - ] Faldu la aktualan blokon " / > <nl> + < Item id = " 44031 " name = " [ + ] Malfaldu la aktualan blokon " / > <nl> < Item id = " 44032 " name = " Tutekrane " / > <nl> - < Item id = " 44033 " name = " RestaÅ ru la defaÅ ltan zomon " / > <nl> + < Item id = " 44033 " name = " RestaÅ ru la defaÅ ltan tekstograndon " / > <nl> < Item id = " 44034 " name = " Ä iamvidebla " / > <nl> < Item id = " 44035 " name = " Sinkronigu vertikalan rulumadon " / > <nl> < Item id = " 44036 " name = " Sinkronigu horizontalan rulumadon " / > <nl> < Item id = " 44041 " name = " Montru novliniajn signojn " / > <nl> < Item id = " 44049 " name = " Informoj kaj statistikoj pri la dosiero . . . " / > <nl> < Item id = " 44072 " name = " Atingu la alian vidon " / > <nl> - <nl> + < Item id = " 44081 " name = " Panelo 1 " / > <nl> + < Item id = " 44082 " name = " Panelo 2 " / > <nl> + < Item id = " 44083 " name = " Panelo 3 " / > <nl> + <nl> < Item id = " 45001 " name = " Konvertu al Vindoza formo " / > <nl> < Item id = " 45002 " name = " Konvertu al Uniksa formo " / > <nl> < Item id = " 45003 " name = " Konvertu al MakintoÅ a formo " / > <nl> <nl> <nl> < Item id = " 10001 " name = " Deloku al alia vido " / > <nl> < Item id = " 10002 " name = " Montru ankaÅ en alia vido " / > <nl> - < Item id = " 10003 " name = " Deloku al nova fenestro de Notepad + + " / > <nl> - < Item id = " 10004 " name = " Montru ankaÅ en nova fenestro de Notepad + + " / > <nl> + < Item id = " 10003 " name = " Deloku al nova ekzemplo de Notepad + + " / > <nl> + < Item id = " 10004 " name = " Montru ankaÅ en nova ekzemplo de Notepad + + " / > <nl> <nl> < Item id = " 46001 " name = " Stilakordilo . . . " / > <nl> <nl> <nl> < Item order = " 11 " name = " Forigu " / > <nl> < Item order = " 12 " name = " Nurlegigu " / > <nl> < Item order = " 13 " name = " Purigu la indikilon de nurlego " / > <nl> - < Item order = " 14 " name = " Deloku al nova fenestro de Notepad + + " / > <nl> - < Item order = " 15 " name = " Montru ankaÅ en nova fenestro de Notepad + + " / > <nl> + < Item order = " 14 " name = " Deloku al nova ekzemplo de Notepad + + " / > <nl> + < Item order = " 15 " name = " Montru ankaÅ en nova ekzemplo de Notepad + + " / > <nl> < / TabBar > <nl> < / Menu > <nl> <nl> < Dialog > <nl> - < Find title = " SerÄ ado " titleFind = " SerÄ u " titleReplace = " Anstatauigu " titleFindInFiles = " SerÄ u en dosierujo " titleMark = " Marku " > <nl> + < Find title = " SerÄ ado " titleFind = " SerÄ u " titleReplace = " AnstataÅ igu " titleFindInFiles = " SerÄ u en dosierujo " titleMark = " Marku " > <nl> < Item id = " 1 " name = " SerÄ u la sekvantan " / > <nl> < Item id = " 2 " name = " Fermu " / > <nl> < Item id = " 1603 " name = " & amp ; Tutaj vortoj " / > <nl> <nl> < Item id = " 1611 " name = " Ansta & amp ; taÅ igu per : " / > <nl> < Item id = " 1612 " name = " & amp ; Supren " / > <nl> < Item id = " 1613 " name = " & amp ; Malsupren " / > <nl> - < Item id = " 1614 " name = " Nombru la aperojn " / > <nl> + < Item id = " 1614 " name = " Nombru " / > <nl> < Item id = " 1615 " name = " SerÄ u Ä iujn " / > <nl> < Item id = " 1616 " name = " Marku liniojn kun trovitaĵoj " / > <nl> < Item id = " 1617 " name = " Evidentigu la trovitaĵojn " / > <nl> <nl> < Item id = " 2206 " name = " Malfona koloro " / > <nl> < Item id = " 2207 " name = " Fona koloro " / > <nl> < Item id = " 2208 " name = " Tiparo : " / > <nl> - < Item id = " 2209 " name = " Grandeco : " / > <nl> + < Item id = " 2209 " name = " Grando : " / > <nl> < Item id = " 2211 " name = " Stilo : " / > <nl> < Item id = " 2212 " name = " Kolorstilo " / > <nl> < Item id = " 2213 " name = " Tiparstilo " / > <nl> <nl> < Item id = " 2218 " name = " Substrekita " / > <nl> < Item id = " 2219 " name = " DefaÅ ltaj Å losilvortoj " / > <nl> < Item id = " 2221 " name = " Propre difinitaj Å losilvortoj " / > <nl> - < Item id = " 2225 " name = " Programlingvo : " / > <nl> - < Item id = " 2226 " name = " Å altu Ä iean malfonan koloron " / > <nl> - < Item id = " 2227 " name = " Å altu Ä iean fonan koloron " / > <nl> - < Item id = " 2228 " name = " Å altu Ä iean tiparon " / > <nl> - < Item id = " 2229 " name = " Å altu Ä iean tiparan grandon " / > <nl> - < Item id = " 2230 " name = " Å altu Ä iean grasan tiparan stilon " / > <nl> - < Item id = " 2231 " name = " Å altu Ä iean kursivan tiparan stilon " / > <nl> - < Item id = " 2232 " name = " Å altu Ä iean substrekitan tiparan stilon " / > <nl> + < Item id = " 2225 " name = " ( Program ) lingvo : " / > <nl> + < Item id = " 2226 " name = " Å altu Ä eneralan malfonan koloron " / > <nl> + < Item id = " 2227 " name = " Å altu Ä eneralan fonan koloron " / > <nl> + < Item id = " 2228 " name = " Å altu Ä eneralan tiparon " / > <nl> + < Item id = " 2229 " name = " Å altu Ä eneralan tiparGrandon " / > <nl> + < Item id = " 2230 " name = " Å altu Ä eneralan grasan tiparStilon " / > <nl> + < Item id = " 2231 " name = " Å altu Ä eneralan kursivan tiparStilon " / > <nl> + < Item id = " 2232 " name = " Å altu Ä eneralan substrekitan tiparStilon " / > <nl> < / SubDialog > <nl> < / StyleConfig > <nl> <nl> <nl> < Item id = " 20003 " name = " Kreu novan . . . " / > <nl> < Item id = " 20004 " name = " Forigu " / > <nl> < Item id = " 20005 " name = " Konservu kiel . . . " / > <nl> - < Item id = " 20007 " name = " Propre difinita programlingvo : " / > <nl> + < Item id = " 20007 " name = " Propre difinita ( program ) lingvo : " / > <nl> < Item id = " 20009 " name = " Sufiks . : " / > <nl> < Item id = " 20011 " name = " Travidebleco " / > <nl> < Item id = " 20012 " name = " NeUsklecDistinga " / > <nl> < Item id = " 20015 " name = " Importu . . . " / > <nl> < Item id = " 20016 " name = " Eksportu . . . " / > <nl> < Item id = " 0 " name = " Kolorstilo " / > <nl> - < Item id = " 1 " name = " Malfona Koloro " / > <nl> - < Item id = " 2 " name = " Fona Koloro " / > <nl> + < Item id = " 1 " name = " Signoj " / > <nl> + < Item id = " 2 " name = " Fono " / > <nl> < Item id = " 3 " name = " Tipara stilo : " / > <nl> < Item id = " 4 " name = " Tipara nomo : " / > <nl> < Item id = " 5 " name = " Tipara grando " / > <nl> <nl> < Item id = " 7 " name = " Kursiva " / > <nl> < Item id = " 8 " name = " Substrekita " / > <nl> < Folder title = " Dosierujoj kaj defaÅ ltaĵoj " > <nl> - < Item id = " 21101 " name = " Agordoj de la defaÅ lta stilo " / > <nl> - < Item id = " 21201 " name = " Agordoj de blok - malfermantaj Å losvortoj " / > <nl> - < Item id = " 21301 " name = " Agordoj de blok - fermantaj Å losvortoj " / > <nl> + < Item id = " 21101 " name = " Agordoj pri la defaÅ lta stilo " / > <nl> + < Item id = " 21201 " name = " Agordoj pri blok - malfermantaj Å losvortoj " / > <nl> + < Item id = " 21301 " name = " Agordoj pri blok - fermantaj Å losvortoj " / > <nl> < / Folder > <nl> < Keywords title = " Å losvortaro " > <nl> < Item id = " 22101 " name = " 1 - a aro " / > <nl> <nl> < Item id = " 6122 " name = " KaÅ u ( por montri : Alt aÅ F10 ) " / > <nl> < Item id = " 6123 " name = " Elektu lingvon " / > <nl> <nl> + < Item id = " 6125 " name = " Panelo de malfermitaj dosieroj " / > <nl> + < Item id = " 6126 " name = " Montru " / > <nl> < / Global > <nl> < Scintillas title = " Redaktado " > <nl> - < Item id = " 6201 " name = " Stilo de blokgrupado " / > <nl> + < Item id = " 6201 " name = " Simbolo de blokgrupoj " / > <nl> < Item id = " 6202 " name = " Simpla " / > <nl> - < Item id = " 6203 " name = " Saga " / > <nl> + < Item id = " 6203 " name = " Sagforma " / > <nl> < Item id = " 6204 " name = " Cirkla " / > <nl> < Item id = " 6205 " name = " Kvadrata " / > <nl> < Item id = " 6206 " name = " Montru numerojn de linioj " / > <nl> <nl> < Item id = " 6208 " name = " Montru kolumnlimon " / > <nl> < Item id = " 6209 " name = " Nombro de kolumnoj : " / > <nl> <nl> - < Item id = " 6211 " name = " Agordoj de kolumnlimo " / > <nl> + < Item id = " 6211 " name = " Agordoj pri kolumnlimo " / > <nl> < Item id = " 6212 " name = " Linia maniero " / > <nl> < Item id = " 6213 " name = " Fona maniero " / > <nl> < Item id = " 6214 " name = " Evidentigu la aktualan linion " / > <nl> <nl> - < Item id = " 6216 " name = " Agordoj de tajpmontrilo " / > <nl> - < Item id = " 6217 " name = " LarÄ eco : " / > <nl> - < Item id = " 6219 " name = " Rapideco : " / > <nl> + < Item id = " 6216 " name = " Agordoj pri tajpmontrilo " / > <nl> + < Item id = " 6217 " name = " LarÄ o : " / > <nl> + < Item id = " 6219 " name = " Rapido : " / > <nl> < Item id = " 6221 " name = " R " / > <nl> < Item id = " 6222 " name = " M " / > <nl> - < Item id = " 6224 " name = " Agordoj de plurredaktado " / > <nl> + < Item id = " 6224 " name = " Agordoj pri plurredaktado " / > <nl> < Item id = " 6225 " name = " Å altu ( Ctrl + Musklako / Elektado ) " / > <nl> < Item id = " 6226 " name = " Nenia " / > <nl> <nl> - < Item id = " 6227 " name = " AÅ tomata linifaldo " / > <nl> + < Item id = " 6227 " name = " AÅ tomata linirompo " / > <nl> < Item id = " 6228 " name = " DefaÅ lta " / > <nl> < Item id = " 6229 " name = " Ä israndigita " / > <nl> - < Item id = " 6230 " name = " Kreu krommarÄ enojn " / > <nl> + < Item id = " 6230 " name = " Kun krommarÄ eno " / > <nl> <nl> < / Scintillas > <nl> < NewDoc title = " Nova dokumento / DefaÅ lta dosierujo " > <nl> - < Item id = " 6401 " name = " AranÄ o " / > <nl> + < Item id = " - 1 " name = " Montrado de PLUa dosieraro " / > <nl> + < Item id = " 6304 " name = " PlejLaste Uzitaj dosieroj ( PLUa dosieraro ) " / > <nl> + < Item id = " 6305 " name = " Ne serÄ u dumlanÄ e " / > <nl> + < Item id = " 6306 " name = " Nombro de memorataj dosieroj : " / > <nl> + < Item id = " 6401 " name = " Dosierformo " / > <nl> < Item id = " 6402 " name = " Vindoza " / > <nl> < Item id = " 6403 " name = " Uniksa " / > <nl> < Item id = " 6404 " name = " MakintoÅ a " / > <nl> <nl> < Item id = " 6408 " name = " UTF - 8 " / > <nl> < Item id = " 6409 " name = " UCS - 2 pezkomenca " / > <nl> < Item id = " 6410 " name = " UCS - 2 pezfina " / > <nl> - < Item id = " 6411 " name = " DefaÅ lta programlingvo : " / > <nl> + < Item id = " 6411 " name = " DefaÅ lta ( program ) lingvo : " / > <nl> < Item id = " 6413 " name = " DefaÅ lta dosierujo ( malfermu / konservu ) " / > <nl> < Item id = " 6414 " name = " Dosierujo de la aktiva dosiero " / > <nl> < Item id = " 6415 " name = " Memoru la lastan dosierujon " / > <nl> < Item id = " 6419 " name = " Nova dokumento " / > <nl> - < Item id = " 6420 " name = " Uzu malfermante ANSI - dosierujojn " / > <nl> + < Item id = " 6420 " name = " Uzu malfermante ANSI - dosierojn " / > <nl> + < Item id = " 6424 " name = " En submenuo " / > <nl> + < Item id = " 6425 " name = " Nur dosiernomon " / > <nl> + < Item id = " 6426 " name = " Tutan vojon " / > <nl> + < Item id = " 6427 " name = " Å anÄ u la maksimuman longon : " / > <nl> < / NewDoc > <nl> < FileAssoc title = " Dosieraj rilatoj " > <nl> < Item id = " 4009 " name = " Konataj sufiksoj : " / > <nl> < Item id = " 4010 " name = " Registritaj sufiksoj : " / > <nl> < / FileAssoc > <nl> - < LangMenu title = " Menuo  « Programlingvo » / TABklavo " > < ! - - Tie Ä i temas pri la Taba klavo , ne pri la Taba signo - - > <nl> + < LangMenu title = " Menuo  « ( Program ) lingvo » / TABklavo " > < ! - - Tie Ä i temas pri la Taba klavo , ne pri la Taba signo - - > <nl> < Item id = " 6301 " name = " TABklavaj Agordoj " / > <nl> < Item id = " 6302 " name = " AnstataÅ igu per spacetoj " / > <nl> - < Item id = " 6303 " name = " TABsigna longeco : " / > <nl> - < Item id = " 6505 " name = " Disponeblaj programlingvoj " / > <nl> - < Item id = " 6506 " name = " MalÅ altitaj programlingvoj " / > <nl> - < Item id = " 6507 " name = " Grupigu erojn en menuo  « Programlingvo » " / > <nl> - < Item id = " 6508 " name = " Menuo  « Programlingvo » " / > <nl> + < Item id = " 6303 " name = " TABlongo : " / > <nl> + < Item id = " 6505 " name = " Disponeblaj ( program ) lingvoj " / > <nl> + < Item id = " 6506 " name = " MalÅ altitaj ( program ) lingvoj " / > <nl> + < Item id = " 6507 " name = " Grupigu erojn de menuo  « ( Program ) lingvo » " / > <nl> + < Item id = " 6508 " name = " Menuo  « ( Program ) lingvo » " / > <nl> < Item id = " 6510 " name = " Uzu defaÅ ltan valoron " / > <nl> < / LangMenu > <nl> < Print title = " Presado " > <nl> - < Item id = " 6601 " name = " Presu numerojn de liniojn " / > <nl> - < Item id = " 6602 " name = " Agordoj de koloroj " / > <nl> + < Item id = " 6601 " name = " Presu numerojn de linioj " / > <nl> + < Item id = " 6602 " name = " Agordoj pri koloroj " / > <nl> < Item id = " 6603 " name = " Vidate - vidote ( kiel vidatas ) " / > < ! - - ankaÅ : faksimila redaktado . . . sed pro la lasta oni devus lerni novan radikon . . . - - > <nl> < Item id = " 6604 " name = " Inversaj " / > <nl> < Item id = " 6605 " name = " Blanka / nigra " / > <nl> < Item id = " 6606 " name = " Ne presu fona ( j ) n koloro ( j ) n " / > <nl> - < Item id = " 6607 " name = " Agordoj de paÄ marÄ enoj ( mm ) " / > <nl> + < Item id = " 6607 " name = " Agordoj pri paÄ marÄ enoj ( unuo : mm ) " / > <nl> < Item id = " 6612 " name = " Maldeks . " / > <nl> < Item id = " 6613 " name = " Supra " / > <nl> < Item id = " 6614 " name = " Dekstra " / > <nl> <nl> < Item id = " 6728 " name = " PaÄ okapo kaj PaÄ opiedo " / > <nl> < / Print > <nl> < MISC title = " Diversaĵoj " > < ! - - LaÅ vortaroj : C . Minnaja kaj komputeko - - > <nl> - < Item id = " 6304 " name = " Plej Laste Uzitaj dosieroj ( PLU ) " / > <nl> - < Item id = " 6305 " name = " Ne serÄ u dumlanÄ e " / > <nl> - < Item id = " 6306 " name = " Nombro de lastaj memorataj dosieroj : " / > <nl> + <nl> < Item id = " 6307 " name = " Å altu " / > <nl> < Item id = " 6308 " name = " Minimumigu en taskopleton " / > <nl> - < Item id = " 6309 " name = " Memoru seancon ( dosieraro ) por estonta lanÄ o " / > <nl> + < Item id = " 6309 " name = " Memoru la seancdosierojn por estonta lanÄ o " / > <nl> < Item id = " 6312 " name = " AÅ tomata rekono de dosierstato " / > <nl> < Item id = " 6313 " name = " Ä isdatigu sen rimarkigo " / > <nl> - < Item id = " 6318 " name = " Agordoj de alklakeblaj ligiloj " / > <nl> + < Item id = " 6318 " name = " Agordoj pri alklakeblaj ligiloj " / > <nl> < Item id = " 6325 " name = " Ä isdatiginte , atingu la lastan linion " / > <nl> < Item id = " 6319 " name = " Å altu " / > <nl> < Item id = " 6320 " name = " Sen substreko " / > <nl> - < Item id = " 6322 " name = " Dosiersufiksoj de seanco : " / > <nl> + < Item id = " 6322 " name = " Sufiksoj de seancdosieroj : " / > <nl> < Item id = " 6323 " name = " AÅ tomata Ä isdatigo de Notepad + + " / > <nl> - < Item id = " 6324 " name = " Å anÄ u dokumenton ( Ctrl + Tab ) " / > <nl> + < Item id = " 6324 " name = " Å anÄ o de dokumento ( Ctrl + Tab ) " / > <nl> < Item id = " 6326 " name = " Inteligenta evidentigo " / > <nl> - < Item id = " 6329 " name = " Evidentigu kongruajn markojn " / > <nl> + < Item id = " 6329 " name = " Evidentigo de kongruaj markoj " / > <nl> < Item id = " 6327 " name = " Å altu " / > <nl> < Item id = " 6328 " name = " Evidentigu atributojn de markojn " / > <nl> < Item id = " 6330 " name = " Evid . regionojn kun komentoj / php / asp " / > <nl> <nl> < Item id = " 6331 " name = " Montru nur dosiernomon en titola breto " / > <nl> < Item id = " 6114 " name = " Å altu " / > <nl> < Item id = " 6115 " name = " AÅ tomata krommarÄ eno " / > <nl> - < Item id = " 6117 " name = " Unue la Plej Laste Uzitaj ( PLU ) " / > <nl> + < Item id = " 6117 " name = " Ordigu laÅ lasta uzo " / > <nl> <nl> < / MISC > <nl> < Backup title = " Sekurkopioj / VortkompletiÄ o " > <nl> < Item id = " 6801 " name = " Sekurkopio " / > <nl> < Item id = " 6315 " name = " Nenia sekurkopio " / > <nl> < Item id = " 6316 " name = " Simpla sekurkopio " / > <nl> - < Item id = " 6317 " name = " Alia sekurkopio je Ä iu konservo " / > <nl> + < Item id = " 6317 " name = " Nova sekurkopio je Ä iu konservo " / > <nl> < Item id = " 6804 " name = " Elektu dosierujon por sekurkopioj : " / > <nl> < Item id = " 6803 " name = " Dosierujo : " / > <nl> < Item id = " 6807 " name = " AÅ tomata vortkompletiÄ o " / > <nl> <nl> < Item id = " 2 " name = " Rezignu " / > <nl> < / ColumnEditor > <nl> < / Dialog > <nl> + < MessageBox > <nl> + < ContextMenuXmlEditWaring title = " Modifu kuntekstan menuon " message = " Modifo de contextMenu . xml ebligas modifon de kunteksta menuo de Notepad + + . & # x0A ; Necesas restarti Notepad + + - n por ke modifoj faritaj en contextMenu . xml efikos . " / > <nl> + < NppHelpAbsentWaring title = " La dosiero ne ekzistas " message = " & # x0A ; ne ekzistas . ElÅ utu Ä in Ä e la retpaÄ aro de Notepad + + . " / > <nl> + < SaveCurrentModifWaring title = " Konservu faritajn modifiojn " message = " Vi devas konservi faritajn modifiojn . & # x0A ; Ne eblas malfari iun konservitan modifion . & # x0A ; & # x0A ; Ä u vi volas daÅ rigi ? " / > <nl> + < LoseUndoAbilityWaring title = " Atentu : perdo de ebleco malfari " message = " Vi devas konservi faritajn modifiojn . & # x0A ; Ne eblas malfari iun konservitan modifion . & # x0A ; & # x0A ; Ä u vi volas daÅ rigi ? " / > <nl> + < CannotMoveDoc title = " Malfermo en alia ekzemplo de Notepad + + " message = " La dokumento estis modifita , konservu antaÅ daÅ rigi . " / > <nl> + < DocReloadWarning title = " ReÅ argo " message = " Ä u vi certe volas reÅ argi la dosieron ? Ä iuj modifioj faritaj estos perditaj . " / > <nl> + < FileLockedWarning title = " Nesukcesa konservo " message = " Kontrolu Ä u la dosiero estas malfermita en alia programo . " / > <nl> + < FileAlreadyOpenedInNpp title = " Dosiero malfermita " message = " La dosiero estas jam malfermita en Notepad + + . " / > <nl> + < DeleteFileFailed title = " Forigo de dosiero " message = " La forigo de la dosiero ne sukcesis . " / > <nl> + < / MessageBox > <nl> + < ProjectManager > <nl> + < PanelTitle name = " Projektoj " / > <nl> + < WorkspaceRootName name = " Laborspaco " / > <nl> + < Menus > <nl> + < Entries > <nl> + < Item id = " 0 " name = " Laborspaco " / > <nl> + < Item id = " 1 " name = " Modifu " / > <nl> + < / Entries > <nl> + < WorkspaceMenu > <nl> + < Item id = " 3122 " name = " Nova laborspaco " / > <nl> + < Item id = " 3123 " name = " Malfermu laborspacon " / > <nl> + < Item id = " 3124 " name = " ReÅ argu laborspacon " / > <nl> + < Item id = " 3125 " name = " Konservu " / > <nl> + < Item id = " 3126 " name = " Konservu kiel . . . " / > <nl> + < Item id = " 3127 " name = " Konservu kopion kiel . . . " / > <nl> + < Item id = " 3121 " name = " Aldonu novan projekton " / > <nl> + < / WorkspaceMenu > <nl> + < ProjectMenu > <nl> + < Item id = " 3111 " name = " Alinomu " / > <nl> + < Item id = " 3112 " name = " Aldonu dosierujon " / > <nl> + < Item id = " 3113 " name = " Aldonu dosierojn . . . " / > <nl> + < Item id = " 3114 " name = " Forigu " / > <nl> + < Item id = " 3117 " name = " Aldonu dosierojn de dosierujo . . . " / > <nl> + < / ProjectMenu > <nl> + < FolderMenu > <nl> + < Item id = " 3111 " name = " Alinomu " / > <nl> + < Item id = " 3112 " name = " Aldonu dosierujon " / > <nl> + < Item id = " 3113 " name = " Aldonu dosierojn . . . " / > <nl> + < Item id = " 3114 " name = " Forigu " / > <nl> + < Item id = " 3117 " name = " Aldonu dosierojn de dosierujo . . . " / > <nl> + < / FolderMenu > <nl> + < FileMenu > <nl> + < Item id = " 3111 " name = " Alinomu " / > <nl> + < Item id = " 3115 " name = " Malaldonu " / > <nl> + < Item id = " 3116 " name = " Modifu vojon de la dosieron " / > <nl> + < / FileMenu > <nl> + < / Menus > <nl> + < / ProjectManager > <nl> < / Native - Langue > <nl> < ! - - <nl> Eble iu volus scii kial mi elektis volitivon ( u - finaĵo ) por verboj , kaj eble tiu demandas , Ä ar en OpenOffice estas uzata la i - finaĵon . Tre simple , Ä ar tio laÅ mi plej bone taÅ gas al la gramatiko de la Lingvo Internacia ( ankaÅ aliaj programoj / retpaÄ aroj uzas Ä in ) . <nl> mmm a / PowerEditor / installer / nativeLang / finnish . xml <nl> ppp b / PowerEditor / installer / nativeLang / finnish . xml <nl> <nl> < ? xml version = " 1 . 0 " encoding = " Windows - 1252 " ? > <nl> < ! - - <nl> - Suomenkielinen lokalisointi Notepad + + 5 . 9 . 5 / Finnish localization <nl> - Viimeisin muokkaaja : Teijo , 24 . 10 . 2011 20 : 35 <nl> + Suomenkielinen lokalisointi Notepad + + 5 . 9 . 6 . 2 / Finnish localization <nl> + Viimeisin muokkaaja : Teijo , 15 - 11 - 2011 21 : 15 <nl> Lähetä käännösvirhehavaintosi ja korjausehdotuksesi osoitteeseen teijo ( at ) nic . fi <nl> Asennusohjeet = > https : / / sourceforge . net / forum / message . php ? msg_id = 5691520 <nl> - - > <nl> Asennusohjeet = > https : / / sourceforge . net / forum / message . php ? msg_id = 5691520 <nl> < Item posX = " 4 " posY = " 5 " posZ = " 15 " name = " Vietnamilainen " / > <nl> <nl> < Item posX = " 6 " posY = " 4 " name = " Tuonti " / > <nl> - <nl> - <nl> - <nl> + <nl> < / SubEntries > <nl> <nl> < ! - - all menu item - - > <nl> < Commands > <nl> + < ! - - < Item id = " 1001 " name = " & amp ; Jetzt drucken ! * * * " / > - - > <nl> + <nl> + < Item id = " 10001 " name = " Yksi näkymä " / > <nl> + < Item id = " 10002 " name = " Kahdenna näkymä " / > <nl> + < Item id = " 10003 " name = " Luo uusi istunto " / > <nl> + < Item id = " 10004 " name = " Avaa uudessa istunnossa " / > <nl> + <nl> < Item id = " 41001 " name = " & amp ; Uusi " / > <nl> < Item id = " 41002 " name = " & amp ; Avaa " / > <nl> < Item id = " 41003 " name = " & amp ; Sulje " / > <nl> Asennusohjeet = > https : / / sourceforge . net / forum / message . php ? msg_id = 5691520 <nl> < Item id = " 45012 " name = " Muunna koodaukseen UCS - 2 Big Endian " / > <nl> < Item id = " 45013 " name = " Muunna koodaukseen UCS - 2 Little Endian " / > <nl> <nl> - < Item id = " 10001 " name = " Yksi näkymä " / > <nl> - < Item id = " 10002 " name = " Kahdenna näkymä " / > <nl> - < Item id = " 10003 " name = " Luo uusi istunto " / > <nl> - < Item id = " 10004 " name = " Avaa uudessa istunnossa " / > <nl> - <nl> < Item id = " 46001 " name = " Mukauta tyyliä . . . " / > <nl> < Item id = " 46015 " name = " MS DOS " / > <nl> < Item id = " 46016 " name = " ( Normaali ) " / > <nl> Asennusohjeet = > https : / / sourceforge . net / forum / message . php ? msg_id = 5691520 <nl> < Item id = " 6111 " name = " Näytä tilarivi " / > <nl> < Item id = " 6112 " name = " Näytä sulkemispainike " / > <nl> < Item id = " 6113 " name = " Suljettavissa kaksoisnapsautuksella " / > <nl> - <nl> < Item id = " 6118 " name = " Piilotettu " / > <nl> < Item id = " 6119 " name = " Rivitä tarvittaessa " / > <nl> < Item id = " 6120 " name = " Pystysuuntaiset " / > <nl> < Item id = " 6121 " name = " Valikkorivi " / > <nl> < Item id = " 6122 " name = " Piilotettu ( Näytä / piilota : F10 tai Alt ) " / > <nl> < Item id = " 6123 " name = " Käyttöliittymän kieli " / > <nl> - < Item id = " 6125 " name = " Dokumenttiluettelo " / > <nl> - < Item id = " 6126 " name = " Näytä " / > <nl> + < Item id = " 6125 " name = " Dokumenttiluettelo " / > <nl> + < Item id = " 6126 " name = " Näytä " / > <nl> < / Global > <nl> <nl> < Scintillas title = " Muokkaus " > <nl> Asennusohjeet = > https : / / sourceforge . net / forum / message . php ? msg_id = 5691520 <nl> < Item id = " 6224 " name = " Monimuokkaus " / > <nl> < Item id = " 6225 " name = " Käytössä ( Ctrl + Napsautus / valinta ) " / > <nl> < Item id = " 6226 " name = " Ei mitään " / > <nl> - <nl> < Item id = " 6227 " name = " Rivitys " / > <nl> < Item id = " 6228 " name = " Oletus " / > <nl> < Item id = " 6229 " name = " Tasattu " / > <nl> Asennusohjeet = > https : / / sourceforge . net / forum / message . php ? msg_id = 5691520 <nl> < Item id = " 3112 " name = " Lisää kansio " / > <nl> < Item id = " 3113 " name = " Lisää tiedostot . . . " / > <nl> < Item id = " 3114 " name = " Poista " / > <nl> + < ! - - < Item id = " 3117 " name = " Lisää tiedostot kansiosta . . * * * " / > - - > <nl> < / ProjectMenu > <nl> < FolderMenu > <nl> < Item id = " 3111 " name = " Nimeä uudelleen " / > <nl> < Item id = " 3112 " name = " Lisää kansio " / > <nl> < Item id = " 3113 " name = " Lisää tiedostot . . . " / > <nl> < Item id = " 3114 " name = " Poista " / > <nl> + < ! - - < Item id = " 3117 " name = " Lisää tiedostot kansiosta . . * * * " / > - - > <nl> < / FolderMenu > <nl> < FileMenu > <nl> < Item id = " 3111 " name = " Nimeä uudelleen " / > <nl> mmm a / PowerEditor / installer / nativeLang / galician . xml <nl> ppp b / PowerEditor / installer / nativeLang / galician . xml <nl> <nl> < ! - - traduzón : nunhes - un galego non avaliado que se rí da oficialidade adormecida e inoperante - - > <nl> < ! - - by ambosass . com 2008 - - > <nl> < ! - - admitense correccións ; ) - - > <nl> + < ! - - 20111122 correccións realizadas por damufo . Proxecto Trasno ( trasno . net ) - - > <nl> + < ! - - damufo . engadidos un par de novas traducións aínda - - > <nl> + < ! - - damufo . faltan bastantes con respecto á version en inglés - - > <nl> < NotepadPlus > <nl> < Native - Langue name = " Galego " filename = " galician . xml " > <nl> < Menu > <nl> <nl> < Item id = " 6 " name = " C & amp ; onfigurar " / > <nl> < Item id = " 7 " name = " Macro " / > <nl> < Item id = " 8 " name = " Executar " / > <nl> - < Item idName = " Plugins " name = " Plugins " / > <nl> + < Item idName = " Plugins " name = " Engadidos " / > <nl> < Item idName = " Window " name = " Xanelas " / > <nl> < / Entries > <nl> <nl> <nl> < Item id = " 41008 " name = " Gardar & amp ; como . . . " / > <nl> < Item id = " 41010 " name = " Imprimir . . . " / > <nl> < Item id = " 1001 " name = " Imprimir agora ! " / > <nl> - < Item id = " 41011 " name = " S & amp ; air " / > <nl> + < Item id = " 41011 " name = " S & amp ; aír " / > <nl> < Item id = " 41012 " name = " Cargar sesión . . . " / > <nl> < Item id = " 41013 " name = " Gardar sesión . . . " / > <nl> < Item id = " 41014 " name = " Recargar dendo disco " / > <nl> <nl> < Item id = " 42023 " name = " Comentario simple " / > <nl> < Item id = " 42024 " name = " Eliminar espazos ao final " / > <nl> < Item id = " 42025 " name = " Gardar macro gravada actual " / > <nl> - < Item id = " 42026 " name = " Dirección do texto Der a Ezq " / > <nl> - < Item id = " 42027 " name = " Dirección do texto Ezq a Der " / > <nl> + < Item id = " 42026 " name = " Dirección do texto Der a Esq " / > <nl> + < Item id = " 42027 " name = " Dirección do texto Esq a Der " / > <nl> < Item id = " 42028 " name = " Só letura " / > <nl> - < Item id = " 42029 " name = " Copiar enderezo do arquivo ao Portapapeis " / > <nl> + < Item id = " 42029 " name = " Copiar ruta do arquivo ao Portapapeis " / > <nl> < Item id = " 42030 " name = " Copiar nome de arquivo ao Portapapeis " / > <nl> - < Item id = " 42031 " name = " Copiar enderezo do arquivo ao Portapapeis " / > <nl> + < Item id = " 42031 " name = " Copiar ruta do arquivo ao Portapapeis " / > <nl> < Item id = " 42032 " name = " Executar unha macro varias veces . . . " / > <nl> < Item id = " 42033 " name = " Quitar marca de só letura " / > <nl> < Item id = " 42035 " name = " Comentar selección " / > <nl> <nl> < Item id = " 43005 " name = " Marcar / Desmarcar " / > <nl> < Item id = " 43006 " name = " Marca seguinte " / > <nl> < Item id = " 43007 " name = " Marca anterior " / > <nl> - < Item id = " 43008 " name = " Quitar tódalas marcas " / > <nl> + < Item id = " 43008 " name = " Quitar todas as marcas " / > <nl> < Item id = " 43009 " name = " Ir ao delimitador asociado " / > <nl> < Item id = " 43010 " name = " Buscar anterior " / > <nl> < Item id = " 43011 " name = " Búsqueda & amp ; rápida . . . " / > <nl> <nl> <nl> < Item id = " 44010 " name = " Encoller todo " / > <nl> < Item id = " 44011 " name = " Atallos persoais " / > <nl> - < Item id = " 44019 " name = " Amosar tódolos carácteres " / > <nl> + < Item id = " 44019 " name = " Amosar todo os caracteres " / > <nl> < Item id = " 44020 " name = " Amosar sangrías " / > <nl> < Item id = " 44022 " name = " Axuste da liña " / > <nl> < Item id = " 44023 " name = " & amp ; Aumentar zoom Ctrl - Mouse Wheel Up " / > <nl> <nl> < Item id = " 45005 " name = " Codificar en UTF - 8 " / > <nl> < Item id = " 45006 " name = " Codificar en UCS - 2 Big Endian " / > <nl> < Item id = " 45007 " name = " Codificar en UCS - 2 Little Endian " / > <nl> - < Item id = " 45008 " name = " Codificar en UTF - 8 sin BOM " / > <nl> + < Item id = " 45008 " name = " Codificar en UTF - 8 sen BOM " / > <nl> < Item id = " 45009 " name = " Converter en ANSI " / > <nl> - < Item id = " 45010 " name = " Converter en UTF - 8 sin BOM " / > <nl> + < Item id = " 45010 " name = " Converter en UTF - 8 sen BOM " / > <nl> < Item id = " 45011 " name = " Converter en UTF - 8 " / > <nl> < Item id = " 45012 " name = " Converter en UCS - 2 Big Endian " / > <nl> < Item id = " 45013 " name = " Converter en UCS - 2 Little Endian " / > <nl> <nl> < Item id = " 10001 " name = " Ir a outra vista " / > <nl> < Item id = " 10002 " name = " Clonar noutra vista " / > <nl> + < Item id = " 10003 " name = " Mover a nova xanela " / > <nl> + < Item id = " 10004 " name = " Abrir en nova xanela " / > <nl> <nl> < Item id = " 46001 " name = " Configurador de estilo . . . " / > <nl> - < Item id = " 47000 " name = " Aprol de . . . " / > <nl> + < Item id = " 47000 " name = " Sobre o Notepad + + . . . " / > <nl> < Item id = " 47001 " name = " Web de Notepad + + " / > <nl> < Item id = " 47002 " name = " Proxecto Notepad + + en Sourceforge " / > <nl> < Item id = " 47003 " name = " Axuda en liña " / > <nl> < Item id = " 47004 " name = " Foro " / > <nl> - < Item id = " 47005 " name = " Descargar máis ' plugins ' " / > <nl> + < Item id = " 47005 " name = " Descargar máis ' engadidos ' " / > <nl> <nl> < Item id = " 48009 " name = " Xestor de atallos de teclado . . . " / > <nl> - < Item id = " 48011 " name = " Preferenzas . . . " / > <nl> + < Item id = " 48011 " name = " Preferencias . . . " / > <nl> < Item id = " 49000 " name = " & amp ; Executar . . . " / > <nl> <nl> < Item id = " 50000 " name = " Completar función " / > <nl> <nl> < GoToLine title = " Ir á liña # " > <nl> < Item id = " 1 " name = " & amp ; Ir " / > <nl> < Item id = " 2 " name = " Esquecer " / > <nl> - < Item id = " 2004 " name = " Atópase aqu ? : " / > <nl> + < Item id = " 2004 " name = " Atópase aquí : " / > <nl> < Item id = " 2005 " name = " Quere ir a : " / > <nl> < Item id = " 2006 " name = " Non pode ir máis alá de : " / > <nl> < / GoToLine > <nl> <nl> < Run title = " Executar . . . " > <nl> - < Item id = " 1903 " name = " Escriba o enderezo do programa a executar " / > <nl> + < Item id = " 1903 " name = " Escriba a ruta do programa a executar " / > <nl> < Item id = " 1 " name = " Executar " / > <nl> < Item id = " 2 " name = " Esquecer " / > <nl> < Item id = " 1904 " name = " Gardar . . . " / > <nl> <nl> < Item id = " 2303 " name = " Transparencia " / > <nl> <nl> < SubDialog > <nl> - < Item id = " 2204 " name = " Negriña " / > <nl> + < Item id = " 2204 " name = " Grosa " / > <nl> < Item id = " 2205 " name = " Cursiva " / > <nl> < Item id = " 2206 " name = " Cor da tipografía " / > <nl> < Item id = " 2207 " name = " Cor do fondo " / > <nl> <nl> < Item id = " 2213 " name = " Tipografía " / > <nl> < Item id = " 2214 " name = " Ext . predet . : " / > <nl> < Item id = " 2216 " name = " Ext . usuario : " / > <nl> - < Item id = " 2218 " name = " Subraiado " / > <nl> + < Item id = " 2218 " name = " Subliñado " / > <nl> < Item id = " 2219 " name = " Verbas clave predeterminadas " / > <nl> < Item id = " 2221 " name = " Verbas clave do usuario " / > <nl> < Item id = " 2225 " name = " Linguaxe : " / > <nl> - < Item id = " 2226 " name = " Habilitar cor xeral de primer plano " / > <nl> - < Item id = " 2227 " name = " Habilitar cor xeral de fondo " / > <nl> - < Item id = " 2228 " name = " Habilitar tipografía xeral " / > <nl> - < Item id = " 2229 " name = " Habilitar tamaño de tipografía xeral " / > <nl> - < Item id = " 2230 " name = " Habilitar tipografía xeral en negriña " / > <nl> - < Item id = " 2231 " name = " Habilitar tipografía xeral en cursiva " / > <nl> - < Item id = " 2232 " name = " Habilitar tipografía xeral en subraiar " / > <nl> + < Item id = " 2226 " name = " Activar cor xeral de primer plano " / > <nl> + < Item id = " 2227 " name = " Activar cor xeral de fondo " / > <nl> + < Item id = " 2228 " name = " Activar tipografía xeral " / > <nl> + < Item id = " 2229 " name = " Activar tamaño de tipografía xeral " / > <nl> + < Item id = " 2230 " name = " Activar tipografía xeral en grosa " / > <nl> + < Item id = " 2231 " name = " Activar tipografía xeral en cursiva " / > <nl> + < Item id = " 2232 " name = " Activar tipografía xeral en subliñar " / > <nl> < / SubDialog > <nl> <nl> < / StyleConfig > <nl> <nl> < Item id = " 3 " name = " Estilo da tipografía " / > <nl> < Item id = " 4 " name = " Tipografía : " / > <nl> < Item id = " 5 " name = " Tamaño : " / > <nl> - < Item id = " 6 " name = " Negriña " / > <nl> + < Item id = " 6 " name = " Grosa " / > <nl> < Item id = " 7 " name = " Cursiva " / > <nl> - < Item id = " 8 " name = " Subraiado " / > <nl> + < Item id = " 8 " name = " Subliñado " / > <nl> < Folder title = " Cartafol & amp ; & amp ; predeterminado " > <nl> < Item id = " 21101 " name = " Configuración de estilo predeterminado " / > <nl> < Item id = " 21201 " name = " Configurar verbas clave de apertura " / > <nl> <nl> < / Comment > <nl> < Operator title = " Operadores " > <nl> < Item id = " 24107 " name = " Operador " / > <nl> - < Item id = " 24103 " name = " Símbolos dispoñibles " / > <nl> + < Item id = " 24103 " name = " Símbolos dispoñíbeis " / > <nl> < Item id = " 24101 " name = " Operadores activados " / > <nl> < Item id = " 24201 " name = " Delimitador 1 " / > <nl> < Item id = " 24211 " name = " Límite aberto : " / > <nl> <nl> < Global title = " Xerais " > <nl> < Item id = " 6101 " name = " Barra de ferramentas " / > <nl> < Item id = " 6102 " name = " Agochar " / > <nl> - < Item id = " 6103 " name = " Iconos pequenos " / > <nl> - < Item id = " 6104 " name = " Iconos grandes " / > <nl> - < Item id = " 6105 " name = " Iconos pequenos predeterminados " / > <nl> + < Item id = " 6103 " name = " Iconas pequenas " / > <nl> + < Item id = " 6104 " name = " Iconas grandes " / > <nl> + < Item id = " 6105 " name = " Iconas pequenas predeterminadas " / > <nl> <nl> - < Item id = " 6106 " name = " Barra de pestanas " / > <nl> + < Item id = " 6106 " name = " Barra de lapelas " / > <nl> < Item id = " 6107 " name = " Reducir texto " / > <nl> < Item id = " 6108 " name = " Bloquear ( impedir arrastrar e soltar ) " / > <nl> < Item id = " 6109 " name = " Amosar xanelas inactivas " / > <nl> < Item id = " 6110 " name = " Amosar liña laranxa na activa " / > <nl> <nl> < Item id = " 6111 " name = " Amosar barra de estado " / > <nl> - < Item id = " 6112 " name = " Botón de peche en cada pestana " / > <nl> + < Item id = " 6112 " name = " Botón de peche en cada lapela " / > <nl> < Item id = " 6113 " name = " Duplo click para pechar un documento " / > <nl> < Item id = " 6118 " name = " Agochar " / > <nl> < Item id = " 6119 " name = " Multi - liña " / > <nl> <nl> < Item id = " 6204 " name = " Cercos " / > <nl> < Item id = " 6205 " name = " Cadros " / > <nl> <nl> - < Item id = " 6206 " name = " Amosar n ? mero de li ? a " / > <nl> + < Item id = " 6206 " name = " Amosar número de liña " / > <nl> < Item id = " 6207 " name = " Amosar marcas " / > <nl> < Item id = " 6208 " name = " Amosar limite vertical " / > <nl> < Item id = " 6209 " name = " Número de columna : " / > <nl> <nl> < Item id = " 6211 " name = " Límite vertical " / > <nl> < Item id = " 6212 " name = " Xeito liñal " / > <nl> < Item id = " 6213 " name = " Xeito de fondo " / > <nl> - < Item id = " 6214 " name = " Resaltala liña activa " / > <nl> + < Item id = " 6214 " name = " Realzar a liña activa " / > <nl> < / Scintillas > <nl> < NewDoc title = " Documento novo " > <nl> < Item id = " 6401 " name = " Formato " / > <nl> < Item id = " 6402 " name = " Windows " / > <nl> < Item id = " 6403 " name = " Unix " / > <nl> < Item id = " 6404 " name = " Mac " / > <nl> - < Item id = " 6405 " name = " Codificaci ? n " / > <nl> + < Item id = " 6405 " name = " Codificación " / > <nl> < Item id = " 6406 " name = " ANSI " / > <nl> - < Item id = " 6407 " name = " UTF - 8 sin BOM " / > <nl> + < Item id = " 6407 " name = " UTF - 8 sen BOM " / > <nl> < Item id = " 6408 " name = " UTF - 8 " / > <nl> < Item id = " 6409 " name = " UCS2 Big endian " / > <nl> < Item id = " 6410 " name = " UCS2 small endian " / > <nl> - < Item id = " 6411 " name = " Linguaxe predeterminado : " / > <nl> + < Item id = " 6411 " name = " Linguaxe predeterminada : " / > <nl> < / NewDoc > <nl> < FileAssoc title = " Asociación de arquivos " > <nl> - < Item id = " 4009 " name = " Ext . dispoñibles : " / > <nl> + < Item id = " 4009 " name = " Ext . dispoñíbeis : " / > <nl> < Item id = " 4010 " name = " Ext . asociadas : " / > <nl> < / FileAssoc > <nl> < LangMenu title = " Menú de linguaxes " > <nl> - < Item id = " 6505 " name = " Dispo ? ibles " / > <nl> + < Item id = " 6505 " name = " Dispoñíbeis " / > <nl> < Item id = " 6506 " name = " Desactivados " / > <nl> < / LangMenu > <nl> < Print title = " Imprimir " > <nl> <nl> < Item id = " 6603 " name = " ' WYSIWYG ' " / > <nl> < Item id = " 6604 " name = " Invertir " / > <nl> < Item id = " 6605 " name = " B / N " / > <nl> - < Item id = " 6606 " name = " Sen a cor do fondo " / > <nl> + < Item id = " 6606 " name = " Sen a cor de fondo " / > <nl> < Item id = " 6607 " name = " Marxes ( mm ) " / > <nl> < Item id = " 6612 " name = " Esquerdo " / > <nl> < Item id = " 6613 " name = " Superior " / > <nl> < Item id = " 6614 " name = " Dereito " / > <nl> < Item id = " 6615 " name = " Inferior " / > <nl> - < Item id = " 6706 " name = " Negriña " / > <nl> + < Item id = " 6706 " name = " Grosa " / > <nl> < Item id = " 6707 " name = " Cursiva " / > <nl> < Item id = " 6708 " name = " Cabeceira " / > <nl> < Item id = " 6709 " name = " Parte esquerda " / > <nl> < Item id = " 6710 " name = " Parte central " / > <nl> < Item id = " 6711 " name = " Parte dereita " / > <nl> - < Item id = " 6717 " name = " Negriña " / > <nl> + < Item id = " 6717 " name = " Grosa " / > <nl> < Item id = " 6718 " name = " Cursiva " / > <nl> < Item id = " 6719 " name = " Pé " / > <nl> < Item id = " 6720 " name = " Parte esquerda " / > <nl> <nl> < Item id = " 6723 " name = " Engadir " / > <nl> < Item id = " 6725 " name = " Variable : " / > <nl> < / Print > <nl> - < MISC title = " Miscel ? nea " > <nl> + < MISC title = " Miscelánea " > <nl> < Item id = " 6301 " name = " Tabulación " / > <nl> < Item id = " 6302 " name = " Sustituir por espazos " / > <nl> < Item id = " 6303 " name = " Tamaño : " / > <nl> <nl> < Item id = " 6313 " name = " Actualización automática " / > <nl> < Item id = " 6318 " name = " Propiedades das ligazóns " / > <nl> < Item id = " 6319 " name = " Activar " / > <nl> - < Item id = " 6320 " name = " Non debuxar subraiado " / > <nl> + < Item id = " 6320 " name = " Non debuxar subliñado " / > <nl> < Item id = " 6323 " name = " Activar actualización automática " / > <nl> < Item id = " 6324 " name = " Alternar documentos ( Ctrl + TAB ) " / > <nl> <nl> < Item id = " 6114 " name = " Permitir alternar documentos ( Ctrl + Tab ) " / > <nl> < Item id = " 6115 " name = " Sangría automática " / > <nl> < Item id = " 6116 " name = " Lembrar o último cartafol usado " / > <nl> - < Item id = " 6117 " name = " Habilitar xeito MRU ao alternar documentos " / > <nl> + < Item id = " 6117 " name = " Activar xeito MRU ao alternar documentos " / > <nl> < / MISC > <nl> - < Backup title = " Copia de seguridade / Autocompletar " > <nl> - < Item id = " 6801 " name = " Copia de seguridade " / > <nl> + < Backup title = " Copia de seguranza / Autocompletar " > <nl> + < Item id = " 6801 " name = " Copia de seguranza " / > <nl> < Item id = " 6315 " name = " Non facer " / > <nl> < Item id = " 6316 " name = " Copia simple " / > <nl> < Item id = " 6317 " name = " Copia detallada " / > <nl> - < Item id = " 6804 " name = " Cartafol do usuario para copia de seguridade personalizado " / > <nl> + < Item id = " 6804 " name = " Cartafol do usuario para copia de seguranza personalizado " / > <nl> < Item id = " 6803 " name = " Cartafol : " / > <nl> < Item id = " 6807 " name = " Autocompletar " / > <nl> - < Item id = " 6808 " name = " Habilitar autocompletar en cada entrada " / > <nl> + < Item id = " 6808 " name = " Activar autocompletar en cada entrada " / > <nl> < Item id = " 6809 " name = " Completar función " / > <nl> < Item id = " 6810 " name = " Completar verba " / > <nl> < Item id = " 6811 " name = " De " / > <nl> - < Item id = " 6813 " name = " Carácteres " / > <nl> + < Item id = " 6813 " name = " Caracteres " / > <nl> < Item id = " 6814 " name = " Valores válidos : 1 - 9 " / > <nl> < / Backup > <nl> < / Preference > <nl> <nl> < Item id = " 2 " name = " Aceptar " / > <nl> < Item id = " 7002 " name = " Gardar " / > <nl> < Item id = " 7003 " name = " Pechar xanela ( s ) " / > <nl> - < Item id = " 7004 " name = " Ordear pestanas " / > <nl> + < Item id = " 7004 " name = " Ordenar lapelas " / > <nl> < / Window > <nl> < ColumnEditor title = " Editor de columnas " > <nl> - < Item id = " 2023 " name = " Texto a insertar " / > <nl> - < Item id = " 2033 " name = " Número a insertar " / > <nl> + < Item id = " 2023 " name = " Texto a inserir " / > <nl> + < Item id = " 2033 " name = " Número a inserir " / > <nl> < Item id = " 2030 " name = " Número inicial : " / > <nl> < Item id = " 2031 " name = " Incrementar en : " / > <nl> < Item id = " 2035 " name = " Ceros diante " / > <nl> mmm a / PowerEditor / installer / nativeLang / georgian . xml <nl> ppp b / PowerEditor / installer / nativeLang / georgian . xml <nl> <nl> < ? xml version = " 1 . 0 " encoding = " UTF - 8 " ? > <nl> + < ! - - <nl> + Georgian localization for Notepad + + 5 . 9 . 6 . 2 <nl> + Last modified 22 . dec . 2011 by UGLT ( Giorgi Maghlakelidze ) . <nl> + Please e - mail errors , suggestions etc . to acidlabz @ gmail . com <nl> + - - > <nl> < NotepadPlus > <nl> < Native - Langue name = " á ¥ á á á á £ á á " filename = " georgian . xml " > <nl> < Menu > <nl> <nl> < ! - - Main Menu Entries - - > <nl> < Entries > <nl> < Item id = " 0 " name = " & amp ; á ¤ á á á á " / > <nl> - < Item id = " 1 " name = " & amp ; á á á á á ¥ á ¢ á á á á á " / > <nl> + < Item id = " 1 " name = " & amp ; á á á á £ á ¨ á á á á á " / > <nl> < Item id = " 2 " name = " & amp ; á « á á á á " / > <nl> < Item id = " 3 " name = " & amp ; á ® á á á " / > <nl> < Item id = " 4 " name = " & amp ; á á á á á á á á " / > <nl> < Item id = " 5 " name = " & amp ; á ¡ á á á ¢ á á ¥ á ¡ á " / > <nl> - < Item id = " 6 " name = " & amp ; á á á á á á á ¢ á á á á " / > <nl> + < Item id = " 6 " name = " & amp ; á á á á á á á á " / > <nl> < Item id = " 7 " name = " á á á á á " / > <nl> < Item id = " 8 " name = " á á á ¨ á á á á " / > <nl> - < Item idName = " Plugins " name = " á © á á á á á á á á " / > <nl> + < Item idName = " Plugins " name = " á á á á á á á ¢ á á á " / > <nl> < Item idName = " Window " name = " á ¤ á á á ¯ á á á " / > <nl> < / Entries > <nl> <nl> < ! - - Sub Menu Entries - - > <nl> < SubEntries > <nl> + < Item posX = " 0 " posY = " 19 " name = " á á ® á á á ® á á á ¡ á á á ® á ¡ á á á á á ¤ á á á á á á " / > <nl> < Item posX = " 1 " posY = " 9 " name = " á á £ á ¤ á á á ¨ á á © á á ¡ á á " / > <nl> < Item posX = " 1 " posY = " 10 " name = " á á á ¨ á á á á á " / > <nl> < Item posX = " 1 " posY = " 11 " name = " á á á á á ¡ á ¢ á á á ¡ á á á á á § á á á á " / > <nl> <nl> < Item posX = " 1 " posY = " 13 " name = " á á á á á á ¢ á á á / á á á ® á ¡ á á " / > <nl> < Item posX = " 1 " posY = " 14 " name = " á á á ¢ á - á á á ¡ á á £ á á á á " / > <nl> < Item posX = " 1 " posY = " 15 " name = " EOL á á á á á á á ¡ á á " / > <nl> - <nl> + < Item posX = " 1 " posY = " 16 " name = " á á á ¥ á á á á á á á á á ° á á á á á á " / > <nl> + < Item posX = " 1 " posY = " 17 " name = " á á á á ¡ á á á £ á á á á á £ á á á © á á ¡ á á " / > <nl> < Item posX = " 2 " posY = " 16 " name = " á § á á á á á ¡ á á á á á ¨ á á á " / > <nl> < Item posX = " 2 " posY = " 17 " name = " á á á á á ¨ á á á á ¡ á á á ® á ¡ á á " / > <nl> - < Item posX = " 2 " posY = " 18 " name = " á á á á á ¡ á á á á á á á á " / > <nl> - < Item posX = " 2 " posY = " 19 " name = " á á á á á ¡ á á á á ¥ á á á á á " / > <nl> - <nl> - < Item posX = " 3 " posY = " 4 " name = " á ¡ á á á á á á á ¡ á © á á á á á á " / > <nl> - < Item posX = " 3 " posY = " 5 " name = " á á á á ® á á á á á " / > <nl> + < Item posX = " 2 " posY = " 18 " name = " á á á á á ¡ á á á á á á á á " / > <nl> + < Item posX = " 2 " posY = " 19 " name = " á á á á á ¡ á á á á ¥ á á á á á " / > <nl> + < Item posX = " 2 " posY = " 21 " name = " á ¡ á á á á ¨ á á " / > <nl> + < Item posX = " 3 " posY = " 4 " name = " á ¡ á á á á á á á ¡ á © á á á á á á " / > <nl> + < Item posX = " 3 " posY = " 5 " name = " á á á ¡ á ¨ á ¢ á á á " / > <nl> < Item posX = " 3 " posY = " 6 " name = " á á á á á á á á á á á á á £ á á á á ¢ á á ¡ á á á á á ¢ á á á / á á á á á á á á á " / > <nl> < Item posX = " 3 " posY = " 16 " name = " á á á á á ¡ á á á ¨ á á " / > <nl> < Item posX = " 3 " posY = " 17 " name = " á á á á á ¡ á á á á ªá á " / > <nl> - <nl> + < Item posX = " 3 " posY = " 21 " name = " á á á á á ¥ á ¢ á " / > <nl> < Item posX = " 4 " posY = " 5 " name = " á á á á á á á á á á " / > <nl> < Item posX = " 4 " posY = " 5 " posZ = " 0 " name = " á á á á á £ á á " / > <nl> < Item posX = " 4 " posY = " 5 " posZ = " 1 " name = " á á á á ¢ á á £ á á " / > <nl> <nl> < Item posX = " 4 " posY = " 5 " posZ = " 11 " name = " á © á á á á á á á á á á á £ á á " / > <nl> < Item posX = " 4 " posY = " 5 " posZ = " 12 " name = " á á á " / > <nl> < Item posX = " 4 " posY = " 5 " posZ = " 13 " name = " á á £ á á ¥ á £ á á " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 14 " name = " á á á ¡ á á á á £ á á á á á á á £ á á " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 14 " name = " á á á ¡ á á á á £ á - á á á á á á £ á á " / > <nl> < Item posX = " 4 " posY = " 5 " posZ = " 15 " name = " á á á á ¢ á á á á £ á á " / > <nl> - <nl> < Item posX = " 6 " posY = " 4 " name = " á ¨ á á á á ¢ á á á " / > <nl> < / SubEntries > <nl> <nl> <nl> < Item id = " 42028 " name = " á á ® á á á á á ¬ á á á á á ® á á á á " / > <nl> < Item id = " 42029 " name = " á á á á á á á á á á ¤ á á á á á ¡ á á á á á £ á ¤ á á á ¨ á " / > <nl> < Item id = " 42030 " name = " á á á á á á á á á á ¤ á á á á á ¡ á ¡ á á ® á á á á á £ á ¤ á á á ¨ á " / > <nl> - < Item id = " 42031 " name = " á á á á á á á á á á á á ¡ á ¢ á á ¡ á á á á á £ á ¤ á á á ¨ á " / > <nl> + < Item id = " 42031 " name = " á á á á á á á á á á ¡ á á ¥ á á ¦ á á á á á ¡ á á á á á £ á ¤ á á á ¨ á " / > <nl> < Item id = " 42032 " name = " á á á á á á ¡ á á á á á á á á á á ¯ á á á á á ¨ á á á á . . . " / > <nl> < Item id = " 42033 " name = " á á ® á á á á á ¬ á á á á á ® á á á á á á á á ¨ á á ¡ á á á ® á ¡ á á " / > <nl> < Item id = " 42035 " name = " á á á á á £ á á á á á á á á ¢ á á á " / > <nl> < Item id = " 42036 " name = " á á á á á £ á á á á á á á á ¢ á á á á ¡ á á á ® á ¡ á á " / > <nl> - <nl> + < Item id = " 42037 " name = " á á á á á ¨ á á á á ¡ á á á ¢ á á á á . . . " / > <nl> + < Item id = " 42038 " name = " HTML á ¨ á á á á á á ¡ á á ¡ á © á á ¡ á á " / > <nl> + < Item id = " 42039 " name = " RTF á ¨ á á á á á á ¡ á á ¡ á © á á ¡ á á " / > <nl> + < Item id = " 42048 " name = " á á á á á á £ á á á ¨ á á á á á á ¡ á á ¡ á á ¡ á á á ¡ á á ¦ á á á " / > <nl> + < Item id = " 42049 " name = " á á á á á á £ á á á ¨ á á á á á á ¡ á á ¡ á á á á á á " / > <nl> + < Item id = " 42050 " name = " á á á á á á £ á á á ¨ á á á á á á ¡ á á ¡ á © á á ¡ á á " / > <nl> + < Item id = " 42042 " name = " á á á ¡ á á ¬ á § á á ¡ á á á á á ° á á á á á á ¡ á á á ¨ á á á á á " / > <nl> + < Item id = " 42043 " name = " á á á ¡ á á ¬ á § á á ¡ á á á á á á á á á á á á á á ° á á á á á á ¡ á á á ¨ á á á á á " / > <nl> + < Item id = " 42044 " name = " á ® á á á á ¡ á á á ¡ á á ¡ á á £ á á á ¡ EOL á ° á á á á á á á á á ¥ á ªá á á " / > <nl> + < Item id = " 42045 " name = " á á á á á á ¢ á á ° á á á á á á ¡ á á á á ® á á á á ¡ á á á ¡ á á ¡ á á £ á á á á á ¡ á á á ¨ á á á á á " / > <nl> + < Item id = " 42046 " name = " TAB á á á á á ¥ á ªá á á á ° á á á á " / > <nl> + < Item id = " 42047 " name = " á ° á á á á ¡ á á á á á ¥ á ªá á á TAB - á " / > <nl> + < Item id = " 42051 " name = " á ¡ á á á á á á á á á á á á á á " / > <nl> + < Item id = " 42052 " name = " á á £ á ¤ á á á á ¡ á á ¡ á ¢ á á á á " / > <nl> + <nl> < Item id = " 43001 " name = " & amp ; á « á á á á . . . " / > <nl> < Item id = " 43002 " name = " & amp ; á ¨ á á á á á á á ¨ á á á á á " / > <nl> < Item id = " 43003 " name = " á © á á á á ªá á á á á . . . " / > <nl> <nl> < Item id = " 43010 " name = " á ¬ á á á á ¨ á á á á á " / > <nl> < Item id = " 43011 " name = " á « á á á á á á á á & amp ; á ¤ á á ¡ á á ¡ " / > <nl> < Item id = " 43013 " name = " á « á á á á á ¤ á á á á á á ¨ á " / > <nl> - < Item id = " 43014 " name = " á ¨ á á á á á á á ¡ á © á ¥ á á á á á á á á " / > <nl> - < Item id = " 43015 " name = " á ¬ á á á á ¡ á © á ¥ á á á á á á á á " / > <nl> + < Item id = " 43014 " name = " á ¨ á á á á á á á ¡ á © á ¥ á á á á « á á á á " / > <nl> + < Item id = " 43015 " name = " á ¬ á á á á ¡ á © á ¥ á á á á « á á á á " / > <nl> < Item id = " 43016 " name = " á § á á á á á ¡ á á á á á ¨ á á á " / > <nl> < Item id = " 43017 " name = " á á á á á ¨ á á á á ¡ á á á ® á ¡ á á " / > <nl> < Item id = " 43018 " name = " á ¡ á á á á ¨ á á á á á á ¡ á ¢ á á á ¥ á á á á á á ¡ á á á á á á " / > <nl> <nl> < Item id = " 43045 " name = " á « á á á á á ¡ á ¨ á á á á á á á á ¡ á ¤ á á á ¯ á á á " / > <nl> < Item id = " 43046 " name = " á « á á á á á ¡ á ¨ á á á á á á á ¨ á á á á á " / > <nl> < Item id = " 43047 " name = " á « á á á á á ¡ á ¬ á á á á ¨ á á á á á " / > <nl> - < Item id = " 43048 " name = " á á á © á á á á á á ¨ á á á á á á á ¡ á á á á á " / > <nl> - < Item id = " 43049 " name = " á á á © á á á á á á ¬ á á á á ¡ á á á á á " / > <nl> - <nl> + < Item id = " 43048 " name = " á á á © á á á á á á ¨ á á á á á á á ¡ á « á á á á " / > <nl> + < Item id = " 43049 " name = " á á á © á á á á á á ¬ á á á á ¡ á « á á á á " / > <nl> + < Item id = " 43050 " name = " á ¡ á á á á ¨ á á á ¡ á ¨ á á á á £ á á á á " / > <nl> + < Item id = " 43051 " name = " á § á á á á á ¡ á á á á ¨ á á á ¡ á á á á á ¨ á á ¡ á ¢ á á á ¥ á á á á ¡ á á á á ¨ á á " / > <nl> + < Item id = " 43052 " name = " á ¡ á á á á á á á á á « á á á á á ¡ á á á á á á á á á á . . . " / > <nl> < Item id = " 44009 " name = " Post - It " / > <nl> < Item id = " 44010 " name = " á § á á á á á ¡ á á á á ªá á " / > <nl> < Item id = " 44011 " name = " á á á á ® á á á á á á á á ¡ á á á á á á á . . . " / > <nl> <nl> < Item id = " 44035 " name = " á á á á ¢ á á á á á £ á á á á á á á ® á á á á á ¡ á ¡ á á á ¥ á á á á á á á á " / > <nl> < Item id = " 44036 " name = " á ° á á á á á á á ¢ á á á £ á á á á á á á ® á á á á á ¡ á ¡ á á á ¥ á á á á á á á á " / > <nl> < Item id = " 44041 " name = " á á á á á ¢ á á á á ¡ á ¡ á á á á á á á ¡ á © á á á á á á " / > <nl> + < Item id = " 44049 " name = " á ¤ á á á á á ¡ á ¡ á ¢ á á ¢ á á ¡ á ¢ á á á . . . " / > <nl> < Item id = " 44072 " name = " á ¡ á ® á á á ® á á á á á ¤ á á á £ á ¡ á á á á á " / > <nl> - <nl> + < Item id = " 44081 " name = " á ¡ á á á á á á ¥ á ¢ á á á á á á á 1 " / > <nl> + < Item id = " 44082 " name = " á ¡ á á á á á á ¥ á ¢ á á á á á á á 2 " / > <nl> + < Item id = " 44083 " name = " á ¡ á á á á á á ¥ á ¢ á á á á á á á 3 " / > <nl> < Item id = " 45001 " name = " á á á á á § á á á á Windows á ¤ á á á á á ¢ á ¨ á " / > <nl> < Item id = " 45002 " name = " á á á á á § á á á á UNIX á ¤ á á á á á ¢ á ¨ á " / > <nl> < Item id = " 45003 " name = " á á á á á § á á á á MAC á ¤ á á á á á ¢ á ¨ á " / > <nl> <nl> < Item id = " 10002 " name = " á ¡ á ® á á á ® á á á ¨ á á á á á á á á á á " / > <nl> < Item id = " 10003 " name = " á á ® á á á ¤ á á á ¯ á á á á ¨ á á á á á á ¢ á á á " / > <nl> < Item id = " 10004 " name = " á á ® á á á ¤ á á á ¯ á á á á ¨ á á á á ® á ¡ á á " / > <nl> - <nl> - <nl> + <nl> < Item id = " 46001 " name = " á ¡ á ¢ á á á á á á ¡ á á á ¬ á § á á á . . . " / > <nl> < Item id = " 46080 " name = " á á á á ¡ á á á ¦ á á á £ á á á á á á ® á á á á á á á á ¡ á á á á " / > <nl> < Item id = " 47000 " name = " Notepad + + ' á ¡ á ¨ á á ¡ á á ® á á . . . " / > <nl> <nl> < Item id = " 44042 " name = " á ® á á á á á á ¡ á á á á á á á " / > <nl> < Item id = " 42040 " name = " á § á á á á á á ® á á á ® á á á á á á á § á á á á á £ á á á ¤ á á á á á ¡ á á á ® á ¡ á á " / > <nl> < Item id = " 42041 " name = " á á ® á á á ® á á á á á á á § á á á á á £ á á á ¤ á á á á á á á ¡ á ¡ á á á ¡ á á á ¬ á á á á á " / > <nl> - <nl> + < Item id = " 48016 " name = " á á á á ¡ á á ® á á á á á ¡ á © á á ¡ á ¬ á á á á á / á á á á á á ¡ á ¬ á á ¨ á á . . . " / > <nl> + < Item id = " 48017 " name = " á á á á ¡ á á ® á á á á á ¡ á © á á ¡ á ¬ á á á á á / á á á « á á á á á á ¡ á ¬ á á ¨ á á . . . " / > <nl> + < Item id = " 48018 " name = " á á á á ¢ á á ¥ á ¡ á ¢ á £ á á á á á á á £ á ¡ á á á á £ á ¨ á á á á á " / > <nl> + < Item id = " 46019 " name = " MS INI á ¤ á á á á " / > <nl> + < Item id = " 46015 " name = " MS - DOS á ¡ á ¢ á á á " / > <nl> + < Item id = " 46016 " name = " á © á á á £ á á á á á á á á ¢ á á ¥ á ¡ á ¢ á " / > <nl> + < Item id = " 46017 " name = " RC Resource á ¤ á á á á " / > <nl> < / Commands > <nl> < / Main > <nl> < Splitter > <nl> <nl> < Item order = " 6 " name = " á á á á á á á á á á ¡ á ® á á á ® á á á ¨ á " / > <nl> < Item order = " 7 " name = " á ¤ á á á á á ¡ á á á á á £ á ¤ á á á ¨ á " / > <nl> < Item order = " 8 " name = " á ¤ á á á á á ¡ á ¡ á á ® á á á á á £ á ¤ á á á ¨ á " / > <nl> - < Item order = " 9 " name = " á á á á á á á á á á á á ¡ á ¢ á á ¡ á á á á á £ á ¤ á á á ¨ á " / > <nl> + < Item order = " 9 " name = " á á á á á á á á á á ¡ á á ¥ á á ¦ á á á á á ¡ á á á á á £ á ¤ á á á ¨ á " / > <nl> < Item order = " 10 " name = " á á á á á á ¥ á á á á " / > <nl> < Item order = " 11 " name = " á ¬ á á ¨ á á " / > <nl> - < Item order = " 12 " name = " á á ® á á á - á ¬ á á á á á ® á á á á " / > <nl> + < Item order = " 12 " name = " á á ® á á á á - á ¬ á á á á á ® á á á á " / > <nl> < Item order = " 13 " name = " á á ® á á á á - á ¬ á á á á á ® á á á á á ¡ á á á ® á ¡ á á " / > <nl> < Item order = " 14 " name = " á á á á á ¢ á á á á á ® á á á ¤ á á á ¯ á á á á ¨ á " / > <nl> < Item order = " 15 " name = " á á á ® á ¡ á á á á ® á á á ¤ á á á ¯ á á á á ¨ á " / > <nl> <nl> <nl> < Dialog > <nl> < Find title = " " titleFind = " á « á á á á " titleReplace = " á © á á á á ªá á á á á " titleFindInFiles = " á « á á á á á ¤ á á á á á á ¨ á " > <nl> - < Item id = " 1 " name = " á ¨ á á á á á á á ¡ á á á á á " / > <nl> + < Item id = " 1 " name = " á ¨ á á á á á á á ¡ á « á á á á " / > <nl> < Item id = " 2 " name = " á á á ® á £ á á á " / > <nl> - < Item id = " 1620 " name = " á ¡ á á á á á á á : " / > <nl> + < Item id = " 1620 " name = " á ¡ á á « á á á á : " / > <nl> < Item id = " 1603 " name = " á á á á á á ® á á á ¡ & amp ; á á ® á á á á á ¡ á á £ á á á ¡ á á ¢ á § á á " / > <nl> < Item id = " 1604 " name = " á á á á á á ® á á á ¡ & amp ; á á á á á ¡ á ¢ á á " / > <nl> < Item id = " 1605 " name = " á á á á á á & amp ; á á á á á á ¥ á á á á " / > <nl> <nl> < Item id = " 1612 " name = " & amp ; á á á á á " / > <nl> < Item id = " 1613 " name = " & amp ; á ¥ á á á á á " / > <nl> < Item id = " 1614 " name = " á á á á á á " / > <nl> - < Item id = " 1615 " name = " á § á á á á á ¡ á á á á á " / > <nl> + < Item id = " 1615 " name = " á § á á á á á ¡ á « á á á á " / > <nl> < Item id = " 1616 " name = " á ® á á á á ¡ á á á á á ¨ á á á " / > <nl> < Item id = " 1617 " name = " á « á á á á á ¡ á ¨ á á á á á á ¡ á ¡ á ¢ á á á " / > <nl> < Item id = " 1618 " name = " á § á á á á á á « á á á á á ¡ á á á á ¡ á á á ¡ á £ á ¤ á á á á á á " / > <nl> < Item id = " 1621 " name = " á á á á á á á £ á á á á " / > <nl> - < Item id = " 1611 " name = " á © á & amp ; á á á ªá á á á á á á á á : " / > <nl> + < Item id = " 1611 " name = " á © á & amp ; á á á ªá á á á á á á á á : " / > <nl> < Item id = " 1608 " name = " & amp ; á © á á á á ªá á á á á " / > <nl> < Item id = " 1609 " name = " & amp ; á § á á á á á ¡ á © á á á á ªá á á á á " / > <nl> - < Item id = " 1623 " name = " á á á á á á á á á á á á á " / > <nl> - < Item id = " 1687 " name = " á ¤ á á . á á á á á á á á á ¡ á á ¡ " / > <nl> - < Item id = " 1688 " name = " á § á á á á á á á á ¡ " / > <nl> - < Item id = " 1632 " name = " á á á á á ¨ á á £ á á ¨ á " / > <nl> - < Item id = " 1633 " name = " á á á ¡ á £ á ¤ á á á á á á " / > <nl> - < Item id = " 1635 " name = " á § á á á á á ¡ á © á á á á ªá á á á á á § á á á á á á á ® á ¡ á á á á á á á £ á á á á ¢ á ¨ á " / > <nl> - < Item id = " 1636 " name = " á § á á á á á ¡ á « á á á á á § á á á á á á á ® á ¡ á á á á á á á £ á á á á ¢ á ¨ á " / > <nl> - < Item id = " 1637 " name = " á « á á á á á ¤ á á á á á á ¨ á " / > <nl> - < Item id = " 1654 " name = " á ¤ á á á ¢ á á á á : " / > <nl> - < Item id = " 1655 " name = " á ¡ á á ¥ á á ¦ á á á á : " / > <nl> - < Item id = " 1656 " name = " á § á á á á á ¡ á « á á á á " / > <nl> - < Item id = " 1658 " name = " á § á á á á á ¥ á á - á ¡ á á ¥ á á ¦ á á á á á ¨ á " / > <nl> - < Item id = " 1659 " name = " á á á á £ á á ¡ á á ¥ á á ¦ á á á á á á á ¨ á " / > <nl> - < Item id = " 1624 " name = " á « á á á á á ¡ á á á á á á " / > <nl> - < Item id = " 1625 " name = " á © á á á £ á á á á á á á " / > <nl> - < Item id = " 1626 " name = " á á á ¤ á á á á á á á £ á á ( \ n , \ r , \ t , \ 0 , \ x . . . ) " / > <nl> - < Item id = " 1660 " name = " á © á á á á ªá á á á á á ¤ á á á á á á ¨ á " / > <nl> + < Item id = " 1623 " name = " á á á á á á á á á á á á á " / > <nl> + < Item id = " 1687 " name = " á ¤ á á . á á á á á á á á á ¡ á á ¡ " / > <nl> + < Item id = " 1688 " name = " á § á á á á á á á á ¡ " / > <nl> + < Item id = " 1632 " name = " á á á á á ¨ á á £ á á ¨ á " / > <nl> + < Item id = " 1633 " name = " á á á ¡ á £ á ¤ á á á á á á " / > <nl> + < Item id = " 1635 " name = " á § á á á á á ¡ á © á á á á ªá á á á á á § á á á á á á á ® á ¡ á á á á á á á £ á á á á ¢ á ¨ á " / > <nl> + < Item id = " 1636 " name = " á § á á á á á ¡ á « á á á á á § á á á á á á á ® á ¡ á á á á á á á £ á á á á ¢ á ¨ á " / > <nl> + < Item id = " 1637 " name = " á « á á á á á ¤ á á á á á á ¨ á " / > <nl> + < Item id = " 1654 " name = " á ¤ á á á ¢ á á á á : " / > <nl> + < Item id = " 1655 " name = " á ¡ á á ¥ á á ¦ á á á á : " / > <nl> + < Item id = " 1656 " name = " á § á á á á á ¡ á « á á á á " / > <nl> + < Item id = " 1658 " name = " á § á á á á á ¥ á á - á ¡ á á ¥ á á ¦ á á á á á ¨ á " / > <nl> + < Item id = " 1659 " name = " á á á á £ á á ¡ á á ¥ á á ¦ á á á á á á á ¨ á " / > <nl> + < Item id = " 1624 " name = " á « á á á á á ¡ á á á á á á " / > <nl> + < Item id = " 1625 " name = " á © á á á £ á á á á á á á " / > <nl> + < Item id = " 1626 " name = " á á á ¤ á á á á á á á £ á á ( \ n , \ r , \ t , \ 0 , \ x . . . ) " / > <nl> + < Item id = " 1660 " name = " á © á á á á ªá á á á á á ¤ á á á á á á ¨ á " / > <nl> < Item id = " 1661 " name = " á á á á £ á á á á ¢ á á ¡ á ¡ á á ¥ á á ¦ á á á á " / > <nl> - < Item id = " 1641 " name = " á § á á á á á ¡ á á á ® á á á á á á á á á á á á á á á £ á á á á ¢ á ¨ á " / > <nl> - < Item id = " 1686 " name = " á á á á á á á á á á á á á " / > <nl> + < Item id = " 1641 " name = " á § á á á á á ¡ á á á ® á á á á á á á á á á á á á á á £ á á á á ¢ á ¨ á " / > <nl> + < Item id = " 1686 " name = " á á á á á á á á á á á á á " / > <nl> < / Find > <nl> < GoToLine title = " á á á á á ¡ á á á . . . " > <nl> < Item id = " 2007 " name = " á ® á á á " / > <nl> < Item id = " 2008 " name = " á á á ¡ á á ¬ á § á á ¡ á á á á á á á ¨ á á á á á " / > <nl> < Item id = " 1 " name = " & amp ; á ¬ á á á á á " / > <nl> < Item id = " 2 " name = " á á á ¡ á á á á ª á á á á á á á á á á " / > <nl> - < Item id = " 2004 " name = " á á ¥ á á á á á ¥ á ® á á á : " / > <nl> - < Item id = " 2005 " name = " á á ¡ á £ á á á á á á á ® á á á á á : " / > <nl> - < Item id = " 2006 " name = " á á á á á á ªá á á á á : " / > <nl> + < Item id = " 2004 " name = " á á ¥ á á á á á ¥ á ® á á á : " / > <nl> + < Item id = " 2005 " name = " á á ¡ á £ á á á á á á á ® á á á á á : " / > <nl> + < Item id = " 2006 " name = " á á á á á á ªá á á á á : " / > <nl> < / GoToLine > <nl> <nl> < Run title = " á á á ¨ á á á á . . . " > <nl> <nl> < Item id = " 2 " name = " á á á £ á ¥ á á á á " / > <nl> < Item id = " 2301 " name = " á ¨ á á á á ® á á & amp ; & amp ; á á á ® á £ á á á " / > <nl> < Item id = " 2303 " name = " á á á á á á á á á á á á á " / > <nl> - < Item id = " 2306 " name = " á á á á á ¡ á á á © á á á : " / > <nl> + < Item id = " 2306 " name = " á á á á á ¡ á á á © á á á : " / > <nl> < SubDialog > <nl> < Item id = " 2204 " name = " á á ¡ á ® á á á á " / > <nl> < Item id = " 2205 " name = " á á á ® á á á á " / > <nl> < Item id = " 2206 " name = " á ¬ á á á á á á á á á ¡ á ¤ á á á " / > <nl> < Item id = " 2207 " name = " á ¤ á á á á ¡ á ¤ á á á " / > <nl> - < Item id = " 2208 " name = " á ¨ á á á ¤ á ¢ á á ¡ á á á ¡ á á ® á á á á á : " / > <nl> - < Item id = " 2209 " name = " á ¨ á á á ¤ á ¢ á á ¡ á á á á : " / > <nl> + < Item id = " 2208 " name = " á ¨ á á á ¤ á ¢ á á ¡ á á á ¡ á á ® á á á á á : " / > <nl> + < Item id = " 2209 " name = " á ¨ á á á ¤ á ¢ á á ¡ á á á á : " / > <nl> + < Item id = " 2211 " name = " á ¡ á ¢ á á á : " / > <nl> < Item id = " 2212 " name = " á ¤ á á á á ¡ á ¡ á ¢ á á á " / > <nl> < Item id = " 2213 " name = " á ¨ á á á ¤ á ¢ á á ¡ á ¡ á ¢ á á á " / > <nl> - < Item id = " 2214 " name = " á ¡ á á ¬ á § á á ¡ á á á á ¤ á á á . : " / > <nl> - < Item id = " 2216 " name = " á á á á ® á á á á á á á á ¡ á á á ¤ . : " / > <nl> + < Item id = " 2214 " name = " á ¡ á á ¬ á § á á ¡ á á á á ¤ á á á . : " / > <nl> + < Item id = " 2216 " name = " á á á á ® á á á á á á á á ¡ á á á ¤ . : " / > <nl> < Item id = " 2218 " name = " á ® á á á á á ¡ á á £ á á " / > <nl> < Item id = " 2219 " name = " á ¡ á á ¬ á § á á ¡ á á ¡ á á á á á á « á á ¡ á á ¢ á § á á á á " / > <nl> < Item id = " 2221 " name = " á á á á ® á á á á á á á á ¡ á ¡ á á á á á á « á á ¡ á á ¢ á § á á á á " / > <nl> - < Item id = " 2225 " name = " á á á : " / > <nl> + < Item id = " 2225 " name = " á á á : " / > <nl> < Item id = " 2226 " name = " á á á á á á á £ á á á ¬ á á á á á á á á á ¡ á ¤ á á á á ¡ á á á á á § á á á á á " / > <nl> < Item id = " 2227 " name = " á á á á á á á £ á á á ¤ á á á á ¡ á ¤ á á á á ¡ á á á á á § á á á á á " / > <nl> < Item id = " 2228 " name = " á á á á á á á £ á á á ¨ á á á ¤ á ¢ á á ¡ á á á á á § á á á á á " / > <nl> <nl> < / StyleConfig > <nl> <nl> < UserDefine title = " á á á á á á á á ¬ á § á á á " > <nl> + < Item id = " 20001 " name = " á á á á á á á á á " / > <nl> < Item id = " 20002 " name = " á á á á á á ¥ á á á á " / > <nl> < Item id = " 20003 " name = " á á ® á á á . . . " / > <nl> < Item id = " 20004 " name = " á ¬ á á ¨ á á " / > <nl> < Item id = " 20005 " name = " á ¨ á á á á ® á á . . . " / > <nl> - < Item id = " 20007 " name = " á á á á á á á á á : " / > <nl> - < Item id = " 20009 " name = " á á á ¤ á á á . : " / > <nl> - < Item id = " 20012 " name = " á á á á á ¡ á ¢ á á á ¡ á á á £ á ® á á á á á á " / > <nl> + < Item id = " 20007 " name = " á á á á á á á á á : " / > <nl> + < Item id = " 20009 " name = " á á á ¤ á á á . : " / > <nl> < Item id = " 20011 " name = " á á á á á á á á á á á á á " / > <nl> + < Item id = " 20012 " name = " á á á á á ¡ á ¢ á á á ¡ á á á £ á ® á á á á á á " / > <nl> + < Item id = " 20016 " name = " á ¨ á á ¢ á á á . . . " / > <nl> + < Item id = " 20015 " name = " á á á ¢ á á á . . . " / > <nl> < Item id = " 0 " name = " á ¤ á á á á ¡ á ¡ á ¢ á á á " / > <nl> < Item id = " 1 " name = " á ¬ á á á á á á á á á ¡ á ¤ á á á " / > <nl> < Item id = " 2 " name = " á ¤ á á á á ¡ á ¤ á á á " / > <nl> < Item id = " 3 " name = " á ¨ á á á ¤ á ¢ á á ¡ á ¡ á ¢ á á á " / > <nl> - < Item id = " 4 " name = " á ¡ á á ® á á á : " / > <nl> - < Item id = " 5 " name = " á á á á : " / > <nl> + < Item id = " 4 " name = " á ¡ á á ® á á á : " / > <nl> + < Item id = " 5 " name = " á á á á : " / > <nl> < Item id = " 6 " name = " á á ¡ á ® á á á á " / > <nl> < Item id = " 7 " name = " á á á ® á á á á " / > <nl> < Item id = " 8 " name = " á ® á á á á á ¡ á á £ á á " / > <nl> <nl> < Item id = " 22201 " name = " á á - 2 á ¯ á á £ á ¤ á " / > <nl> < Item id = " 22301 " name = " á á - 3 á ¯ á á £ á ¤ á " / > <nl> < Item id = " 22401 " name = " á á - 4 á ¯ á á £ á ¤ á " / > <nl> - < Item id = " 22113 " name = " á á á á ¡ á á á á á ¡ á á á á á á " / > <nl> - < Item id = " 22213 " name = " á á á á ¡ á á á á á ¡ á á á á á á " / > <nl> - < Item id = " 22313 " name = " á á á á ¡ á á á á á ¡ á á á á á á " / > <nl> - < Item id = " 22413 " name = " á á á á ¡ á á á á á ¡ á á á á á á " / > <nl> + < Item id = " 22113 " name = " á á á á ¡ á á á á " / > <nl> + < Item id = " 22213 " name = " á á á á ¡ á á á á " / > <nl> + < Item id = " 22313 " name = " á á á á ¡ á á á á " / > <nl> + < Item id = " 22413 " name = " á á á á ¡ á á á á " / > <nl> < / Keywords > <nl> < Comment title = " á á á á á á ¢ á á á & amp ; & amp ; á á á ªá ® á á " > <nl> < Item id = " 23301 " name = " á á á á á á ¢ á á á á ¡ á ¡ á ¢ á á á ¥ á á á " / > <nl> < Item id = " 23101 " name = " á á á á á á ¢ á á á á ¡ á á á á á " / > <nl> - < Item id = " 23113 " name = " á á á á á á ¢ á á á á ¡ á á á ® á ¡ á á : " / > <nl> - < Item id = " 23115 " name = " á á á á á á ¢ á á á á ¡ á á á ® á £ á á á : " / > <nl> + < Item id = " 23113 " name = " á á á á á á ¢ á á á á ¡ á á á ® á ¡ á á : " / > <nl> + < Item id = " 23115 " name = " á á á á á á ¢ á á á á ¡ á á á ® á £ á á á : " / > <nl> < Item id = " 23116 " name = " á ¡ á á á á á á « á á ¡ á á ¢ á § á á á á á á á á ª á ¡ á á á á á á " / > <nl> < Item id = " 23117 " name = " á ¡ á á á á á á « á á ¡ á á ¢ á § á á á á - á ¡ á á á á á á á á á " / > <nl> < Item id = " 23201 " name = " á á á ªá ® á á " / > <nl> <nl> < Item id = " 24103 " name = " á á á ¡ á á ¬ á á á á á á ¡ á á á á á á á á á " / > <nl> < Item id = " 24101 " name = " á á ¥ á ¢ á á £ á á á á á á á á ¢ á á á á á " / > <nl> < Item id = " 24201 " name = " á á á á § á á ¤ á 1 " / > <nl> - < Item id = " 24211 " name = " á ¡ á á á ¦ á á á á ¡ á á á ® á ¡ á á : " / > <nl> - < Item id = " 24214 " name = " á ¡ á á á ¦ á á á á ¡ á á á ® á £ á á á : " / > <nl> + < Item id = " 24211 " name = " á ¡ á á á ¦ á á á á ¡ á á á ® á ¡ á á : " / > <nl> + < Item id = " 24214 " name = " á ¡ á á á ¦ á á á á ¡ á á á ® á £ á á á : " / > <nl> < Item id = " 24301 " name = " á á á á § á á ¤ á 2 " / > <nl> - < Item id = " 24311 " name = " á ¡ á á á ¦ á á á á ¡ á á á ® á ¡ á á : " / > <nl> - < Item id = " 24314 " name = " á ¡ á á á ¦ á á á á ¡ á á á ® á £ á á á : " / > <nl> - < Item id = " 24001 " name = " á á á á á á § á á á Escape Character : " / > <nl> + < Item id = " 24311 " name = " á ¡ á á á ¦ á á á á ¡ á á á ® á ¡ á á : " / > <nl> + < Item id = " 24314 " name = " á ¡ á á á ¦ á á á á ¡ á á á ® á £ á á á : " / > <nl> < / Operator > <nl> + < Item id = " 24001 " name = " á á á á á á § á á á Escape Character : " / > <nl> < / UserDefine > <nl> - < Preference title = " á á á á á á á ¢ á á á á " > <nl> + < Preference title = " á á á á á á á á " > <nl> < Item id = " 6001 " name = " á á á ® á £ á á á " / > <nl> < Global title = " á á á á á á " > <nl> < Item id = " 6101 " name = " á ® á á á ¡ á á ¬ á § á á á á á á á á á " / > <nl> <nl> < Item id = " 6121 " name = " á á á á á £ á ¡ á á á á á á " / > <nl> < Item id = " 6122 " name = " á á á á á á á ( á á á á á á á á á ¡ á á á á ¡ Alt á á F10 ) " / > <nl> < Item id = " 6123 " name = " á á á á á á á á á ªá á " / > <nl> + < Item id = " 6125 " name = " á á á ® á ¡ á á á á á ¤ á á á á á á á ¡ á © á á á á á á á á á á " / > <nl> + < Item id = " 6126 " name = " á © á á á á á á " / > <nl> < / Global > <nl> - < Scintillas title = " á © á á ¡ á ¬ á á á á á " > <nl> - < Item id = " 6216 " name = " á á £ á á ¡ á á á á ¡ á á á á á á á ¢ á á á á " / > <nl> - < Item id = " 6217 " name = " á ¡ á á á á á : " / > <nl> - < Item id = " 6219 " name = " á ªá á á ªá á á á ¡ á á á á : " / > <nl> - < Item id = " 6221 " name = " + " / > <nl> - < Item id = " 6222 " name = " - " / > <nl> - < Item id = " 6224 " name = " á á á á á á á á © á á ¡ á ¬ á á á á á á ¡ á á á á á á " / > <nl> - < Item id = " 6225 " name = " á © á á á á á ( Ctrl + á á á á á á ¡ á ¬ á á á á / á á á á á ¨ á á á ) " / > <nl> + < Scintillas title = " á á á á £ á ¨ á á á á á " > <nl> < Item id = " 6201 " name = " á á á á á ªá á á á á á ¡ á ¡ á ¢ á á á " / > <nl> < Item id = " 6202 " name = " á á á á ¢ á á á " / > <nl> < Item id = " 6203 " name = " á á ¡ á á á " / > <nl> - < Item id = " 6204 " name = " á ¬ á á á á á á ¡ á ® á " / > <nl> + < Item id = " 6204 " name = " á ¬ á á á á á á ¡ á ® á " / > <nl> < Item id = " 6205 " name = " á ¡ á á á á á á á á á ¡ á ® á " / > <nl> - <nl> < Item id = " 6206 " name = " á ¡ á ¢ á á á ¥ á á á á á á ¡ á á á á á ¡ á © á á á á á á " / > <nl> < Item id = " 6207 " name = " á ¡ á á á á ¨ á á á á á á ¡ á © á á á á á á " / > <nl> < Item id = " 6208 " name = " á á á á ¢ á á á á á £ á á á á á á á ¡ á © á á á á á á " / > <nl> - < Item id = " 6209 " name = " á ¡ á á á ¢ á á á á ¡ á á á á á á á á á : " / > <nl> - <nl> + < Item id = " 6209 " name = " á ¡ á á á ¢ á á á : " / > <nl> < Item id = " 6211 " name = " á á á á ¢ á á á á á £ á á á á á á " / > <nl> < Item id = " 6212 " name = " á ® á á á á ¡ á á á á á á " / > <nl> < Item id = " 6213 " name = " á ¤ á á á á ¡ á á á á á á " / > <nl> < Item id = " 6214 " name = " á á á á á á á á á á ¡ á ¢ á á á ¥ á á á á ¡ á á á á á ¨ á á á " / > <nl> + < Item id = " 6216 " name = " á á £ á á ¡ á á á " / > <nl> + < Item id = " 6217 " name = " á ¡ á á á á á " / > <nl> + < Item id = " 6219 " name = " á ªá á á ªá á á á ¡ á á á á " / > <nl> + < Item id = " 6221 " name = " + " / > <nl> + < Item id = " 6222 " name = " - " / > <nl> + < Item id = " 6224 " name = " á á á á á á á á © á á ¡ á ¬ á á á á á á ¡ á á á á á á " / > <nl> + < Item id = " 6225 " name = " á © á á á á á ( Ctrl + á á á á á á ¡ á ¬ á á á á / á á á á á ¨ á á á ) " / > <nl> + < Item id = " 6226 " name = " á á á á á ¨ á £ á á " / > <nl> + < Item id = " 6227 " name = " á ¡ á ¢ á á á ¥ á á á á á á ¡ á á á á á ¢ á á á " / > <nl> + < Item id = " 6228 " name = " á á á á £ á á á ¡ á ® á á á á á " / > <nl> + < Item id = " 6229 " name = " á á á ¡ á ¬ á á á á á £ á á " / > <nl> + < Item id = " 6230 " name = " á á á ¨ á á á á á á " / > <nl> < / Scintillas > <nl> - < NewDoc title = " á á ® á á á á á á á £ á á á á ¢ á / á ¡ á á ¬ á § á á ¡ á á á á ¡ á ¢ á " > <nl> + < NewDoc title = " á á ® á á á á á á á £ á á á á ¢ á " > <nl> < Item id = " 6401 " name = " á ¤ á á á á á ¢ á " / > <nl> < Item id = " 6402 " name = " Windows " / > <nl> < Item id = " 6403 " name = " Unix " / > <nl> <nl> < Item id = " 6408 " name = " UTF - 8 " / > <nl> < Item id = " 6409 " name = " UCS - 2 Big Endian " / > <nl> < Item id = " 6410 " name = " UCS - 2 Little Endian " / > <nl> - < Item id = " 6411 " name = " á ¡ á á ¬ á § á á ¡ á á á á : " / > <nl> - < Item id = " 6413 " name = " á ¡ á á ¬ á § á á ¡ á á á á ¡ á ¢ á ( á á á ® á ¡ á á / á ¨ á á á á ® á á ) " / > <nl> + < Item id = " 6411 " name = " á ¡ á á ¬ á § á á ¡ á á á á : " / > <nl> + < Item id = " 6413 " name = " á ¡ á á ¬ á § á á ¡ á á ¡ á á ¥ á á ¦ á á á á ( á á á ® á ¡ á á / á ¨ á á á á ® á á ) " / > <nl> < Item id = " 6414 " name = " á á á á á á á á á á á á á £ á á á á ¢ á á ¡ á ¡ á á ¥ á á ¦ á á á á " / > <nl> - < Item id = " 6415 " name = " á á á á á ¡ á á á á á § á á á á á £ á á á á á ¡ á ¢ á á ¡ á á á á á ® á ¡ á á á á á á " / > <nl> + < Item id = " 6415 " name = " á á á á á ¡ á á á á á § á á á á á £ á á á ¡ á á ¥ á á ¦ á á á á á ¡ á á á á á ® á ¡ á á á á á á " / > <nl> < Item id = " 6419 " name = " á á ® á á á á á á á £ á á á á ¢ á " / > <nl> < Item id = " 6420 " name = " á á á á á § á á á á á á á á ® á ¡ á á á ANSI á ¤ á á á á á á á " / > <nl> + < Item id = " - 1 " name = " á © á á á á á á " / > <nl> + < Item id = " 6424 " name = " á ¥ á á á á á á á £ á ¨ á " / > <nl> + < Item id = " 6425 " name = " á á ® á á á á á ¤ á á á á á ¡ á ¡ á á ® á á á " / > <nl> + < Item id = " 6426 " name = " á ¤ á á á á á ¡ á ¡ á á £ á á á á á ¡ á á á á á á " / > <nl> + < Item id = " 6427 " name = " á ¡ á ¢ á á á ¥ á á á á ¡ á á á á « á á : " / > <nl> + < Item id = " 6304 " name = " á á á ® á ¡ á á á á ¤ á á á á á á á ¡ á ¢ á á á á " / > <nl> + < Item id = " 6305 " name = " á á á ¨ á á á á á ¡ á á ¡ á á á ¨ á á á á ¬ á á á á " / > <nl> + < Item id = " 6306 " name = " á á á á á ® á ¡ á á á á á á £ á á á ¤ á á á á á á : " / > <nl> < / NewDoc > <nl> < FileAssoc title = " á ¤ á á á á á á á ¡ á á ¡ á á ªá á á ªá á " > <nl> - < Item id = " 4009 " name = " á á ® á á á á á á á á á á á á á ¤ á á á . : " / > <nl> - < Item id = " 4010 " name = " á á á á á ¡ á ¢ á á á á á á £ á á á á á ¤ á á á . : " / > <nl> + < Item id = " 4009 " name = " á á ® á á á á á á á á á á á á á ¤ á á á . : " / > <nl> + < Item id = " 4010 " name = " á á á á á ¡ á ¢ á á á á á á £ á á á á á ¤ á á á . : " / > <nl> < / FileAssoc > <nl> < LangMenu title = " á á á á ¡ á á á á á £ / á á á ¤ á á á á ¡ á á ¬ á § á á á " > <nl> < Item id = " 6301 " name = " á á á ¤ á á á á ¡ á á ¬ á § á á á " / > <nl> < Item id = " 6302 " name = " á ° á á á á á © á á á á ªá á á á á " / > <nl> - < Item id = " 6303 " name = " á á á ¤ á á ¡ á á á á : " / > <nl> + < Item id = " 6303 " name = " á á á ¤ á á ¡ á á á á : " / > <nl> < Item id = " 6505 " name = " á ® á á á á á ¡ á á ¬ á á á á á á ¡ á á á á á á " / > <nl> < Item id = " 6506 " name = " á á á á á ¨ á £ á á á ¡ á á á á á á " / > <nl> < Item id = " 6507 " name = " á á á á ¡ á á á á á £ á ¡ á á á á á á ¥ á ¢ á £ á á á á ¥ á ªá á á " / > <nl> <nl> < Print title = " á á á á á á " > <nl> < Item id = " 6601 " name = " á ¡ á ¢ á á á ¥ á á á á ¡ á á á á á á ¡ á á á á á á " / > <nl> < Item id = " 6602 " name = " á ¤ á á á á á á ¡ á á ¬ á § á á á " / > <nl> - < Item id = " 6603 " name = " WYSIWYG " / > <nl> + < Item id = " 6603 " name = " á á á á £ á á á £ á á á á á á á ¥ á ¢ á á á " / > <nl> < Item id = " 6604 " name = " á ¨ á á á á £ á á á á " / > <nl> < Item id = " 6605 " name = " á ¨ á á á á á á á á á " / > <nl> < Item id = " 6606 " name = " á ¤ á á á £ á á á ¤ á á á á ¡ á á á á á ¨ á " / > <nl> <nl> < Item id = " 6718 " name = " á á á ® á á á á " / > <nl> < Item id = " 6719 " name = " á « á á á " / > <nl> < Item id = " 6720 " name = " á á á á ªá ® á á á á á á ¬ á á á " / > <nl> - < Item id = " 6721 " name = " á ¨ á £ á á á á ¬ á á á " / > <nl> + < Item id = " 6721 " name = " á ¨ á £ á á á á ¬ á á á " / > <nl> < Item id = " 6722 " name = " á á á á ¯ á á á á á á á ¬ á á á " / > <nl> - < Item id = " 6723 " name = " á á á á á ¢ á á á " / > <nl> - < Item id = " 6725 " name = " á ªá á á á á : " / > <nl> + < Item id = " 6723 " name = " á á á á á ¢ á á á " / > <nl> + < Item id = " 6725 " name = " á ªá á á á á : " / > <nl> + < Item id = " 6727 " name = " á á á á á ¬ á á á . . . " / > <nl> < Item id = " 6728 " name = " á á á á á á á « á á á " / > <nl> < / Print > <nl> < MISC title = " á ¡ á ® á á á á á ¡ á ® á á " > <nl> < Item id = " 6304 " name = " á á ® á á á ® á á á á á á á § á á á á á £ á á á ¤ á á á á á á á ¡ á á ¡ á ¢ á á á á " / > <nl> - < Item id = " 6305 " name = " á á á ¨ á á á á á ¡ á á ¡ á á á ¨ á á á á á ¬ á á " / > <nl> - < Item id = " 6306 " name = " á ¨ á á á á ¢ á á á á á á ¡ á á á ¥ á ¡ . á á á á á á á á á : " / > <nl> + < Item id = " 6305 " name = " á á á ¨ á á á á á ¡ á á ¡ á á á ¨ á á á á á ¬ á á " / > <nl> + < Item id = " 6306 " name = " á ¨ á á á á ¢ á á á á á á ¡ á á á ¥ á ¡ . á á á á á á á á á : " / > <nl> < Item id = " 6307 " name = " á á á á á § á á á á á " / > <nl> < Item id = " 6308 " name = " á © á á á á ªá á á ¡ á á ¡ á ¢ á á á á ¡ á á á á á á á ¨ á " / > <nl> < Item id = " 6309 " name = " á ¨ á á á á á á á á á ¨ á á á á á ¡ á á á á ¡ á á á á á á á á á á ¡ á á ¡ á á á ¡ á á á á á ® á ¡ á á á á á á " / > <nl> <nl> < Item id = " 6327 " name = " á á á á á § á á á á á " / > <nl> < Item id = " 6328 " name = " á ¢ á á á á á á ¡ á á ¢ á á á á £ á ¢ á á á á ¡ á á á á á ¨ á á á " / > <nl> < Item id = " 6330 " name = " á á á á á á ¢ á á á / php / asp á á á á á á á ¡ á á á á á ¨ á á á " / > <nl> - <nl> < Item id = " 6331 " name = " á ¡ á á á á £ á á á ¡ á á á á ¨ á á á ® á á á á á ¤ á á á á á ¡ á ¡ á á ® á á á á ¡ á © á á á á á á " / > <nl> < Item id = " 6114 " name = " á á á á á § á á á á á " / > <nl> < Item id = " 6115 " name = " á á á ¢ á - á á á ¨ á á á á á " / > <nl> < Item id = " 6117 " name = " á á á á á á § á á á MRU á ¥ á ªá á á á á " / > <nl> <nl> < / MISC > <nl> - < Backup title = " á á ¡ á á á á / á á á ¢ á - á á á ¡ á á £ á á á á " > <nl> + <nl> + < Backup title = " á á ¡ á á á á / á á á ¢ á - á á á ¡ á á £ á á á á " > <nl> < Item id = " 6801 " name = " á ¡ á á á á á á á á á á á ¡ á á á á " / > <nl> < Item id = " 6315 " name = " á á á á ¤ á á á " / > <nl> < Item id = " 6316 " name = " á á á á ¢ á á á á á ¡ á á á á " / > <nl> <nl> < MultiMacro title = " á á á á á á ¡ á á á á á á á á á á ¯ á á á á á ¨ á á á á " > <nl> < Item id = " 1 " name = " á á á ¨ á á á á " / > <nl> < Item id = " 2 " name = " á á á £ á ¥ á á á á " / > <nl> - < Item id = " 8006 " name = " á á á ¡ á á ¨ á á á á á á á á á : " / > <nl> + < Item id = " 8006 " name = " á á á ¡ á á ¨ á á á á á á á á á : " / > <nl> < Item id = " 8001 " name = " á á á ¨ á á á á " / > <nl> < Item id = " 8005 " name = " á ¯ á á " / > <nl> < Item id = " 8002 " name = " á á á ¨ á á á á á ¤ á á á á á ¡ á á á á á á á " / > <nl> < / MultiMacro > <nl> < Window title = " á ¤ á á á ¯ á á á á " > <nl> - < Item id = " 1 " name = " á á ¥ á ¢ á á á á á á á " / > <nl> - < Item id = " 2 " name = " á á " / > <nl> + < Item id = " 1 " name = " á © á á á á á " / > <nl> + < Item id = " 2 " name = " á á á á ® " / > <nl> < Item id = " 7002 " name = " á ¨ á á á á ® á á " / > <nl> < Item id = " 7003 " name = " á ¤ á á á ¯ á ( á á ) á á ¡ á á á ® á £ á á á " / > <nl> < Item id = " 7004 " name = " á á á ¤ á á á á ¡ á á á á á á á á " / > <nl> <nl> < ColumnEditor title = " á ¡ á á á ¢ á á á á ¡ á á á á á ¥ á ¢ á á á " > <nl> < Item id = " 2023 " name = " á © á á ¡ á á ¡ á á á á á ¢ á á ¥ á ¡ á ¢ á " / > <nl> < Item id = " 2033 " name = " á © á á ¡ á á ¡ á á á á á á á ªá ® á á " / > <nl> - < Item id = " 2030 " name = " á ¡ á á ¬ á § á á ¡ á á á á ªá ® á á : " / > <nl> - < Item id = " 2031 " name = " á á á á á á : " / > <nl> + < Item id = " 2030 " name = " á ¡ á á ¬ á § á á ¡ á á á á ªá ® á á : " / > <nl> + < Item id = " 2031 " name = " á á á á á á : " / > <nl> < Item id = " 2035 " name = " á á £ á á á á á á ¬ á á " / > <nl> < Item id = " 2032 " name = " á ¤ á á á á á ¢ á " / > <nl> < Item id = " 2024 " name = " Dec " / > <nl> < Item id = " 2025 " name = " Oct " / > <nl> < Item id = " 2026 " name = " Hex " / > <nl> < Item id = " 2027 " name = " Bin " / > <nl> - < Item id = " 1 " name = " á á " / > <nl> + < Item id = " 1 " name = " á á á á ® " / > <nl> < Item id = " 2 " name = " á á á £ á ¥ á á á á " / > <nl> < / ColumnEditor > <nl> + < FindCharsInRange title = " á ¡ á á á á á á á á á « á á á á á ¡ á á á á á á á á á á . . . . " > <nl> + < Item id = " 2910 " name = " á « á á á á " / > <nl> + < Item id = " 2 " name = " á á á ® á £ á á á " / > <nl> + < Item id = " 2901 " name = " á á á - ASCII á ¡ á á á á á á á á á ( 128 - 255 ) " / > <nl> + < Item id = " 2902 " name = " ASCII á ¡ á á á á á á á á á ( 0 - 127 ) " / > <nl> + < Item id = " 2903 " name = " á © á á á á ¡ á á á á á á á : " / > <nl> + < Item id = " 2906 " name = " á á á á á " / > <nl> + < Item id = " 2907 " name = " á ¥ á á á á á " / > <nl> + < Item id = " 2908 " name = " á á á á á á á £ á á á á " / > <nl> + < Item id = " 2909 " name = " á á á á á á á á £ á á á á ¢ á ¨ á " / > <nl> + < / FindCharsInRange > <nl> < / Dialog > <nl> + < MessageBox > <nl> + < ContextMenuXmlEditWaring title = " contextMenu - á ¡ á á á á £ á ¨ á á á á á " message = " á ¤ á á á á contextMenu . xml - á ¡ á © á á ¡ á ¬ á á á á á á á á « á á á á á ¡ á á ¨ á £ á á á á á á ¡ á á á á á £ á ¨ á á á Notepad + + á á á á ¢ á á ¥ á ¡ á ¢ á £ á á á á á á á £ . \ rá ¤ á á á á á ¡ á © á á ¡ á ¬ á á á á á á ¡ á ¨ á á á á á , á ªá á á á á á á á á á á á ¦ á á á á ¡ á á á á ¡ á ¡ á á á á á á á á á á á ¨ á á á á á ® á á á á ® á á á © á á á á á Notepad + + . " / > <nl> + < NppHelpAbsentWaring title = " á ¤ á á á á á á á á á ¡ á á á á á ¡ " message = " \ rá á á á á á á « á á á á . á á á á á á ¢ á á á á á á á á ¡ Notepad + + á ¡ á á á ¢ á á á á . " / > <nl> + < SaveCurrentModifWaring title = " á ªá á á á á á á á á á ¡ á ¨ á á ¢ á á á " message = " á ¨ á á á á á ® á á á á á á á á á á á á á ªá á á á á á á á á . \ rá ¨ á á á á ® á á á ¡ á á á á , á ªá á á á á á á á á á ¡ á á á á á £ á á á á á ¨ á á £ á « á á á á á á á . \ r \ rá á á á á « á á á á á ? " / > <nl> + < LoseUndoAbilityWaring title = " á á á á á £ á á á á á ¡ á ¨ á á ¡ á á « á á á á á á á á ¡ á á á á á ¨ á á " message = " á ¨ á á á á á ® á á á á á á á á á á á á á ªá á á á á á á á á . \ rá ¨ á á á á ® á á á ¡ á á á á , á ªá á á á á á á á á á ¡ á á á á á £ á á á á á ¨ á á £ á « á á á á á á á . \ r \ rá á á á á « á á á á á ? " / > <nl> + < CannotMoveDoc title = " á á á á á ¢ á á á Notepad + + ' á á ¡ á á ® á á á á ¡ á á ¨ á " message = " á á á á £ á á á á ¢ á á ¨ á á á ªá á á á . á ¨ á á á á á ® á á á á ¡ á á á á á á á á ¡ á ªá á á á . " / > <nl> + < DocReloadWarning title = " á á á á á ¢ á á á á á á " message = " á á á á á á á á á á á ¡ á £ á á Notepad + + ' á á ¡ á á á ¨ á á á á á á ¨ á á ¢ á á á á á á ªá á á á á á á á á á ¡ á á á á á § á á á á á ¤ á á á á á ¡ á á á ¡ á á á á á á á á á á á á ® á á ? " / > <nl> + < FileLockedWarning title = " á ¨ á á á á ® á á á © á á á ¨ á á á " message = " á ¨ á á á á á ¬ á á á , á ® á á á á á á § á á á á ¡ á á á á á á ¡ á ® á á á á á á á á á á á á á á á á á á á á ¤ á á á á ¡ . " / > <nl> + < FileAlreadyOpenedInNpp title = " " message = " á á ¡ á ¤ á á á á á £ á á á á á á ® á ¡ á á á á á Notepad + + ' á ¨ á . " / > <nl> + < DeleteFileFailed title = " á ¤ á á á á á ¡ á ¬ á á ¨ á á " message = " á ¤ á á á á á ¡ á ¬ á á ¨ á á á © á á á ¨ á á á " / > <nl> + < / MessageBox > <nl> + < ProjectManager > <nl> + < PanelTitle name = " á á á á á ¥ á ¢ á " / > <nl> + < WorkspaceRootName name = " á ¡ á á á £ á ¨ á á á á á " / > <nl> + < NewProjectName name = " á á á á á ¥ á ¢ á á ¡ á ¡ á á ® á á á " / > <nl> + < NewFolderName name = " á á á á á ¥ á ¢ á á ¡ á ¡ á á ¥ á á ¦ á á á á " / > <nl> + < Menus > <nl> + < Entries > <nl> + < Item id = " 0 " name = " á ¡ á á á £ á ¨ á á á á á " / > <nl> + < Item id = " 1 " name = " á á á á £ á ¨ á á á á á " / > <nl> + < / Entries > <nl> + < WorkspaceMenu > <nl> + < Item id = " 3122 " name = " á á ® á á á á á á " / > <nl> + < Item id = " 3123 " name = " á á á á ¡ á á á ® á ¡ á á " / > <nl> + < Item id = " 3124 " name = " á á á á ¡ á ® á á á á ® á á á á á ® á ¡ á á " / > <nl> + < Item id = " 3125 " name = " á ¨ á á á á ® á á " / > <nl> + < Item id = " 3126 " name = " á ¨ á á á á ® á á á á á á á á ª . . . " / > <nl> + < Item id = " 3127 " name = " á á ¡ á á á ¡ á ¨ á á á á ® á á á á á á á á ª . . . " / > <nl> + < Item id = " 3121 " name = " á á ® á á á á á á á á ¥ á ¢ á á ¡ á á á á á ¢ á á á " / > <nl> + < / WorkspaceMenu > <nl> + < ProjectMenu > <nl> + < Item id = " 3111 " name = " á á á á á á ¥ á á á á " / > <nl> + < Item id = " 3112 " name = " á ¡ á á ¥ á á ¦ á á á á á ¡ á á á á á ¢ á á á " / > <nl> + < Item id = " 3113 " name = " á ¤ á á á á á ¡ á á á á á ¢ á á á . . . " / > <nl> + < Item id = " 3117 " name = " á § á á á á á ¤ á á á á á ¡ á á ¥ á á ¦ á á á á á á á . . . " / > <nl> + < Item id = " 3114 " name = " á á á ¨ á á á á á " / > <nl> + < / ProjectMenu > <nl> + < FolderMenu > <nl> + < Item id = " 3111 " name = " á á á á á á ¥ á á á á " / > <nl> + < Item id = " 3112 " name = " á ¡ á á ¥ á á ¦ á á á á á ¡ á á á á á ¢ á á á " / > <nl> + < Item id = " 3113 " name = " á ¤ á á á á á ¡ á á á á á ¢ á á á . . . " / > <nl> + < Item id = " 3117 " name = " á § á á á á á ¤ á á á á á ¡ á á ¥ á á ¦ á á á á á á á . . . " / > <nl> + < Item id = " 3114 " name = " Remove " / > <nl> + < / FolderMenu > <nl> + < FileMenu > <nl> + < Item id = " 3111 " name = " á á á á á á ¥ á á á á " / > <nl> + < Item id = " 3114 " name = " á á á ¨ á á á á á " / > <nl> + < Item id = " 3116 " name = " á ¤ á á á á á ¡ á á á á á á á á á á á ¡ á ¨ á á ªá á á " / > <nl> + < / FileMenu > <nl> + < / Menus > <nl> + < / ProjectManager > <nl> < / Native - Langue > <nl> - < / NotepadPlus > <nl> \ No newline at end of file <nl> + < / NotepadPlus > <nl> mmm a / PowerEditor / installer / nativeLang / indonesian . xml <nl> ppp b / PowerEditor / installer / nativeLang / indonesian . xml <nl> <nl> < Menu > <nl> < Main > <nl> < ! - - Main Menu Entries - - > <nl> - < Entries > <nl> - < Item id = " 0 " name = " & amp ; File " / > <nl> - < Item id = " 1 " name = " & amp ; Edit " / > <nl> - < Item id = " 2 " name = " & amp ; Temukan " / > <nl> - < Item id = " 3 " name = " & amp ; Pandangan " / > <nl> - < Item id = " 4 " name = " For & amp ; mat " / > <nl> - < Item id = " 5 " name = " & amp ; Bahasa " / > <nl> - < Item id = " 6 " name = " Penga & amp ; turan " / > <nl> - < Item id = " 7 " name = " Macro " / > <nl> - < Item id = " 8 " name = " Jalankan " / > <nl> - < / Entries > <nl> + < ! - - < Entries > - - > <nl> + < Entries > <nl> + < Item id = " 0 " name = " Berkas " / > <nl> + < Item id = " 1 " name = " Edit " / > <nl> + < Item id = " 2 " name = " Cari " / > <nl> + < Item id = " 3 " name = " Tampilan " / > <nl> + < Item id = " 4 " name = " Enkode " / > <nl> + < Item id = " 5 " name = " Bahasa " / > <nl> + < Item id = " 6 " name = " Pengaturan " / > <nl> + < Item id = " 7 " name = " Makro " / > <nl> + < Item id = " 8 " name = " Jalankan " / > <nl> + < Item idName = " Plugins " name = " Plugin " / > <nl> + < Item idName = " Window " name = " Jendela " / > <nl> + < / Entries > <nl> <nl> < ! - - Sub Menu Entries - - > <nl> < SubEntries > <nl> - < Item posX = " 3 " posY = " 16 " name = " Jabarkan levelnya " / > <nl> - < Item posX = " 3 " posY = " 17 " name = " Ringkaskan levelnya " / > <nl> + < Item posX = " 1 " posY = " 9 " name = " Salin ke Klipbor " / > <nl> + < Item posX = " 1 " posY = " 10 " name = " Indentasi " / > <nl> + < Item posX = " 1 " posY = " 11 " name = " Ganti Kapitalisasi " / > <nl> + < Item posX = " 1 " posY = " 12 " name = " Operasi Baris " / > <nl> + < Item posX = " 1 " posY = " 13 " name = " Komentar / Hapus Komentar " / > <nl> + < Item posX = " 1 " posY = " 14 " name = " Lengkapi Otomatis " / > <nl> + < Item posX = " 1 " posY = " 15 " name = " Konversi EOL " / > <nl> + < Item posX = " 1 " posY = " 16 " name = " Operasi Kosong " / > <nl> + < Item posX = " 1 " posY = " 17 " name = " Rekat Spesial " / > <nl> + < Item posX = " 2 " posY = " 16 " name = " Tandai Semua " / > <nl> + < Item posX = " 2 " posY = " 17 " name = " Hapus Semua Tanda " / > <nl> + < Item posX = " 2 " posY = " 18 " name = " Loncat Naik " / > <nl> + < Item posX = " 2 " posY = " 19 " name = " Loncat Turun " / > <nl> + < Item posX = " 2 " posY = " 21 " name = " Tanda " / > <nl> + < Item posX = " 3 " posY = " 4 " name = " Tampilkan Simbol " / > <nl> + < Item posX = " 3 " posY = " 5 " name = " Pembesaran " / > <nl> + < Item posX = " 3 " posY = " 6 " name = " Pindahkan / Duplikatkan Dokumen Ini " / > <nl> + < Item posX = " 3 " posY = " 16 " name = " Ciutkan Level " / > <nl> + < Item posX = " 3 " posY = " 17 " name = " Kembangkan Level " / > <nl> + < Item posX = " 4 " posY = " 5 " name = " Set Karakter " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 0 " name = " Arab " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 1 " name = " Baltik " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 2 " name = " Seltik " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 3 " name = " Sirilik " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 4 " name = " Eropa Tengah " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 5 " name = " Cina " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 6 " name = " Eropa Timur " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 7 " name = " Yunani " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 8 " name = " Ibrani " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 9 " name = " Jepang " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 10 " name = " Korea " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 11 " name = " Eropa Utara " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 12 " name = " Thai " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 13 " name = " Turki " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 14 " name = " Eropa Barat " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 15 " name = " Vietnam " / > <nl> + < Item posX = " 6 " posY = " 4 " name = " Impor " / > <nl> < / SubEntries > <nl> <nl> < ! - - all menu item - - > <nl> < Commands > <nl> - < Item id = " 41001 " name = " & amp ; Baru Ctrl + N " / > <nl> - < Item id = " 41002 " name = " B & amp ; uka Ctrl + O " / > <nl> - < Item id = " 41003 " name = " Tutup Ctrl + W " / > <nl> - < Item id = " 41004 " name = " T & amp ; utup Semua " / > <nl> - < Item id = " 41005 " name = " Tutup semua kecuali dokumen ini " / > <nl> - < Item id = " 41006 " name = " & amp ; Simpan Ctrl + S " / > <nl> - < Item id = " 41007 " name = " Sim & amp ; pan Semua Ctrl + Shift + S " / > <nl> - < Item id = " 41008 " name = " Simpan & amp ; Sebagai . . . " / > <nl> - < Item id = " 41010 " name = " Print . . . Ctrl + P " / > <nl> - < Item id = " 41011 " name = " Ke & amp ; luar " / > <nl> - <nl> - < Item id = " 42001 " name = " Cu & amp ; t Ctrl + X " / > <nl> - < Item id = " 42002 " name = " & amp ; Copy Ctrl + C " / > <nl> - < Item id = " 42003 " name = " & amp ; Undo Ctrl + Z " / > <nl> - < Item id = " 42004 " name = " & amp ; Redo Ctrl + Y " / > <nl> - < Item id = " 42005 " name = " & amp ; Paste Ctrl + V " / > <nl> - < Item id = " 42006 " name = " & amp ; Hapus Del " / > <nl> - < Item id = " 42007 " name = " Pilih Se & amp ; mua Ctrl + A " / > <nl> - < Item id = " 42008 " name = " Sisipkan TAB ( Indent ) TAB " / > <nl> - < Item id = " 42009 " name = " Hapus TAB ( Outdent ) Shift + TAB " / > <nl> - < Item id = " 42010 " name = " Gandakan baris ini Ctrl + D " / > <nl> - < Item id = " 42011 " name = " Transpose baris ini Ctrl + T " / > <nl> - < Item id = " 42012 " name = " Pisahkan baris Ctrl + I " / > <nl> - < Item id = " 42013 " name = " Gabungkan baris Ctrl + J " / > <nl> - < Item id = " 42014 " name = " Bawa baris ini ke atas Ctrl + Shift + Up " / > <nl> - < Item id = " 42015 " name = " Bawa baris ini ke bawah Ctrl + Shift + Down " / > <nl> - < Item id = " 42016 " name = " Jadikan Upper case Ctrl + Shift + U " / > <nl> - < Item id = " 42017 " name = " Jadikan Lower case Ctrl + U " / > <nl> - < Item id = " 42018 " name = " & amp ; Merekam dimulai Ctrl + Shift + R " / > <nl> - < Item id = " 42019 " name = " & amp ; Merekam dihentikan Ctrl + Shift + R " / > <nl> - < Item id = " 42021 " name = " & amp ; Putar Ulang Ctrl + Shift + P " / > <nl> - < Item id = " 42022 " name = " Block comment / uncomment " / > <nl> - < Item id = " 42023 " name = " Sisipkan comment " / > <nl> - < Item id = " 42024 " name = " Rapikan spasi yg tidak beraturan " / > <nl> - < Item id = " 42025 " name = " Simpan Makro yg telah direkam " / > <nl> - < Item id = " 42026 " name = " Arah Text kanan - > kiri Ctrl + Alt + R " / > <nl> - < Item id = " 42027 " name = " Arah Text kiri - > kanan Ctrl + Alt + L " / > <nl> - <nl> - < Item id = " 43001 " name = " & amp ; Temukan . . . Ctrl + F " / > <nl> - < Item id = " 43002 " name = " Temukan & amp ; Lagi F3 " / > <nl> - < Item id = " 43003 " name = " Gantikan . . . Ctrl + H " / > <nl> - < Item id = " 43004 " name = " Pergi ke baris . . . Ctrl + G " / > <nl> - < Item id = " 43005 " name = " Beri / buang Bookmark Ctrl + F2 " / > <nl> - < Item id = " 43006 " name = " Bookmark Selanjutnya F2 " / > <nl> - < Item id = " 43007 " name = " Bookmark Sebelumnya Shift + F2 " / > <nl> - < Item id = " 43008 " name = " Buang semua Bookmark " / > <nl> - < Item id = " 43009 " name = " Pergi ke struktur yg cocok Ctrl + B " / > <nl> - < Item id = " 43010 " name = " Temukan Sebelumnya Shift + F3 " / > <nl> - < Item id = " 43013 " name = " Temukan dalam files Ctrl + Shift + F " / > <nl> - <nl> - <nl> - <nl> - <nl> - <nl> - <nl> - <nl> - <nl> - <nl> - <nl> - < Item id = " 44010 " name = " Gulung semua Alt + 0 " / > <nl> - < Item id = " 44011 " name = " Dialog pilihan " / > <nl> - <nl> - <nl> - <nl> - <nl> - <nl> - <nl> - <nl> - < Item id = " 44019 " name = " Tunjukkan semua karakter " / > <nl> - < Item id = " 44020 " name = " Tunjukkan Indent guide " / > <nl> - <nl> - < Item id = " 44022 " name = " Bungkus " / > <nl> - < Item id = " 44023 " name = " Zoom & amp ; in Ctrl - Mouse Wheel Up " / > <nl> - < Item id = " 44024 " name = " Zoom & amp ; out Ctrl - Mouse Wheel Down " / > <nl> - < Item id = " 44025 " name = " Tunjukkan Spasi dan TAB " / > <nl> - < Item id = " 44026 " name = " Tunjukkan akhir baris " / > <nl> - <nl> - <nl> - < Item id = " 44029 " name = " Jabarkan semua Alt + Shift + 0 " / > <nl> - < Item id = " 44030 " name = " Jabarkan level ini Ctrl + Alt + F " / > <nl> - < Item id = " 44031 " name = " Ringkas level ini Ctrl + Alt + Shift + F " / > <nl> - < Item id = " 44032 " name = " Pindah Mode Full Screen F11 " / > <nl> - < Item id = " 44033 " name = " Kembali ke pengaturan Zoom asli Ctrl + / ( keypad ) " / > <nl> - <nl> - < Item id = " 45001 " name = " Terjemahkan ke Format Windows " / > <nl> - < Item id = " 45002 " name = " Terjemahkan ke Format UNIX " / > <nl> - < Item id = " 45003 " name = " Terjemahkan ke Format MAC " / > <nl> - < Item id = " 45004 " name = " Encode ke ANSI " / > <nl> - < Item id = " 45005 " name = " Encode ke UTF - 8 " / > <nl> - < Item id = " 45006 " name = " Encode ke UCS - 2 Big Endian " / > <nl> - < Item id = " 45007 " name = " Encode ke UCS - 2 Little Endian " / > <nl> - < Item id = " 45008 " name = " Encode ke UTF - 8 ( tanpa BOM ) " / > <nl> - <nl> - < Item id = " 10001 " name = " Menuju dokumen lainnya " / > <nl> - < Item id = " 10002 " name = " Gandakan ke dokumen lainnya " / > <nl> - <nl> - < Item id = " 46001 " name = " Styler Configurator . . . " / > <nl> - < Item id = " 47000 " name = " Tentang . . . F1 " / > <nl> - <nl> - <nl> - <nl> - <nl> - <nl> - <nl> - <nl> - <nl> - <nl> - < Item id = " 48009 " name = " Shortcut mapper . . . " / > <nl> + < Item id = " 41001 " name = " Baru " / > <nl> + < Item id = " 41002 " name = " Buka " / > <nl> + < Item id = " 41003 " name = " Tutup " / > <nl> + < Item id = " 41004 " name = " Tutup Semua " / > <nl> + < Item id = " 41005 " name = " Tutup Semua Kecuali Dokumen Aktif " / > <nl> + < Item id = " 41006 " name = " Simpan " / > <nl> + < Item id = " 41007 " name = " Simpan Semua " / > <nl> + < Item id = " 41008 " name = " Simpan Sebagai . . . " / > <nl> + < Item id = " 41010 " name = " Cetak . . . " / > <nl> + < Item id = " 1001 " name = " Cetak Langsung " / > <nl> + < Item id = " 41011 " name = " Keluar " / > <nl> + < Item id = " 41012 " name = " Muat Sesi . . . " / > <nl> + < Item id = " 41013 " name = " Simpan Sesi . . . " / > <nl> + < Item id = " 41014 " name = " Muat dari Diska " / > <nl> + < Item id = " 41015 " name = " Simpan Salinan Sebagai . . . " / > <nl> + < Item id = " 41016 " name = " Hapus dari Diska " / > <nl> + < Item id = " 41017 " name = " Namai Ulang . . . " / > <nl> + <nl> + < Item id = " 42001 " name = " Potong " / > <nl> + < Item id = " 42002 " name = " Salin " / > <nl> + < Item id = " 42003 " name = " Urung " / > <nl> + < Item id = " 42004 " name = " Ulang " / > <nl> + < Item id = " 42005 " name = " Rekat " / > <nl> + < Item id = " 42006 " name = " Hapus " / > <nl> + < Item id = " 42007 " name = " Pilih Semua " / > <nl> + < Item id = " 42008 " name = " Tambah Indentasi " / > <nl> + < Item id = " 42009 " name = " Kurangi Indentasi " / > <nl> + < Item id = " 42010 " name = " Duplikat Baris " / > <nl> + < Item id = " 42012 " name = " Pisah Baris " / > <nl> + < Item id = " 42013 " name = " Gabung Baris " / > <nl> + < Item id = " 42014 " name = " Naikkan Baris " / > <nl> + < Item id = " 42015 " name = " Turunkan Baris " / > <nl> + < Item id = " 42016 " name = " HURUF BESAR " / > <nl> + < Item id = " 42017 " name = " huruf kecil " / > <nl> + < Item id = " 42018 " name = " Mulai Rekam " / > <nl> + < Item id = " 42019 " name = " Berhenti Rekam " / > <nl> + < Item id = " 42021 " name = " Putar " / > <nl> + < Item id = " 42022 " name = " Tukar Komentar Blok " / > <nl> + < Item id = " 42023 " name = " Komentar Aliran " / > <nl> + < Item id = " 42042 " name = " Pangkas Spasi Awal " / > <nl> + < Item id = " 42043 " name = " Pangkas Spasi Awal dan Akhir " / > <nl> + < Item id = " 42044 " name = " EOL jadi Spasi " / > <nl> + < Item id = " 42045 " name = " Buang Kosong dan EOL Lebihan " / > <nl> + < Item id = " 42046 " name = " TAB jadi Spasi " / > <nl> + < Item id = " 42047 " name = " Spasi jadi TAB " / > <nl> + < Item id = " 42024 " name = " Pangkas Spasi Akhir " / > <nl> + < Item id = " 42025 " name = " Simpan Rekaman Makro " / > <nl> + < Item id = " 42026 " name = " Arah Teks RTL " / > <nl> + < Item id = " 42027 " name = " Arah Teks LTR " / > <nl> + < Item id = " 42028 " name = " Setel Hanya - Baca " / > <nl> + < Item id = " 42029 " name = " Path Berkas Aktif ke Klipbor " / > <nl> + < Item id = " 42030 " name = " Nama Berkas Aktif ke Klipbor " / > <nl> + < Item id = " 42031 " name = " Path Direktori Aktif ke Klipbor " / > <nl> + < Item id = " 42032 " name = " Jalankan Makro Beberapa Kali . . . " / > <nl> + < Item id = " 42033 " name = " Hapus Tanda Hanya - Baca " / > <nl> + < Item id = " 42035 " name = " Komentar Blok " / > <nl> + < Item id = " 42036 " name = " Hapus Komentar Blok " / > <nl> + <nl> + < Item id = " 43001 " name = " Cari . . . " / > <nl> + < Item id = " 43002 " name = " Cari Selanjutnya " / > <nl> + < Item id = " 43003 " name = " Ganti . . . " / > <nl> + < Item id = " 43004 " name = " Pergi ke . . . " / > <nl> + < Item id = " 43005 " name = " Tukar Tanda " / > <nl> + < Item id = " 43006 " name = " Tanda Selanjutnya " / > <nl> + < Item id = " 43007 " name = " Tanda Sebelumnya " / > <nl> + < Item id = " 43008 " name = " Hapus Semua Tanda " / > <nl> + < Item id = " 43009 " name = " Pergi ke Kurung Cocokan " / > <nl> + < Item id = " 43010 " name = " Cari Sebelumnya " / > <nl> + < Item id = " 43011 " name = " Cari Meningkat " / > <nl> + < Item id = " 43013 " name = " Cari dalam Berkas " / > <nl> + < Item id = " 43014 " name = " Cari ( Volatil ) Selanjutnya " / > <nl> + < Item id = " 43015 " name = " Cari ( Volatil ) Sebelumnya " / > <nl> + < Item id = " 43016 " name = " Tandai Semua " / > <nl> + < Item id = " 43017 " name = " Hapus Semua Tanda " / > <nl> + < Item id = " 43018 " name = " Potong Baris Bertanda " / > <nl> + < Item id = " 43019 " name = " Salin Baris Bertanda " / > <nl> + < Item id = " 43020 " name = " Rekatkan kepada ( Ganti ) Baris Bertanda " / > <nl> + < Item id = " 43021 " name = " Hapus Baris Bertanda " / > <nl> + < Item id = " 43022 " name = " Gunakan Gaya 1 " / > <nl> + < Item id = " 43023 " name = " Hapus Gaya 1 " / > <nl> + < Item id = " 43024 " name = " Gunakan Gaya 3 " / > <nl> + < Item id = " 43025 " name = " Hapus Gaya 2 " / > <nl> + < Item id = " 43026 " name = " Gunakan Gaya 3 " / > <nl> + < Item id = " 43027 " name = " Hapus Gaya 3 " / > <nl> + < Item id = " 43028 " name = " Gunakan Gaya 4 " / > <nl> + < Item id = " 43029 " name = " Hapus Gaya 4 " / > <nl> + < Item id = " 43030 " name = " Gunakan Gaya 5 " / > <nl> + < Item id = " 43031 " name = " Hapus Gaya 5 " / > <nl> + < Item id = " 43032 " name = " Hapus Semua Gaya " / > <nl> + < Item id = " 43033 " name = " Gaya 1 " / > <nl> + < Item id = " 43034 " name = " Gaya 2 " / > <nl> + < Item id = " 43035 " name = " Gaya 3 " / > <nl> + < Item id = " 43036 " name = " Gaya 4 " / > <nl> + < Item id = " 43037 " name = " Gaya 5 " / > <nl> + < Item id = " 43038 " name = " Cari Gaya " / > <nl> + < Item id = " 43039 " name = " Gaya 1 " / > <nl> + < Item id = " 43040 " name = " Gaya 2 " / > <nl> + < Item id = " 43041 " name = " Gaya 3 " / > <nl> + < Item id = " 43042 " name = " Gaya 4 " / > <nl> + < Item id = " 43043 " name = " Gaya 5 " / > <nl> + < Item id = " 43044 " name = " Cari Gaya " / > <nl> + < Item id = " 43045 " name = " Jendela Hasil Pencarian " / > <nl> + < Item id = " 43046 " name = " Hasil Pencarian Selanjutnya " / > <nl> + < Item id = " 43047 " name = " Hasil Pencarian Sebelumnya " / > <nl> + < Item id = " 43048 " name = " Pilih dan Cari Selanjutnya " / > <nl> + < Item id = " 43049 " name = " Pilih dan Cari Sebelumnya " / > <nl> + < Item id = " 43050 " name = " Balikkan Tanda " / > <nl> + < Item id = " 44009 " name = " Post - It " / > <nl> + < Item id = " 44010 " name = " Lipat Semua " / > <nl> + < Item id = " 44011 " name = " Dialog Definisi Pengguna . . . " / > <nl> + < Item id = " 44019 " name = " Tampilkan Semua Karakter " / > <nl> + < Item id = " 44020 " name = " Tampilkan Panduan Indentasi " / > <nl> + < Item id = " 44022 " name = " Penggal Baris " / > <nl> + < Item id = " 44023 " name = " Besarkan Ctrl + Mouse Wheel Up " / > <nl> + < Item id = " 44024 " name = " Kecilkan Ctrl + Mouse Wheel Down " / > <nl> + < Item id = " 44025 " name = " Tampilkan Spasi Putih dan TAB " / > <nl> + < Item id = " 44026 " name = " Tampilkan EOL " / > <nl> + < Item id = " 44029 " name = " Buka Semua Lipatan " / > <nl> + < Item id = " 44030 " name = " Ciutkan Level Ini " / > <nl> + < Item id = " 44031 " name = " Kembangkan Level Ini " / > <nl> + < Item id = " 44032 " name = " Tukar Modus Layar Penuh " / > <nl> + < Item id = " 44033 " name = " Pulihkan Pembesaran Baku " / > <nl> + < Item id = " 44034 " name = " Selalu di Atas " / > <nl> + < Item id = " 44049 " name = " Ringkasan . . . " / > <nl> + < Item id = " 44035 " name = " Sinkronkan Guliran Vertikal " / > <nl> + < Item id = " 44036 " name = " Sinkronkan Guliran Horisontal " / > <nl> + < Item id = " 44041 " name = " Tampilkan Simbol Pemutus " / > <nl> + < Item id = " 44072 " name = " Fokus pada Tampilan Lain " / > <nl> + <nl> + < Item id = " 45001 " name = " Konversi ke Format Windows " / > <nl> + < Item id = " 45002 " name = " Konversi ke Format UNIX " / > <nl> + < Item id = " 45003 " name = " Konversi ke Format MAC " / > <nl> + < Item id = " 45004 " name = " Enkode ANSI " / > <nl> + < Item id = " 45005 " name = " Enkode UTF - 8 " / > <nl> + < Item id = " 45006 " name = " Enkode UCS - 2 Big Endian " / > <nl> + < Item id = " 45007 " name = " Enkode UCS - 2 Little Endian " / > <nl> + < Item id = " 45008 " name = " Enkode UTF - 8 tanpa BOM " / > <nl> + < Item id = " 45009 " name = " Konversi ke ANSI " / > <nl> + < Item id = " 45010 " name = " Konversi ke UTF - 8 tanpa BOM " / > <nl> + < Item id = " 45011 " name = " Konversi ke UTF - 8 " / > <nl> + < Item id = " 45012 " name = " Konversi ke UCS - 2 Big Endian " / > <nl> + < Item id = " 45013 " name = " Konversi ke UCS - 2 Little Endian " / > <nl> + <nl> + < Item id = " 10001 " name = " Pindahkan ke Tampilan Lain " / > <nl> + < Item id = " 10002 " name = " Duplikatkan ke Tampilan Lain " / > <nl> + < Item id = " 10003 " name = " Pindahkan ke Perwujudan Lain " / > <nl> + < Item id = " 10004 " name = " Buka dalam Perwujudan Baru " / > <nl> + <nl> <nl> - < Item id = " 49000 " name = " & amp ; Jalankan . . . " / > <nl> + < Item id = " 46001 " name = " Konfigurator Gaya . . . " / > <nl> + < Item id = " 46080 " name = " Definisi - Pengguna " / > <nl> + < Item id = " 47000 " name = " Ihwal Notepad + + . . . " / > <nl> + < Item id = " 47001 " name = " Beranda Notepad + + " / > <nl> + < Item id = " 47002 " name = " Laman Proyek Notepad + + " / > <nl> + < Item id = " 47003 " name = " Dokumentasi Daring " / > <nl> + < Item id = " 47004 " name = " Forum " / > <nl> + < Item id = " 47005 " name = " Dapatkan Plugin Lain " / > <nl> + < Item id = " 47006 " name = " Perbarui Notepad + + " / > <nl> + < Item id = " 47008 " name = " Isi Bantuan " / > <nl> + < Item id = " 48005 " name = " Impor Plugin . . . " / > <nl> + < Item id = " 48006 " name = " Impor Tema . . . " / > <nl> + < Item id = " 48009 " name = " Peta Pintasan . . . " / > <nl> + < Item id = " 48011 " name = " Preferensi . . . " / > <nl> + < Item id = " 49000 " name = " Jalankan . . . " / > <nl> + <nl> + < Item id = " 50000 " name = " Pelengkapan Fungsi " / > <nl> + < Item id = " 50001 " name = " Pelengkapan Kata " / > <nl> + < Item id = " 50002 " name = " Bantuan Parameter Fungsi " / > <nl> + < Item id = " 42034 " name = " Editor Kolom . . . " / > <nl> + < Item id = " 44042 " name = " Sembunyikan Baris " / > <nl> + < Item id = " 42040 " name = " Buka Semua Berkas Terbaru " / > <nl> + < Item id = " 42041 " name = " Kosongkan Daftar Berkas Terbaru " / > <nl> + < Item id = " 48016 " name = " Ubah Pintasan / Hapus Makro . . . " / > <nl> + < Item id = " 48017 " name = " Ubah Pintasan / Hapus Perintah . . . " / > <nl> + < Item id = " 48018 " name = " Edit Menu Konteks Munculan " / > <nl> < / Commands > <nl> < / Main > <nl> < Splitter > <nl> < / Splitter > <nl> < TabBar > <nl> - < Item order = " 0 " name = " Tutup " / > <nl> - < Item order = " 1 " name = " Tutup lainnya kecuali ini " / > <nl> - < Item order = " 2 " name = " Simpan " / > <nl> - < Item order = " 3 " name = " Simpan sebagai . . . " / > <nl> - < Item order = " 4 " name = " Cetak " / > <nl> - < Item order = " 5 " name = " Menuju dokumen lainnya " / > <nl> - < Item order = " 6 " name = " Gandakan ke dokumen lainnya " / > <nl> + < Item order = " 0 " name = " Tutup " / > <nl> + < Item order = " 1 " name = " Tutup Semua Kecuali Ini " / > <nl> + < Item order = " 2 " name = " Simpan " / > <nl> + < Item order = " 3 " name = " Simpan Sebagai . . . " / > <nl> + < Item order = " 4 " name = " Cetak " / > <nl> + < Item order = " 5 " name = " Pindah ke Tampilan Lain " / > <nl> + < Item order = " 6 " name = " Duplikat ke Tampilan Lain " / > <nl> + < Item order = " 7 " name = " Path Lengkap Berkas ke Klipbor " / > <nl> + < Item order = " 8 " name = " Nama Berkas ke Klipbor " / > <nl> + < Item order = " 9 " name = " Path Direktori Aktif ke Klipbor " / > <nl> + < Item order = " 10 " name = " Ganti Nama " / > <nl> + < Item order = " 11 " name = " Hapus " / > <nl> + < Item order = " 12 " name = " Hanya - Baca " / > <nl> + < Item order = " 13 " name = " Hapus Tanda Hanya - Baca " / > <nl> + < Item order = " 14 " name = " Pindahkan ke Perwujudan Baru " / > <nl> + < Item order = " 15 " name = " Buka dalam Perwujudan Baru " / > <nl> < / TabBar > <nl> < / Menu > <nl> <nl> < Dialog > <nl> - < Find title = " Temukan . . . " > <nl> - < Item id = " 1 " name = " Temukan lainnya " / > <nl> - < Item id = " 2 " name = " Tutup " / > <nl> - < Item id = " 1620 " name = " Mencari apa : " / > <nl> - < Item id = " 1603 " name = " Cocok & amp ; seluruh kata " / > <nl> - < Item id = " 1604 " name = " Cocok & amp ; Besar / kecilnya " / > <nl> - < Item id = " 1605 " name = " Regular & amp ; expression " / > <nl> - < Item id = " 1606 " name = " Wrap aroun & amp ; d " / > <nl> - < Item id = " 1612 " name = " & amp ; Atas " / > <nl> - < Item id = " 1613 " name = " & amp ; Down " / > <nl> - < Item id = " 1614 " name = " Hitung " / > <nl> - < Item id = " 1615 " name = " Temukan semua " / > <nl> - < Item id = " 1616 " name = " Tandai baris " / > <nl> - < Item id = " 1617 " name = " Tandai yang ditemukan " / > <nl> - < Item id = " 1618 " name = " Buang item yang ditemukan " / > <nl> - < Item id = " 1621 " name = " Arah " / > <nl> - < Item id = " 1611 " name = " Gan & amp ; tikan dengan : " / > <nl> - < Item id = " 1608 " name = " & amp ; Gantikan " / > <nl> - < Item id = " 1609 " name = " Gantikan & amp ; Semua " / > <nl> - < Item id = " 1623 " name = " Transparensi " / > <nl> - < Item id = " 1632 " name = " Dalam Seleksi " / > <nl> - < Item id = " 1633 " name = " Bersihkan " / > <nl> - < Item id = " 1635 " name = " Gantikan semua di dokumen yg terbuka " / > <nl> - < Item id = " 1636 " name = " Temukan semua di dokumen yg terbuka " / > <nl> - < Item id = " 1637 " name = " Temukan dalam file " / > <nl> + < Find title = " " titleFind = " Cari " titleReplace = " Ganti " titleFindInFiles = " Cari dalam Berkas " titleMark = " Tanda " > <nl> + < Item id = " 1 " name = " Cari Selanjutnya " / > <nl> + < Item id = " 2 " name = " Tutup " / > <nl> + < Item id = " 1620 " name = " Cari apa : " / > <nl> + < Item id = " 1603 " name = " Cocokkan seluruh kata " / > <nl> + < Item id = " 1604 " name = " Cocokkan kapitalisasi " / > <nl> + < Item id = " 1605 " name = " Persamaan reguler " / > <nl> + < Item id = " 1606 " name = " Apit sekitarnya " / > <nl> + < Item id = " 1612 " name = " Naik " / > <nl> + < Item id = " 1613 " name = " Turun " / > <nl> + < Item id = " 1614 " name = " Hitung " / > <nl> + < Item id = " 1615 " name = " Cari Semua " / > <nl> + < Item id = " 1616 " name = " Tandai baris " / > <nl> + < Item id = " 1617 " name = " Token temuan gaya " / > <nl> + < Item id = " 1618 " name = " Hapus untuk tiap pencarian " / > <nl> + < Item id = " 1621 " name = " Arah " / > <nl> + < Item id = " 1611 " name = " Ganti dengan : " / > <nl> + < Item id = " 1608 " name = " Ganti " / > <nl> + < Item id = " 1609 " name = " Ganti Semua " / > <nl> + < Item id = " 1623 " name = " Transparansi " / > <nl> + < Item id = " 1687 " name = " Saat hilang fokus " / > <nl> + < Item id = " 1688 " name = " Selalu " / > <nl> + < Item id = " 1632 " name = " Dalam pilihan " / > <nl> + < Item id = " 1633 " name = " Hapus " / > <nl> + < Item id = " 1635 " name = " Ganti Semua dalam Semua Dokumen Terbuka " / > <nl> + < Item id = " 1636 " name = " Cari Semua dalam Semua Dokumen Terbuka " / > <nl> + < Item id = " 1637 " name = " Cari dalam Berkas " / > <nl> + < Item id = " 1654 " name = " Filter : " / > <nl> + < Item id = " 1655 " name = " Direktori : " / > <nl> + < Item id = " 1656 " name = " Cari Semua " / > <nl> + < Item id = " 1658 " name = " Dalam semua subdirektori " / > <nl> + < Item id = " 1659 " name = " Dalam direktori tersembunyi " / > <nl> + < Item id = " 1624 " name = " Modus pencarian " / > <nl> + < Item id = " 1625 " name = " Normal " / > <nl> + < Item id = " 1626 " name = " Lanjut ( \ n , \ r , \ t , \ 0 , \ x . . . ) " / > <nl> + < Item id = " 1660 " name = " Ganti dalam Berkas " / > <nl> + < Item id = " 1661 " name = " Ikuti dok . aktif " / > <nl> + < Item id = " 1641 " name = " Cari Semua dalam Dokumen Ini " / > <nl> + < Item id = " 1686 " name = " Transparansi " / > <nl> < / Find > <nl> - < GoToLine title = " Pergi ke baris # " > <nl> - < Item id = " 1 " name = " & amp ; Maju ! " / > <nl> - < Item id = " 2 " name = " Tidak jadi " / > <nl> - < Item id = " 2004 " name = " Sekarang di : " / > <nl> - < Item id = " 2005 " name = " Pergi ke : " / > <nl> - < Item id = " 2006 " name = " Tidak boleh lebih dari : " / > <nl> + < GoToLine title = " Pergi ke . . . " > <nl> + < Item id = " 2007 " name = " Baris " / > <nl> + < Item id = " 2008 " name = " Ofset " / > <nl> + < Item id = " 1 " name = " Pergi " / > <nl> + < Item id = " 2 " name = " Tetap di tempat " / > <nl> + < Item id = " 2004 " name = " Anda di sini : " / > <nl> + < Item id = " 2005 " name = " Anda ingin pergi ke : " / > <nl> + < Item id = " 2006 " name = " Anda tidak dapat lewat dari : " / > <nl> < / GoToLine > <nl> <nl> - < Run title = " Run . . . " > <nl> - < Item id = " 1903 " name = " Ketik program untuk dijalankan " / > <nl> - < Item id = " 1 " name = " Jalankan ! " / > <nl> - < Item id = " 2 " name = " Batal " / > <nl> - < Item id = " 1904 " name = " Simpan . . . " / > <nl> + < Run title = " Jalankan . . . " > <nl> + < Item id = " 1903 " name = " Program untuk Dijalankan " / > <nl> + < Item id = " 1 " name = " Jalankan " / > <nl> + < Item id = " 2 " name = " Batal " / > <nl> + < Item id = " 1904 " name = " Simpan . . . " / > <nl> < / Run > <nl> <nl> - < StyleConfig title = " Style Configurator " > <nl> - < Item id = " 1 " name = " Coba ! " / > <nl> - < Item id = " 2 " name = " Batal " / > <nl> - < Item id = " 2301 " name = " Simpan & amp ; & amp ; Tutup " / > <nl> - < Item id = " 2303 " name = " Transparansi " / > <nl> - <nl> + < StyleConfig title = " Konfigurator Gaya " > <nl> + < Item id = " 2 " name = " Batal " / > <nl> + < Item id = " 2301 " name = " Simpan Tutup " / > <nl> + < Item id = " 2303 " name = " Transparansi " / > <nl> + < Item id = " 2306 " name = " Pilih tema : " / > <nl> < SubDialog > <nl> - < Item id = " 2204 " name = " Bold " / > <nl> - < Item id = " 2205 " name = " Italic " / > <nl> - < Item id = " 2206 " name = " Warna Depan " / > <nl> - < Item id = " 2207 " name = " Warna Lattar " / > <nl> - < Item id = " 2208 " name = " Nama Font : " / > <nl> - < Item id = " 2209 " name = " Ukuran Font : " / > <nl> - < Item id = " 2210 " name = " Perhatian : Definisi dari style ini akan menjadi deskripsi default untuk style yang tidak didefinisikan " / > <nl> - < Item id = " 2211 " name = " Deskripsi Style : " / > <nl> - < Item id = " 2212 " name = " Warna style " / > <nl> - < Item id = " 2213 " name = " Font style " / > <nl> - < Item id = " 2214 " name = " Extensi Default : " / > <nl> - < Item id = " 2216 " name = " Extensi User : " / > <nl> - < Item id = " 2218 " name = " Garis Bawah " / > <nl> - < Item id = " 2219 " name = " Kata kunci Default " / > <nl> - < Item id = " 2221 " name = " Kata kunci USER " / > <nl> - < / SubDialog > <nl> - <nl> + < Item id = " 2204 " name = " Tebal " / > <nl> + < Item id = " 2205 " name = " Miring " / > <nl> + < Item id = " 2206 " name = " Warna depan " / > <nl> + < Item id = " 2207 " name = " Warna latar " / > <nl> + < Item id = " 2208 " name = " Jenis huruf : " / > <nl> + < Item id = " 2209 " name = " Besar huruf : " / > <nl> + < Item id = " 2212 " name = " Gaya Warna " / > <nl> + < Item id = " 2213 " name = " Gaya Huruf " / > <nl> + < Item id = " 2214 " name = " Ekst . baku : " / > <nl> + < Item id = " 2216 " name = " Ekst . pengguna : " / > <nl> + < Item id = " 2218 " name = " Garis bawah " / > <nl> + < Item id = " 2219 " name = " Kata kunci baku " / > <nl> + < Item id = " 2221 " name = " Kata kunci definisi pengguna " / > <nl> + < Item id = " 2225 " name = " Bahasa : " / > <nl> + < Item id = " 2226 " name = " Aktifkan warna depan global " / > <nl> + < Item id = " 2227 " name = " Aktifkan warna latar global " / > <nl> + < Item id = " 2228 " name = " Aktifkan jenis huruf global " / > <nl> + < Item id = " 2229 " name = " Aktifkan besar huruf global " / > <nl> + < Item id = " 2230 " name = " Aktifkan gaya huruf tebal global " / > <nl> + < Item id = " 2231 " name = " Aktifkan gaya huruf miring global " / > <nl> + < Item id = " 2232 " name = " Aktifkan gaya huruf garis bawah global " / > <nl> + < / SubDialog > <nl> + <nl> < / StyleConfig > <nl> <nl> - < UserDefine title = " Definisi dari USER " > <nl> - < Item id = " 20002 " name = " Ganti Nama " / > <nl> - < Item id = " 20003 " name = " Buat Baru . . . " / > <nl> - < Item id = " 20004 " name = " Buang " / > <nl> - < Item id = " 20005 " name = " Simpan sebagai . . . " / > <nl> - < Item id = " 20007 " name = " Bahasa User : " / > <nl> - < Item id = " 20009 " name = " Extensi : " / > <nl> - < Item id = " 20012 " name = " Abaikan hurufnya " / > <nl> - < Item id = " 20011 " name = " Transparansi " / > <nl> - < Item id = " 0 " name = " Warna style " / > <nl> - < Item id = " 1 " name = " Warna Depan " / > <nl> - < Item id = " 2 " name = " Warna Lattar " / > <nl> - < Item id = " 3 " name = " Font style " / > <nl> - < Item id = " 4 " name = " Nama Font : " / > <nl> - < Item id = " 5 " name = " Ukuran : " / > <nl> - < Item id = " 6 " name = " Bold " / > <nl> - < Item id = " 7 " name = " Italic " / > <nl> - < Item id = " 8 " name = " Underline " / > <nl> - < Folder title = " Folder & amp ; & amp ; Default " > <nl> - < Item id = " 21101 " name = " Pengaturan Default Style " / > <nl> - < Item id = " 21201 " name = " Pengaturan Kata kunci pembuka " / > <nl> - < Item id = " 21301 " name = " Pengaturan Kata kunci penutup Folder " / > <nl> + < UserDefine title = " User - Defined " > <nl> + < Item id = " 20002 " name = " Ganti Nama " / > <nl> + < Item id = " 20003 " name = " Buat Baru . . . " / > <nl> + < Item id = " 20004 " name = " Hapus " / > <nl> + < Item id = " 20005 " name = " Simpan Sebagai . . . " / > <nl> + < Item id = " 20007 " name = " Bahasa pengguna : " / > <nl> + < Item id = " 20009 " name = " Ekst . : " / > <nl> + < Item id = " 20012 " name = " Abaikan kapitalisasi " / > <nl> + < Item id = " 20011 " name = " Transparansi " / > <nl> + < Item id = " 20016 " name = " Impor . . . " / > <nl> + < Item id = " 20015 " name = " Ekspor . . . " / > <nl> + < Item id = " 0 " name = " Gaya Warna " / > <nl> + < Item id = " 1 " name = " Warna depan " / > <nl> + < Item id = " 2 " name = " Warna latar " / > <nl> + < Item id = " 3 " name = " Gaya Huruf " / > <nl> + < Item id = " 4 " name = " Jenis huruf : " / > <nl> + < Item id = " 5 " name = " Besar huruf : " / > <nl> + < Item id = " 6 " name = " Tebal " / > <nl> + < Item id = " 7 " name = " Miring " / > <nl> + < Item id = " 8 " name = " Garis bawah " / > <nl> + < Folder title = " Direktori Baku " > <nl> + < Item id = " 21101 " name = " Pengaturan Gaya Baku " / > <nl> + < Item id = " 21201 " name = " Pengaturan Kata Kunci Buka Direktori " / > <nl> + < Item id = " 21301 " name = " Pengaturan Kata Kunci Tutup Direktori " / > <nl> < / Folder > <nl> - < Keywords title = " Daftar Kata Kunci " > <nl> - < Item id = " 22101 " name = " Grup pertama " / > <nl> - < Item id = " 22201 " name = " Grup kedua " / > <nl> - < Item id = " 22301 " name = " Grup ketiga " / > <nl> - < Item id = " 22401 " name = " Grup keempat " / > <nl> - < Item id = " 22113 " name = " Mode Prefix " / > <nl> - < Item id = " 22213 " name = " Mode Prefix " / > <nl> - < Item id = " 22313 " name = " Mode Prefix " / > <nl> - < Item id = " 22413 " name = " Mode Prefix " / > <nl> + < Keywords title = " Daftar Kata Kunci " > <nl> + < Item id = " 22101 " name = " Kelompok 1 " / > <nl> + < Item id = " 22201 " name = " Kelompok 2 " / > <nl> + < Item id = " 22301 " name = " Kelompok 3 " / > <nl> + < Item id = " 22401 " name = " Kelompok 4 " / > <nl> + < Item id = " 22113 " name = " Modus prefiks " / > <nl> + < Item id = " 22213 " name = " Modus prefiks " / > <nl> + < Item id = " 22313 " name = " Modus prefiks " / > <nl> + < Item id = " 22413 " name = " Modus prefiks " / > <nl> < / Keywords > <nl> - < Comment title = " Nomor & amp ; & amp ; Komentar " > <nl> - < Item id = " 23301 " name = " Baris Komentar " / > <nl> - < Item id = " 23101 " name = " Blok Komentar " / > <nl> - < Item id = " 23113 " name = " Buka Komentar : " / > <nl> - < Item id = " 23115 " name = " Tutup Komentar : " / > <nl> - < Item id = " 23116 " name = " Perlakukan Keyword sebagai symbol " / > <nl> - < Item id = " 23117 " name = " Perlakukan Keyword sebagai symbol " / > <nl> - < Item id = " 23201 " name = " Nomor " / > <nl> + < Comment title = " Komentar Angka " > <nl> + < Item id = " 23301 " name = " Baris Komentar " / > <nl> + < Item id = " 23101 " name = " Blok Komentar " / > <nl> + < Item id = " 23113 " name = " Buka komentar : " / > <nl> + < Item id = " 23115 " name = " Tutup komentar : " / > <nl> + < Item id = " 23116 " name = " Perlakukan kata kunci sebagai simbol " / > <nl> + < Item id = " 23117 " name = " Perlakukan kata kunci sebagai simbol " / > <nl> + < Item id = " 23201 " name = " Angka " / > <nl> < / Comment > <nl> - < Operator title = " Operators " > <nl> - < Item id = " 24107 " name = " Operator " / > <nl> - < Item id = " 24103 " name = " Symbol yg tersedia " / > <nl> - < Item id = " 24101 " name = " Operator yg tersedia " / > <nl> - < Item id = " 24201 " name = " Delimiter 1 " / > <nl> - < Item id = " 24211 " name = " Batas Pembuka : " / > <nl> - < Item id = " 24214 " name = " Batas Penutup : " / > <nl> - < Item id = " 24301 " name = " Delimiter 2 " / > <nl> - < Item id = " 24311 " name = " Batas Pembuka : " / > <nl> - < Item id = " 24314 " name = " Batas Penutup : " / > <nl> + < Operator title = " Operator " > <nl> + < Item id = " 24107 " name = " Operator " / > <nl> + < Item id = " 24103 " name = " Simbol tersedia " / > <nl> + < Item id = " 24101 " name = " Operator aktif " / > <nl> + < Item id = " 24201 " name = " Pembatas 1 " / > <nl> + < Item id = " 24211 " name = " Pembuka batas : " / > <nl> + < Item id = " 24214 " name = " Penutup batas : " / > <nl> + < Item id = " 24301 " name = " Pembatas 2 " / > <nl> + < Item id = " 24311 " name = " Pembuka batas : " / > <nl> + < Item id = " 24314 " name = " Penutup close : " / > <nl> < / Operator > <nl> + < Item id = " 24001 " name = " Aktifkan karakter escape : " / > <nl> < / UserDefine > <nl> + < Preference title = " Preferensi " > <nl> + < Item id = " 6001 " name = " Tutup " / > <nl> + < Global title = " Umum " > <nl> + < Item id = " 6101 " name = " Bilah Alat " / > <nl> + < Item id = " 6102 " name = " Sembunyikan " / > <nl> + < Item id = " 6103 " name = " Ikon kecil " / > <nl> + < Item id = " 6104 " name = " Ikon besar " / > <nl> + < Item id = " 6105 " name = " Ikon standar " / > <nl> + <nl> + < Item id = " 6106 " name = " Bilah Tab " / > <nl> + < Item id = " 6107 " name = " Kecilkan " / > <nl> + < Item id = " 6108 " name = " Kunci ( tanpa seret lepas ) " / > <nl> + < Item id = " 6109 " name = " Tab nonaktif gelap " / > <nl> + < Item id = " 6110 " name = " Tab aktif berwarna " / > <nl> + <nl> + < Item id = " 6111 " name = " Tampilkan bilah status " / > <nl> + < Item id = " 6112 " name = " Tampilkan tombol tutup di setiap tab " / > <nl> + < Item id = " 6113 " name = " Klik ganda untuk menutup dokumen " / > <nl> + < Item id = " 6118 " name = " Sembunyikan " / > <nl> + < Item id = " 6119 " name = " Multibaris " / > <nl> + < Item id = " 6120 " name = " Vertikal " / > <nl> + <nl> + < Item id = " 6121 " name = " Bilah Menu " / > <nl> + < Item id = " 6122 " name = " Sembunyikan ( Tukar dengan Alt / F10 ) " / > <nl> + < Item id = " 6123 " name = " Pelokalan " / > <nl> + < / Global > <nl> + < Scintillas title = " Pengeditan " > <nl> + < Item id = " 6216 " name = " Pengaturan Caret " / > <nl> + < Item id = " 6217 " name = " Lebar : " / > <nl> + < Item id = " 6219 " name = " Kecepatan Kedip : " / > <nl> + < Item id = " 6221 " name = " C " / > <nl> + < Item id = " 6222 " name = " P " / > <nl> + < Item id = " 6224 " name = " Pengaturan Multiedit " / > <nl> + < Item id = " 6225 " name = " Aktifkan ( Ctrl + Mouse ) " / > <nl> + < Item id = " 6201 " name = " Gaya Batas Lipatan " / > <nl> + < Item id = " 6202 " name = " Sederhana " / > <nl> + < Item id = " 6203 " name = " Panah " / > <nl> + < Item id = " 6204 " name = " Pohon lingkaran " / > <nl> + < Item id = " 6205 " name = " Pohon kotak " / > <nl> + < Item id = " 6226 " name = " Tidak ada " / > <nl> + <nl> + < Item id = " 6227 " name = " Pemenggalan Baris " / > <nl> + < Item id = " 6228 " name = " Baku " / > <nl> + < Item id = " 6229 " name = " Lurus " / > <nl> + < Item id = " 6230 " name = " Indentasi " / > <nl> + <nl> + < Item id = " 6206 " name = " Tampilkan nomor baris " / > <nl> + < Item id = " 6207 " name = " Tampilkan tanda " / > <nl> + < Item id = " 6208 " name = " Tampilkan batas vertikal " / > <nl> + < Item id = " 6209 " name = " Jumlah kolom : " / > <nl> + <nl> + < Item id = " 6211 " name = " Pengaturan Batas Vertikal " / > <nl> + < Item id = " 6212 " name = " Modus baris " / > <nl> + < Item id = " 6213 " name = " Modus latar " / > <nl> + < Item id = " 6214 " name = " Aktifkan penyorotan baris aktif " / > <nl> + < / Scintillas > <nl> + < NewDoc title = " Dokumen Baru / Direktori Baku " > <nl> + < Item id = " 6401 " name = " Format " / > <nl> + < Item id = " 6402 " name = " Windows " / > <nl> + < Item id = " 6403 " name = " Unix " / > <nl> + < Item id = " 6404 " name = " Mac " / > <nl> + < Item id = " 6405 " name = " Enkode " / > <nl> + < Item id = " 6406 " name = " ANSI " / > <nl> + < Item id = " 6407 " name = " UTF - 8 tanpa BOM " / > <nl> + < Item id = " 6408 " name = " UTF - 8 " / > <nl> + < Item id = " 6409 " name = " UCS - 2 Big Endian " / > <nl> + < Item id = " 6410 " name = " UCS - 2 Little Endian " / > <nl> + < Item id = " 6411 " name = " Bahasa baku : " / > <nl> + < Item id = " 6413 " name = " Direktori Baku ( Buka / Simpan ) " / > <nl> + < Item id = " 6414 " name = " Ikuti dokumen aktif " / > <nl> + < Item id = " 6415 " name = " Ingat direktori terakhir " / > <nl> + < Item id = " 6419 " name = " Dokumen Baru " / > <nl> + < Item id = " 6420 " name = " Terapkan untuk berkas ANSI " / > <nl> + < / NewDoc > <nl> + < FileAssoc title = " Asosiasi Berkas " > <nl> + < Item id = " 4009 " name = " Ekst . didukung : " / > <nl> + < Item id = " 4010 " name = " Ekst . terdaftar : " / > <nl> + < / FileAssoc > <nl> + < LangMenu title = " Menu / Tab Bahasa " > <nl> + < Item id = " 6301 " name = " Pengaturan Tab " / > <nl> + < Item id = " 6302 " name = " Ganti dengan spasi " / > <nl> + < Item id = " 6303 " name = " Besar tab : " / > <nl> + < Item id = " 6505 " name = " Butir tersedia " / > <nl> + < Item id = " 6506 " name = " Butir nonaktif " / > <nl> + < Item id = " 6507 " name = " Menu bahasa ringkas " / > <nl> + < Item id = " 6508 " name = " Menu Bahasa " / > <nl> + < Item id = " 6510 " name = " Gunakan nilai baku " / > <nl> + < / LangMenu > <nl> + < Print title = " Pencetakan " > <nl> + < Item id = " 6601 " name = " Cetak nomor baris " / > <nl> + < Item id = " 6602 " name = " Opsi Warna " / > <nl> + < Item id = " 6603 " name = " YALIYAD " / > <nl> + < Item id = " 6604 " name = " Balikkan " / > <nl> + < Item id = " 6605 " name = " Hitam di atas putih " / > <nl> + < Item id = " 6606 " name = " Tanpa warna latar " / > <nl> + < Item id = " 6607 " name = " Pengaturan Margin ( Unit : mm ) " / > <nl> + < Item id = " 6612 " name = " Kiri " / > <nl> + < Item id = " 6613 " name = " Atas " / > <nl> + < Item id = " 6614 " name = " Kanan " / > <nl> + < Item id = " 6615 " name = " Bawah " / > <nl> + < Item id = " 6706 " name = " Tebal " / > <nl> + < Item id = " 6707 " name = " Miring " / > <nl> + < Item id = " 6708 " name = " Kepala " / > <nl> + < Item id = " 6709 " name = " Bagian kiri " / > <nl> + < Item id = " 6710 " name = " Bagian tengah " / > <nl> + < Item id = " 6711 " name = " Bagian kanan " / > <nl> + < Item id = " 6717 " name = " Tebal " / > <nl> + < Item id = " 6718 " name = " Miring " / > <nl> + < Item id = " 6719 " name = " Kaki " / > <nl> + < Item id = " 6720 " name = " Bagian kiri " / > <nl> + < Item id = " 6721 " name = " Bagian tengah " / > <nl> + < Item id = " 6722 " name = " Bagian kanan " / > <nl> + < Item id = " 6723 " name = " Tambahkan " / > <nl> + < Item id = " 6725 " name = " Variabel : " / > <nl> + < Item id = " 6728 " name = " Kepala and Kaki " / > <nl> + < / Print > <nl> + < MISC title = " Lain - lain " > <nl> + < Item id = " 6304 " name = " Riwayat Berkas Terakhir " / > <nl> + < Item id = " 6305 " name = " Jangan periksa saat dibuka " / > <nl> + < Item id = " 6306 " name = " Jumlah entri maks . : " / > <nl> + < Item id = " 6307 " name = " Aktifkan " / > <nl> + < Item id = " 6308 " name = " Ciutkan ke baki sistem " / > <nl> + < Item id = " 6309 " name = " Ingat sesi terakhir saat dibuka selanjutnya " / > <nl> + < Item id = " 6312 " name = " Deteksi Otomatis Status Berkas " / > <nl> + < Item id = " 6313 " name = " Perbarui diam - diam " / > <nl> + < Item id = " 6318 " name = " Pengaturan Tautan Dapat Diklik " / > <nl> + < Item id = " 6325 " name = " Gulir hingga baris terakhir setelah diperbarui " / > <nl> + < Item id = " 6319 " name = " Aktifkan " / > <nl> + < Item id = " 6320 " name = " Tanpa garis bawah " / > <nl> + < Item id = " 6322 " name = " Ekst . berkas sesi : " / > <nl> + < Item id = " 6323 " name = " Aktifkan pembaru otomatis Notepad + + " / > <nl> + < Item id = " 6324 " name = " Penukar Dokumen ( Ctrl + TAB ) " / > <nl> + < Item id = " 6326 " name = " Aktifkan penyorotan pintar " / > <nl> + < Item id = " 6329 " name = " Sorot Tag Cocokan " / > <nl> + < Item id = " 6327 " name = " Aktifkan " / > <nl> + < Item id = " 6328 " name = " Sorot atribut tag " / > <nl> + < Item id = " 6330 " name = " Sorot zona komentar / php / asp " / > <nl> + <nl> + < Item id = " 6331 " name = " Tampilkan nama berkas saja di bilah judul " / > <nl> + < Item id = " 6114 " name = " Aktifkan " / > <nl> + < Item id = " 6115 " name = " Indentasi otomatis " / > <nl> + < Item id = " 6117 " name = " Aktifkan perilaku MRU " / > <nl> + <nl> + < / MISC > <nl> + < Backup title = " Cadangan / Pelengkapan Otomatis " > <nl> + < Item id = " 6801 " name = " Cadangan " / > <nl> + < Item id = " 6315 " name = " Tidak ada " / > <nl> + < Item id = " 6316 " name = " Cadangan sederhana " / > <nl> + < Item id = " 6317 " name = " Cadangan lengkap " / > <nl> + < Item id = " 6804 " name = " Direktori Cadangan Kustom " / > <nl> + < Item id = " 6803 " name = " Direktori : " / > <nl> + < Item id = " 6807 " name = " Pelengkapan otomatis " / > <nl> + < Item id = " 6808 " name = " Aktifkan pelengkapan otomatis pada setiap masukan " / > <nl> + < Item id = " 6809 " name = " Pelengkapan fungsi " / > <nl> + < Item id = " 6810 " name = " Pelengkapan kata " / > <nl> + < Item id = " 6811 " name = " Dari " / > <nl> + < Item id = " 6813 " name = " karakter " / > <nl> + < Item id = " 6814 " name = " Nilai valid : 1 - 9 " / > <nl> + < Item id = " 6815 " name = " Bantuan parameter fungsi pada masukan " / > <nl> + < / Backup > <nl> + < / Preference > <nl> + < MultiMacro title = " Jalankan Makro Beberapa Kali " > <nl> + < Item id = " 1 " name = " Jalankan " / > <nl> + < Item id = " 2 " name = " Batal " / > <nl> + < Item id = " 8006 " name = " Makro untuk dijalankan : " / > <nl> + < Item id = " 8001 " name = " Jalankan " / > <nl> + < Item id = " 8005 " name = " kali " / > <nl> + < Item id = " 8002 " name = " Jalankan hingga EOL " / > <nl> + < / MultiMacro > <nl> + < Window title = " Jendela " > <nl> + < Item id = " 1 " name = " Aktifkan " / > <nl> + < Item id = " 2 " name = " Oke " / > <nl> + < Item id = " 7002 " name = " Simpan " / > <nl> + < Item id = " 7003 " name = " Tutup jendela " / > <nl> + < Item id = " 7004 " name = " Urutkan tab " / > <nl> + < / Window > <nl> + < ColumnEditor title = " Column Editor " > <nl> + < Item id = " 2023 " name = " Sisipan Teks " / > <nl> + < Item id = " 2033 " name = " Sisipan Angka " / > <nl> + < Item id = " 2030 " name = " Angka awal : " / > <nl> + < Item id = " 2031 " name = " Naikkan sebesar : " / > <nl> + < Item id = " 2035 " name = " Nol pada awal " / > <nl> + < Item id = " 2032 " name = " Format " / > <nl> + < Item id = " 2024 " name = " Dec " / > <nl> + < Item id = " 2025 " name = " Oct " / > <nl> + < Item id = " 2026 " name = " Hex " / > <nl> + < Item id = " 2027 " name = " Bin " / > <nl> + < Item id = " 1 " name = " Oke " / > <nl> + < Item id = " 2 " name = " Batal " / > <nl> + < / ColumnEditor > <nl> < / Dialog > <nl> < / Native - Langue > <nl> < / NotepadPlus > <nl> mmm a / PowerEditor / installer / nativeLang / russian . xml <nl> ppp b / PowerEditor / installer / nativeLang / russian . xml <nl> <nl> - < ? xml version = " 1 . 0 " encoding = " Windows - 1251 " ? > <nl> + < ? xml version = " 1 . 0 " encoding = " Windows - 1251 " ? > <nl> < NotepadPlus > <nl> - < Native - Langue name = " Ðóññêèé " filename = " russian . xml " > <nl> - < Menu > <nl> - < Main > <nl> - < ! - - Main Menu Entries - - > <nl> + < Native - Langue name = " Ðóññêèé " filename = " russian . xml " > <nl> + < Menu > <nl> + < Main > <nl> + < ! - - Ïåðåâîä : Äì . Ôåäîðîâ ( ê Np + + v_5 . 9 ) <nl> + Äîï . ïåðåâîä : À . Èðæàâñêèé ( ê Np + + v_5 . 9 . 6 . 1 ) <nl> + Ñîêðàùåíèÿ òåêñòà âûçâàíû ëèáî óäîáî ÷ èòàåìîñòüþ , ëèáî îòñóòñòâèåì ìåñòà ïðè ïðîðèñîâêå äèàëîãà , êîòîðîå óñòàíàâëèâàåòñÿ àâòîðîì . <nl> + Èíôî äëÿ òåõ êòî õî ÷ åò ÷ òî - òî ïîäïðàâèòü : ôàéë russian . xml ïåðåïèñûâàåò çàíîâî ôàéë nativelang . xml ïðè ñìåíå ÿçûêà . <nl> + <nl> + Èñïðàâëåíû ìíîãî ÷ èñëåííûå îøèáêè ñàéòîâñêîãî ïåðåâîäà . <nl> + Îñòàâëåíî ïîíÿòèå Ñèíòàêñèñ ÷ òîáû íå áûëî ïóòàíèöû ñî ñëîâîì ÿçûê . ( ïî Àíãë . ÿçûê ïðîãðàììèðîâàíèÿ ) <nl> + Ïîíÿòèå Êîììåíòàðèé ïðèâåäåíî â ñîîòâåòñòâèå ñ Âèêèïåäèåé . ( îäíî è ìíîãî - ñòðî ÷ íûé ) <nl> + Folder - ïååðåâåäåíî êàê òåêñò - áëîê ( ñîäðàë ó íåìöåâ ) , ïîòîìó ÷ òî ïàïêà êîíå ÷ íî íå çâó ÷ èò , ñøèâêà òîæå . <nl> + <nl> + Äîáàâëåíû ïóíêòû ( ì_Ïðàâêà / Ñïåö Âñòàâêà ) , îñòóñòâóþùèå â îðèãèíàëå Àíãë . ôàéëà , ïîñòàâëÿåìîãî äëÿ ïåðåâîäà <nl> + <nl> + Çàìå ÷ åííûå íåäîñòàòêè : <nl> + Íàñòðîéêè / Ñèíòàêñèñ_Òàáóëÿöèÿ / Íàñòðîéêà òàáóëÿöèè : íå ïðîðèñîâûâàåòñÿ ãàëêà id = " 6510 " name = " Èñï . çíà ÷ . ïî óìîë ÷ " <nl> + Îòëàä ÷ èê ñèíòàêñèñà ìîæåò âûçâàòü ïîëîìêó ïðîãè ( îíà áîëüøå íå îòêðîåòñÿ ) . Ñîâåò - óäàëèòå session . xml è çàðàáîòàåò . <nl> + - - > <nl> < Entries > <nl> - < Item id = " 0 " name = " & amp ; Ôàéë " / > <nl> - < Item id = " 1 " name = " Ï & amp ; ðàâêà " / > <nl> - < Item id = " 2 " name = " & amp ; Ïîèñê " / > <nl> - < Item id = " 3 " name = " & amp ; Âèä " / > <nl> - < Item id = " 4 " name = " & amp ; Êîäèðîâêè " / > <nl> - < Item id = " 5 " name = " & amp ; Ñèíòàêñèñ " / > <nl> - < Item id = " 6 " name = " & amp ; Îïöèè " / > <nl> - < Item id = " 7 " name = " & amp ; Ìàêðîñû " / > <nl> - < Item id = " 8 " name = " & amp ; Çàïóñê " / > <nl> - < Item idName = " Plugins " name = " Ï & amp ; ëàãèíû " / > <nl> - < Item idName = " Window " name = " Îê & amp ; íà " / > <nl> + < Item id = " 0 " name = " & amp ; Ôàéë " / > / / / Ãë . ìåíþ | & amp ; File <nl> + < Item id = " 1 " name = " Ï & amp ; ðàâêà " / > / / / Ãë . ìåíþ | & amp ; Edit <nl> + < Item id = " 2 " name = " & amp ; Ïîèñê " / > / / / Ãë . ìåíþ | & amp ; Search <nl> + < Item id = " 3 " name = " & amp ; Âèä " / > / / / Ãë . ìåíþ | & amp ; View <nl> + < Item id = " 4 " name = " & amp ; Êîäèðîâêà " / > / / / Ãë . ìåíþ | E & amp ; ncoding <nl> + < Item id = " 5 " name = " & amp ; Ñèíòàêñèñ " / > / / / Ãë . ìåíþ | & amp ; Language <nl> + < Item id = " 6 " name = " & amp ; Íàñòðîéêè " / > / / / Ãë . ìåíþ | Se & amp ; ttings <nl> + < Item id = " 7 " name = " & amp ; Ìàêðîñû " / > / / / Ãë . ìåíþ | Macro <nl> + < Item id = " 8 " name = " & amp ; Çàïóñê " / > / / / Ãë . ìåíþ | Run <nl> + < Item idName = " Plugins " name = " Ï & amp ; ëàãèíû " / > / / / Ãë . ìåíþ | Plugins <nl> + < Item idName = " Window " name = " & amp ; Îêíà " / > / / / Ãë . ìåíþ | Window <nl> < / Entries > <nl> - <nl> - < ! - - Sub Menu Entries - - > <nl> + < ! - - Ïîäìåíþ , posX = ¹ ãë . Ìåíþ , posY , Z = ¹ ïîçèöèè ñâåðõó ìåíþ - - > <nl> < SubEntries > <nl> - < Item posX = " 0 " posY = " 19 " name = " Íåäàâíèå ôàéëû " / > <nl> - < Item posX = " 1 " posY = " 9 " name = " Ñêîïèðîâàòü â áóôåð îáìåíà " / > <nl> - < Item posX = " 1 " posY = " 10 " name = " Îòñòóïû ( òàáóëÿöèÿ ) " / > <nl> - < Item posX = " 1 " posY = " 11 " name = " Ïðåîáðàçîâàòü ðåãèñòð " / > <nl> - < Item posX = " 1 " posY = " 12 " name = " Îïåðàöèè ñî ñòðîêàìè " / > <nl> - < Item posX = " 1 " posY = " 13 " name = " Äîáàâèòü / Óäàëèòü êîììåíòàðèé " / > <nl> - < Item posX = " 1 " posY = " 14 " name = " Àâòîçàâåðøåíèå " / > <nl> - < Item posX = " 1 " posY = " 15 " name = " Êîíâåðñèÿ Êîíöà Ñòðîêè " / > <nl> - < Item posX = " 1 " posY = " 16 " name = " Îïåðàöèè ñ Ïðîáåëàìè " / > <nl> - < Item posX = " 1 " posY = " 17 " name = " Ñïåöèàëüíàÿ Âñòàâêà " / > <nl> - < Item posX = " 2 " posY = " 16 " name = " Ïîìåòèòü âûäåëåííîå " / > <nl> - < Item posX = " 2 " posY = " 17 " name = " Óáðàòü Ïîìåòêè " / > <nl> - < Item posX = " 2 " posY = " 18 " name = " Ïåðåéòè ââåðõ " / > <nl> - < Item posX = " 2 " posY = " 19 " name = " Ïåðåéòè âíèç " / > <nl> - < Item posX = " 2 " posY = " 21 " name = " Óïðàâëåíèå Çàêëàäêàìè " / > <nl> - < Item posX = " 3 " posY = " 4 " name = " Îòîáðàæåíèå ñèìâîëîâ " / > <nl> - < Item posX = " 3 " posY = " 5 " name = " Ìàñøòàá " / > <nl> - < Item posX = " 3 " posY = " 6 " name = " Ïåðåìåñòèòü / Äóáëèðîâàòü äîêóìåíò " / > <nl> - < Item posX = " 3 " posY = " 16 " name = " Ñâåðíóòü óðîâåíü " / > <nl> - < Item posX = " 3 " posY = " 17 " name = " Ðàçâåðíóòü óðîâåíü " / > <nl> - < Item posX = " 3 " posY = " 21 " name = " Ïðîåêò " / > <nl> - < Item posX = " 4 " posY = " 5 " name = " Êîäèðîâêè " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 0 " name = " Àðàáñêèé " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 1 " name = " Áàëòèéñêèé " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 2 " name = " Êåëüòñêèé " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 3 " name = " Êèðèëëèöà " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 4 " name = " Öåíòðàëüíî - Åâðîïåéñêèé " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 5 " name = " Êèòàéñêèé " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 6 " name = " Âîñòî ÷ íî - Åâðîïåéñêèé " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 7 " name = " Ãðå ÷ åñêèé " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 8 " name = " Èâðèò " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 9 " name = " ßïîíñêèé " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 10 " name = " Êîðåéñêèé " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 11 " name = " Ñåâåðî - Åâðîïåéñêèé " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 12 " name = " Òàéñêèé " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 13 " name = " Òóðåöêèé " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 14 " name = " Çàïàäíî - Åâðîïåéñêèé " / > <nl> - < Item posX = " 4 " posY = " 5 " posZ = " 15 " name = " Âüåòíàìñêèé " / > <nl> - < Item posX = " 6 " posY = " 4 " name = " Èìïîðòèðîâàòü " / > <nl> + < Item posX = " 1 " posY = " 9 " name = " Êîïèðîâàòü â áóôåð îáìåíà " / > / / / Ïîäìåíþ Ïðàâêà | Copy to Clipboard <nl> + < Item posX = " 1 " posY = " 10 " name = " Îòñòóï ( òàáóëÿöèåé ) " / > / / / Ïîäìåíþ Ïðàâêà | Indent <nl> + < Item posX = " 1 " posY = " 11 " name = " Ðåãèñòð ( âûäåëåííîãî ) " / > / / / Ïîäìåíþ Ïðàâêà | Convert Case to <nl> + < Item posX = " 1 " posY = " 12 " name = " Ñòðîêè " / > / / / Ïîäìåíþ Ïðàâêà | Line Operations <nl> + < Item posX = " 1 " posY = " 13 " name = " Êîììåíòàðèé ( ó ÷ . ñèíòàêñèñ ) " / > / / / Ïîäìåíþ Ïðàâêà | Comment / Uncomment <nl> + < Item posX = " 1 " posY = " 14 " name = " Àâòîçàâåðøåíèå " / > / / / Ïîäìåíþ Ïðàâêà | Auto - Completion <nl> + < Item posX = " 1 " posY = " 15 " name = " Êîíåö còðîê ( âåñü ôàéë ) " / > / / / Ïîäìåíþ Ïðàâêà | EOL Conversion <nl> + < Item posX = " 1 " posY = " 16 " name = " Ïðîáåëû ( âåñü ôàéë ) " / > / / / Ïîäìåíþ Ïðàâêà | Blank Operations <nl> + < Item posX = " 1 " posY = " 17 " name = " Ñïåö âñòàâêà " / > / / / Ïîäìåíþ Ïðàâêà | Paste Special <nl> + < Item posX = " 2 " posY = " 16 " name = " Ïîìåòèòü öâåòîì âñå âõîæäåíèÿ " / > / / / Ïîäìåíþ Ïîèñê | Mark All <nl> + < Item posX = " 2 " posY = " 17 " name = " Ñáðîñ ïîìåòîê " / > / / / Ïîäìåíþ Ïîèñê | Unmark All <nl> + < Item posX = " 2 " posY = " 18 " name = " Ê ïîìåòêå ââåðõ " / > / / / Ïîäìåíþ Ïîèñê | Jump Up <nl> + < Item posX = " 2 " posY = " 19 " name = " Ê ïîìåòêå âíèç " / > / / / Ïîäìåíþ Ïîèñê | Jump Down <nl> + < Item posX = " 2 " posY = " 21 " name = " Çàêëàäêè " / > / / / Ïîäìåíþ Ïîèñê | Bookmark <nl> + < Item posX = " 3 " posY = " 4 " name = " Ïîêàç ñèìâîëîâ " / > / / / Ïîäìåíþ Âèä | Show Symbol <nl> + < Item posX = " 3 " posY = " 5 " name = " Ìàñøòàá " / > / / / Ïîäìåíþ Âèä | Zoom <nl> + < Item posX = " 3 " posY = " 6 " name = " Ïåðåìåñòèòü / äóáëèðîâàòü âêëàäêó " / > / / / Ïîäìåíþ Âèä | Move / Clone Current Document <nl> + < Item posX = " 3 " posY = " 16 " name = " Ñâåðíóòü óðîâåíü " / > / / / Ïîäìåíþ Âèä | Collapse Level <nl> + < Item posX = " 3 " posY = " 17 " name = " Ðàçâåðíóòü óðîâåíü " / > / / / Ïîäìåíþ Âèä | Uncollapse Level <nl> + < Item posX = " 4 " posY = " 5 " name = " Íàáîð ñèìâîëîâ ANSI " / > / / / Ïîäìåíþ Êîäèðîâêà | Character Set <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 0 " name = " Àðàáñêèé " / > / / / Ïîäìåíþ Êîäèðîâêà / Íàáîð ñèìâîëîâ | Arabic <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 1 " name = " Áàëòèéñêèé " / > / / / Ïîäìåíþ Êîäèðîâêà / Íàáîð ñèìâîëîâ | Baltic <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 2 " name = " Êåëüòñêèé " / > / / / Ïîäìåíþ Êîäèðîâêà / Íàáîð ñèìâîëîâ | Celtic <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 3 " name = " Êèðèëëèöà " / > / / / Ïîäìåíþ Êîäèðîâêà / Íàáîð ñèìâîëîâ | Cyrillic <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 4 " name = " Öåíòðàëüíî - Åâðîïåéñêèé " / > / / / Ïîäìåíþ Êîäèðîâêà / Íàáîð ñèìâîëîâ | Central European <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 5 " name = " Êèòàéñêèé " / > / / / Ïîäìåíþ Êîäèðîâêà / Íàáîð ñèìâîëîâ | Chinese <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 6 " name = " Âîñòî ÷ íî - Åâðîïåéñêèé " / > / / / Ïîäìåíþ Êîäèðîâêà / Íàáîð ñèìâîëîâ | Eastern European <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 7 " name = " Ãðå ÷ åñêèé " / > / / / Ïîäìåíþ Êîäèðîâêà / Íàáîð ñèìâîëîâ | Greek <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 8 " name = " Èâðèò " / > / / / Ïîäìåíþ Êîäèðîâêà / Íàáîð ñèìâîëîâ | Hebrew <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 9 " name = " ßïîíñêèé " / > / / / Ïîäìåíþ Êîäèðîâêà / Íàáîð ñèìâîëîâ | Japanese <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 10 " name = " Êîðåéñêèé " / > / / / Ïîäìåíþ Êîäèðîâêà / Íàáîð ñèìâîëîâ | Korean <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 11 " name = " Ñåâåðî - Åâðîïåéñêèé " / > / / / Ïîäìåíþ Êîäèðîâêà / Íàáîð ñèìâîëîâ | North European <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 12 " name = " Òàéñêèé " / > / / / Ïîäìåíþ Êîäèðîâêà / Íàáîð ñèìâîëîâ | Thai <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 13 " name = " Òóðåöêèé " / > / / / Ïîäìåíþ Êîäèðîâêà / Íàáîð ñèìâîëîâ | Turkish <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 14 " name = " Çàïàäíî - Åâðîïåéñêèé " / > / / / Ïîäìåíþ Êîäèðîâêà / Íàáîð ñèìâîëîâ | Western European <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 15 " name = " Âüåòíàìñêèé " / > / / / Ïîäìåíþ Êîäèðîâêà / Íàáîð ñèìâîëîâ | Vietnamese <nl> + < Item posX = " 6 " posY = " 4 " name = " Èìïîðò " / > / / / Ïîäìåíþ Óñòàíîâêè | Import <nl> < / SubEntries > <nl> - <nl> - < ! - - all menu item - - > <nl> < Commands > <nl> - < Item id = " 41001 " name = " Íîâûé " / > <nl> - < Item id = " 41002 " name = " Îòêðûòü " / > <nl> - < Item id = " 41003 " name = " Çàêðûòü " / > <nl> - < Item id = " 41004 " name = " Çàêðûòü âñå " / > <nl> - < Item id = " 41005 " name = " Çàêðûòü âñå , êðîìå àêòèâíîãî " / > <nl> - < Item id = " 41006 " name = " Ñîõðàíèòü " / > <nl> - < Item id = " 41007 " name = " Ñîõðàíèòü âñå " / > <nl> - < Item id = " 41008 " name = " Ñîõðàíèòü êàê . . . " / > <nl> - < Item id = " 41010 " name = " Ïå ÷ àòü . . . " / > <nl> - < Item id = " 1001 " name = " Ðàñïå ÷ àòàòü ! " / > <nl> - < Item id = " 41011 " name = " Âûõîä " / > <nl> - < Item id = " 41012 " name = " Çàãðóçèòü ñåññèþ . . . " / > <nl> - < Item id = " 41013 " name = " Ñîõðàíèòü ñåññèþ . . . " / > <nl> - < Item id = " 41014 " name = " Ïåðåçàãðóçèòü ñ äèñêà " / > <nl> - < Item id = " 41015 " name = " Ñîõðàíèòü êîïèþ êàê . . . " / > <nl> - < Item id = " 41016 " name = " Óäàëèòü ñ äèñêà " / > <nl> - < Item id = " 41017 " name = " Ïåðåèìåíîâàòü . . . " / > <nl> - < Item id = " 42001 " name = " Âûðåçàòü " / > <nl> - < Item id = " 42002 " name = " Êîïèðîâàòü " / > <nl> - < Item id = " 42003 " name = " Îòìåíà " / > <nl> - < Item id = " 42004 " name = " Ïîâòîð " / > <nl> - < Item id = " 42005 " name = " Âñòàâèòü " / > <nl> - < Item id = " 42006 " name = " Óäàëèòü " / > <nl> - < Item id = " 42007 " name = " Âûäåëèòü âñ ¸ " / > <nl> - < Item id = " 42008 " name = " Âñòàâèòü Òàáóëÿöèþ " / > <nl> - < Item id = " 42009 " name = " Óäàëèòü Òàáóëÿöèþ " / > <nl> - < Item id = " 42010 " name = " Äóáëèðîâàòü ñòðîêó " / > <nl> - < Item id = " 42012 " name = " Ðàçáèòü ñòðîêè " / > <nl> - < Item id = " 42013 " name = " Îáúåäèíèòü ñòðîêè " / > <nl> - < Item id = " 42014 " name = " Ïîäíÿòü òåêóùóþ ñòðîêó " / > <nl> - < Item id = " 42015 " name = " Îïóñòèòü òåêóùóþ ñòðîêó " / > <nl> - < Item id = " 42016 " name = " ÏÐÎÏÈÑÍÛÅ " / > <nl> - < Item id = " 42017 " name = " ñòðî ÷ íûå " / > <nl> - < Item id = " 42018 " name = " Ñòàðò çàïèñè " / > <nl> - < Item id = " 42019 " name = " Ñòîï çàïèñè " / > <nl> - < Item id = " 42021 " name = " Ïðîêðóòèòü çàïèñü " / > <nl> - < Item id = " 42022 " name = " Áëîêîâûé êîììåíòàðèé " / > <nl> - < Item id = " 42023 " name = " Ïîòîêîâûé êîììåíòàðèé " / > <nl> - < Item id = " 42024 " name = " Óáðàòü Çàìûêàþùèå Ïðîáåëû " / > <nl> - < Item id = " 42025 " name = " Ñîõðàíèòü çàïèñü ìàêðî . . . " / > <nl> - < Item id = " 42026 " name = " Òåêñò ñïðàâà Íàëåâî " / > <nl> - < Item id = " 42027 " name = " Òåêñò ñëåâà Íàïðàâî " / > <nl> - < Item id = " 42028 " name = " Òîëüêî ÷ òåíèå " / > <nl> - < Item id = " 42029 " name = " Êîïèðîâàòü Ïóòü è Èìÿ ôàéëà " / > <nl> - < Item id = " 42030 " name = " Êîïèðîâàòü Èìÿ ôàéëà " / > <nl> - < Item id = " 42031 " name = " Êîïèðîâàòü Ïóòü ê ôàéëó " / > <nl> - < Item id = " 42032 " name = " Çàïóñòèòü ìíîãîêðàòíî . . . " / > <nl> - < Item id = " 42033 " name = " Ñíÿòü ìåòêó & quot ; Òîëüêî ÷ òåíèå & quot ; " / > <nl> - < Item id = " 42035 " name = " Çàêîììåíòèðîâàòü áëîê " / > <nl> - < Item id = " 42036 " name = " Ðàñêîììåíòèðîâàòü áëîê " / > <nl> - < Item id = " 42037 " name = " Âûäåëåíèå Ñòîëáöîì . . . " / > <nl> - < Item id = " 42038 " name = " Âñòàâèòü ñîäåðæèìîå HTML " / > <nl> - < Item id = " 42039 " name = " Âñòàâèòü ñîäåðæèìîå RTF " / > <nl> - < Item id = " 42048 " name = " Êîïèðîâàòü Áèíàðíîå ñîäåðæèìîå " / > <nl> - < Item id = " 42049 " name = " Âûðåçàòü Áèíàðíîå ñîäåðæèìîå " / > <nl> - < Item id = " 42050 " name = " Âñòàâèòü Áèíàðíîå ñîäåðæèìîå " / > <nl> - < Item id = " 42042 " name = " Óáðàòü Çàãëàâíûå Ïðîáåëû " / > <nl> - < Item id = " 42043 " name = " Óáðàòü Çàãëàâíûå è Çàìûêàþùèå Ïðîáåëû " / > <nl> - < Item id = " 42044 " name = " Ïåðåíîñ Ñòðîêè â Ïðîáåë " / > <nl> - < Item id = " 42045 " name = " Ïðåäûäóùèå äâå îïöèè âìåñòå " / > <nl> - < Item id = " 42046 " name = " Òàáóëÿöèþ â Ïðîáåë " / > <nl> - < Item id = " 42047 " name = " Ïðîáåë â Òàáóëÿöèþ " / > <nl> - < Item id = " 42051 " name = " Ïàíåëü ñèìâîëîâ " / > <nl> - < Item id = " 42052 " name = " Èñòîðèÿ áóôåðà îáìåíà " / > <nl> - < Item id = " 43001 " name = " Ïîèñê . . . " / > <nl> - < Item id = " 43002 " name = " Èñêàòü äàëåå " / > <nl> - < Item id = " 43003 " name = " Çàìåíà . . . " / > <nl> - < Item id = " 43004 " name = " Ïåðåéòè ê . . . " / > <nl> - < Item id = " 43005 " name = " Çàêëàäêà ( ïîñòàâèòü / ñíÿòü ) " / > <nl> - < Item id = " 43006 " name = " Ñëåäóþùàÿ çàêëàäêà " / > <nl> - < Item id = " 43007 " name = " Ïðåäûäóùàÿ çàêëàäêà " / > <nl> - < Item id = " 43008 " name = " Óáðàòü âñå çàêëàäêè " / > <nl> - < Item id = " 43009 " name = " Ïåðåõîä ê êðàÿì ñîïîñòàâëåííûõ ñêîáîê " / > <nl> - < Item id = " 43010 " name = " Èñêàòü ðàíåå " / > <nl> - < Item id = " 43011 " name = " Ïîèñê ïî ìåðå íàáîðà . . . " / > <nl> - < Item id = " 43013 " name = " Íàéòè â ôàéëàõ " / > <nl> - < Item id = " 43014 " name = " Âûáðàòü è èñêàòü äàëåå ñ Ðåãèñòðîì " / > <nl> - < Item id = " 43015 " name = " Âûáðàòü è èñêàòü ðàíåå ñ Ðåãèñòðîì " / > <nl> - < Item id = " 43016 " name = " Âûäåëèòü âñå " / > <nl> - < Item id = " 43017 " name = " Ñíÿòü âûäåëåíèå " / > <nl> - < Item id = " 43018 " name = " Âûðåçàòü âñå ñòðîêè ñ çàêëàäêîé " / > <nl> - < Item id = " 43019 " name = " Êîïèðîâàòü âñå ñòðîêè ñ çàêëàäêîé " / > <nl> - < Item id = " 43020 " name = " Âñòàâèòü ( ñ çàìåíîé ) â ñòðîêè ñ çàêëàäêàìè " / > <nl> - < Item id = " 43021 " name = " Óäàëèòü âñå ñòðîêè ñ çàêëàäêîé " / > <nl> - < Item id = " 43022 " name = " Èñïîëüçóÿ 1é ñòèëü " / > <nl> - < Item id = " 43023 " name = " Óáðàòü 1é ñòèëü " / > <nl> - < Item id = " 43024 " name = " Èñïîëüçóÿ 2é ñòèëü " / > <nl> - < Item id = " 43025 " name = " Óáðàòü 2é ñòèëü " / > <nl> - < Item id = " 43026 " name = " Èñïîëüçóÿ 3é ñòèëü " / > <nl> - < Item id = " 43027 " name = " Óáðàòü 3é ñòèëü " / > <nl> - < Item id = " 43028 " name = " Èñïîëüçóÿ 4é ñòèëü " / > <nl> - < Item id = " 43029 " name = " Óáðàòü 4é ñòèëü " / > <nl> - < Item id = " 43030 " name = " Èñïîëüçóÿ 5é ñòèëü " / > <nl> - < Item id = " 43031 " name = " Óáðàòü 5é ñòèëü " / > <nl> - < Item id = " 43032 " name = " Óáðàòü âñå ñòèëè " / > <nl> - < Item id = " 43033 " name = " 1é ñòèëü " / > <nl> - < Item id = " 43034 " name = " 2é ñòèëü " / > <nl> - < Item id = " 43035 " name = " 3é ñòèëü " / > <nl> - < Item id = " 43036 " name = " 4é ñòèëü " / > <nl> - < Item id = " 43037 " name = " 5é ñòèëü " / > <nl> - < Item id = " 43038 " name = " Íàéòè ñòèëü " / > <nl> - < Item id = " 43039 " name = " 1é ñòèëü " / > <nl> - < Item id = " 43040 " name = " 2é ñòèëü " / > <nl> - < Item id = " 43041 " name = " 3é ñòèëü " / > <nl> - < Item id = " 43042 " name = " 4é ñòèëü " / > <nl> - < Item id = " 43043 " name = " 5é ñòèëü " / > <nl> - < Item id = " 43044 " name = " Íàéòè ñòèëü " / > <nl> - < Item id = " 43045 " name = " Îêíî ðåçóëüòàòà ïîèñêà " / > <nl> - < Item id = " 43046 " name = " Ñëåäóþùèå ðåçóëüòàòû ïîèñêà " / > <nl> - < Item id = " 43047 " name = " Ïðåäûäóùèå ðåçóëüòàòû ïîèñêà " / > <nl> - < Item id = " 43048 " name = " Âûáðàòü è èñêàòü äàëåå " / > <nl> - < Item id = " 43049 " name = " Âûáðàòü è èñêàòü ðàíåå " / > <nl> - < Item id = " 43050 " name = " Èíâåðòèðîâàòü ñòðîêè ñ çàêëàäêàìè " / > <nl> - < Item id = " 43051 " name = " Óäàëèòü âñå ñòðîêè áåç çàêëàäêè " / > <nl> - < Item id = " 43052 " name = " Íàéòè ñèìâîëû â äèàïàçîíå . . . " / > <nl> - < Item id = " 44009 " name = " Òåêñò âî âñå îêíî " / > <nl> - < Item id = " 44010 " name = " Ñâåðíóòü âñå áëîêè " / > <nl> - < Item id = " 44011 " name = " Ïîëüçîâàòåëüñêîå îïðåäåëåíèå " / > <nl> - < Item id = " 44019 " name = " Îòîáðàæàòü âñå ñèìâîëû " / > <nl> - < Item id = " 44020 " name = " Îòîáðàæàòü Îòñòóïû " / > <nl> - < Item id = " 44022 " name = " Ïåðåíîñ ñòðîê " / > <nl> - < Item id = " 44023 " name = " Êðóïíåå " / > <nl> - < Item id = " 44024 " name = " Ìåëü ÷ å " / > <nl> - < Item id = " 44025 " name = " Îòîáðàæàòü Ïðîáåëû è Òàáóëÿöèè " / > <nl> - < Item id = " 44026 " name = " Ñèìâîë Êîíåö Ñòðîêè " / > <nl> - < Item id = " 44029 " name = " Ðàçâåðíóòü âñå áëîêè " / > <nl> - < Item id = " 44030 " name = " Ñâåðíóòü òåêóùèé áëîê " / > <nl> - < Item id = " 44031 " name = " Ðàçâåðíóòü òåêóùèé áëîê " / > <nl> - < Item id = " 44032 " name = " Âî âåñü ýêðàí " / > <nl> - < Item id = " 44033 " name = " Âîññòàíîâèòü ìàñøòàá . . . " / > <nl> - < Item id = " 44034 " name = " Ïîâåðõ âñåõ îêîí " / > <nl> - < Item id = " 44035 " name = " Ñèíõðîíèç . âåðòèêàëüíóþ ïðîêðóòêó " / > <nl> - < Item id = " 44036 " name = " Ñèíõðîíèç . ãîðèçîíòàëüíóþ ïðîêðóòêó " / > <nl> - < Item id = " 44041 " name = " Îòîáðàæàòü ñèìâîë Ïåðåíîñ Ñòðîêè " / > <nl> - < Item id = " 44049 " name = " Èíôîðìàöèÿ î ôàéëå . . . " / > <nl> - < Item id = " 44072 " name = " Ñôîêóñèðîâàòüñÿ íà Äðóãîì Îêíå " / > <nl> - < Item id = " 44081 " name = " Ïàíåëü ïðîåêòà 1 " / > <nl> - < Item id = " 44082 " name = " Ïàíåëü ïðîåêòà 2 " / > <nl> - < Item id = " 44083 " name = " Ïàíåëü ïðîåêòà 3 " / > <nl> - < Item id = " 45001 " name = " Ïðåîáðàçîâàòü â Win - ôîðìàò " / > <nl> - < Item id = " 45002 " name = " Ïðåîáðàçîâàòü â UNIX - ôîðìàò " / > <nl> - < Item id = " 45003 " name = " Ïðåîáðàçîâàòü â MAC - ôîðìàò " / > <nl> - < Item id = " 45004 " name = " Êîäèðîâàòü â ANSI " / > <nl> - < Item id = " 45005 " name = " Êîäèðîâàòü â UTF - 8 " / > <nl> - < Item id = " 45006 " name = " Êîäèðîâàòü â UCS - 2 Big Endian " / > <nl> - < Item id = " 45007 " name = " Êîäèðîâàòü â UCS - 2 Little Endian " / > <nl> - < Item id = " 45008 " name = " Êîäèðîâàòü â UTF - 8 ( áåç BOM ) " / > <nl> - < Item id = " 45009 " name = " Ïðåîáðàçîâàòü â ANSI " / > <nl> - < Item id = " 45010 " name = " Ïðåîáðàçîâàòü â UTF - 8 áåç BOM " / > <nl> - < Item id = " 45011 " name = " Ïðåîáðàçîâàòü â UTF - 8 " / > <nl> - < Item id = " 45012 " name = " Ïðåîáðàçîâàòü â UCS - 2 Big Endian " / > <nl> - < Item id = " 45013 " name = " Ïðåîáðàçîâàòü â UCS - 2 Little Endian " / > <nl> - < Item id = " 10001 " name = " Ïåðåìåñòèòü â Äðóãîå Îêíî " / > <nl> - < Item id = " 10002 " name = " Äóáëèðîâàòü â Äðóãîå Îêíî " / > <nl> - < Item id = " 10003 " name = " Ïåðåìåñòèòü â Íîâûé Ýêçåìïëÿð " / > <nl> - < Item id = " 10004 " name = " Îòêðûòü â Íîâîì Ýêçåìïëÿðå " / > <nl> - < Item id = " 46001 " name = " Îïðåäåëåíèå ñòèëåé . . . " / > <nl> - < Item id = " 46080 " name = " Ñâîè Íàñòðîéêè " / > <nl> - < Item id = " 47000 " name = " Î ïðîãðàììå . . . " / > <nl> - < Item id = " 47001 " name = " Äîìàøíÿÿ ñòðàíèöà Notepad + + " / > <nl> - < Item id = " 47002 " name = " Ñòðàíèöà ïðîåêòà Notepad + + " / > <nl> - < Item id = " 47003 " name = " Ïîìîùü â Èíòåðíåò " / > <nl> - < Item id = " 47004 " name = " Ôîðóì " / > <nl> - < Item id = " 47005 " name = " Áîëüøå Ïëàãèíîâ " / > <nl> - < Item id = " 47006 " name = " Îáíîâèòü Notepad + + " / > <nl> - < Item id = " 47008 " name = " Ñïðàâêà " / > <nl> - < Item id = " 48005 " name = " Èìïîðòèðîâàòü Ïëàãèí ( û ) " / > <nl> - < Item id = " 48006 " name = " Èìïîðòèðîâàòü Òåìó ( û ) " / > <nl> - < Item id = " 48009 " name = " Ãîðÿ ÷ èå êëàâèøè . . . " / > <nl> - < Item id = " 48011 " name = " Íàñòðîéêè . . . " / > <nl> - < Item id = " 49000 " name = " Çàïóñê . . . " / > <nl> - < Item id = " 50000 " name = " Çàâåðøåíèå ôóíêöèé " / > <nl> - < Item id = " 50001 " name = " Çàâåðøåíèå ñëîâ " / > <nl> - < Item id = " 50002 " name = " Ïîäñêàçêà ïî ôóíêöèÿì " / > <nl> - < Item id = " 42034 " name = " Ðåäàêòîð ñòîëáöîâ . . . " / > <nl> - < Item id = " 44042 " name = " Ñïðÿòàòü âûáðàííûå ñòðîêè " / > <nl> - < Item id = " 42040 " name = " Îòêðûòü âñå íåäàâíèå ôàéëû " / > <nl> - < Item id = " 42041 " name = " Î ÷ èñòèòü ñïèñîê íåäàâíèõ ôàéëîâ " / > <nl> - < Item id = " 48016 " name = " Èçìåí . ãîð . êëàâ . / Óäàëèòü ìàêðî . . . " / > <nl> - < Item id = " 48017 " name = " Èçìåí . ãîð . êëàâ . / Óäàëèòü êîìàíäó . . . " / > <nl> - < Item id = " 48018 " name = " Ðåäàêò . Êîíòåêñòíîå Ìåíþ " / > <nl> - < Item id = " 46019 " name = " MS INI ôàéë " / > <nl> - < Item id = " 46015 " name = " MS - DOS ñòèëü " / > <nl> - < Item id = " 46016 " name = " Îáû ÷ íûé Òåêñò " / > <nl> - < Item id = " 46017 " name = " RC Resource ôàéë " / > <nl> + < ! - - ì_Ôàéë - - > <nl> + < Item id = " 41001 " name = " Íîâûé " / > / / / ì_Ôàéë | & amp ; New <nl> + < Item id = " 41002 " name = " Îòêðûòü " / > / / / ì_Ôàéë | & amp ; Open <nl> + < Item id = " 41014 " name = " Ïåðåçàãðóçèòü ñ äèñêà " / > / / / ì_Ôàéë | Reload from Disk <nl> + < Item id = " 41006 " name = " Ñîõðàíèòü èçìåíåíèÿ " / > / / / ì_Ôàéë | & amp ; Save <nl> + < Item id = " 41008 " name = " Ñîõðàíèòü êàê . . . " / > / / / ì_Ôàéë | Save & amp ; As . . . <nl> + < Item id = " 41015 " name = " Ñîõðàíèòü Êîïèþ êàê . . . " / > / / / ì_Ôàéë | Save a Copy As . . . <nl> + < Item id = " 41007 " name = " Ñîõðàíèòü âñ ¸ " / > / / / ì_Ôàéë | Sav & amp ; e All <nl> + < Item id = " 41017 " name = " Ïåðåèìåíîâàòü . . . " / > / / / ì_Ôàéë | Rename . . . <nl> + < Item id = " 41003 " name = " Çàêðûòü " / > / / / ì_Ôàéë | Close <nl> + < Item id = " 41004 " name = " Çàêðûòü âñ ¸ " / > / / / ì_Ôàéë | C & amp ; lose All <nl> + < Item id = " 41005 " name = " Çàêðûòü âñ ¸ , êðîìå àêòèâíîãî " / > / / / ì_Ôàéë | Close All BUT Current Document <nl> + < Item id = " 41016 " name = " Óäàëèòü ñ äèñêà " / > / / / ì_Ôàéë | Delete from Disk <nl> + < Item id = " 41012 " name = " Çàãðóçèòü ñåññèþ . . . " / > / / / ì_Ôàéë | Load Session . . . <nl> + < Item id = " 41013 " name = " Ñîõðàíèòü ñåññèþ . . . " / > / / / ì_Ôàéë | Save Session . . . <nl> + < Item id = " 41010 " name = "  ïå ÷ àòü . . . " / > / / / ì_Ôàéë | Print . . . <nl> + < Item id = " 1001 " name = " Ðàñïå ÷ àòàòü ! " / > / / / ì_Ôàéë | Print Now <nl> + < Item id = " 42040 " name = " Îòêðûòü âñå ïîñëåäíèå ôàéëû " / > / / / ì_Ôàéë | Open All Recent Files <nl> + < Item id = " 42041 " name = " Î ÷ èñòèòü ñïèñîê ïîñëåäíèõ ôàéëîâ " / > / / / ì_Ôàéë | Empty Recent Files List <nl> + < Item id = " 41011 " name = " Âûõîä " / > / / / ì_Ôàéë | E & amp ; xit <nl> + < ! - - ì_Ïðàâêà - - > <nl> + < Item id = " 42003 " name = " Îòìåíèòü " / > / / / ì_Ïðàâêà | & amp ; Undo <nl> + < Item id = " 42004 " name = " Âåðíóòü " / > / / / ì_Ïðàâêà | & amp ; Redo <nl> + < Item id = " 42001 " name = " Âûðåçàòü " / > / / / ì_Ïðàâêà | Cu & amp ; t <nl> + < Item id = " 42002 " name = " Êîïèðîâàòü " / > / / / ì_Ïðàâêà | & amp ; Copy <nl> + < Item id = " 42005 " name = " Âñòàâèòü " / > / / / ì_Ïðàâêà | & amp ; Paste <nl> + < Item id = " 42006 " name = " Óäàëèòü " / > / / / ì_Ïðàâêà | & amp ; Delete <nl> + < Item id = " 42007 " name = " Âûäåëèòü âñ ¸ " / > / / / ì_Ïðàâêà | Select A & amp ; ll <nl> + < Item id = " 42029 " name = " Ïîëíûé ïóòü ê ôàéëó " / > / / / ì_Ïðàâêà /  Áóôåð | Current File Path to Clipboard <nl> + < Item id = " 42030 " name = " Èìÿ ôàéëà " / > / / / ì_Ïðàâêà /  Áóôåð | Current Filename to Clipboard <nl> + < Item id = " 42031 " name = " Ïóòü ê ôàéëó " / > / / / ì_Ïðàâêà /  Áóôåð | Current Dir . Path to Clipboard <nl> + < Item id = " 42008 " name = " Óâåëè ÷ èòü îòñòóï " / > / / / ì_Ïðàâêà / Îòñòóï ( òàáóëÿöèåé ) | Increase Line Indent <nl> + < Item id = " 42009 " name = " Óìåíüøèòü îòñòóï " / > / / / ì_Ïðàâêà / Îòñòóï ( òàáóëÿöèåé ) | Decrease Line Indent <nl> + < Item id = " 42016 " name = " âñå ÏÐÎÏÈÑÍÛÅ " / > / / / ì_Ïðàâêà / Ðåãèñòð ( âûäåëåíîãî ) | UPPERCASE <nl> + < Item id = " 42017 " name = " âñå ñòðî ÷ íûå " / > / / / ì_Ïðàâêà / Ðåãèñòð ( âûäåëåíîãî ) | lowercase <nl> + < Item id = " 42010 " name = " Äóáëèðîâàòü ( íèæå ) " / > / / / ì_Ïðàâêà / Ñòðîêè | Duplicate Current Line <nl> + < Item id = " 42012 " name = " Ðàçáèòü ( ïî øèðèíå îêíà ) " / > / / / ì_Ïðàâêà / Ñòðîêè | Split Lines <nl> + < Item id = " 42013 " name = " Îáúåäèíèòü " / > / / / ì_Ïðàâêà / Ñòðîêè | Join Lines <nl> + < Item id = " 42014 " name = " Ñìåñòèòü ââåðõ " / > / / / ì_Ïðàâêà / Ñòðîêè | Move Up Current Line <nl> + < Item id = " 42015 " name = " Ñìåñòèòü âíèç " / > / / / ì_Ïðàâêà / Ñòðîêè | Move Down Current Line <nl> + < Item id = " 42022 " name = " Îäíî - ñòðî ÷ . êîììåíò . ( Âêë / Óäàë ) " / > / / / ì_Ïðàâêà / Êîììåíò . ( ñ ó ÷ . Ñèíòàêñ ) | Toggle Block Comment <nl> + < Item id = " 42035 " name = " Îäíî - ñòðî ÷ . êîììåíò . ( Äîáàâ . ) " / > / / / ì_Ïðàâêà / Êîììåíò . ( ñ ó ÷ . Ñèíòàêñ ) | Block Comment <nl> + < Item id = " 42036 " name = " Îäíî - ñòðî ÷ . êîììåíò . ( Óäàë . ) " / > / / / ì_Ïðàâêà / Êîììåíò . ( ñ ó ÷ . Ñèíòàêñ ) | Block Uncomment <nl> + < Item id = " 42023 " name = " Ìíîãî - ñòðî ÷ . êîììåíò . ( Âêë . ) " / > / / / ì_Ïðàâêà / Êîììåíò . ( ñ ó ÷ . Ñèíòàêñ ) | Stream Comment <nl> + < Item id = " 50000 " name = " Ôóíêöèé " / > / / / ì_Ïðàâêà / Àâòîçàâåðøåíèå | Function Completion <nl> + < Item id = " 50001 " name = " Ñëîâ " / > / / / ì_Ïðàâêà / Àâòîçàâåðøåíèå | Word Completion <nl> + < Item id = " 50002 " name = " Ïîäñêàçêà ïî ôóíêöèÿì " / > / / / ì_Ïðàâêà / Àâòîçàâåðøåíèå | Function Parameters Hint <nl> + < Item id = " 45001 " name = " â Windows - ôîðìàò ( CRLF ) " / > / / / ì_Ïðàâêà / Êîíåö ñòðîê ( âåñü ôàéë ) | Convert to Windows Format <nl> + < Item id = " 45002 " name = " â UNIX - ôîðìàò ( LF ) " / > / / / ì_Ïðàâêà / Êîíåö ñòðîê ( âåñü ôàéë ) | Convert to UNIX Format <nl> + < Item id = " 45003 " name = " â MAC - ôîðìàò ( CR ) " / > / / / ì_Ïðàâêà / Êîíåö ñòðîê ( âåñü ôàéë ) | Convert to MAC Format <nl> + < Item id = " 42024 " name = " Óáðàòü êîíöåâûå Ïðîáåëû " / > / / / ì_Ïðàâêà / Ïðîáåëû ( âåñü ôàéë ) | Trim Trailing Space <nl> + < Item id = " 42042 " name = " Óáðàòü íà ÷ àëüíûå Ïðîáåëû " / > / / / ì_Ïðàâêà / Ïðîáåëû ( âåñü ôàéë ) | Trim Leading Space <nl> + < Item id = " 42043 " name = " Óáðàòü íà ÷ àëüíûå è êîíöåâûå Ïðîáåëû " / > / / / ì_Ïðàâêà / Ïðîáåëû ( âåñü ôàéë ) | Trim Leading and Trailing Space <nl> + < Item id = " 42044 " name = " Ñèìâîëû êîíöà ñòðîê â Ïðîáåë " / > / / / ì_Ïðàâêà / Ïðîáåëû ( âåñü ôàéë ) | EOL to Space <nl> + < Item id = " 42045 " name = " Óäàëèòü ëèøíèå Ïðîáåëû è Ñèìâîëû êîíöà ñòðîê " / > / / / ì_Ïðàâêà / Ïðîáåëû ( âåñü ôàéë ) | Remove Unnecessary Blank and EOL <nl> + < Item id = " 42046 " name = " Òàáóëÿöèþ â Ïðîáåë " / > / / / ì_Ïðàâêà / Ïðîáåëû ( âåñü ôàéë ) | TAB to Space <nl> + < Item id = " 42047 " name = " Ïðîáåë â Òàáóëÿöèþ " / > / / / ì_Ïðàâêà / Ïðîáåëû ( âåñü ôàéë ) | Space to TAB <nl> + < Item id = " 42038 " name = " Âñòàâèòü êàê HTML " / > / / / ì_Ïðàâêà / Ñïåö Âñòàâêà | Paste HTML Content <nl> + < Item id = " 42039 " name = " Âñòàâèòü êàê RTF " / > / / / ì_Ïðàâêà / Ñïåö Âñòàâêà | Paste RTF Content <nl> + < Item id = " 42048 " name = " Êîïèðîâàòü êàê Äâîè ÷ íûé " / > / / / ì_Ïðàâêà / Ñïåö Âñòàâêà | Copy Binary Content <nl> + < Item id = " 42049 " name = " Âûðåçàòü êàê Äâîè ÷ íûé " / > / / / ì_Ïðàâêà / Ñïåö Âñòàâêà | Cut Binary Content <nl> + < Item id = " 42050 " name = " Âñòàâèòü êàê Äâîè ÷ íûé " / > / / / ì_Ïðàâêà / Ñïåö Âñòàâêà | Paste Binary Content <nl> + < Item id = " 42037 " name = " Ðåæèì Êîëîíêè . . . " / > / / / ì_Ïðàâêà | Column Mode . . . <nl> + < Item id = " 42034 " name = " Ðåäàêòîð Êîëîíêè . . . " / > / / / ì_Ïðàâêà | Column Editor . . . <nl> + < Item id = " 42028 " name = " Ðåæèì Òîëüêî ÷ òåíèå " / > / / / ì_Ïðàâêà | Set Read - Only <nl> + < Item id = " 42033 " name = " Ñíÿòü àòðèáóò & quot ; Òîëüêî ÷ òåíèå & quot ; " / > / / / ì_Ïðàâêà | Clear Read - Only Flag <nl> + < ! - - ì_Ïîèñê - - > <nl> + < Item id = " 43001 " name = " Íàéòè . . . " / > / / / ì_Ïîèñê | & amp ; Find . . . <nl> + < Item id = " 43013 " name = " Íàéòè â ôàéëàõ " / > / / / ì_Ïîèñê | Find in Files <nl> + < Item id = " 43002 " name = " Íàéòè ñëåäóþùåå " / > / / / ì_Ïîèñê | Find & amp ; Next <nl> + < Item id = " 43010 " name = " Íàéòè ïðåäûäóùåå " / > / / / ì_Ïîèñê | Find Previous <nl> + < Item id = " 43048 " name = " Âûäåëèòü è íàéòè ñëåäóùåå " / > / / / ì_Ïîèñê | Select and Find Next <nl> + < Item id = " 43049 " name = " Âûäåëèòü è íàéòè ïðåäûäóùåå " / > / / / ì_Ïîèñê | Select and Find Previous <nl> + < Item id = " 43014 " name = " Íàéòè Ñëåäóù . ( ïî âûäåë , íîí - ñòîï , ñ ó ÷ . ðåã ) " / > / / / ì_Ïîèñê | Find ( Volatile ) Next <nl> + < Item id = " 43015 " name = " Íàéòè Ïðåäûä . ( ïî âûäåë , íîí - ñòîï , ñ ó ÷ . ðåã ) " / > / / / ì_Ïîèñê | Find ( Volatile ) Previous <nl> + < Item id = " 43003 " name = " Çàìåíà . . . " / > / / / ì_Ïîèñê | Replace . . . <nl> + < Item id = " 43011 " name = " Ïîêàçàòü ñòðîêó ïîèñêà . . . " / > / / / ì_Ïîèñê | & amp ; Incremental Search <nl> + < Item id = " 43045 " name = " Ïîêàçàòü îêíî ðåçóëüòàòà ïîèñêà " / > / / / ì_Ïîèñê | Search Results Window <nl> + < Item id = " 43046 " name = " Ê ñëåäóþùåìó ðåçóëüòàòó " / > / / / ì_Ïîèñê | Next Search Result <nl> + < Item id = " 43047 " name = " Ê ïðåäûäóùåìó ðåçóëüòàòó " / > / / / ì_Ïîèñê | Previous Search Result <nl> + < Item id = " 43004 " name = " Ïåðåéòè ê . . . " / > / / / ì_Ïîèñê | Go to . . . <nl> + < Item id = " 43009 " name = " Ïåðåéòè ê ïàðíîé ñêîáêå " / > / / / ì_Ïîèñê | Go to Matching Brace <nl> + < Item id = " 43022 " name = " Ïîìåòèòü 1ì ñòèëåì ( áèðþçà ) " / > / / / ì_Ïîèñê / Ïîìåòèòü öâåòîì âñå âõîæäåíèÿ | Using 1st Style <nl> + < Item id = " 43024 " name = " Ïîìåòèòü 2ì ñòèëåì ( îðàíæ ) " / > / / / ì_Ïîèñê / Ïîìåòèòü öâåòîì âñå âõîæäåíèÿ | Using 2nd Style <nl> + < Item id = " 43026 " name = " Ïîìåòèòü 3ì ñòèëåì ( ñåðûé ) " / > / / / ì_Ïîèñê / Ïîìåòèòü öâåòîì âñå âõîæäåíèÿ | Using 3rd Style <nl> + < Item id = " 43028 " name = " Ïîìåòèòü 4ì ñòèëåì ( ôèîëåò ) " / > / / / ì_Ïîèñê / Ïîìåòèòü öâåòîì âñå âõîæäåíèÿ | Using 4th Style <nl> + < Item id = " 43030 " name = " Ïîìåòèòü 5ì ñòèëåì ( çåë ¸ íûé ) " / > / / / ì_Ïîèñê / Ïîìåòèòü öâåòîì âñå âõîæäåíèÿ | Using 5th Style <nl> + < Item id = " 43023 " name = " Óáðàòü 1é ñòèëü ( áèðþçà ) " / > / / / ì_Ïîèñê / Óáðàòü Ïîìåòêè | Clear 1st Style <nl> + < Item id = " 43025 " name = " Óáðàòü 2é ñòèëü ( îðàíæ ) " / > / / / ì_Ïîèñê / Óáðàòü Ïîìåòêè | Clear 2nd Style <nl> + < Item id = " 43027 " name = " Óáðàòü 3é ñòèëü ( ñåðûé ) " / > / / / ì_Ïîèñê / Óáðàòü Ïîìåòêè | Clear 3rd Style <nl> + < Item id = " 43029 " name = " Óáðàòü 4é ñòèëü ( ôèîëåò ) " / > / / / ì_Ïîèñê / Óáðàòü Ïîìåòêè | Clear 4th Style <nl> + < Item id = " 43031 " name = " Óáðàòü 5é ñòèëü ( çåë ¸ íûé ) " / > / / / ì_Ïîèñê / Óáðàòü Ïîìåòêè | Clear 5th Style <nl> + < Item id = " 43032 " name = " Óáðàòü âñå ñòèëè " / > / / / ì_Ïîèñê / Óáðàòü Ïîìåòêè | Clear All Styles <nl> + < Item id = " 43033 " name = " ñòèëü 1 ( áèðþçà ) " / > / / / ì_Ïîèñê / Ââåðõ ê Ïîìåòêå | 1st style <nl> + < Item id = " 43034 " name = " ñòèëü 2 ( îðàíæ ) " / > / / / ì_Ïîèñê / Ââåðõ ê Ïîìåòêå | 2nd style <nl> + < Item id = " 43035 " name = " ñòèëü 3 ( ñåðûé ) " / > / / / ì_Ïîèñê / Ââåðõ ê Ïîìåòêå | 3rd style <nl> + < Item id = " 43036 " name = " ñòèëü 4 ( ôèîëåò ) " / > / / / ì_Ïîèñê / Ââåðõ ê Ïîìåòêå | 4th style <nl> + < Item id = " 43037 " name = " ñòèëü 5 ( çåë ¸ íûé ) " / > / / / ì_Ïîèñê / Ââåðõ ê Ïîìåòêå | 5th style <nl> + < Item id = " 43038 " name = " ñòèëü ' Ïîìåòèòü ' ( êðàñíûé ) " / > / / / ì_Ïîèñê / Ââåðõ ê Ïîìåòêå | Find style <nl> + < Item id = " 43039 " name = " ñòèëü 1 ( áèðþçà ) " / > / / / ì_Ïîèñê / Âíèç ê Ïîìåòêå | 1st style <nl> + < Item id = " 43040 " name = " ñòèëü 2 ( îðàíæ ) " / > / / / ì_Ïîèñê / Âíèç ê Ïîìåòêå | 2nd style <nl> + < Item id = " 43041 " name = " ñòèëü 3 ( ñåðûé ) " / > / / / ì_Ïîèñê / Âíèç ê Ïîìåòêå | 3rd style <nl> + < Item id = " 43042 " name = " ñòèëü 4 ( ôèîëåò ) " / > / / / ì_Ïîèñê / Âíèç ê Ïîìåòêå | 4th style <nl> + < Item id = " 43043 " name = " ñòèëü 5 ( çåë ¸ íûé ) " / > / / / ì_Ïîèñê / Âíèç ê Ïîìåòêå | 5th style <nl> + < Item id = " 43044 " name = " ñòèëü ' Ïîìåòèòü ' ( êðàñíûé ) " / > / / / ì_Ïîèñê / Âíèç ê Ïîìåòêå | Find style <nl> + < Item id = " 43005 " name = " Ïîñòàâèòü / ñíÿòü Çàêëàäêó " / > / / / ì_Ïîèñê / Çàêëàäêè | Toggle Bookmark <nl> + < Item id = " 43006 " name = " Ê ñëåäóþùåé Çàêëàäêå " / > / / / ì_Ïîèñê / Çàêëàäêè | Next Bookmark <nl> + < Item id = " 43007 " name = " Ê ïðåäûäóùåé Çàêëàäêå " / > / / / ì_Ïîèñê / Çàêëàäêè | Previous Bookmark <nl> + < Item id = " 43008 " name = " Óáðàòü âñå Çàêëàäêè " / > / / / ì_Ïîèñê / Çàêëàäêè | Clear All Bookmarks <nl> + < Item id = " 43018 " name = " âñå ñòðîêè c çàêë : ÂÛÐåçàòü " / > / / / ì_Ïîèñê / Çàêëàäêè | Cut Bookmarked Lines <nl> + < Item id = " 43019 " name = " âñå ñòðîêè c çàêë : ÊÎÏèðîâàòü " / > / / / ì_Ïîèñê / Çàêëàäêè | Copy Bookmarked Lines <nl> + < Item id = " 43020 " name = " âñå ñòðîêè c çàêë : ÇÀÌåíèòü Áóôåðîì " / > / / / ì_Ïîèñê / Çàêëàäêè | Paste to ( Replace ) Bookmarked Lines <nl> + < Item id = " 43021 " name = " âñå ñòðîêè c çàêë : ÓÄÀËèòü " / > / / / ì_Ïîèñê / Çàêëàäêè | Delete Bookmarked Lines <nl> + < Item id = " 43051 " name = " âñå ñòðîêè ÁÅÇ çàêë : ÓÄÀËèòü " / > / / / ì_Ïîèñê / Çàêëàäêè | Remove Unmarked Lines <nl> + < Item id = " 43050 " name = " Èíâåðòèðîâàòü Çàêëàäêè â ñòðîêàõ " / > / / / ì_Ïîèñê / Çàêëàäêè | Inverse Bookmark <nl> + < ! - - ì_Âèä - - > <nl> + < Item id = " 44034 " name = " Ïîâåðõ âñåõ îêîí " / > / / / ì_Âèä | Always on Top <nl> + < Item id = " 44032 " name = " Âî âåñü ýêðàí " / > / / / ì_Âèä | Toggle Full Screen Mode <nl> + < Item id = " 44009 " name = " Òîëüêî Òåêñò ( âî âñ ¸ îêíî Np + + ) " / > / / / ì_Âèä | Post - It <nl> + < Item id = " 44025 " name = " Îòîáðàæàòü Ïðîáåëû è Òàáóëÿöèè " / > / / / ì_Âèä / Ïîêàç Ñèìâîëîâ | Show White Space and TAB <nl> + < Item id = " 44026 " name = " Îòîáðàæàòü cèìâîëû Êîíöà ñòðîêè " / > / / / ì_Âèä / Ïîêàç Ñèìâîëîâ | Show End of Line <nl> + < Item id = " 44019 " name = " Îòîáðàæàòü Âñå ñèìâîëû " / > / / / ì_Âèä / Ïîêàç Ñèìâîëîâ | Show All Characters <nl> + < Item id = " 44020 " name = " Îòîáðàæàòü Îòñòóïû " / > / / / ì_Âèä / Ïîêàç Ñèìâîëîâ | Show Indent Guide <nl> + < Item id = " 44041 " name = " Îòîáðàæàòü ñèìâîë Ïåðåíîñà ñòðîêè " / > / / / ì_Âèä / Ïîêàç Ñèìâîëîâ | Show Wrap Symbol <nl> + < Item id = " 44023 " name = " Êðóïíåå ( Ctrl + ÊîëåñîÂíèç ) " / > / / / ì_Âèä / Ìàñøòàá | Zoom & amp ; In Ctrl + Mouse Wheel Up <nl> + < Item id = " 44024 " name = " Ìåëü ÷ å ( Ctrl + ÊîëåñîÂâåðõ ) " / > / / / ì_Âèä / Ìàñøòàá | Zoom & amp ; Out Ctrl + Mouse Wheel Down <nl> + < Item id = " 44033 " name = " Âîññòàíîâèòü ìàñøòàá . . . " / > / / / ì_Âèä / Ìàñøòàá | Restore Default Zoom <nl> + < Item id = " 10001 " name = " Ïåðåìåñòèòü â äðóãîå îêíî " / > / / / ì_Âèä / Ïåðåìåñòèòü / Äóáëèðîâàòü Âêëàäêó | Move to Other View <nl> + < Item id = " 10002 " name = " Äóáëèðîâàòü â äðóãîì îêíå " / > / / / ì_Âèä / Ïåðåìåñòèòü / Äóáëèðîâàòü Âêëàäêó | Clone to Other View <nl> + < Item id = " 10003 " name = " Ïåðåìåñòèòü ( â íîâûé ýêçåìëÿð Np + + ) " / > / / / ì_Âèä / Ïåðåìåñòèòü / Äóáëèðîâàòü Âêëàäêó | Move to New Instance <nl> + < Item id = " 10004 " name = " Îòêðûòü ( â íîâîì ýêçåìïëÿðå Np + + ) " / > / / / ì_Âèä / Ïåðåìåñòèòü / Äóáëèðîâàòü Âêëàäêó | Open in New Instance <nl> + < Item id = " 44022 " name = " Ïåðåíîñ ñòðîê " / > / / / ì_Âèä | Wrap <nl> + < Item id = " 44072 " name = " Ñôîêóñèðîâàòüñÿ íà äðóãîå îêíî " / > / / / ì_Âèä | Focus on Another View <nl> + < Item id = " 44042 " name = " Ñïðÿòàòü âûäåëåííûå ñòðîêè " / > / / / ì_Âèä | Hide Lines <nl> + < Item id = " 44011 " name = " Çàäàòü ïîäñâåòêó ñèíòàêñèñà . . . " / > / / / ì_Âèä | User - Defined Dialogue . . . <nl> + < Item id = " 44010 " name = " Ñâåðíóòü âñå óðîâíè " / > / / / ì_Âèä | Fold All <nl> + < Item id = " 44029 " name = " Ðàçâåðíóòü âñå óðîâíè " / > / / / ì_Âèä | Unfold All <nl> + < Item id = " 44030 " name = " Ñâåðíóòü òåêóùèé áëîê " / > / / / ì_Âèä | Collapse Current Level <nl> + < Item id = " 44031 " name = " Ðàçâåðíóòü òåêóùèé áëîê " / > / / / ì_Âèä | Uncollapse Current Level <nl> + < Item id = " 44049 " name = " Ðåçþìå . . . " / > / / / ì_Âèä | Summary . . . <nl> + < Item id = " 44035 " name = " Ñèíõð . âåðòèêàëüíóþ ïðîêðóòêó " / > / / / ì_Âèä | Synchronise Vertical Scrolling <nl> + < Item id = " 44036 " name = " Ñèíõð . ãîðèçîíòàëüíóþ ïðîêðóòêó " / > / / / ì_Âèä | Synchronise Horizontal Scrolling <nl> + < Item id = " 42026 " name = " Òåêñò ñïðàâà - íàëåâî " / > / / / ì_Âèä | Text Direction RTL <nl> + < Item id = " 42027 " name = " Òåêñò ñëåâà - íàïðàâî " / > / / / ì_Âèä | Text Direction LTR <nl> + < ! - - ì_Êîäèðîâêè - - > <nl> + < Item id = " 45004 " name = " ANSI " / > / / / ì_Êîäèðîâêà | Encode in ANSI <nl> + < Item id = " 45008 " name = " UTF - 8 ( áåç BOM ) " / > / / / ì_Êîäèðîâêà | Encode in UTF - 8 without BOM <nl> + < Item id = " 45005 " name = " UTF - 8 " / > / / / ì_Êîäèðîâêà | Encode in UTF - 8 <nl> + < Item id = " 45006 " name = " UCS - 2 Big Endian " / > / / / ì_Êîäèðîâêà | Encode in UCS - 2 Big Endian <nl> + < Item id = " 45007 " name = " UCS - 2 Little Endian " / > / / / ì_Êîäèðîâêà | Encode in UCS - 2 Little Endian <nl> + < Item id = " 45009 " name = " Ïðåîáðàçîâàòü â ANSI " / > / / / ì_Êîäèðîâêà | Convert to ANSI <nl> + < Item id = " 45010 " name = " Ïðåîáðàçîâàòü â UTF - 8 áåç BOM " / > / / / ì_Êîäèðîâêà | Convert to UTF - 8 without BOM <nl> + < Item id = " 45011 " name = " Ïðåîáðàçîâàòü â UTF - 8 " / > / / / ì_Êîäèðîâêà | Convert to UTF - 8 <nl> + < Item id = " 45012 " name = " Ïðåîáðàçîâàòü â UCS - 2 Big Endian " / > / / / ì_Êîäèðîâêà | Convert to UCS - 2 Big Endian <nl> + < Item id = " 45013 " name = " Ïðåîáðàçîâàòü â UCS - 2 Little Endian " / > / / / ì_Êîäèðîâêà | Convert to UCS - 2 Little Endian <nl> + < ! - - ì_Ñèíòàêñèñ - - > <nl> + < Item id = " 46019 " name = " MS INI - ôàéë " / > / / / ì_Ñèíòàêñèñ | MS INI file <nl> + < Item id = " 46015 " name = " MS - DOS ñòèëü " / > / / / ì_Ñèíòàêñèñ | MS - DOS Style <nl> + < Item id = " 46016 " name = " Îáû ÷ íûé òåêñò " / > / / / ì_Ñèíòàêñèñ | Normal Text <nl> + < Item id = " 46017 " name = " Ôàéë ðåñóðñà " / > / / / ì_Ñèíòàêñèñ | Resource file <nl> + < Item id = " 46080 " name = " Ïîëüçîâàòåëÿ " / > / / / ì_Ñèíòàêñèñ | User - Defined <nl> + < ! - - ì_Íàñòðîéêè - - > <nl> + < Item id = " 48011 " name = " Êîíôèãóðàöèÿ . . . " / > / / / ì_Óñòàíîâêè | Preferences . . . <nl> + < Item id = " 46001 " name = " Ñòèëü . . . " / > / / / ì_Óñòàíîâêè | Style Configurator . . . <nl> + < Item id = " 48009 " name = " Ãîðÿ ÷ èå êëàâèøè . . . " / > / / / ì_Óñòàíîâêè | Shortcut Mapper . . . <nl> + < Item id = " 48005 " name = " Èìïîðò Ïëàãèíîâ " / > / / / ì_Óñòàíîâêè / Èìïîðòèðîâàòü | Import Plugin ( s ) . . . <nl> + < Item id = " 48006 " name = " Èìïîðò Òåì " / > / / / ì_Óñòàíîâêè / Èìïîðòèðîâàòü | Import Theme ( s ) . . . <nl> + < Item id = " 48018 " name = " Ðåäàêò . contextMenu . xml " / > / / / ì_Óñòàíîâêè | Edit Popup ContextMenu <nl> + < ! - - ì_Ìàêðîñû - - > <nl> + < Item id = " 42018 " name = " Ñòàðò çàïèñè " / > / / / ì_Ìàêðîñû | & amp ; Start Recording <nl> + < Item id = " 42019 " name = " Ñòîï çàïèñè " / > / / / ì_Ìàêðîñû | & amp ; Stop Recording <nl> + < Item id = " 42021 " name = " Ïðîêðóòèòü çàïèñàííûé Ìàêðîñ " / > / / / ì_Ìàêðîñû | & amp ; Playback <nl> + < Item id = " 42025 " name = " Ñîõðàíèòü çàïèñàííûé Ìàêðîñ " / > / / / ì_Ìàêðîñû | Save Currently Recorded Macro <nl> + < Item id = " 42032 " name = " Çàïóñê Ìàêðîñà ìíîãîêðàòíî . . . " / > / / / ì_Ìàêðîñû | Run a Macro Multiple Times . . . <nl> + < Item id = " 48016 " name = " Èçìåíèòü ãîð . êëàâèøó / Óäàëèòü ìàêðîñ . . . " / > / / / ì_Ìàêðîñû | Modify Shortcut / Delete Macro . . . <nl> + < ! - - ì_Çàïóñê - - > <nl> + < Item id = " 49000 " name = " Çàïóñê ïðîãðàììû . . . " / > / / / ì_Çàïóñê | & amp ; Run . . . <nl> + < Item id = " 48017 " name = " Èçìåíèòü ãîð . êëàâèøó / Óäàëèòü êîìàíäó . . . " / > / / / ì_Çàïóñê | Modify Shortcut / Delete Command . . . <nl> + < ! - - ì_Ñïðàâêà - - > <nl> + < Item id = " 47008 " name = " Ñïðàâêà " / > / / / ì_Ñïðàâêà | Help Contents <nl> + < Item id = " 47001 " name = " Äîìàøíÿÿ ñòðàíèöà Notepad + + " / > / / / ì_Ñïðàâêà | Notepad + + Home <nl> + < Item id = " 47002 " name = " Ñòðàíèöà ïðîåêòà Notepad + + " / > / / / ì_Ñïðàâêà | Notepad + + Project Page <nl> + < Item id = " 47003 " name = " Ñïðàâêà Online " / > / / / ì_Ñïðàâêà | Online Documentation <nl> + < Item id = " 47004 " name = " Ôîðóì " / > / / / ì_Ñïðàâêà | Forum <nl> + < Item id = " 47005 " name = " Áîëüøå ïëàãèíîâ " / > / / / ì_Ñïðàâêà | Get More Plugins <nl> + < Item id = " 47006 " name = " Îáíîâèòü Notepad + + " / > / / / ì_Ñïðàâêà | Update Notepad + + <nl> + < Item id = " 47000 " name = " Î ïðîãðàììå . . . " / > / / / ì_Ñïðàâêà | About Notepad + + . . . <nl> < / Commands > <nl> < / Main > <nl> < Splitter > <nl> < / Splitter > <nl> < TabBar > <nl> - < Item order = " 0 " name = " Çàêðûòü " / > <nl> - < Item order = " 1 " name = " Çàêðûòü âñå , êðîìå ýòîãî " / > <nl> - < Item order = " 2 " name = " Ñîõðàíèòü " / > <nl> - < Item order = " 3 " name = " Ñîõðàíèòü êàê . . . " / > <nl> - < Item order = " 4 " name = " Ïå ÷ àòü " / > <nl> - < Item order = " 5 " name = "  äðóãîå îêíî " / > <nl> - < Item order = " 6 " name = " Äóáëèðîâàòü â Äðóãîå Îêíî " / > <nl> - < Item order = " 7 " name = " Ïîëíûé ïóòü ê ôàéëó " / > <nl> - < Item order = " 8 " name = " Èìÿ ôàéëà " / > <nl> - < Item order = " 9 " name = " Ïóòü ê äèðåêòîðèè ôàéëà " / > <nl> - < Item order = " 10 " name = " Ïåðåèìåíîâàòü " / > <nl> - < Item order = " 11 " name = " Óäàëèòü " / > <nl> - < Item order = " 12 " name = " Òîëüêî ÷ òåíèå " / > <nl> - < Item order = " 13 " name = " Ñíÿòü ìåòêó & quot ; Òîëüêî ÷ òåíèå & quot ; " / > <nl> - < Item order = " 14 " name = " Ïåðåìåñòèòü â Íîâûé Ýêçåìïëÿð " / > <nl> - < Item order = " 15 " name = " Îòêðûòü â Íîâîì Ýêçåìïëÿðå " / > <nl> + < Item order = " 0 " name = " Çàêðûòü çòî " / > / / / Êîíò . ìåíþ íà çàãîëîâêå âêëàäêè | Close <nl> + < Item order = " 1 " name = " Çàêðûòü âñ ¸ , êðîìå ýòîãî " / > / / / Êîíò . ìåíþ íà çàãîëîâêå âêëàäêè | Close All BUT This <nl> + < Item order = " 2 " name = " Ñîõðàíèòü èçìåíåíèÿ " / > / / / Êîíò . ìåíþ íà çàãîëîâêå âêëàäêè | Save <nl> + < Item order = " 3 " name = " Ñîõðàíèòü êàê . . . " / > / / / Êîíò . ìåíþ íà çàãîëîâêå âêëàäêè | Save As . . . <nl> + < Item order = " 4 " name = " Ïå ÷ àòü " / > / / / Êîíò . ìåíþ íà çàãîëîâêå âêëàäêè | Print <nl> + < Item order = " 5 " name = "  äðóãîå îêíî " / > / / / Êîíò . ìåíþ íà çàãîëîâêå âêëàäêè | Move to Other View <nl> + < Item order = " 6 " name = " Äóáëèðîâàòü â äðóãîì îêíå " / > / / / Êîíò . ìåíþ íà çàãîëîâêå âêëàäêè | Clone to Other View <nl> + < Item order = " 7 " name = " Ïîëíûé ïóòü ê ôàéëó " / > / / / Êîíò . ìåíþ íà çàãîëîâêå âêëàäêè | Full File Path to Clipboard <nl> + < Item order = " 8 " name = " Èìÿ ôàéëà " / > / / / Êîíò . ìåíþ íà çàãîëîâêå âêëàäêè | Filename to Clipboard <nl> + < Item order = " 9 " name = " Ïóòü ê ôàéëó " / > / / / Êîíò . ìåíþ íà çàãîëîâêå âêëàäêè | Current Dir . Path to Clipboard <nl> + < Item order = " 10 " name = " Ïåðåèìåíîâàòü " / > / / / Êîíò . ìåíþ íà çàãîëîâêå âêëàäêè | Rename <nl> + < Item order = " 11 " name = " Óäàëèòü " / > / / / Êîíò . ìåíþ íà çàãîëîâêå âêëàäêè | Delete <nl> + < Item order = " 12 " name = " Ðåæèì Òîëüêî ÷ òåíèå " / > / / / Êîíò . ìåíþ íà çàãîëîâêå âêëàäêè | Read - Only <nl> + < Item order = " 13 " name = " Ñíÿòü àòðèáóò & quot ; Òîëüêî ÷ òåíèå & quot ; " / > / / / Êîíò . ìåíþ íà çàãîëîâêå âêëàäêè | Clear Read - Only Flag <nl> + < Item order = " 14 " name = " Ïåðåìåñòèòü ( â Íîâûé Ýêçåìëÿð Np + + ) " / > / / / Êîíò . ìåíþ íà çàãîëîâêå âêëàäêè | Move to New Instance <nl> + < Item order = " 15 " name = " Îòêðûòü ( â Íîâîì Ýêçåìïëÿðå Np + + ) " / > / / / Êîíò . ìåíþ íà çàãîëîâêå âêëàäêè | Open in New Instance <nl> < / TabBar > <nl> < / Menu > <nl> - <nl> < Dialog > <nl> - < Find title = " " titleFind = " Íàéòè " titleReplace = " Çàìåíèòü " titleFindInFiles = " Íàéòè â ôàéëàõ " titleMark = " Ïîìåòêè " > <nl> - < Item id = " 1 " name = " Èñêàòü äàëåå " / > <nl> - < Item id = " 2 " name = " Çàêðûòü " / > <nl> - < Item id = " 1603 " name = " Òîëüêî öåëûå ñëîâà " / > <nl> - < Item id = " 1604 " name = " Ó ÷ èòûâàòü ðåãèñòð " / > <nl> - < Item id = " 1605 " name = " Ðåãóëÿðíîå âûðàæåíèå " / > <nl> - < Item id = " 1606 " name = " Çàöèêëèòü ïîèñê " / > <nl> - < Item id = " 1608 " name = " Çàìåíèòü " / > <nl> - < Item id = " 1609 " name = " Çàìåíèòü âñå " / > <nl> - < Item id = " 1611 " name = " Çàìåíèòü íà : " / > <nl> - < Item id = " 1612 " name = " Ââåðõ " / > <nl> - < Item id = " 1613 " name = " Âíèç " / > <nl> - < Item id = " 1614 " name = " Ïîäñ ÷ èòàòü " / > <nl> - < Item id = " 1615 " name = " Íàéòè âñå " / > <nl> - < Item id = " 1616 " name = " Ïîìå ÷ àòü Çàêëàäêîé " / > <nl> - < Item id = " 1617 " name = " Ïîìå ÷ àòü íàéäåííîå " / > <nl> - < Item id = " 1618 " name = " Óáèðàòü ïðåäûäóùèå ïîìåòêè " / > <nl> - < Item id = " 1620 " name = " Íàéòè : " / > <nl> - < Item id = " 1621 " name = " Íàïðàâëåíèå " / > <nl> - < Item id = " 1624 " name = " Ðåæèì ïîèñêà " / > <nl> - < Item id = " 1625 " name = " Îáû ÷ íûé " / > <nl> - < Item id = " 1626 " name = " Ðàñøèðåííûé ( \ n , \ r , \ t , \ 0 , \ x . . . ) " / > <nl> - < Item id = " 1632 " name = "  âûäåëåííîì " / > <nl> - < Item id = " 1633 " name = " Óáðàòü âñå " / > <nl> - < Item id = " 1635 " name = " Çàìåíèòü âñå âî âñåõ Îòêðûòûõ Äîêóìåíòàõ " / > <nl> - < Item id = " 1636 " name = " Íàéòè âñå âî âñåõ Îòêðûòûõ Äîêóìåíòàõ " / > <nl> - < Item id = " 1637 " name = " Èñêàòü â ôàéëàõ " / > <nl> - < Item id = " 1641 " name = " Íàéòè âñå â <nl> - Òåêóùåì Äîêóìåíòå " / > <nl> - < Item id = " 1654 " name = " Ôèëüòðû : " / > <nl> - < Item id = " 1655 " name = " Ïàïêà : " / > <nl> - < Item id = " 1656 " name = " Íàéòè âñå " / > <nl> - < Item id = " 1658 " name = " Âî âñåõ ïîäïàïêàõ " / > <nl> - < Item id = " 1659 " name = "  ñêðûòûõ ïàïêàõ " / > <nl> - < Item id = " 1660 " name = " Çàìåíèòü â ôàéëàõ " / > <nl> - < Item id = " 1661 " name = " Ñëåä . çà òåêóùèì äîê . " / > <nl> - < Item id = " 1686 " name = " Ïðîçðà ÷ íîñòü " / > <nl> - < Item id = " 1687 " name = " Íåàêòèâíî " / > <nl> - < Item id = " 1688 " name = " Âñåãäà " / > <nl> + < Find title = " " titleFind = " Íàéòè " titleReplace = " Çàìåíèòü " titleFindInFiles = " Íàéòè â ôàéëàõ " titleMark = " Ïîìåòèòü " > / / / ä_Íàéòè ( ì_Ïîèñê / Íàéòè ) | Find Replace Find in Files Mark <nl> + < Item id = " 1620 " name = " Íàéòè : " / > / / / ä_Íàéòè | Find what : <nl> + < Item id = " 1603 " name = " Òîëüêî öåëûå ñëîâà " / > / / / ä_Íàéòè | Match & amp ; whole word only <nl> + < Item id = " 1604 " name = " Ó ÷ èòûâàòü ðåãèñòð " / > / / / ä_Íàéòè | Match & amp ; case <nl> + < Item id = " 1606 " name = " Çàöèêëèòü ïîèñê " / > / / / ä_Íàéòè | Wrap aroun & amp ; d <nl> + < Item id = " 1624 " name = " Ðåæèì ïîèñêà " / > / / / ä_Íàéòè | Search mode <nl> + < Item id = " 1625 " name = " Îáû ÷ íûé " / > / / / ä_Íàéòè | Normal <nl> + < Item id = " 1626 " name = " Ðàñøèðåííûé ( \ n , \ r , \ t , \ 0 , \ x . . . ) " / > / / / ä_Íàéòè | Extended ( \ n , \ r , \ t , \ 0 , \ x . . . ) <nl> + < Item id = " 1605 " name = " Ðåãóëÿðíîå âûðàæåíèå " / > / / / ä_Íàéòè | Regular & amp ; expression <nl> + < Item id = " 1621 " name = " Íàïðàâëåíèå " / > / / / ä_Íàéòè | Direction <nl> + < Item id = " 1612 " name = " Ââåðõ " / > / / / ä_Íàéòè | & amp ; Up <nl> + < Item id = " 1613 " name = " Âíèç " / > / / / ä_Íàéòè | & amp ; Down <nl> + < Item id = " 1686 " name = " Ïðîçðà ÷ íîñòü " / > / / / ä_Íàéòè | Transparency <nl> + < Item id = " 1687 " name = " Ïðè ïîòåðå ôîêóñà " / > / / / ä_Íàéòè | On losing focus <nl> + < Item id = " 1688 " name = " Âñåãäà " / > / / / ä_Íàéòè | Always <nl> + < Item id = " 1 " name = " Èñêàòü äàëåå " / > / / / ä_Íàéòè | Find Next <nl> + < Item id = " 1614 " name = " Ïîäñ ÷ èòàòü " / > / / / ä_Íàéòè | Count <nl> + < Item id = " 1636 " name = " Íàéòè âñ ¸ âî âñåõ îòêðûòûõ äîêóìåíòàõ " / > / / / ä_Íàéòè | Find All in All Opened Documents <nl> + < Item id = " 1641 " name = " Íàéòè âñ ¸ â òåêóùåì äîêóìåíòå " / > / / / ä_Íàéòè | Find All in Current Document ( * Ïåðåíîñ ñòðîêè äëÿ ëó ÷ øåãî ïðîñìîòðà ) <nl> + < Item id = " 2 " name = " Çàêðûòü " / > / / / ä_Íàéòè | Close <nl> + < Item id = " 1611 " name = " Çàìåíèòü íà : " / > / / / ä_Íàéòè / Çàìåíèòü | Re & amp ; place with : <nl> + < Item id = " 1608 " name = " Çàìåíèòü " / > / / / ä_Íàéòè / Çàìåíèòü | & amp ; Replace <nl> + < Item id = " 1609 " name = " Çàìåíèòü âñ ¸ " / > / / / ä_Íàéòè / Çàìåíèòü | Replace & amp ; All <nl> + < Item id = " 1632 " name = "  âûäåëåííîì " / > / / / ä_Íàéòè / Çàìåíèòü | In selection <nl> + < Item id = " 1635 " name = " Çàìåíèòü âñ ¸ âî âñåõ îòêðûòûõ äîêóìåíòàõ " / > / / / ä_Íàéòè / Çàìåíèòü | Replace All in All Opened Documents <nl> + < Item id = " 1654 " name = " Ôèëüòðû : " / > / / / ä_Íàéòè / Íàéòè â ôàéëàõ | Filters : <nl> + < Item id = " 1655 " name = " Ïàïêà : " / > / / / ä_Íàéòè / Íàéòè â ôàéëàõ | Directory : <nl> + < Item id = " 1656 " name = " Íàéòè âñ ¸ " / > / / / ä_Íàéòè / Íàéòè â ôàéëàõ | Find All <nl> + < Item id = " 1658 " name = " Âî âñåõ ïîäïàïêàõ " / > / / / ä_Íàéòè / Íàéòè â ôàéëàõ | In all sub - folders <nl> + < Item id = " 1659 " name = "  ñêðûòûõ ïàïêàõ " / > / / / ä_Íàéòè / Íàéòè â ôàéëàõ | In hidden folders <nl> + < Item id = " 1660 " name = " Çàìåíèòü â ôàéëàõ " / > / / / ä_Íàéòè / Íàéòè â ôàéëàõ | Replace in Files <nl> + < Item id = " 1661 " name = " Ñëåäîâàòü çà òåê . äîê . " / > / / / ä_Íàéòè / Íàéòè â ôàéëàõ | Follow current doc . <nl> + < Item id = " 1615 " name = " Ïîìåòèòü âñ ¸ " / > / / / ä_Íàéòè / Íàéòè_Ïîìåòèòü | Find All <nl> + < Item id = " 1633 " name = " Î ÷ èñòèòü " / > / / / ä_Íàéòè / Íàéòè_Ïîìåòèòü ( * êí . ) | Clear <nl> + < Item id = " 1616 " name = " Ïîìåòèòü Çàêëàäêîé " / > / / / ä_Íàéòè / Íàéòè_Ïîìåòèòü | Mark line <nl> + < Item id = " 1618 " name = " Ñáðîñ ïðåäûäóùèõ ìåòîê " / > / / / ä_Íàéòè / Íàéòè_Ïîìåòèòü | Purge for each search <nl> + < ! - - < Item id = " 1617 " name = " Ïîìå ÷ àòü íàéäåííîå " / > / / / ä_Íàéòè_ ? ? Íåò òàêîãî äàæå â ýêçåøêå | Style found token <nl> + < Item id = " 1637 " name = " Èñêàòü â ôàéëàõ " / > / / / ä_Íàéòè_ ? ? Íåò òàêîãî äàæå â ýêçåøêå | Find in Files - - > <nl> < / Find > <nl> - < GoToLine title = " Ê ñòðîêå . . . " > <nl> - < Item id = " 2007 " name = " Ñòðîêà " / > <nl> - < Item id = " 2008 " name = " Ñòîëáåö " / > <nl> - < Item id = " 1 " name = " Âïåðåä ! " / > <nl> - < Item id = " 2 " name = " Îòìåíà " / > <nl> - < Item id = " 2004 " name = " Ñåé ÷ àñ âû çäåñü : " / > <nl> - < Item id = " 2005 " name = " Õîòèòå ïðîéòè ê : " / > <nl> - < Item id = " 2006 " name = " Ìàêñèìàëüíîå çíà ÷ åíèå : " / > <nl> + < GoToLine title = " Ïåðåéòè ê . . . " > / / / ä_Ïåðåéòè ê ( ì_Ïîèñê / Ïåðåéòè ê ) | Go to . . . <nl> + < Item id = " 2007 " name = " ¹ Ñòðîêè " / > / / / ä_Ïåðåéòè ê | Line <nl> + < Item id = " 2008 " name = " ¹ Ñìåùåíèÿ " / > / / / ä_Ïåðåéòè ê | Offset <nl> + < Item id = " 1 " name = " Ïåðåéòè " / > / / / ä_Ïåðåéòè ê | & amp ; Go <nl> + < Item id = " 2 " name = " Îòìåíà " / > / / / ä_Ïåðåéòè ê | I ' m going nowhere <nl> + < Item id = " 2004 " name = " Òåêóùèé ¹ : " / > / / / ä_Ïåðåéòè ê | You are here : <nl> + < Item id = " 2005 " name = " Ïåðåéòè ê ¹ : " / > / / / ä_Ïåðåéòè ê | You want to go to : <nl> + < Item id = " 2006 " name = " Ýòî ïîñëåäíèé ¹ : " / > / / / ä_Ïåðåéòè ê | You can ' t go further than : <nl> < / GoToLine > <nl> - <nl> - < Run title = " Çàïóñê . . . " > <nl> - < Item id = " 1903 " name = " Ââåäèòå ïàðàìåòðà çàïóñêà ïðîãðàììû " / > <nl> - < Item id = " 1 " name = " Çàïóñê ! " / > <nl> - < Item id = " 2 " name = " Îòìåíà " / > <nl> - < Item id = " 1904 " name = " Ñîõðàíèòü . . . " / > <nl> + < Run title = " Çàïóñê . . . " > / / / ä_Çàïóñê ( ì_Çàïóñê / Çàïóñê ) | Run . . . <nl> + < Item id = " 1903 " name = " Ïðîãðàììà äëÿ çàïóñêà " / > / / / ä_Çàïóñê | The Program to Run <nl> + < Item id = " 1 " name = " Çàïóñòèòü " / > / / / ä_Çàïóñê | Run <nl> + < Item id = " 2 " name = " Îòìåíà " / > / / / ä_Çàïóñê | Cancel <nl> + < Item id = " 1904 " name = " Ñîõðàíèòü . . . " / > / / / ä_Çàïóñê | Save . . . <nl> < / Run > <nl> - <nl> - < StyleConfig title = " Îïðåäåëåíèå ñòèëåé " > <nl> - < Item id = " 2 " name = " Îòìåíà " / > <nl> - < Item id = " 2301 " name = " ÎÊ " / > <nl> - < Item id = " 2303 " name = " Ïðîçðà ÷ íîñòü " / > <nl> - < Item id = " 2306 " name = " Âûáðàòü ñòèëü : " / > <nl> + < StyleConfig title = " Êîíôèãóðàòîð ñòèëåé " > / / / ä_Êîíôèãóðàòîð Ñòèëåé ( ì_Óñòàíîâêè / Ñòèëü ) | Style Configurator <nl> + < Item id = " 2306 " name = " Âûáðàòü ñòèëü : " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé | Select theme : <nl> + < Item id = " 2301 " name = " Ñîõð . è Çàêð . " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé | Save & amp ; & amp ; Close <nl> + < Item id = " 2 " name = " Îòìåíà " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé | Cancel <nl> + < Item id = " 2303 " name = " Ïðîçðà ÷ íîñòü " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé | Transparency <nl> < SubDialog > <nl> - < Item id = " 2204 " name = " Ïîëóæèðíûé " / > <nl> - < Item id = " 2205 " name = " Êóðñèâ " / > <nl> - < Item id = " 2206 " name = " Ïåðåäíèé ïëàí " / > <nl> - < Item id = " 2207 " name = " Çàäíèé ïëàí " / > <nl> - < Item id = " 2208 " name = " Øðèôò : " / > <nl> - < Item id = " 2209 " name = " Ðàçìåð : " / > <nl> - < Item id = " 2211 " name = " Ñòèëü : " / > <nl> - < Item id = " 2212 " name = " Ñòèëü Öâåòà " / > <nl> - < Item id = " 2213 " name = " Ñòèëü Øðèôòà " / > <nl> - < Item id = " 2214 " name = " Ñòàíäàðòíîå ðàñøèð : " / > <nl> - < Item id = " 2216 " name = " Ïîëüç . ðàñøèðåíèå : " / > <nl> - < Item id = " 2218 " name = " Ïîä ÷ åðêíóòûé " / > <nl> - < Item id = " 2219 " name = " Ñòàíäàðòíûå êëþ ÷ åâûå ñëîâà " / > <nl> - < Item id = " 2221 " name = " Êëþ ÷ åâûå ñëîâà ïîëüçîâàòåëÿ " / > <nl> - < Item id = " 2225 " name = " ßçûê : " / > <nl> - < Item id = " 2226 " name = " Îáùèé öâåò ïåðåäíåãî ïëàíà " / > <nl> - < Item id = " 2227 " name = " Îáùèé öâåò çàäíåãî ïëàíà " / > <nl> - < Item id = " 2228 " name = " Îáùèé øðèôò " / > <nl> - < Item id = " 2229 " name = " Îáùèé ðàçìåð øðèôòà " / > <nl> - < Item id = " 2230 " name = " Âûêë . ïîëóæèðíîñòü øðèôòîâ " / > <nl> - < Item id = " 2231 " name = " Âûêë . êóðñèâ øðèôòîâ " / > <nl> - < Item id = " 2232 " name = " Âûêë . ïîä ÷ ¸ ðêèâàíèå øðèôòîâ " / > <nl> + < Item id = " 2225 " name = " ßçûê : " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Language : <nl> + < Item id = " 2211 " name = " Ñòèëü : " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Style : <nl> + < Item id = " 2214 " name = " Ïî óìîë ÷ àíèþ : " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Default ext . : <nl> + < Item id = " 2216 " name = " Çàäàííûå : " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | User ext . : <nl> + < Item id = " 2212 " name = " Öâåò Ñòèëÿ " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Colour Style <nl> + < Item id = " 2206 " name = " Òåêñò " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Foreground colour <nl> + < Item id = " 2207 " name = " Ôîí " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Background colour <nl> + < Item id = " 2226 " name = " Âêë . öâåò Òåêñòà ãëîáàëüíî " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Enable global foreground colour <nl> + < Item id = " 2227 " name = " Âêë . öâåò Ôîíà ãëîáàëüíî " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Enable global background colour <nl> + < Item id = " 2213 " name = " Øðèôò Ñòèëÿ " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Font Style <nl> + < Item id = " 2208 " name = " Øðèôò : " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Font name : <nl> + < Item id = " 2204 " name = " Ïîëóæèðíûé " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Bold <nl> + < Item id = " 2205 " name = " Êóðñèâ " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Italic <nl> + < Item id = " 2218 " name = " Ïîä ÷ ¸ ðêíóòûé " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Underline <nl> + < Item id = " 2209 " name = " Ðàçìåð : " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Font size : <nl> + < Item id = " 2228 " name = " Îáùèé øðèôò " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Enable global font <nl> + < Item id = " 2229 " name = " Îáùèé ðàçìåð øðèôòà " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Enable global font size <nl> + < Item id = " 2230 " name = " Ïîëóæèðíûé " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Enable global bold font style <nl> + < Item id = " 2231 " name = " Êóðñèâ " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Enable global italic font style <nl> + < Item id = " 2232 " name = " Ïîä ÷ ¸ ðêíóòûé " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Enable global underline font style <nl> + < Item id = " 2219 " name = " Êëþ ÷ åâûå ñëîâà ïî óìîë ÷ àíèþ " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | Default keywords <nl> + < Item id = " 2221 " name = " Êëþ ÷ åâûå ñëîâà ïîëüçîâàòåëÿ " / > / / / ä_Êîíôèãóðàòîð Ñòèëåé / | User - defined keywords <nl> < / SubDialog > <nl> < / StyleConfig > <nl> - <nl> - < UserDefine title = " Ïîëüçîâàòåëüñêîå îïðåäåëåíèå " > <nl> - < Item id = " 20001 " name = " Ñòûêîâàòü " / > <nl> - < Item id = " 20002 " name = " Íîâîå èìÿ " / > <nl> - < Item id = " 20003 " name = " Ñîçäàòü . . . " / > <nl> - < Item id = " 20004 " name = " Óäàëèòü " / > <nl> - < Item id = " 20005 " name = " Ñîõðàíèòü êàê . . . " / > <nl> - < Item id = " 20007 " name = " Ïîëüç . ÿçûê : " / > <nl> - < Item id = " 20009 " name = " Ïðîä . : " / > <nl> - < Item id = " 20011 " name = " Ïðîçðà ÷ íîñòü " / > <nl> - < Item id = " 20012 " name = " Ëþáîé ðåãèñòð " / > <nl> - < Item id = " 20015 " name = " Èìïîðòèð . . . " / > <nl> - < Item id = " 20016 " name = " Ýêñïîðòèð . . . " / > <nl> - < Item id = " 0 " name = " Ñòèëü Öâåòà " / > <nl> - < Item id = " 1 " name = " Ïåðåäíèé ïëàí " / > <nl> - < Item id = " 2 " name = " Çàäíèé ïëàí " / > <nl> - < Item id = " 3 " name = " Ñòèëü Øðèôòà " / > <nl> - < Item id = " 4 " name = " Øðèôò : " / > <nl> - < Item id = " 5 " name = " Ðàçìåð : " / > <nl> - < Item id = " 6 " name = " Ïîëóæèðíûé " / > <nl> - < Item id = " 7 " name = " Êóðñèâ " / > <nl> - < Item id = " 8 " name = " Ïîä ÷ ¸ ðêíóòûé " / > <nl> - < Folder title = " Ñòàíäàðòíûé " > <nl> - < Item id = " 21101 " name = " Íàñòðîéêà ñòàíäàðòíîãî ñòèëÿ " / > <nl> - < Item id = " 21201 " name = " Íàñòðîéêà Îòêðûòûõ Êëþ ÷ åâûõ Ñëîâ " / > <nl> - < Item id = " 21301 " name = " Íàñòðîéêà Çàêðûòûõ Êëþ ÷ åâûõ Ñëîâ " / > <nl> + < UserDefine title = " Íàñòðîéêè ïîäñâåòêè Ñèíòàêñèñà " > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå ( ì_Âèä / Ïîëüçîâàòåëüñêîå îïðåäåëåíèå ) | User - Defined <nl> + < Item id = " 20007 " name = " ßçûê : " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå | User language : <nl> + < Item id = " 20011 " name = " Ïðîçðà ÷ íîñòü " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå | Transparency <nl> + < Item id = " 20001 " name = " Ñòûêîâàòü " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå | Dock <nl> + < Item id = " 20003 " name = " Ñîçäàòü . . . " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå ( êí . ) | Create New . . . <nl> + < Item id = " 20005 " name = " Ñîõð . êàê . . . " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå ( êí . ) | Save As . . . <nl> + < Item id = " 20012 " name = " Áåç ó ÷ ¸ òà ðåãèñòðà " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå | Ignore case <nl> + < Item id = " 20015 " name = " Èìïîðò . . . " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå ( êí . ) | Export . . . <nl> + < Item id = " 20016 " name = " Ýêñïîðò . . . " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå ( êí . ) | Import . . . <nl> + < Item id = " 20002 " name = " Ïåðåèìåí . " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå ( êí . ) | Rename <nl> + < Item id = " 20004 " name = " Óäàëèòü " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå ( êí . ) | Remove <nl> + < Item id = " 20009 " name = " Ðàñøèð . : " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå | Ext . : <nl> + < Item id = " 0 " name = " Öâåò " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå | Colour Style <nl> + < Item id = " 1 " name = " Òåêñò " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå | Foreground colour <nl> + < Item id = " 2 " name = " Ôîí " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå | Background colour <nl> + < Item id = " 3 " name = " Øðèôò " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå | Font Style <nl> + < Item id = " 4 " name = " Øðèôò : " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå | Font name : <nl> + < Item id = " 6 " name = " Ïîëóæèðí . " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå | Bold <nl> + < Item id = " 5 " name = " Ðàçìåð : " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå | Font size : <nl> + < Item id = " 7 " name = " Êóðñèâ " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå | Italic <nl> + < Item id = " 8 " name = " Ïîä ÷ ¸ ðêíóò . " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå | Underline <nl> + < Folder title = " Ñòèëü ïî óìîë ÷ . è Òåêñò - áëîê " > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Ñòàíäàðòíûé | Folder & amp ; & amp ; Default <nl> + < Item id = " 21101 " name = " Ñòèëü ïî óìîë ÷ àíèþ " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Ñòàíäàðòíûé | Default Style Settings <nl> + < Item id = " 21201 " name = " Íàñòðîéêè êëþ ÷ . ñëîâ îòêðûòèÿ Òåêñò - áëîêà " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Ñòàíäàðòíûé | Folder Open Keywords Settings <nl> + < Item id = " 21301 " name = " Íàñòðîéêè êëþ ÷ . ñëîâ çàêðûòèÿ Òåêñò - áëîêà " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Ñòàíäàðòíûé | Folder Close Keywords Settings <nl> < / Folder > <nl> - < Keywords title = " Ñïèñêè êëþ ÷ åâûõ ñëîâ " > <nl> - < Item id = " 22101 " name = " 1 ãðóïïà " / > <nl> - < Item id = " 22201 " name = " 2 ãðóïïà " / > <nl> - < Item id = " 22301 " name = " 3 ãðóïïà " / > <nl> - < Item id = " 22401 " name = " 4 ãðóïïà " / > <nl> - < Item id = " 22113 " name = " Ïðåôèêñ " / > <nl> - < Item id = " 22213 " name = " Ïðåôèêñ " / > <nl> - < Item id = " 22313 " name = " Ïðåôèêñ " / > <nl> - < Item id = " 22413 " name = " Ïðåôèêñ " / > <nl> + < Keywords title = " Ñïèñêè êëþ ÷ . ñëîâ " > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Ñïèñêè êëþ ÷ åâûõ ñëîâ | Keywords Lists <nl> + < Item id = " 22101 " name = " 1 ãðóïïà " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Ñïèñêè êëþ ÷ åâûõ ñëîâ | 1st Group <nl> + < Item id = " 22201 " name = " 2 ãðóïïà " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Ñïèñêè êëþ ÷ åâûõ ñëîâ | 2nd Group <nl> + < Item id = " 22301 " name = " 3 ãðóïïà " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Ñïèñêè êëþ ÷ åâûõ ñëîâ | 3rd Group <nl> + < Item id = " 22401 " name = " 4 ãðóïïà " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Ñïèñêè êëþ ÷ åâûõ ñëîâ | 4th Group <nl> + < Item id = " 22113 " name = " Ïðåôèêñ - ðåæèì " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Ñïèñêè êëþ ÷ åâûõ ñëîâ | Prefix mode <nl> + < Item id = " 22213 " name = " Ïðåôèêñ - ðåæèì " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Ñïèñêè êëþ ÷ åâûõ ñëîâ | Prefix mode <nl> + < Item id = " 22313 " name = " Ïðåôèêñ - ðåæèì " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Ñïèñêè êëþ ÷ åâûõ ñëîâ | Prefix mode <nl> + < Item id = " 22413 " name = " Ïðåôèêñ - ðåæèì " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Ñïèñêè êëþ ÷ åâûõ ñëîâ | Prefix mode <nl> < / Keywords > <nl> - < Comment title = " Êîììåíòàðèé è Íóìåðàöèÿ " > <nl> - < Item id = " 23301 " name = " Ñòðîêà êîììåíòàðèåâ " / > <nl> - < Item id = " 23101 " name = " Áëîê êîììåíòàðèåâ " / > <nl> - < Item id = " 23113 " name = " Îòêðûòèå : " / > <nl> - < Item id = " 23115 " name = " Çàêðûòèå : " / > <nl> - < Item id = " 23116 " name = " Ñëîâî êàê ñèìâîë " / > <nl> - < Item id = " 23117 " name = " Ñëîâà êàê ñèìâîëû " / > <nl> - < Item id = " 23201 " name = " Íóìåðàöèÿ " / > <nl> + < Comment title = " Êîììåíòàðèè è × èñëà " > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Êîììåíòàðèé è Íóìåðàöèÿ | Comment & amp ; & amp ; Number <nl> + < Item id = " 23301 " name = " Îäíî - ñòðî ÷ . êîììåíòàðèé " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Êîììåíòàðèé è Íóìåðàöèÿ | Comment Line <nl> + < Item id = " 23116 " name = " Ñ ÷ èòàòü òýã ñèìâîëîì " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Êîììåíòàðèé è Íóìåðàöèÿ | Treat keyword as symbol <nl> + < Item id = " 23101 " name = " Ìíîãî - ñòðî ÷ . êîììåíòàðèé " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Êîììåíòàðèé è Íóìåðàöèÿ | Comment Block <nl> + < Item id = " 23117 " name = " Ñ ÷ èòàòü òýã ñèìâîëîì " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Êîììåíòàðèé è Íóìåðàöèÿ | Treat keywords as symbols <nl> + < Item id = " 23113 " name = " Òýã îòêðûòèÿ : " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Êîììåíòàðèé è Íóìåðàöèÿ | Comment open : <nl> + < Item id = " 23115 " name = " Òýã çàêðûòèÿ : " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Êîììåíòàðèé è Íóìåðàöèÿ | Comment close : <nl> + < Item id = " 23201 " name = " × èñëà " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Êîììåíòàðèé è Íóìåðàöèÿ | Number <nl> < / Comment > <nl> - < Operator title = " Îïåðàòîðû " > <nl> - < Item id = " 24001 " name = " Âêëþ ÷ èòü çíàê ïåðåõîäà : " / > <nl> - < Item id = " 24107 " name = " Îïåðàòîð " / > <nl> - < Item id = " 24103 " name = " Äîñòóïíûå çíàêè " / > <nl> - < Item id = " 24101 " name = " Àêòèâíûå îïåðàòîðû " / > <nl> - < Item id = " 24201 " name = " Ðàçäåëèòåëü ¹ 1 " / > <nl> - < Item id = " 24211 " name = " Ãðàíèöà îòêðûòèÿ : " / > <nl> - < Item id = " 24214 " name = " Ãðàíèöà çàêðûòèÿ : " / > <nl> - < Item id = " 24301 " name = " Ðàçäåëèòåëü ¹ 2 " / > <nl> - < Item id = " 24311 " name = " Ãðàíèöà îòêðûòèÿ : " / > <nl> - < Item id = " 24314 " name = " Ãðàíèöà çàêðûòèÿ : " / > <nl> + < Operator title = " Îïåðàòîðû " > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Îïåðàòîðû | Operators <nl> + < Item id = " 24107 " name = " Îïåðàòîðû " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Îïåðàòîðû | Operator <nl> + < Item id = " 24103 " name = " Äîñòóïíûå " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Îïåðàòîðû | Available symbols <nl> + < Item id = " 24101 " name = " Àêòèâèðîâàííûå " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Îïåðàòîðû | Activated operators <nl> + < Item id = " 24001 " name = " Ðàçðåøèòü Escape - ñèìâîë : " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Îïåðàòîðû | Enable escape character : <nl> + < Item id = " 24201 " name = " Ðàçäåëèòåëü 1 " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Îïåðàòîðû | Delimiter 1 <nl> + < Item id = " 24211 " name = " Íà ÷ àëî îáðàìëåíèÿ : " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Îïåðàòîðû | Boundary open : <nl> + < Item id = " 24214 " name = " Êîíåö îáðàìëåíèÿ : " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Îïåðàòîðû | Boundary close : <nl> + < Item id = " 24301 " name = " Ðàçäåëèòåëü 2 " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Îïåðàòîðû | Delimiter 2 <nl> + < Item id = " 24311 " name = " Íà ÷ àëî îáðàìëåíèÿ : " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Îïåðàòîðû | Boundary open : <nl> + < Item id = " 24314 " name = " Êîíåö îáðàìëåíèÿ : " / > / / / ä_Ïîëüçîâàòåëüñêîå Îïðåäåëåíèå / Îïåðàòîðû | Boundary close : <nl> < / Operator > <nl> < / UserDefine > <nl> - < Preference title = " Íàñòðîéêè " > <nl> - < Item id = " 6001 " name = " Çàêðûòü " / > <nl> - < Global title = " Îáùèå " > <nl> - < Item id = " 6101 " name = " Ïàíåëü Èíñòðóìåíòîâ " / > <nl> - < Item id = " 6102 " name = " Ñêðûòàÿ " / > <nl> - < Item id = " 6103 " name = " Ìåëêèå çíà ÷ êè " / > <nl> - < Item id = " 6104 " name = " Êðóïíûå çíà ÷ êè " / > <nl> - < Item id = " 6105 " name = " Ñòàíäàðòíûå ìåëêèå çíà ÷ êè " / > <nl> - < Item id = " 6106 " name = " Ïàíåëü Âêëàäîê " / > <nl> - < Item id = " 6107 " name = " Óìåíüøèòü " / > <nl> - < Item id = " 6108 " name = " Çàïðåòèòü ïåðåòàñêèâàíèå " / > <nl> - < Item id = " 6109 " name = " Íåàêòèâíûå âêëàäêè ñåðîãî öâåòà " / > <nl> - < Item id = " 6110 " name = " Îðàíæåâàÿ ëèíèÿ íàä âêëàäêîé " / > <nl> - < Item id = " 6111 " name = " Îòîáðàæàòü Ñòðîêó Ñîñòîÿíèÿ " / > <nl> - < Item id = " 6112 " name = " Êíîïêà çàêðûòèÿ íà âêëàäêå " / > <nl> - < Item id = " 6113 " name = " Çàêðûâàòü äâîéíûì ùåë ÷ êîì " / > <nl> - < Item id = " 6118 " name = " Ñêðûòàÿ " / > <nl> - < Item id = " 6119 " name = " Êàñêàäíàÿ " / > <nl> - < Item id = " 6120 " name = " Âåðòèêàëüíàÿ " / > <nl> - < Item id = " 6121 " name = " Ïàíåëü Ìåíþ " / > <nl> - < Item id = " 6122 " name = " Ñêðûòü ( Alt èëè F10 äëÿ âûáîðà ) " / > <nl> - < Item id = " 6123 " name = " ßçûê " / > <nl> + < Preference title = " Êîíôèãóðàöèÿ " > / / / ä_Íàñòðîéêè ( ì_Óñòàíîâêè / Íàñòðîéêè ) | Preferences <nl> + < Item id = " 6001 " name = " Çàêðûòü " / > / / / ä_Íàñòðîéêè | Close <nl> + < Global title = " Îáùèå " > / / / ä_Íàñòðîéêè / Îáùèå | General <nl> + < Item id = " 6123 " name = " ßçûê èíòåðôåéñà " / > / / / ä_Íàñòðîéêè / Îáùèå | Localization <nl> + < Item id = " 6101 " name = " Ïàíåëü èíñòðóìåíòîâ " / > / / / ä_Íàñòðîéêè / Îáùèå | Toolbar <nl> + < Item id = " 6102 " name = " Ñêðûòü " / > / / / ä_Íàñòðîéêè / Îáùèå | Hide <nl> + < Item id = " 6103 " name = " Ìåëêèå èêîíêè " / > / / / ä_Íàñòðîéêè / Îáùèå | Small icons <nl> + < Item id = " 6104 " name = " Êðóïíûå èêîíêè " / > / / / ä_Íàñòðîéêè / Îáùèå | Big icons <nl> + < Item id = " 6105 " name = " Ñòàíäàðòíûå èêîíêè " / > / / / ä_Íàñòðîéêè / Îáùèå | Standard icons <nl> + < Item id = " 6121 " name = " Ïàíåëü Ìåíþ " / > / / / ä_Íàñòðîéêè / Îáùèå | Menu Bar <nl> + < Item id = " 6122 " name = " Ñêðûòü ( Alt / F10 äëÿ ïîêàçà ) " / > / / / ä_Íàñòðîéêè / Îáùèå | Hide ( use Alt or F10 key to toggle ) <nl> + < Item id = " 6111 " name = " Îòîáðàæàòü Ñòðîêó ñîñòîÿíèÿ " / > / / / ä_Íàñòðîéêè / Îáùèå | Show status bar <nl> < Item id = " 6125 " name = " Ñïèñîê Äîêóìåíòîâ " / > <nl> - < Item id = " 6126 " name = " Îòîáðàæàòü " / > <nl> + < Item id = " 6126 " name = " Îòîáðàæàòü " / > <nl> + < Item id = " 6106 " name = " Ïàíåëü Âêëàäîê " / > / / / ä_Íàñòðîéêè / Îáùèå | Tab Bar <nl> + < Item id = " 6118 " name = " Ñêðûòü " / > / / / ä_Íàñòðîéêè / Îáùèå | Hide <nl> + < Item id = " 6119 " name = " Êàñêàäîì " / > / / / ä_Íàñòðîéêè / Îáùèå | Multi - line <nl> + < Item id = " 6120 " name = " Âåðòèêàëüíàÿ " / > / / / ä_Íàñòðîéêè / Îáùèå | Vertical <nl> + < Item id = " 6107 " name = " Óìåíüøåííàÿ " / > / / / ä_Íàñòðîéêè / Îáùèå | Reduce <nl> + < Item id = " 6108 " name = " Ñ çàïðåòîì ïåðåòàñêèâàíèÿ " / > / / / ä_Íàñòðîéêè / Îáùèå | Lock ( no drag and drop ) <nl> + < Item id = " 6109 " name = " Íåàêòèâíûå âêëàäêè ò ¸ ìíûå " / > / / / ä_Íàñòðîéêè / Îáùèå | Darken inactive tabs <nl> + < Item id = " 6110 " name = " Îðàíæåâàÿ ëèíèÿ íà àêòèâíîé " / > / / / ä_Íàñòðîéêè / Îáùèå | Draw a coloured bar on active tab <nl> + < Item id = " 6112 " name = " Âêëàäêè ñ êíîïêîé Çàêðûòü " / > / / / ä_Íàñòðîéêè / Îáùèå | Show close button on each tab <nl> + < Item id = " 6113 " name = " Çàêðûâàòü äâîéíûì ùåë ÷ êîì " / > / / / ä_Íàñòðîéêè / Îáùèå | Double click to close document <nl> < / Global > <nl> - < Scintillas title = " Ïðàâêà " > <nl> - < Item id = " 6201 " name = " Îôîðìëåíèå Ãðàíèö Áëîêà " / > <nl> - < Item id = " 6202 " name = " Ïðîñòàÿ " / > <nl> - < Item id = " 6203 " name = " Ñòðåëêàìè " / > <nl> - < Item id = " 6204 " name = " Êðóæêàìè " / > <nl> - < Item id = " 6205 " name = " Êâàäðàòèêàìè " / > <nl> - < Item id = " 6206 " name = " Îòîáðàæàòü ïîëå Íóìåðàöèè Ñòðîê " / > <nl> - < Item id = " 6207 " name = " Îòîáðàæàòü ïîëå Çàêëàäîê " / > <nl> - < Item id = " 6208 " name = " Âåðòèêàëüíàÿ ãðàíèöà " / > <nl> - < Item id = " 6209 " name = " Ñòîëáåö : " / > <nl> - < Item id = " 6211 " name = " Íàñòðîéêè Âåðòèêàëüíîé Ãðàíèöû " / > <nl> - < Item id = " 6212 " name = " Ëèíèÿ " / > <nl> - < Item id = " 6213 " name = " Ôîí " / > <nl> - < Item id = " 6214 " name = " Ïîäñâåòêà òåêóùåé ñòðîêè " / > <nl> - < Item id = " 6216 " name = " Çíàê Âñòàâêè " / > <nl> - < Item id = " 6217 " name = " Øèðèíà " / > <nl> - < Item id = " 6219 " name = " × àñò ìåðö : " / > <nl> - < Item id = " 6221 " name = " × " / > <nl> - < Item id = " 6222 " name = " Ð " / > <nl> - < Item id = " 6224 " name = " Ìóëüòè - ðåäàêòèðîâàíèå " / > <nl> - < Item id = " 6225 " name = " Âêë . ( Ctrl + Êëèê ìûøè / âûáîð ) " / > <nl> - < Item id = " 6226 " name = " Âûêëþ ÷ åíî " / > <nl> - < Item id = " 6227 " name = " Ïåðåíîñ Ñòðîê " / > <nl> - < Item id = " 6228 " name = " Ñòàíäàðòíûé " / > <nl> - < Item id = " 6229 " name = " Âûðîâíåííûé " / > <nl> - < Item id = " 6230 " name = " Ñ îòñòóïîì " / > <nl> + < Scintillas title = " Ïðàâêà " > / / / ä_Íàñòðîéêè / Ïðàâêà | Editing <nl> + < Item id = " 6216 " name = " Çíàê ìåðöàþùåãî êóðñîðà âñòàâêè " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Caret Settings <nl> + < Item id = " 6217 " name = " Øèðèíà " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Width : <nl> + < Item id = " 6219 " name = " × àñò . ìåðö : " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Blink Rate : <nl> + < Item id = " 6221 " name = " Á " / > / / / ä_Íàñòðîéêè / Ïðàâêà | F <nl> + < Item id = " 6222 " name = " Ì " / > / / / ä_Íàñòðîéêè / Ïðàâêà | S <nl> + < Item id = " 6224 " name = " Ìóëüòè - ðåäàêòèðîâàíèå " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Multi - Editing Settings <nl> + < Item id = " 6225 " name = " Âêë . ( Ctrl + Êëèê ìûøè / Âûäåëåíèå ) " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Enable ( Ctrl + Mouse click / selection ) <nl> + < Item id = " 6201 " name = " Ñòèëü äåðåâà ïàïîê " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Folder Margin Style <nl> + < Item id = " 6202 " name = " Ïðîñòîé " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Simple <nl> + < Item id = " 6203 " name = " Ñòðåëêàìè " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Arrow <nl> + < Item id = " 6204 " name = " Êðóæêàìè " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Circle tree <nl> + < Item id = " 6205 " name = " Êâàäðàòèêàìè " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Box tree <nl> + < Item id = " 6226 " name = " Âûêë " / > / / / ä_Íàñòðîéêè / Ïðàâêà | None <nl> + < Item id = " 6211 " name = " Âåðòèêàëüíàÿ ãðàíèöà øèðèíû " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Vertical Edge Settings <nl> + < Item id = " 6208 " name = " Îòîáðàæàòü ãðàíèöó " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Show vertical edge <nl> + < Item id = " 6212 " name = " Ëèíèåé " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Line mode <nl> + < Item id = " 6213 " name = " Ôîíîì ( çà ãðàíèöåé ) " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Background mode <nl> + < Item id = " 6209 " name = " Ñèìâîëîâ äî ãðàíèöû : " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Number of columns : <nl> + < Item id = " 6227 " name = " Ïåðåíîñèòü Ñòðîêó â " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Line Wrap <nl> + < Item id = " 6228 " name = " 1 ïîç . ( Óìîë ÷ . ) " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Default <nl> + < Item id = " 6229 " name = " Íà ÷ àëî òåêñòà " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Aligned <nl> + < Item id = " 6230 " name = " Îòñòóï ê òåêñòó " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Indent <nl> + < Item id = " 6206 " name = " Îòîáðàæàòü íóìåðàöèþ ñòðîê " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Display line numbers <nl> + < Item id = " 6207 " name = " Îòîáðàæàòü çàêëàäêè " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Display bookmarks <nl> + < Item id = " 6214 " name = " Ïîäñâå ÷ èâàòü òåêóùóþ ñòðîêó " / > / / / ä_Íàñòðîéêè / Ïðàâêà | Enable current line highlighting <nl> < / Scintillas > <nl> - < NewDoc title = " Íîâûé Äîêóìåíò " > <nl> - < Item id = " 6401 " name = " Ôîðìàò " / > <nl> - < Item id = " 6402 " name = " Windows " / > <nl> - < Item id = " 6403 " name = " Unix " / > <nl> - < Item id = " 6404 " name = " Mac " / > <nl> - < Item id = " 6405 " name = " Êîäèðîâêà " / > <nl> - < Item id = " 6406 " name = " ANSI " / > <nl> - < Item id = " 6407 " name = " UTF - 8 áåç ìåòêè BOM " / > <nl> - < Item id = " 6408 " name = " UTF - 8 " / > <nl> - < Item id = " 6409 " name = " UCS2 Big Endian " / > <nl> - < Item id = " 6410 " name = " UCS2 Small Endian " / > <nl> - < Item id = " 6411 " name = " Ñèíòàêñèñ : " / > <nl> - < Item id = " 6413 " name = " Îòêðûòü Ôàéë / Ñîõðàíèòü Äèðåêòîðèþ " / > <nl> - < Item id = " 6414 " name = " Ïðîéòè çà òåêóùèì äîêóìåíòîì " / > <nl> - < Item id = " 6415 " name = " Çàïîìíèòü ïîñëåäíþþ äèðåêòîðèþ " / > <nl> - < Item id = " 6419 " name = " Íîâûé Äîêóìåíò " / > <nl> - < Item id = " 6420 " name = " Ïðèìåíèòü ïðè îòêð . ANSI ôàéëà " / > <nl> - < Item id = " - 1 " name = " Îòîáðàæàòü " / > <nl> - < Item id = " 6424 " name = "  ïîäìåíþ " / > <nl> - < Item id = " 6425 " name = " Òîëüêî èìÿ ôàéëà " / > <nl> - < Item id = " 6426 " name = " Ïîëíûé ïóòü ê ôàéëó " / > <nl> - < Item id = " 6427 " name = " Çàäàòü äëèíó ñòðîêè : " / > <nl> - < Item id = " 6304 " name = " Èñòîðèÿ îòêðûòûõ ôàéëîâ " / > <nl> - < Item id = " 6305 " name = " Íå ïðîâåðÿòü âî âðåìÿ çàïóñêà " / > <nl> - < Item id = " 6306 " name = " Çàïîìèíàòü ïîñëåäíèå : " / > <nl> + < NewDoc title = " Íîâûé äîêóìåíò " > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | New Document / Default Directory <nl> + < Item id = " 6401 " name = " Ôîðìàò " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | Format <nl> + < Item id = " 6402 " name = " Windows " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | Windows <nl> + < Item id = " 6403 " name = " Unix " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | Unix <nl> + < Item id = " 6404 " name = " Mac " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | Mac <nl> + < Item id = " 6405 " name = " Êîäèðîâêà " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | Encoding <nl> + < Item id = " 6406 " name = " ANSI " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | ANSI <nl> + < Item id = " 6407 " name = " UTF - 8 áåç ìåòêè BOM " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | UTF - 8 without BOM <nl> + < Item id = " 6408 " name = " UTF - 8 " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | UTF - 8 <nl> + < Item id = " 6409 " name = " UCS2 Big Endian " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | UCS - 2 Big Endian <nl> + < Item id = " 6410 " name = " UCS2 Small Endian " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | UCS - 2 Little Endian <nl> + < Item id = " 6411 " name = " Ñèíòàêñèñ : " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | Default language : <nl> + < Item id = " 6413 " name = " Êàòàëîã ïî óìîë ÷ àíèþ Îòêðûòü / Ñîõðàíèòü " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | Default Directory ( Open / Save ) <nl> + < Item id = " 6414 " name = " Ñëåäîâàòü çà òåêóùèì äîêóìåíòîì " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | Follow current document <nl> + < Item id = " 6415 " name = " Çàïîìèíàòü ïîñëåäíèé êàòàëîã " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | Remember last used directory <nl> + < Item id = " 6419 " name = " Íîâûé Äîêóìåíò " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | New Document <nl> + < Item id = " 6420 " name = " Ïðè îòêðûòèè ANSI - ôàéëà " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | Apply to opened ANSI files <nl> + < Item id = " - 1 " name = " Îòîáðàæàòü " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò <nl> + < Item id = " 6424 " name = "  ïîäìåíþ " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò <nl> + < Item id = " 6425 " name = " Òîëüêî èìÿ ôàéëà " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò <nl> + < Item id = " 6426 " name = " Ïîëíûé ïóòü ê ôàéëó " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò <nl> + < Item id = " 6427 " name = " Çàäàòü äëèíó ñòðîêè : " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò <nl> + < Item id = " 6304 " name = " Èñòîðèÿ îòêðûòûõ ôàéëîâ " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | Recent Files History <nl> + < Item id = " 6305 " name = " Íå ïðîâåðÿòü âî âðåìÿ çàïóñêà " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | Don ' t check at launch time <nl> + < Item id = " 6306 " name = " Ìàêñèìóì ïîñëåäíèõ ôàéëîâ : " / > / / / ä_Íàñòðîéêè / Íîâûé Äîêóìåíò | Max . number of entries : <nl> < / NewDoc > <nl> - < FileAssoc title = " Àññîöèàöèÿ Ôàéëîâ " > <nl> - < Item id = " 4009 " name = " Ïîääåðæèâàåìûå : " / > <nl> - < Item id = " 4010 " name = " Çàðåãèñòðèðîâàííûå : " / > <nl> + < FileAssoc title = " Àññîöèàöèè ôàéëîâ " > / / / ä_Íàñòðîéêè / Àññîöèàöèÿ Ôàéëîâ | File Association <nl> + < Item id = " 4009 " name = " Ïîääåðæèâàåìûå : " / > / / / ä_Íàñòðîéêè / Àññîöèàöèÿ Ôàéëîâ | Supported exts : <nl> + < Item id = " 4010 " name = " Çàðåãèñòðèðîâàíû : " / > / / / ä_Íàñòðîéêè / Àññîöèàöèÿ Ôàéëîâ | Registered exts : <nl> < / FileAssoc > <nl> - < LangMenu title = " Ñèíòàêñèñ / Òàáóëÿöèÿ " > <nl> - < Item id = " 6301 " name = " Íàñòðîéêà Òàáóëÿöèè " / > <nl> - < Item id = " 6302 " name = " Çàìåíèòü ïðîáåëîì " / > <nl> - < Item id = " 6303 " name = " Ðàçìåð òàáóëÿöèè : " / > <nl> - < Item id = " 6505 " name = " Äîñòóïíûå ÿçûêè " / > <nl> - < Item id = " 6506 " name = " Îòêëþ ÷ ¸ ííûå ÿçûêè " / > <nl> - < Item id = " 6507 " name = " Êîìïàêòíîå ìåíþ Ñèíòàêñèñà " / > <nl> - < Item id = " 6508 " name = " Ìåíþ Ñèíòàêñèñà " / > <nl> - < Item id = " 6510 " name = " Èñï . çíà ÷ . ïî óìîë ÷ . " / > <nl> + < LangMenu title = " Ñèíòàêñèñ / Òàáóëÿöèÿ " > / / / ä_Íàñòðîéêè / Ñèíòàêñèñ_Òàáóëÿöèÿ | Language Menu / Tab Settings <nl> + < Item id = " 6508 " name = " Ìåíþ Ñèíòàêñèñ " / > / / / ä_Íàñòðîéêè / Ñèíòàêñèñ_Òàáóëÿöèÿ | Language Menu <nl> + < Item id = " 6507 " name = " Êîìïàêòíîå ìåíþ Ñèíòàêñèñ " / > / / / ä_Íàñòðîéêè / Ñèíòàêñèñ_Òàáóëÿöèÿ | Make language menu compact <nl> + < Item id = " 6505 " name = " Äîñòóïíûå ÿçûêè " / > / / / ä_Íàñòðîéêè / Ñèíòàêñèñ_Òàáóëÿöèÿ | Available items <nl> + < Item id = " 6506 " name = " Îòêëþ ÷ ¸ ííûå " / > / / / ä_Íàñòðîéêè / Ñèíòàêñèñ_Òàáóëÿöèÿ | Disabled items <nl> + < Item id = " 6301 " name = " Íàñòðîéêà Òàáóëÿöèè " / > / / / ä_Íàñòðîéêè / Ñèíòàêñèñ_Òàáóëÿöèÿ | Tab Settings <nl> + < Item id = " 6302 " name = " Çàìåíÿòü Ïðîáåëîì " / > / / / ä_Íàñòðîéêè / Ñèíòàêñèñ_Òàáóëÿöèÿ | Replace by space <nl> + < Item id = " 6303 " name = " Ðàçìåð : " / > / / / ä_Íàñòðîéêè / Ñèíòàêñèñ_Òàáóëÿöèÿ | Tab size : <nl> + < Item id = " 6510 " name = " Çíà ÷ êè ïî óìîë ÷ àíèþ " / > / / / ä_Íàñòðîéêè / Ñèíòàêñèñ_Òàáóëÿöèÿ | Use default value <nl> < / LangMenu > <nl> - < Print title = " Ïå ÷ àòü " > <nl> - < Item id = " 6601 " name = " Ïå ÷ àòàòü íîìåðà ñòðîê " / > <nl> - < Item id = " 6602 " name = " Öâåòîâàÿ ñõåìà " / > <nl> - < Item id = " 6603 " name = " Êàê åñòü " / > <nl> - < Item id = " 6604 " name = " Îáðàòèòü " / > <nl> - < Item id = " 6605 " name = " × ¸ ðíûì ïî áåëîìó " / > <nl> - < Item id = " 6606 " name = " Áåç ôîíîâîãî öâåòà " / > <nl> - < Item id = " 6607 " name = " Îòñòóïû (  ìèëëèìåòðàõ ) " / > <nl> - < Item id = " 6612 " name = " Ñëåâà " / > <nl> - < Item id = " 6613 " name = " Ñâåðõó " / > <nl> - < Item id = " 6614 " name = " Ñïðàâà " / > <nl> - < Item id = " 6615 " name = " Ñíèçó " / > <nl> - < Item id = " 6706 " name = " Ïîëóæèðíûé " / > <nl> - < Item id = " 6707 " name = " Êóðñèâ " / > <nl> - < Item id = " 6708 " name = " Âåðõíèé êîëîíòèòóë " / > <nl> - < Item id = " 6709 " name = " Ëåâàÿ ÷ àñòü " / > <nl> - < Item id = " 6710 " name = " Ñðåäíÿÿ ÷ àñòü " / > <nl> - < Item id = " 6711 " name = " Ïðàâàÿ ÷ àñòü " / > <nl> - < Item id = " 6717 " name = " Ïîëóæèðíûé " / > <nl> - < Item id = " 6718 " name = " Êóðñèâ " / > <nl> - < Item id = " 6719 " name = " Íèæíèé êîëîíòèòóë " / > <nl> - < Item id = " 6720 " name = " Ëåâàÿ ÷ àñòü " / > <nl> - < Item id = " 6721 " name = " Ñðåäíÿÿ ÷ àñòü " / > <nl> - < Item id = " 6722 " name = " Ïðàâàÿ ÷ àñòü " / > <nl> - < Item id = " 6723 " name = " Äîáàâèòü " / > <nl> - < Item id = " 6725 " name = " Ïåðåìåííàÿ : " / > <nl> - < Item id = " 6727 " name = " Êàêàÿ ÷ àñòü . . . " / > <nl> - < Item id = " 6728 " name = " Êîëîíòèòóëû " / > <nl> + < Print title = " Ïå ÷ àòü " > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Print <nl> + < Item id = " 6601 " name = " Ïå ÷ àòàòü íîìåðà ñòðîê " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Print line number <nl> + < Item id = " 6602 " name = " Öâåòîâàÿ ñõåìà " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Colour Options <nl> + < Item id = " 6603 " name = " Êàê åñòü " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | WYSIWYG <nl> + < Item id = " 6604 " name = " Îáðàòèòü " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Invert <nl> + < Item id = " 6605 " name = " × ¸ ðíîå íà áåëîì " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Black on white <nl> + < Item id = " 6606 " name = " Áåç öâåòíîãî ôîíà " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | No background colour <nl> + < Item id = " 6607 " name = " Êðàÿ ( â ìèëëèìåòðàõ ) " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Marge Settings ( Unit : mm ) <nl> + < Item id = " 6612 " name = " Ñëåâà " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Left <nl> + < Item id = " 6613 " name = " Ñâåðõó " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Top <nl> + < Item id = " 6614 " name = " Ñïðàâà " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Right <nl> + < Item id = " 6615 " name = " Ñíèçó " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Bottom <nl> + < Item id = " 6728 " name = " Êîëîíòèòóëû " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Header and Footer <nl> + < Item id = " 6725 " name = " Ïåðåìåííûå : " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Variable : <nl> + < Item id = " 6723 " name = " Äîáàâèòü " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Add <nl> + < Item id = " 6708 " name = " Âåðõíèé êîëîíòèòóë " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Header <nl> + < Item id = " 6709 " name = " Ëåâàÿ ÷ àñòü " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Left part <nl> + < Item id = " 6710 " name = " Ñðåäíÿÿ ÷ àñòü " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Middle part <nl> + < Item id = " 6711 " name = " Ïðàâàÿ ÷ àñòü " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Right part <nl> + < Item id = " 6706 " name = " Ïîëóæèðí . " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Bold <nl> + < Item id = " 6707 " name = " Êóðñèâ " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Italic <nl> + < Item id = " 6719 " name = " Íèæíèé êîëîíòèòóë " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Footer <nl> + < Item id = " 6720 " name = " Ëåâàÿ ÷ àñòü " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Left part <nl> + < Item id = " 6721 " name = " Ñðåäíÿÿ ÷ àñòü " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Middle part <nl> + < Item id = " 6722 " name = " Ïðàâàÿ ÷ àñòü " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Right part <nl> + < Item id = " 6717 " name = " Ïîëóæèðí . " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Bold <nl> + < Item id = " 6718 " name = " Êóðñèâ " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Italic <nl> + < Item id = " 6727 " name = " Êàêàÿ ÷ àñòü : " / > / / / ä_Íàñòðîéêè / Ïå ÷ àòü | Which part : <nl> < / Print > <nl> - < MISC title = " Ðàçíîå " > <nl> - < Item id = " 6307 " name = " Âêëþ ÷ èòü " / > <nl> - < Item id = " 6308 " name = " Ñâîðà ÷ èâàòü â çíà ÷ îê â òðåå " / > <nl> - < Item id = " 6309 " name = " Îòêðûâàòü ôàéëû ñ ïðîøëîãî ñåàíñà " / > <nl> - < Item id = " 6312 " name = " Àâòîîïðåäåëåíèå Ñòàòóñà " / > <nl> - < Item id = " 6313 " name = " Îáíîâëÿòü íå ñïðàøèâàÿ " / > <nl> - < Item id = " 6318 " name = " Îáðàáîòêà Ññûëîê " / > <nl> - < Item id = " 6325 " name = " Ïðîêðóòèòü äî êîíöà ïîñëå îáíîâë . " / > <nl> - < Item id = " 6319 " name = " Âêëþ ÷ èòü " / > <nl> - < Item id = " 6320 " name = " Íå ïîä ÷ ¸ ðêèâàòü " / > <nl> - < Item id = " 6322 " name = " Ðàñøèðåíèå ôàéëà ñåññèè : " / > <nl> - < Item id = " 6323 " name = " Âêëþ ÷ èòü àâòîìàòè ÷ åñêîå îáíîâëåíèå " / > <nl> - < Item id = " 6324 " name = " Ïåðåêëþ ÷ åíèå Äîêóìåíòîâ ( Ctrl + TAB ) " / > <nl> - < Item id = " 6326 " name = " Èíòåëëåêòóàëüíàÿ ïîäñâåòêà " / > <nl> - < Item id = " 6327 " name = " Ðàçðåøèòü " / > <nl> - < Item id = " 6328 " name = " Ïîäñâåòêà õàðàêòåðíûõ òåãîâ " / > <nl> - < Item id = " 6329 " name = " Ïîäñâåòêà ñîâïàäàþùèõ òåãîâ " / > <nl> - < Item id = " 6330 " name = " Ïîäñâåòêà çîí : comment / php / asp " / > <nl> - < Item id = " 6331 " name = " Îòîáðàæàòü â çàãîëîâêå òîëüêî èìÿ ôàéëà " / > <nl> - < Item id = " 6114 " name = " Ðàçðåøèòü " / > <nl> - < Item id = " 6115 " name = " Àâòîìàòè ÷ åñêèé îòñòóï " / > <nl> - < Item id = " 6117 " name = " Ïåðåêëþ ÷ àòü íà ïðåäûäóùèå " / > <nl> - < / MISC > <nl> - < Backup title = " Ðåçåðâ / Àâòîçàâåðøåíèå " > <nl> - < Item id = " 6801 " name = " Ðåçåðâíàÿ êîïèÿ " / > <nl> - < Item id = " 6315 " name = " Îòêëþ ÷ åíî " / > <nl> - < Item id = " 6316 " name = " Ïðîñòîå " / > <nl> - < Item id = " 6317 " name = " Ïîäðîáíîå " / > <nl> - < Item id = " 6804 " name = " Ïîëüçîâàòåëüñêàÿ ïàïêà äëÿ ñîõðàíåíèÿ " / > <nl> - < Item id = " 6803 " name = " Ïàïêà : " / > <nl> - < Item id = " 6807 " name = " Àâòîçàâåðøåíèå " / > <nl> - < Item id = " 6808 " name = " Âêëþ ÷ èòü äëÿ êàæäîãî ââîäà " / > <nl> - < Item id = " 6809 " name = " Çàâåðøåíèå ôóíêöèé " / > <nl> - < Item id = " 6810 " name = " Äîïîëíåíèå ñëîâ " / > <nl> - < Item id = " 6811 " name = " Ñ " / > <nl> - < Item id = " 6813 " name = " ãî ñèìâîëà " / > <nl> - < Item id = " 6814 " name = " Äîïóñòèìûå çíà ÷ åíèÿ : 1 - 9 " / > <nl> - < Item id = " 6815 " name = " Ïîäñêàçêà ïðè ââîäå ïàðàìåòðîâ ôóíêöèé " / > <nl> + < Backup title = " Ðåçåðâ / Àâòîçàâåðøåíèå " > / / / ä_Íàñòðîéêè / Ðåçåðâ_Àâòîçàâåðøåíèå | Backup / Auto - Completion <nl> + < Item id = " 6801 " name = " Êîïèÿ ðåçåðâèðîâàíèÿ " / > / / / ä_Íàñòðîéêè / Ðåçåðâ_Àâòîçàâåðøåíèå | Backup <nl> + < Item id = " 6315 " name = " Îòêëþ ÷ åíî " / > / / / ä_Íàñòðîéêè / Ðåçåðâ_Àâòîçàâåðøåíèå | None <nl> + < Item id = " 6316 " name = " Ïðîñòàÿ " / > / / / ä_Íàñòðîéêè / Ðåçåðâ_Àâòîçàâåðøåíèå | Simple backup <nl> + < Item id = " 6317 " name = " Ïîäðîáíàÿ " / > / / / ä_Íàñòðîéêè / Ðåçåðâ_Àâòîçàâåðøåíèå | Verbose backup <nl> + < Item id = " 6804 " name = " Çàäàòü êàòàëîã äëÿ ñîõðàíåíèÿ " / > / / / ä_Íàñòðîéêè / Ðåçåðâ_Àâòîçàâåðøåíèå | Custom Backup Directory <nl> + < Item id = " 6803 " name = " Êàòàëîã : " / > / / / ä_Íàñòðîéêè / Ðåçåðâ_Àâòîçàâåðøåíèå | Directory : <nl> + < Item id = " 6807 " name = " Àâòîçàâåðøåíèå " / > / / / ä_Íàñòðîéêè / Ðåçåðâ_Àâòîçàâåðøåíèå | Auto - Completion <nl> + < Item id = " 6808 " name = " Âêëþ ÷ èòü äëÿ êàæäîãî ââîäà " / > / / / ä_Íàñòðîéêè / Ðåçåðâ_Àâòîçàâåðøåíèå | Enable auto - completion on each input <nl> + < Item id = " 6809 " name = " Çàâåðøåíèå ôóíêöèé " / > / / / ä_Íàñòðîéêè / Ðåçåðâ_Àâòîçàâåðøåíèå | Function completion <nl> + < Item id = " 6810 " name = " Çàâåðøåíèå ñëîâ " / > / / / ä_Íàñòðîéêè / Ðåçåðâ_Àâòîçàâåðøåíèå | Word completion <nl> + < Item id = " 6811 " name = " Ñ " / > / / / ä_Íàñòðîéêè / Ðåçåðâ_Àâòîçàâåðøåíèå | From <nl> + < Item id = " 6813 " name = " - ãî ñèìâîëà " / > / / / ä_Íàñòðîéêè / Ðåçåðâ_Àâòîçàâåðøåíèå | th character <nl> + < Item id = " 6814 " name = " Äîïóñòèìûå çíà ÷ åíèÿ : 1 - 9 " / > / / / ä_Íàñòðîéêè / Ðåçåðâ_Àâòîçàâåðøåíèå | Valid value : 1 - 9 <nl> + < Item id = " 6815 " name = " Ïîäñêàçêà ïðè ââîäå ïàðàìåòðîâ ôóíêöèé " / > / / / ä_Íàñòðîéêè / Ðåçåðâ_Àâòîçàâåðøåíèå | Function parameters hint on input <nl> < / Backup > <nl> + < MISC title = " Ðàçíîå " > / / / ä_Íàñòðîéêè / Ðàçíîå | MISC . <nl> + < Item id = " 6304 " name = " Èñòîðèÿ îòêðûòûõ ôàéëîâ " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Recent Files History <nl> + < Item id = " 6306 " name = " Ïîìíèòü ïîñëåäíèå : " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Max . number of entries : <nl> + < Item id = " 6305 " name = " Íå ïðîâåðÿòü âî âðåìÿ çàïóñêà " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Don ' t check at launch time <nl> + < Item id = " 6324 " name = " Ïåðåêëþ ÷ àòåëü äîêóìåíòîâ ( Ctrl + TAB ) " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Document Switcher ( Ctrl + TAB ) <nl> + < Item id = " 6327 " name = " Ðàçðåøèòü " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Enable <nl> + < Item id = " 6117 " name = " Ïîêàçûâàòü , íà ÷ èíàÿ ñ ïîñëåäíèõ " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Enable MRU behaviour <nl> + < Item id = " 6323 " name = " Âêëþ ÷ èòü àâòîìàòè ÷ åñêîå îáíîâëåíèå " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Enable Notepad + + auto - updater <nl> + < Item id = " 6115 " name = " Àâòîìàòè ÷ åñêèé îòñòóï " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Auto - indent <nl> + < Item id = " 6308 " name = " Ñâîðà ÷ èâàòü â çíà ÷ îê â òðåå " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Minimize to system tray <nl> + < Item id = " 6326 " name = " Èíòåëëåêòóàëüíàÿ ïîäñâåòêà " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Enable smart highlighting <nl> + < Item id = " 6331 " name = " Îòîáðàæàòü íà âêëàäêå òîëüêî èìÿ ôàéëà " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Show only filename in title bar <nl> + < Item id = " 6309 " name = " Îòêðûâàòü ôàéëû ñ ïðîøëîãî ñåàíñà " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Remember current session for next launch <nl> + < Item id = " 6318 " name = " Îáðàáîòêà Ññûëîê " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Clickable Link Settings <nl> + < Item id = " 6307 " name = " Âêëþ ÷ èòü " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Enable <nl> + < Item id = " 6320 " name = " Íå ïîä ÷ ¸ ðêèâàòü " / > / / / ä_Íàñòðîéêè / Ðàçíîå | No underline <nl> + < Item id = " 6312 " name = " Àâòîîïðåäåëåíèå ñòàòóñà ôàéëà " / > / / / ä_Íàñòðîéêè / Ðàçíîå | File Status Auto - Detection <nl> + < Item id = " 6319 " name = " Âêëþ ÷ èòü " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Enable <nl> + < Item id = " 6313 " name = " Îáíîâëÿòü íå ñïðàøèâàÿ " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Update silently <nl> + < Item id = " 6325 " name = " Ê ïîñëåäíåé ñòðîêå ïîñëå îáíîâë . " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Scroll to the last line after update <nl> + < Item id = " 6329 " name = " Ïîäñâåòêà ñîâïàäàþùèõ òåãîâ " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Highlight Matching Tags <nl> + < Item id = " 6114 " name = " Âêëþ ÷ èòü " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Enable <nl> + < Item id = " 6328 " name = " Ïîäñâåòêà àòðèáóòîâ òåãà " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Highlight tag attributes <nl> + < Item id = " 6330 " name = " Ïîäñâåòêà çîí : comment / php / asp " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Highlight comment / php / asp zone <nl> + < Item id = " 6322 " name = " Ðàñøèðåíèå ' ôàéëà ñåññèè ' : " / > / / / ä_Íàñòðîéêè / Ðàçíîå | Session file ext . : <nl> + < / MISC > <nl> < / Preference > <nl> - < MultiMacro title = " Çàïóñòèòü ìíîãîêðàòíî . . . " > <nl> - < Item id = " 1 " name = " Çàïóñê " / > <nl> - < Item id = " 2 " name = " Îòìåíà " / > <nl> - < Item id = " 8006 " name = " Ìàêðîñ : " / > <nl> - < Item id = " 8001 " name = " Çàïóñê " / > <nl> - < Item id = " 8005 " name = " ðàç " / > <nl> - < Item id = " 8002 " name = " Ïðîêðóòèòü äî êîíöà " / > <nl> + < MultiMacro title = " Çàïóñê Ìàêðîñà ( ìíîãîêðàòíûé ) " > / / / ä_Çàïóñòèòü Ìíîãîêðàòíî ( ì_Ìàêðîñû / Çàïóñòèòü ìíîãîêðàòíî ) | Run a Macro Multiple Times <nl> + < Item id = " 8006 " name = " Ìàêðîñ : " / > / / / ä_Çàïóñòèòü Ìíîãîêðàòíî | Macro to run : <nl> + < Item id = " 1 " name = " Çàïóñê " / > / / / ä_Çàïóñòèòü Ìíîãîêðàòíî | Run <nl> + < Item id = " 8005 " name = " ðàç " / > / / / ä_Çàïóñòèòü Ìíîãîêðàòíî | times <nl> + < Item id = " 8002 " name = " Âûïîëíÿòü äî êîíöà ôàéëà " / > / / / ä_Çàïóñòèòü Ìíîãîêðàòíî | Run until the end of file <nl> + < Item id = " 8001 " name = " Çàïóñê " / > / / / ä_Çàïóñòèòü Ìíîãîêðàòíî | Run <nl> + < Item id = " 2 " name = " Îòìåíà " / > / / / ä_Çàïóñòèòü Ìíîãîêðàòíî | Cancel <nl> < / MultiMacro > <nl> - < Window title = " Îêíà " > <nl> - < Item id = " 1 " name = " Îòêðûòü " / > <nl> - < Item id = " 2 " name = " ÎÊ " / > <nl> - < Item id = " 7002 " name = " Ñîõðàíèòü " / > <nl> - < Item id = " 7003 " name = " Çàêðûòü Îêíî ( à ) " / > <nl> - < Item id = " 7004 " name = " Óïîðÿäî ÷ èòü " / > <nl> + < Window title = " Îêíà " > / / / ä_Îêíà ( ì_Îêíà / Îêíà ) | Windows <nl> + < Item id = " 1 " name = " Îòêðûòü " / > / / / ä_Îêíà | Activate <nl> + < Item id = " 7002 " name = " Ñîõðàíèòü " / > / / / ä_Îêíà | Save <nl> + < Item id = " 7003 " name = " Çàêðûòü îêíî " / > / / / ä_Îêíà | Close window ( s ) <nl> + < Item id = " 7004 " name = " Óïîðÿäî ÷ èòü " / > / / / ä_Îêíà | Sort tabs <nl> + < Item id = " 2 " name = " ÎÊ " / > / / / ä_Îêíà | OK <nl> < / Window > <nl> - < ColumnEditor title = " Ðåäàêòîð ñòîëáöîâ " > <nl> - < Item id = " 2023 " name = " Òåêñò äëÿ âñòàâêè " / > <nl> - < Item id = " 2033 " name = " × èñëà äëÿ âñòàâêè " / > <nl> - < Item id = " 2030 " name = " Èñõîäíîå ÷ èñëî : " / > <nl> - < Item id = " 2031 " name = " Óâåëè ÷ åíèå íà : " / > <nl> - < Item id = " 2035 " name = " Âåäóùèå íóëè " / > <nl> - < Item id = " 2032 " name = " Ôîðìàò " / > <nl> - < Item id = " 2024 " name = " Äåñÿòè ÷ . " / > <nl> - < Item id = " 2025 " name = " Âîñüì . " / > <nl> - < Item id = " 2026 " name = " Øåñòí . " / > <nl> - < Item id = " 2027 " name = " Äâîè ÷ . " / > <nl> - < Item id = " 1 " name = " ÎÊ " / > <nl> - < Item id = " 2 " name = " Îòìåíà " / > <nl> + < ColumnEditor title = " Ðåäàêòîð Êîëîíêè " > / / / ä_Ðåäàêòîð Êîëîíêè ( ì_Ïðàâêà / Ðåäàêòîð Êîëîíêè ) | Column Editor <nl> + < Item id = " 2023 " name = " Òåêñò äëÿ âñòàâêè " / > / / / ä_Ðåäàêòîð Êîëîíêè | Text to Insert <nl> + < Item id = " 2033 " name = " × èñëà äëÿ âñòàâêè " / > / / / ä_Ðåäàêòîð Êîëîíêè | Number to Insert <nl> + < Item id = " 2030 " name = " Íà ÷ àëüíûé íîìåð : " / > / / / ä_Ðåäàêòîð Êîëîíêè | Initial number : <nl> + < Item id = " 2031 " name = " Øàã : " / > / / / ä_Ðåäàêòîð Êîëîíêè | Increase by : <nl> + < Item id = " 2035 " name = " Äîï . íóëè " / > / / / ä_Ðåäàêòîð Êîëîíêè | Leading zeros <nl> + < Item id = " 2032 " name = " Ôîðìàò " / > / / / ä_Ðåäàêòîð Êîëîíêè | Format <nl> + < Item id = " 2024 " name = " Äåñÿò . " / > / / / ä_Ðåäàêòîð Êîëîíêè | Dec <nl> + < Item id = " 2025 " name = " Âîñüì . " / > / / / ä_Ðåäàêòîð Êîëîíêè | Oct <nl> + < Item id = " 2026 " name = " Øåñòí . " / > / / / ä_Ðåäàêòîð Êîëîíêè | Hex <nl> + < Item id = " 2027 " name = " Äâîè ÷ . " / > / / / ä_Ðåäàêòîð Êîëîíêè | Bin <nl> + < Item id = " 1 " name = " ÎÊ " / > / / / ä_Ðåäàêòîð Êîëîíêè | OK <nl> + < Item id = " 2 " name = " Îòìåíà " / > / / / ä_Ðåäàêòîð Êîëîíêè | Cancel <nl> < / ColumnEditor > <nl> - < FindCharsInRange title = " Íàéòè ñèìâîëû â äèàïàçîíå . . . . " > <nl> - < Item id = " 2910 " name = " Íàéòè " / > <nl> - < Item id = " 2 " name = " Çàêðûòü " / > <nl> - < Item id = " 2901 " name = " Íå - ASCII ñèìâîëû ( 128 - 255 ) " / > <nl> - < Item id = " 2902 " name = " ASCII ñèìâîëû ( 0 - 127 ) " / > <nl> - < Item id = " 2903 " name = " Ìîé äèàïàçîí : " / > <nl> - < Item id = " 2906 " name = " Ââåðõ " / > <nl> - < Item id = " 2907 " name = " Âíèç " / > <nl> - < Item id = " 2908 " name = " Íàïðàâëåíèå " / > <nl> - < Item id = " 2909 " name = " Çàöèêëèòü ïîèñê " / > <nl> - < / FindCharsInRange > <nl> < / Dialog > <nl> < / Native - Langue > <nl> - < / NotepadPlus > <nl> + < / NotepadPlus > <nl> \ No newline at end of file <nl> new file mode 100644 <nl> index 0000000000 . . 99f8a27e79 <nl> mmm / dev / null <nl> ppp b / PowerEditor / installer / nativeLang / sardinian . xml <nl> <nl> + < ? xml version = " 1 . 0 " encoding = " Windows - 1252 " ? > <nl> + < ! - - <nl> + Sardininian translation for Notepad + + 5 . 9 . 6 . 1 <nl> + Last modified Sat , December 24th , 2011 01 : 10 GMT by Marco Solinas . <nl> + Please e - mail errors , suggestions etc . to solinas . marco ( at ) libero . it . <nl> + For updates , see https : / / sourceforge . net / projects / notepad - plus / forums / forum / 558104 / topic / 1853765 <nl> + <nl> + Custa tradutzioni est fata sighendu is arrégulas de sa " Limba Sarda Comuna " . Custu scioberu <nl> + ndi benit de sa necessidadi de dhi donai a sa comunidadi informàtica sarda un ' aina chi potzat <nl> + essi imperada de totus , in Sardu , sentza de fai distintzioni peruna tra variantis . Ammarolla , ca <nl> + dèu etotu soi unu " cabesutesu " , sa basi de su Sardu chi dhui at , in custa faina , a suta de sa LSC <nl> + est cussu chi apu sempri intèndiu allegai dèu : s ' Olliastrinu de costera . In dónnia manera , ca <nl> + dèu soi unu de cussus chi funt cumbintus chi totugantu su Sardu apartenit a totus is Sardus , timoria <nl> + de is préstitus internus no ndi tèngiu : tandu , candu apu agatau una calisisiat paràulas de una <nl> + calisiollat de is atras variantis chi fut sa mellus po sa craresa de unu cuncetu informàticu , <nl> + dh ' apu scioberada sentza de nci pensai mancu pagu pagu . <nl> + <nl> + Ia a bolli torrai gràtzias a totus is amigus chi m ' ant donau una manu de agiudu in custa <nl> + faina de tradutzioni . Mescamenti , unu gràtzias mannu meda tocat a si dhu torrai a su <nl> + prof . Roberto Bolognesi e a su dot . Cristiano Becciu , po sa passiéntzia chi ant tentu in <nl> + su processu de curretzioni de custu file . <nl> + <nl> + Gràtzias de coru ! <nl> + Marco <nl> + - - > <nl> + < NotepadPlus > <nl> + < Native - Langue name = " Sardu " filename = " sardinian . xml " > <nl> + < Menu > <nl> + < Main > <nl> + < ! - - Main Menu Entries - - > <nl> + < Entries > <nl> + < Item id = " 0 " name = " & amp ; File " / > <nl> + < Item id = " 1 " name = " & amp ; Muda " / > <nl> + < Item id = " 2 " name = " C & amp ; hirca " / > <nl> + < Item id = " 3 " name = " & amp ; Faghe a bìdere " / > <nl> + < Item id = " 4 " name = " For & amp ; madu " / > <nl> + < Item id = " 5 " name = " & amp ; Limbàgiu " / > <nl> + < Item id = " 6 " name = " C & amp ; onfiguratzione " / > <nl> + < Item id = " 7 " name = " Macro " / > <nl> + < Item id = " 8 " name = " Esecuta " / > <nl> + < Item idName = " Plugins " name = " Plugins " / > <nl> + < Item idName = " Window " name = " Ventana " / > <nl> + < / Entries > <nl> + < ! - - Sub Menu Entries - - > <nl> + < SubEntries > <nl> + < Item posX = " 0 " posY = " 19 " name = " Files reghentes " / > <nl> + < Item posX = " 1 " posY = " 9 " name = " Còpia in is notas " / > <nl> + < Item posX = " 1 " posY = " 10 " name = " Indenta " / > <nl> + < Item posX = " 1 " posY = " 11 " name = " Cunverte caràteres " / > <nl> + < Item posX = " 1 " posY = " 12 " name = " Operatziones in is lìnias " / > <nl> + < Item posX = " 1 " posY = " 13 " name = " Pone a cummentu / sena cummentu " / > <nl> + < Item posX = " 1 " posY = " 14 " name = " Auto - cumprimentu " / > <nl> + < Item posX = " 1 " posY = " 15 " name = " Cunverte caràteres de fine lìnia " / > <nl> + < Item posX = " 1 " posY = " 16 " name = " Operatziones in is ispàtzios " / > <nl> + < Item posX = " 1 " posY = " 17 " name = " Apìtziga ispetziale " / > <nl> + < Item posX = " 2 " posY = " 16 " name = " Sinna totu " / > <nl> + < Item posX = " 2 " posY = " 17 " name = " Boga · nche marcadura " / > <nl> + < Item posX = " 2 " posY = " 18 " name = " Brinca a susu " / > <nl> + < Item posX = " 2 " posY = " 19 " name = " Brinca a giosso " / > <nl> + < Item posX = " 2 " posY = " 21 " name = " Sinnalibros " / > <nl> + < Item posX = " 3 " posY = " 4 " name = " Ammustra sìmbolos " / > <nl> + < Item posX = " 3 " posY = " 5 " name = " Zoom " / > <nl> + < Item posX = " 3 " posY = " 6 " name = " Move / Clona documentu currente " / > <nl> + < Item posX = " 3 " posY = " 16 " name = " Cuntrae livellu : " / > <nl> + < Item posX = " 3 " posY = " 17 " name = " Islarga livellu : " / > <nl> + < Item posX = " 3 " posY = " 21 " name = " Progetos " / > <nl> + < Item posX = " 4 " posY = " 5 " name = " Set de caràteres " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 0 " name = " Àrabu " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 1 " name = " Bàlticu " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 2 " name = " Tzèlticu " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 3 " name = " Tzirìllicu " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 4 " name = " Europa Tzentrale " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 5 " name = " Tzinesu " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 6 " name = " Europa orientale " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 7 " name = " Grecu " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 8 " name = " Ebràicu " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 9 " name = " Giaponesu " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 10 " name = " Coreanu " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 11 " name = " Europa de su nord " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 12 " name = " Tailandesu " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 13 " name = " Turcu " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 14 " name = " Europa Otzidentale " / > <nl> + < Item posX = " 4 " posY = " 5 " posZ = " 15 " name = " Vietnamita " / > <nl> + < Item posX = " 6 " posY = " 4 " name = " Importa " / > <nl> + < / SubEntries > <nl> + < ! - - all menu item - - > <nl> + < Commands > <nl> + < Item id = " 41001 " name = " & amp ; Nou " / > <nl> + < Item id = " 41002 " name = " & amp ; Aberi . . . " / > <nl> + < Item id = " 41003 " name = " Serra " / > <nl> + < Item id = " 41004 " name = " S & amp ; erra totus " / > <nl> + < Item id = " 41005 " name = " Serra totus francu su documentu currente " / > <nl> + < Item id = " 41006 " name = " & amp ; Sarba " / > <nl> + < Item id = " 41007 " name = " Sarba t & amp ; otu " / > <nl> + < Item id = " 41008 " name = " S & amp ; arba comente . . . " / > <nl> + < Item id = " 41010 " name = " Imprenta . . . " / > <nl> + < Item id = " 1001 " name = " Imprenta luego ! " / > <nl> + < Item id = " 41011 " name = " & amp ; Essi " / > <nl> + < Item id = " 41012 " name = " Aberi sessione . . . " / > <nl> + < Item id = " 41013 " name = " Sarba sessione . . . " / > <nl> + < Item id = " 41014 " name = " Càrriga torra dae su discu " / > <nl> + < Item id = " 41015 " name = " Sarba una còpia comente . . . " / > <nl> + < Item id = " 41016 " name = " Burra dae su discu " / > <nl> + < Item id = " 41017 " name = " Torra a numenare . . . " / > <nl> + < Item id = " 42001 " name = " Se & amp ; ga " / > <nl> + < Item id = " 42002 " name = " & amp ; Còpia " / > <nl> + < Item id = " 42003 " name = " Ann & amp ; udda " / > <nl> + < Item id = " 42004 " name = " & amp ; Torra · nche " / > <nl> + < Item id = " 42005 " name = " & amp ; Apìtziga " / > <nl> + < Item id = " 42006 " name = " & amp ; Burra " / > <nl> + < Item id = " 42007 " name = " Seletziona t & amp ; otu " / > <nl> + < Item id = " 42008 " name = " Pone · nche tabulatzione ( indent ) " / > <nl> + < Item id = " 42009 " name = " Boga · nche tabulatzione ( outdent ) " / > <nl> + < Item id = " 42010 " name = " Addòpia custa riga " / > <nl> + < Item id = " 42012 " name = " Partzi rigas " / > <nl> + < Item id = " 42013 " name = " Auni rigas " / > <nl> + < Item id = " 42014 " name = " Move a susu custa riga " / > <nl> + < Item id = " 42015 " name = " Move a giosso custa riga " / > <nl> + < Item id = " 42016 " name = " Totu in majùscolu " / > <nl> + < Item id = " 42017 " name = " Totu in minùscolu " / > <nl> + < Item id = " 42018 " name = " & amp ; Cumentza registratzione " / > <nl> + < Item id = " 42019 " name = " & amp ; Firma registratzione " / > <nl> + < Item id = " 42021 " name = " & amp ; Esecuta sa macro " / > <nl> + < Item id = " 42022 " name = " Pone sa seletzione a / sena cummentu " / > <nl> + < Item id = " 42023 " name = " Pone sa seletzione a cummentu " / > <nl> + < Item id = " 42024 " name = " Burra ispàtzios de badas " / > <nl> + < Item id = " 42025 " name = " Sarba sa macro registrada immoe " / > <nl> + < Item id = " 42026 " name = " Diretzione de su testu RTL " / > <nl> + < Item id = " 42027 " name = " Diretzione de su testu LTR " / > <nl> + < Item id = " 42028 " name = " File in letura isceti " / > <nl> + < Item id = " 42029 " name = " Àndala file currente " / > <nl> + < Item id = " 42030 " name = " Nùmene file currente " / > <nl> + < Item id = " 42031 " name = " Cartella currente " / > <nl> + < Item id = " 42032 " name = " Esecuta una macro medas bortas . . . " / > <nl> + < Item id = " 42033 " name = " Lìmpia su flag de letura isceti " / > <nl> + < Item id = " 42034 " name = " Editor a culunnas . . . " / > <nl> + < Item id = " 42035 " name = " Pone a cummentu su blocu ( onni riga ) " / > <nl> + < Item id = " 42036 " name = " Pone sena cummentu su blocu ( onni riga ) " / > <nl> + < Item id = " 42037 " name = " Modalidade culunna . . . " / > <nl> + < Item id = " 42038 " name = " Apìtziga càbidu HTML " / > <nl> + < Item id = " 42039 " name = " Apìtziga càbidu RTF " / > <nl> + < Item id = " 42040 " name = " Aberi totu is files reghentes " / > <nl> + < Item id = " 42041 " name = " Lìmpia lista files reghentes " / > <nl> + < Item id = " 42042 " name = " Burra ispàtzios in cummentzu " / > <nl> + < Item id = " 42043 " name = " Burra ispàtzios in cummentzu e acabbu " / > <nl> + < Item id = " 42044 " name = " Cunverte EOL in ispàtziu " / > <nl> + < Item id = " 42045 " name = " Boga · nche ispàtzios e EOL de badas " / > <nl> + < Item id = " 42046 " name = " Cunverte TAB in ispàtzios " / > <nl> + < Item id = " 42047 " name = " Cunverte ispàtzios in TAB " / > <nl> + < Item id = " 42048 " name = " Còpia càbidu binàriu " / > <nl> + < Item id = " 42049 " name = " Sega càbidu binàriu " / > <nl> + < Item id = " 42050 " name = " Apìtziga càbidu binàriu " / > <nl> + < Item id = " 42051 " name = " Pannellu caràteres " / > <nl> + < Item id = " 42052 " name = " Istòria notas " / > <nl> + < Item id = " 43001 " name = " & amp ; Agata . . . " / > <nl> + < Item id = " 43002 " name = " Agata & amp ; su chi sighit " / > <nl> + < Item id = " 43003 " name = " Muda cun . . . " / > <nl> + < Item id = " 43004 " name = " Bae a sa riga . . . " / > <nl> + < Item id = " 43005 " name = " Sinnalibru " / > <nl> + < Item id = " 43006 " name = " Sinnalibru chi sighit " / > <nl> + < Item id = " 43007 " name = " Sinnalibru de in antis " / > <nl> + < Item id = " 43008 " name = " Burra totus is Sinnalibros " / > <nl> + < Item id = " 43009 " name = " Bae a sa parèntesi chi currispondet " / > <nl> + < Item id = " 43010 " name = " Agata su de in antis " / > <nl> + < Item id = " 43011 " name = " Chirca incrementale " / > <nl> + < Item id = " 43013 " name = " Agata in is files . . . " / > <nl> + < Item id = " 43014 " name = " Agata ( volàtile ) su chi sighit " / > <nl> + < Item id = " 43015 " name = " Agata ( volàtile ) su de in antis " / > <nl> + < Item id = " 43016 " name = " Marca totu " / > <nl> + < Item id = " 43017 " name = " Boga · nche marcadura " / > <nl> + < Item id = " 43018 " name = " Sega rigas cun sinnalibros " / > <nl> + < Item id = " 43019 " name = " Còpia rigas cun sinnalibros " / > <nl> + < Item id = " 43020 " name = " Apìtziga ( càmbia ) rigas cun sinnalibros " / > <nl> + < Item id = " 43021 " name = " Burra rigas cun sinnalibros " / > <nl> + < Item id = " 43022 " name = " Imprea 1º istile " / > <nl> + < Item id = " 43024 " name = " Imprea 2º istile " / > <nl> + < Item id = " 43026 " name = " Imprea 3º istile " / > <nl> + < Item id = " 43028 " name = " Imprea 4º istile " / > <nl> + < Item id = " 43030 " name = " Imprea 5º istile " / > <nl> + < Item id = " 43023 " name = " Iscantzella 1º istile " / > <nl> + < Item id = " 43025 " name = " Iscantzella 2º istile " / > <nl> + < Item id = " 43027 " name = " Iscantzella 3º istile " / > <nl> + < Item id = " 43029 " name = " Iscantzella 4º istile " / > <nl> + < Item id = " 43031 " name = " Iscantzella 5º istile " / > <nl> + < Item id = " 43032 " name = " Iscantzella totus is istiles " / > <nl> + < Item id = " 43033 " name = " 1º istile " / > <nl> + < Item id = " 43034 " name = " 2º istile " / > <nl> + < Item id = " 43035 " name = " 3º istile " / > <nl> + < Item id = " 43036 " name = " 4º istile " / > <nl> + < Item id = " 43037 " name = " 5º istile " / > <nl> + < Item id = " 43038 " name = " Agata istile " / > <nl> + < Item id = " 43039 " name = " 1º istile " / > <nl> + < Item id = " 43040 " name = " 2º istile " / > <nl> + < Item id = " 43041 " name = " 3º istile " / > <nl> + < Item id = " 43042 " name = " 4º istile " / > <nl> + < Item id = " 43043 " name = " 5º istile " / > <nl> + < Item id = " 43044 " name = " Agata istile " / > <nl> + < Item id = " 43045 " name = " Ventana resurtados de chirca " / > <nl> + < Item id = " 43046 " name = " Resurtadu de chirca chi sighit " / > <nl> + < Item id = " 43047 " name = " Resurtadu de chirca de in antis " / > <nl> + < Item id = " 43048 " name = " Sèbera e agata su chi sighit " / > <nl> + < Item id = " 43049 " name = " Sèbera e agata su de in antis " / > <nl> + < Item id = " 43050 " name = " Fùrria sinnalibros " / > <nl> + < Item id = " 43051 " name = " Boga · nche lìnias non sèberadas " / > <nl> + < Item id = " 43052 " name = " Chirca caràteres . . . " / > <nl> + < Item id = " 44009 " name = " Modalidade Post - it " / > <nl> + < Item id = " 44010 " name = " Cuntrae totus is livellos " / > <nl> + < Item id = " 44011 " name = " Ventana impostatziones personalizadas " / > <nl> + < Item id = " 44019 " name = " Ammustra totus is caràteres " / > <nl> + < Item id = " 44020 " name = " Ammustra ghias de indentatzione " / > <nl> + < Item id = " 44022 " name = " A capu automàticu " / > <nl> + < Item id = " 44023 " name = " & amp ; Ismànnia testu " / > <nl> + < Item id = " 44024 " name = " & amp ; Ismèngua testu " / > <nl> + < Item id = " 44025 " name = " Ammustra ispàtzios e tabulatziones " / > <nl> + < Item id = " 44026 " name = " Ammustra acabu de riga " / > <nl> + < Item id = " 44029 " name = " Islarga totus is livellos " / > <nl> + < Item id = " 44030 " name = " Cuntrae custu livellu " / > <nl> + < Item id = " 44031 " name = " Islarga custu livellu " / > <nl> + < Item id = " 44032 " name = " Càstia a ischermu intreu " / > <nl> + < Item id = " 44033 " name = " Torra a su zoom predefinidu " / > <nl> + < Item id = " 44034 " name = " Semper in primu pranu " / > <nl> + < Item id = " 44035 " name = " Sincroniza iscurrimentu verticale " / > <nl> + < Item id = " 44036 " name = " Sincroniza iscurrimentu orizontale " / > <nl> + < Item id = " 44041 " name = " Ammustra sìmbulu de a capu automàticu " / > <nl> + < Item id = " 44042 " name = " Cua rigas " / > <nl> + < Item id = " 44049 " name = " Informatziones file . . . " / > <nl> + < Item id = " 44072 " name = " Ativa àtera bista " / > <nl> + < Item id = " 44081 " name = " Pannellu 1 " / > <nl> + < Item id = " 44082 " name = " Pannellu 2 " / > <nl> + < Item id = " 44083 " name = " Pannellu 3 " / > <nl> + < Item id = " 45001 " name = " Formadu Windows " / > <nl> + < Item id = " 45002 " name = " Formadu UNIX " / > <nl> + < Item id = " 45003 " name = " Formadu MAC " / > <nl> + < Item id = " 45004 " name = " Codìfica in ANSI " / > <nl> + < Item id = " 45005 " name = " Codìfica in UTF - 8 " / > <nl> + < Item id = " 45006 " name = " Codìfica in UCS - 2 Big Endian " / > <nl> + < Item id = " 45007 " name = " Codìfica in UCS - 2 Little Endian " / > <nl> + < Item id = " 45008 " name = " Codìfica in UTF - 8 ( sena BOM ) " / > <nl> + < Item id = " 45009 " name = " Cunverte in ANSI " / > <nl> + < Item id = " 45010 " name = " Cunverte in UTF - 8 ( sena BOM ) " / > <nl> + < Item id = " 45011 " name = " Cunverte in UTF - 8 " / > <nl> + < Item id = " 45012 " name = " Cunverte in UCS - 2 Big Endian " / > <nl> + < Item id = " 45013 " name = " Cunverte in UCS - 2 Little Endian " / > <nl> + < Item id = " 10001 " name = " Move a s ' àtera bista " / > <nl> + < Item id = " 10002 " name = " Còpia in s ' àtera bista " / > <nl> + < Item id = " 10003 " name = " Move a una ventana noa " / > <nl> + < Item id = " 10004 " name = " Còpia in una ventana noa " / > <nl> + < Item id = " 46001 " name = " Configura is istiles . . . " / > <nl> + < Item id = " 46015 " name = " Istile MS - DOS " / > <nl> + < Item id = " 46016 " name = " Testu normale " / > <nl> + < Item id = " 46017 " name = " File de resursas " / > <nl> + < Item id = " 46019 " name = " File MS INI " / > <nl> + < Item id = " 46080 " name = " Definidu dae s ' impitadore " / > <nl> + < Item id = " 47000 " name = " Informatziones a pitzu de . . . " / > <nl> + < Item id = " 47001 " name = " Pàgina printzipale Notepad + + " / > <nl> + < Item id = " 47002 " name = " Pàgina progetu Notepad + + " / > <nl> + < Item id = " 47003 " name = " Agitòriu in lìnia " / > <nl> + < Item id = " 47004 " name = " Forum " / > <nl> + < Item id = " 47005 " name = " Otenni àteros plugin " / > <nl> + < Item id = " 47006 " name = " Annoa Notepad + + " / > <nl> + < Item id = " 47008 " name = " Ghia . . . " / > <nl> + < Item id = " 48005 " name = " Importa Plugin . . . " / > <nl> + < Item id = " 48006 " name = " Importa Tema ( s ) . . . " / > <nl> + < Item id = " 48009 " name = " Teclas de sèberu lestru . . . " / > <nl> + < Item id = " 48011 " name = " Preferèntzias . . . " / > <nl> + < Item id = " 48016 " name = " Muda Incurtziadòrgios / Burra Macro . . . " / > <nl> + < Item id = " 48017 " name = " Muda Incurtziadòrgios / Burra Cumandu . . . " / > <nl> + < Item id = " 48018 " name = " Muda Menù Contestuale . . . " / > <nl> + < Item id = " 49000 " name = " E & amp ; secuta . . . " / > <nl> + < Item id = " 50000 " name = " Cumpri funtzione " / > <nl> + < Item id = " 50001 " name = " Cumpri paràula " / > <nl> + < Item id = " 50002 " name = " Paràmetros funtzione " / > <nl> + < / Commands > <nl> + < / Main > <nl> + < Splitter / > <nl> + < TabBar > <nl> + < Item order = " 0 " name = " Serra " / > <nl> + < Item order = " 1 " name = " Serra totas francu custa " / > <nl> + < Item order = " 2 " name = " Sarba " / > <nl> + < Item order = " 3 " name = " Sarba comente . . . " / > <nl> + < Item order = " 4 " name = " Imprenta " / > <nl> + < Item order = " 5 " name = " Move a s ' àtera bista " / > <nl> + < Item order = " 6 " name = " Còpia in s ' àtera bista " / > <nl> + < Item order = " 7 " name = " Còpia àndala file " / > <nl> + < Item order = " 8 " name = " Còpia nùmene file " / > <nl> + < Item order = " 9 " name = " Còpia àndala cartella " / > <nl> + < Item order = " 10 " name = " Torra a numenare file " / > <nl> + < Item order = " 11 " name = " Burra file " / > <nl> + < Item order = " 12 " name = " Letura isceti " / > <nl> + < Item order = " 13 " name = " Torra a impostare su flag de letura isceti " / > <nl> + < Item order = " 14 " name = " Move a una ventana noa " / > <nl> + < Item order = " 15 " name = " Còpia in una ventana noa " / > <nl> + < / TabBar > <nl> + < / Menu > <nl> + < Dialog > <nl> + < Find title = " Chirca . . . " titleFind = " Agata " titleReplace = " Càmbia " titleFindInFiles = " Chirca in is files " titleMark = " Evidèntzia " > > <nl> + < Item id = " 1 " name = " Agata su chi sighit " / > <nl> + < Item id = " 2 " name = " Serra " / > <nl> + < Item id = " 1603 " name = " Paràulas intreas isceti " / > <nl> + < Item id = " 1604 " name = " Distinghe lìteras majùscolas e minùscolas " / > <nl> + < Item id = " 1605 " name = " Espressione regulare " / > <nl> + < Item id = " 1606 " name = " Torra a susu si lompet a sa fine " / > <nl> + < Item id = " 1608 " name = " Càmbia " / > <nl> + < Item id = " 1609 " name = " Càmbia & amp ; totus " / > <nl> + < Item id = " 1611 " name = " Càmbia cun : " / > <nl> + < Item id = " 1612 " name = " A susu " / > <nl> + < Item id = " 1613 " name = " A giosso " / > <nl> + < Item id = " 1614 " name = " Conta ocurrèntzias " / > <nl> + < Item id = " 1615 " name = " Agata totus " / > <nl> + < Item id = " 1616 " name = " Imposta sinnalibru in sa riga " / > <nl> + < Item id = " 1617 " name = " Evidèntzia is resurtados " / > <nl> + < Item id = " 1618 " name = " Lìmpia pro onni chirca " / > <nl> + < Item id = " 1620 " name = " Agata : " / > <nl> + < Item id = " 1621 " name = " Diretzione " / > <nl> + < Item id = " 1624 " name = " Tipu de chirca " / > <nl> + < Item id = " 1625 " name = " Normale " / > <nl> + < Item id = " 1626 " name = " Islargada ( \ n , \ r , \ t , \ 0 , \ x . . . ) " / > <nl> + < Item id = " 1632 " name = " In sa seletzione " / > <nl> + < Item id = " 1633 " name = " Lìmpia " / > <nl> + < Item id = " 1635 " name = " Càmbia totu in is documentos abertos " / > <nl> + < Item id = " 1636 " name = " Chirca in is documentos abertos " / > <nl> + < Item id = " 1637 " name = " Chirca in is file " / > <nl> + < Item id = " 1640 " name = " Intrèvera ventana " / > <nl> + < Item id = " 1641 " name = " Agata totu in su documentu currente " / > <nl> + < Item id = " 1654 " name = " Filtros : " / > <nl> + < Item id = " 1655 " name = " Cartella : " / > <nl> + < Item id = " 1656 " name = " Agata totus " / > <nl> + < Item id = " 1658 " name = " In is sutacartellas " / > <nl> + < Item id = " 1659 " name = " In is sutacartellas cuadas " / > <nl> + < Item id = " 1660 " name = " & amp ; Càmbia in is files " / > <nl> + < Item id = " 1661 " name = " Sighe documentu currente " / > <nl> + < Item id = " 1686 " name = " T & amp ; rasparèntzia " / > <nl> + < Item id = " 1687 " name = " Si perdet su focus " / > <nl> + < Item id = " 1688 " name = " Semper " / > <nl> + < / Find > <nl> + < FindCharsInRange title = " Chirca caràteres . . . " > <nl> + < Item id = " 2910 " name = " Chirca " / > <nl> + < Item id = " 2 " name = " Serra " / > <nl> + < Item id = " 2901 " name = " Caràteres No - ASCII ( 128 - 255 ) " / > <nl> + < Item id = " 2902 " name = " Caràteres ASCII ( 0 - 127 ) " / > <nl> + < Item id = " 2903 " name = " Intervallu : " / > <nl> + < Item id = " 2906 " name = " A Susu " / > <nl> + < Item id = " 2907 " name = " A Giosso " / > <nl> + < Item id = " 2908 " name = " Diretzione " / > <nl> + < Item id = " 2909 " name = " Torra a susu si si lompet a sa fine " / > <nl> + < / FindCharsInRange > <nl> + < GoToLine title = " Bae a sa riga # " > <nl> + < Item id = " 1 " name = " & amp ; Bae ! " / > <nl> + < Item id = " 2 " name = " Annudda " / > <nl> + < Item id = " 2004 " name = " Ses in sa riga : " / > <nl> + < Item id = " 2005 " name = " Bae a sa riga : " / > <nl> + < Item id = " 2006 " name = " Ùrtima riga fasia : " / > <nl> + < Item id = " 2007 " name = " Riga " / > <nl> + < Item id = " 2008 " name = " Offset " / > <nl> + < / GoToLine > <nl> + < Run title = " Esecuta . . . " > <nl> + < Item id = " 1903 " name = " Programma chi si depet esecutare " / > <nl> + < Item id = " 1 " name = " Esecuta ! " / > <nl> + < Item id = " 2 " name = " Annudda " / > <nl> + < Item id = " 1904 " name = " Sarba . . . " / > <nl> + < / Run > <nl> + < StyleConfig title = " Configuradore de istilos " > <nl> + < Item id = " 2 " name = " Annudda " / > <nl> + < Item id = " 2301 " name = " Sarba e Serra " / > <nl> + < Item id = " 2303 " name = " Trasparèntzia " / > <nl> + < Item id = " 2306 " name = " Sèbera tema : " / > <nl> + < SubDialog > <nl> + < Item id = " 2204 " name = " Grussitu " / > <nl> + < Item id = " 2205 " name = " Corsivu " / > <nl> + < Item id = " 2206 " name = " Primu pranu : " / > <nl> + < Item id = " 2207 " name = " Isfundu : " / > <nl> + < Item id = " 2208 " name = " Tipu : " / > <nl> + < Item id = " 2209 " name = " Mannària : " / > <nl> + < Item id = " 2211 " name = " Istile : " / > <nl> + < Item id = " 2212 " name = " Colore " / > <nl> + < Item id = " 2213 " name = " Caràtere " / > <nl> + < Item id = " 2214 " name = " Est . predefinidas : " / > <nl> + < Item id = " 2216 " name = " Est . de s ' impitadore : " / > <nl> + < Item id = " 2218 " name = " Sutalineadu " / > <nl> + < Item id = " 2219 " name = " Paràulas crae predefinidas " / > <nl> + < Item id = " 2221 " name = " Paràulas crae definidas d / s ' impitadore " / > <nl> + < ! - - Custu " d / " est po " dae " : addolumannu est necessàriu ca chi nou no imbucat in sa label ! - - > <nl> + < Item id = " 2225 " name = " Limbàgiu : " / > <nl> + < Item id = " 2226 " name = " Abìlita colore globale in primu pranu " / > <nl> + < Item id = " 2227 " name = " Abìlita colore globale pro s ' isfundu " / > <nl> + < Item id = " 2228 " name = " Abìlita istile globale de su caràtere " / > <nl> + < Item id = " 2229 " name = " Abìlita mannària globale " / > <nl> + < Item id = " 2230 " name = " Abìlita istile globale pro su grussitu " / > <nl> + < Item id = " 2231 " name = " Abìlita istile globale pro su corsivu " / > <nl> + < Item id = " 2232 " name = " Abìlita istile globale pro su sutalineadu " / > <nl> + < / SubDialog > <nl> + < / StyleConfig > <nl> + < UserDefine title = " Impostatziones personalizadas " > <nl> + < Item id = " 20001 " name = " Àncora " / > <nl> + < Item id = " 20002 " name = " Torra a nùmenare " / > <nl> + < Item id = " 20003 " name = " Crea nou . . . " / > <nl> + < Item id = " 20004 " name = " Boga · nche " / > <nl> + < Item id = " 20005 " name = " Sarba comente . . . " / > <nl> + < Item id = " 20007 " name = " Limbàgiu personalizadu : " / > <nl> + < Item id = " 20009 " name = " Estensione : " / > <nl> + < Item id = " 20011 " name = " Trasparèntzia " / > <nl> + < Item id = " 20012 " name = " Inniora majùs / minùs " / > <nl> + < Item id = " 20015 " name = " Importa . . . " / > <nl> + < Item id = " 20016 " name = " Esporta . . . " / > <nl> + < Item id = " 0 " name = " Colore " / > <nl> + < Item id = " 1 " name = " Caràtere " / > <nl> + < Item id = " 2 " name = " Isfundu " / > <nl> + < Item id = " 3 " name = " Istile de su caràtere " / > <nl> + < Item id = " 4 " name = " Caràtere : " / > <nl> + < Item id = " 5 " name = " Mannària : " / > <nl> + < Item id = " 6 " name = " Grussitu " / > <nl> + < Item id = " 7 " name = " Corsivu " / > <nl> + < Item id = " 8 " name = " Sutaliniadu " / > <nl> + < Folder title = " Cartellas e Predefinidos " > <nl> + < Item id = " 21101 " name = " Impostatziones istile predefinidu " / > <nl> + < Item id = " 21201 " name = " Impostatziones paràulas crae de abertura brocu " / > <nl> + < Item id = " 21301 " name = " Impostatziones paràulas crae de serradura brocu " / > <nl> + < / Folder > <nl> + < Keywords title = " Lista Paràulas crae " > <nl> + < Item id = " 22101 " name = " 1º Grupu " / > <nl> + < Item id = " 22201 " name = " 2º Grupu " / > <nl> + < Item id = " 22301 " name = " 3º Grupu " / > <nl> + < Item id = " 22401 " name = " 4º Grupu " / > <nl> + < Item id = " 22113 " name = " Prefissu " / > <nl> + < Item id = " 22213 " name = " Prefissu " / > <nl> + < Item id = " 22313 " name = " Prefissu " / > <nl> + < Item id = " 22413 " name = " Prefissu " / > <nl> + < / Keywords > <nl> + < Comment title = " Cummentos e Nùmeros " > <nl> + < Item id = " 23301 " name = " Riga a cummentu " / > <nl> + < Item id = " 23101 " name = " Blocu de cummentos " / > <nl> + < Item id = " 23113 " name = " Abertura cummentu : " / > <nl> + < Item id = " 23115 " name = " Serradura cummentu : " / > <nl> + < Item id = " 23116 " name = " Paràula crae comente sìmbulu " / > <nl> + < Item id = " 23117 " name = " Paràulas crae comente sìmbulos " / > <nl> + < Item id = " 23201 " name = " Numeros " / > <nl> + < / Comment > <nl> + < Operator title = " Operadores " > <nl> + < Item id = " 24001 " name = " Abìlita caràtere de escape : " / > <nl> + < Item id = " 24107 " name = " Operadore " / > <nl> + < Item id = " 24103 " name = " Sìmbulos fasios " / > <nl> + < Item id = " 24101 " name = " Operadores ativados " / > <nl> + < Item id = " 24201 " name = " Delimitadore 1 " / > <nl> + < Item id = " 24211 " name = " Delimitatzione aberta : " / > <nl> + < Item id = " 24214 " name = " Delimitatzione serrada : " / > <nl> + < Item id = " 24301 " name = " Delimitadore 2 " / > <nl> + < Item id = " 24311 " name = " Delimitatzione aberta : " / > <nl> + < Item id = " 24314 " name = " Delimitatzione serrada : " / > <nl> + < / Operator > <nl> + < / UserDefine > <nl> + < Preference title = " Preferèntzias " > <nl> + < Item id = " 6001 " name = " Serra " / > <nl> + < Global title = " Generale " > <nl> + < Item id = " 6101 " name = " Barra de is istrumentos " / > <nl> + < Item id = " 6102 " name = " Cua " / > <nl> + < Item id = " 6103 " name = " Iconas piticas " / > <nl> + < Item id = " 6104 " name = " Iconas mannas " / > <nl> + < Item id = " 6105 " name = " Iconas istandard " / > <nl> + < Item id = " 6106 " name = " Barra de is ischedas " / > <nl> + < Item id = " 6107 " name = " Ammustra ischedas piticas " / > <nl> + < Item id = " 6108 " name = " Arrea ( tragu disabilitadu ) " / > <nl> + < Item id = " 6109 " name = " Iscùriga is ischedas inativas " / > <nl> + < Item id = " 6110 " name = " Pone sa lìnia colorada in s ' ischeda ativa " / > <nl> + < Item id = " 6111 " name = " Ammustra sa barra de istadu " / > <nl> + < Item id = " 6112 " name = " Tastu pro serrare in onni ischeda " / > <nl> + < Item id = " 6113 " name = " Dòpiu click serrat un ' ischeda " / > <nl> + < Item id = " 6118 " name = " Cua " / > <nl> + < Item id = " 6119 " name = " Imprea prus rigas " / > <nl> + < Item id = " 6120 " name = " Verticale " / > <nl> + < Item id = " 6121 " name = " Barra de is menus " / > <nl> + < Item id = " 6122 " name = " Cua ( Alt o F10 pro ammustrare ) " / > <nl> + < Item id = " 6123 " name = " Seletziona Limba " / > <nl> + < Item id = " 6125 " name = " Documentos abertos " / > <nl> + < Item id = " 6126 " name = " Faghe a bìdere " / > <nl> + < / Global > <nl> + < Scintillas title = " Personalizatzione cumponentes " > <nl> + < Item id = " 6216 " name = " Impostatziones cursore " / > <nl> + < Item id = " 6217 " name = " Largària : " / > <nl> + < Item id = " 6219 " name = " Lestresa : " / > <nl> + < Item id = " 6221 " name = " V " / > <nl> + < Item id = " 6222 " name = " L " / > <nl> + <nl> + < Item id = " 6303 " name = " Dimensione : " / > <nl> + <nl> + < Item id = " 6201 " name = " Istile de s ' acàbidu " / > <nl> + < Item id = " 6202 " name = " Simple " / > <nl> + < Item id = " 6203 " name = " Fritza " / > <nl> + < Item id = " 6204 " name = " Chircu " / > <nl> + < Item id = " 6205 " name = " Cuadradu " / > <nl> + <nl> + < Item id = " 6206 " name = " Faghe a bìdere is nùmeros de riga " / > <nl> + < Item id = " 6207 " name = " Faghe a bìdere is sinnalibros " / > <nl> + < Item id = " 6208 " name = " Faghe a bìdere làcana de culunna " / > <nl> + < Item id = " 6209 " name = " Nùmeru de culunna : " / > <nl> + <nl> + < Item id = " 6211 " name = " Impostatzione de sa làcana de culunna " / > <nl> + < Item id = " 6212 " name = " Modalidade ' lìnia ' " / > <nl> + < Item id = " 6213 " name = " Modalidade ' isfundu ' " / > <nl> + < Item id = " 6214 " name = " Evidèntzia custa riga " / > <nl> + < Item id = " 6224 " name = " Impostatziones sèberu mùltiplu " / > <nl> + < Item id = " 6225 " name = " Abìlita ( Ctrl + Click / seletzione ) " / > <nl> + < Item id = " 6226 " name = " Perunu " / > <nl> + < Item id = " 6227 " name = " A capu automàticu " / > <nl> + < Item id = " 6228 " name = " Default " / > <nl> + < Item id = " 6229 " name = " Alliniadu " / > <nl> + < Item id = " 6230 " name = " Indentadu " / > <nl> + < / Scintillas > <nl> + < NewDoc title = " Documentu / Directory nou predefinidu " > <nl> + < Item id = " - 1 " name = " Ammustra " / > <nl> + < Item id = " 6304 " name = " Documentos reghentes " / > <nl> + < Item id = " 6305 " name = " Non compides a s ' aviu " / > <nl> + < Item id = " 6306 " name = " Elementos impreados dae pagu " / > <nl> + < Item id = " 6401 " name = " Formadu " / > <nl> + < Item id = " 6402 " name = " Windows " / > <nl> + < Item id = " 6403 " name = " Unix " / > <nl> + < Item id = " 6404 " name = " Mac " / > <nl> + < Item id = " 6405 " name = " Codìfica " / > <nl> + < Item id = " 6406 " name = " ANSI " / > <nl> + < Item id = " 6407 " name = " UTF - 8 sena BOM " / > <nl> + < Item id = " 6408 " name = " UTF - 8 " / > <nl> + < Item id = " 6409 " name = " UCS - 2 Big endian " / > <nl> + < Item id = " 6410 " name = " UCS - 2 Little endian " / > <nl> + < Item id = " 6411 " name = " Limbàgiu predefinidu : " / > <nl> + < Item id = " 6413 " name = " Aberi file / Sarba cartella " / > <nl> + < Item id = " 6414 " name = " Segundu su documentu currente " / > <nl> + < Item id = " 6415 " name = " Ammenta s ' ùrtima cartella impreada " / > <nl> + < Item id = " 6419 " name = " Documentu nou " / > <nl> + < Item id = " 6420 " name = " Àplica a s ' aberta de files ANSI " / > <nl> + < Item id = " 6424 " name = " In unu sutamenù " / > <nl> + < Item id = " 6425 " name = " Nùmene file isceti " / > <nl> + < Item id = " 6426 " name = " Àndala intrea " / > <nl> + < Item id = " 6427 " name = " Personaliza longària màssima : " / > <nl> + < / NewDoc > <nl> + < FileAssoc title = " Assòtziu tipos de file " > <nl> + < Item id = " 4009 " name = " Estens . suportadas : " / > <nl> + < Item id = " 4010 " name = " Estens . registradas : " / > <nl> + < / FileAssoc > <nl> + < LangMenu title = " Menù Limbàgiu / Impostatziones tabulatziones " > <nl> + < Item id = " 6505 " name = " A disponimentu " / > <nl> + < Item id = " 6506 " name = " No abilitados " / > <nl> + < Item id = " 6507 " name = " Abbàtziga su menù " / > <nl> + < Item id = " 6508 " name = " Menù & quot ; Limbàgios & quot ; " / > <nl> + < Item id = " 6510 " name = " Imprea predefinidu " / > <nl> + < Item id = " 6301 " name = " Impostatziones Tabulatziones " / > <nl> + < Item id = " 6302 " name = " Càmbia cun ispàtzios " / > <nl> + < Item id = " 6303 " name = " Dimensione tabulatzione : " / > <nl> + < / LangMenu > <nl> + < Print title = " Imprenta " > <nl> + < Item id = " 6601 " name = " Nùmeros de riga " / > <nl> + < Item id = " 6602 " name = " Optziones colore " / > <nl> + < Item id = " 6603 " name = " WYSIWYG " / > <nl> + < Item id = " 6604 " name = " Fùrria " / > <nl> + < Item id = " 6605 " name = " Biancu e nieddu " / > <nl> + < Item id = " 6606 " name = " No imprentes is colores de isfundu " / > <nl> + < Item id = " 6607 " name = " Impostatzione de is làcanas ( unidade : mm ) " / > <nl> + < Item id = " 6612 " name = " Manca " / > <nl> + < Item id = " 6613 " name = " Susu " / > <nl> + < Item id = " 6614 " name = " Dereta " / > <nl> + < Item id = " 6615 " name = " Giosso " / > <nl> + < Item id = " 6706 " name = " Grussitu " / > <nl> + < Item id = " 6707 " name = " Corsivu " / > <nl> + < Item id = " 6708 " name = " Intestatzione " / > <nl> + < Item id = " 6709 " name = " Setzione de manca " / > <nl> + < Item id = " 6710 " name = " Setzione tzentrale " / > <nl> + < Item id = " 6711 " name = " Setzione de dereta " / > <nl> + < Item id = " 6717 " name = " Grussitu " / > <nl> + < Item id = " 6718 " name = " Corsivu " / > <nl> + < Item id = " 6719 " name = " Pee de pàgina " / > <nl> + < Item id = " 6720 " name = " Setzione de manca " / > <nl> + < Item id = " 6721 " name = " Setzione tzentrale " / > <nl> + < Item id = " 6722 " name = " Setzione de dereta " / > <nl> + < Item id = " 6723 " name = " Annànghere " / > <nl> + < Item id = " 6725 " name = " Variàbile : " / > <nl> + < Item id = " 6727 " name = " Sèbera parte " / > <nl> + < Item id = " 6728 " name = " Intestatzione e pee de pàgina " / > <nl> + < / Print > <nl> + < MISC title = " Vàrias " > <nl> + < Item id = " 6307 " name = " Ativa autorilevamentu " / > <nl> + < Item id = " 6308 " name = " Mìnima in s ' àrea de notìfica " / > <nl> + < Item id = " 6309 " name = " Ammenta sa sessione currente a s ' aviu chi sighit " / > <nl> + < Item id = " 6312 " name = " Autorilevamentu de s ' istadu de su file " / > <nl> + < Item id = " 6313 " name = " Annoa sena notìfica " / > <nl> + < Item id = " 6114 " name = " Abìlita " / > <nl> + < Item id = " 6115 " name = " Indentatzione automàtica " / > <nl> + < Item id = " 6117 " name = " Pretzedèntzia a is files prus reghentes " / > <nl> + < Item id = " 6318 " name = " Impostatziones acàpios cracàbiles " / > <nl> + < Item id = " 6319 " name = " Abìlita " / > <nl> + < Item id = " 6320 " name = " Non disìnnnies sutaliniadura " / > <nl> + < Item id = " 6322 " name = " Est . file de sessione : " / > <nl> + < Item id = " 6323 " name = " Annoa automaticamente Notepad + + " / > <nl> + < Item id = " 6324 " name = " Càmbia documentu ( CTRL + TAB ) " / > <nl> + < Item id = " 6325 " name = " Bae a s ' ùrtima riga a pustis de s ' annou " / > <nl> + < Item id = " 6326 " name = " Evidentziatzione intelligente " / > <nl> + < Item id = " 6327 " name = " Abìlita " / > <nl> + < Item id = " 6328 " name = " Evidèntzia atributos " / > <nl> + < Item id = " 6329 " name = " Evidèntzia tag currispondentes " / > <nl> + < Item id = " 6330 " name = " Evidèntzia partes php / asp " / > <nl> + < Item id = " 6331 " name = " Ammustra isceti nùmene file in sa barra de su tìtulu " / > <nl> + < / MISC > <nl> + < Backup title = " Backup / Auto - cumprimentu " > <nl> + < Item id = " 6801 " name = " Backup " / > <nl> + < Item id = " 6803 " name = " Cartella : " / > <nl> + < Item id = " 6804 " name = " Cartella de backup personalizada : " / > <nl> + < Item id = " 6807 " name = " Auto - cumprimentu " / > <nl> + < Item id = " 6808 " name = " Ativa s ' auto - cumprimentu pro cada input " / > <nl> + < Item id = " 6809 " name = " Cumprimentu funtzione " / > <nl> + < Item id = " 6810 " name = " Cumprimentu paràula " / > <nl> + < Item id = " 6811 " name = " Dae " / > <nl> + < Item id = " 6813 " name = " º caràtere " / > <nl> + < Item id = " 6814 " name = " Valores vàlidos : 1 - 9 " / > <nl> + < Item id = " 6815 " name = " Ammustra paràm . funtziones insertende · ddos " / > <nl> + < Item id = " 6315 " name = " Perunu " / > <nl> + < Item id = " 6316 " name = " Backup simpli " / > <nl> + < Item id = " 6317 " name = " Backup cun detàllios " / > <nl> + < / Backup > <nl> + < / Preference > <nl> + < MultiMacro title = " Esecuta macros medas bortas " > <nl> + < Item id = " 1 " name = " Esecuta " / > <nl> + < Item id = " 2 " name = " Annudda " / > <nl> + < Item id = " 8006 " name = " Macro chi si depet esecutare : " / > <nl> + < Item id = " 8001 " name = " Esecuta " / > <nl> + < Item id = " 8005 " name = " bortas " / > <nl> + < Item id = " 8002 " name = " Esecuta finas a sa fine de su file " / > <nl> + < / MultiMacro > <nl> + < Window title = " Ventanas " > <nl> + < Item id = " 1 " name = " Ativa " / > <nl> + < Item id = " 2 " name = " OK " / > <nl> + < Item id = " 7002 " name = " Sarba " / > <nl> + < Item id = " 7003 " name = " Serra is ventanas " / > <nl> + < Item id = " 7004 " name = " Òrdina is ischedas " / > <nl> + < / Window > <nl> + < ColumnEditor title = " Editor a culunnas " > <nl> + < Item id = " 2023 " name = " Testu de pònnere " / > <nl> + < Item id = " 2033 " name = " Nùmeru de pònnere " / > <nl> + < Item id = " 2030 " name = " Nùmeru de cumentzu : " / > <nl> + < Item id = " 2031 " name = " Cresche de : " / > <nl> + < Item id = " 2035 " name = " Zeros in cumentzu " / > <nl> + < Item id = " 2032 " name = " Formadu " / > <nl> + < Item id = " 2024 " name = " Detzimale " / > <nl> + < Item id = " 2025 " name = " Otale " / > <nl> + < Item id = " 2026 " name = " Esadetzimale " / > <nl> + < Item id = " 2027 " name = " Binàriu " / > <nl> + < Item id = " 1 " name = " OK " / > <nl> + < Item id = " 2 " name = " Annudda " / > <nl> + < / ColumnEditor > <nl> + < / Dialog > <nl> + < MessageBox > <nl> + < ContextMenuXmlEditWaring title = " Muda menù contestuale " message = " Sa modìfica de su file contextMenu . xml permitit de mudare su menù contestuale de Notepad + + . & # x0A ; Est pretzisu aviare torra Notepad + + pro chi is modìficas fatas in su file contextMenu . xml fatzant efetu . " / > <nl> + < NppHelpAbsentWaring title = " Su file no esistit " message = " & # x0A ; no esistit . Iscàrriga su file dae su giassu de Notepad + + . " / > <nl> + < SaveCurrentModifWaring title = " Sarba modìficas currentes " message = " Depes sarbare is modìficas currentes . & # x0A ; Totu is modìficas sarbadas non podent èssere annuddadas . & # x0A ; & # x0A ; Boles sighire ? " / > <nl> + < LoseUndoAbilityWaring title = " Atentzione : Pèrdida de sa possibbilidade de ripristinare " message = " Depes sarbare is modìficas currentes . & # x0A ; Totu is modìficas sarbadas non podent èssere annuddadas . & # x0A ; & # x0A ; Boles sighire ? " / > <nl> + < CannotMoveDoc title = " Invia a una istànzia noa de Notepad + + " message = " Su documentu est istadu modificadu , est a ddu sarbare in antis de sighire . " / > <nl> + < DocReloadWarning title = " Càrriga torra " message = " Ses seguru chi boles carrigare torra su file ? Onni Muda fata s ' at a pèrdere . " / > <nl> + < FileLockedWarning title = " Sarbamentu faddidu " message = " Verificare chi su file non siat abertu cun carchi àteru programma . " / > <nl> + < FileAlreadyOpenedInNpp title = " " message = " Su file est già abertu in Notepad + + . " / > <nl> + < DeleteFileFailed title = " Eliminatzione file " message = " Eliminatzione de su file faddida . " / > <nl> + < / MessageBox > <nl> + < ProjectManager > <nl> + < PanelTitle name = " Progetos " / > <nl> + < WorkspaceRootName name = " Workspace " / > <nl> + < Menus > <nl> + < Entries > <nl> + < Item id = " 0 " name = " Workspace " / > <nl> + < Item id = " 1 " name = " Muda " / > <nl> + < / Entries > <nl> + < WorkspaceMenu > <nl> + < Item id = " 3122 " name = " Workspace nou " / > <nl> + < Item id = " 3123 " name = " Aberi workspace " / > <nl> + < Item id = " 3124 " name = " Càrriga torra Workspace " / > <nl> + < Item id = " 3125 " name = " Sarba " / > <nl> + < Item id = " 3126 " name = " Sarba comente . . . " / > <nl> + < Item id = " 3127 " name = " Sarba una còpia comente . . . " / > <nl> + < Item id = " 3121 " name = " Annanghe unu progetu nou " / > <nl> + < / WorkspaceMenu > <nl> + < ProjectMenu > <nl> + < Item id = " 3111 " name = " Càmbia su nùmene " / > <nl> + < Item id = " 3112 " name = " Annanghe cartella " / > <nl> + < Item id = " 3113 " name = " Annanghe files . . . " / > <nl> + < Item id = " 3114 " name = " Boga · nche " / > <nl> + < Item id = " 3117 " name = " Annanghe files dae una cartella . . . " / > <nl> + < / ProjectMenu > <nl> + < FolderMenu > <nl> + < Item id = " 3111 " name = " Càmbia su nùmene " / > <nl> + < Item id = " 3112 " name = " Annanghe cartella " / > <nl> + < Item id = " 3113 " name = " Annanghe files . . . " / > <nl> + < Item id = " 3114 " name = " Boga · nche " / > <nl> + < Item id = " 3117 " name = " Annanghe files dae una cartella . . . " / > <nl> + < / FolderMenu > <nl> + < FileMenu > <nl> + < Item id = " 3111 " name = " Càmbia su nùmene " / > <nl> + < Item id = " 3115 " name = " Boga · nche " / > <nl> + < Item id = " 3116 " name = " Muda s ' andala de su file " / > <nl> + < / FileMenu > <nl> + < / Menus > <nl> + < / ProjectManager > <nl> + < / Native - Langue > <nl> + < / NotepadPlus > <nl> mmm a / PowerEditor / installer / nativeLang / slovak . xml <nl> ppp b / PowerEditor / installer / nativeLang / slovak . xml <nl> <nl> < Item id = " 2909 " name = " Dokola " / > <nl> < / FindCharsInRange > <nl> < / Dialog > <nl> + < MessageBox > <nl> + < ContextMenuXmlEditWaring title = " Upravenie kontextovà © ho menu " message = " Upravenie contextMenu . xml và ¡ m umožnà zmeniÅ ¥ vaÅ ¡ e vyskakovacie kontextovà © menu v Notepade + + . & # x0A ; Je potrebnà © reÅ ¡ tartovaÅ ¥ và ¡ Å ¡ Notepad + + , aby zmeny nadobudli ÃºÄ innosÅ ¥ po úprave contextMenu . xml . " / > <nl> + < NppHelpAbsentWaring title = " Súbor neexistuje " message = " & # x0A ; neexistuje . Prosà m , stiahnite ho z webstrà ¡ nky Notepadu + + . " / > <nl> + < SaveCurrentModifWaring title = " UložiÅ ¥ aktuà ¡ lnu modifikà ¡ ciu " message = " Mali by ste uložiÅ ¥ aktuà ¡ lnu modifikà ¡ ciu . & # x0A ; VÅ ¡ etky uloženà © zmeny nebudú mà ´ cÅ ¥ byÅ ¥ vrà ¡ tenà © . & # x0A ; & # x0A ; PokraÄ ovaÅ ¥ ? " / > <nl> + < LoseUndoAbilityWaring title = " Varovanie o strate možnosti à sÅ ¥ spà ¤ Å ¥ " message = " Mali by ste uložiÅ ¥ aktuà ¡ lnu modifikà ¡ ciu . & # x0A ; VÅ ¡ etky uloženà © zmeny nebudú mà ´ cÅ ¥ byÅ ¥ vrà ¡ tenà © . & # x0A ; & # x0A ; PokraÄ ovaÅ ¥ ? " / > <nl> + < CannotMoveDoc title = " PresunúŠ¥ do novej inÅ ¡ tancie Notepadu + + " message = " Dokument je zmenený , uložte ho , a potom skúste znova . " / > <nl> + < DocReloadWarning title = " Znova naÄ Ã taÅ ¥ " message = " Ste si istý , že chcete znova naÄ Ã taÅ ¥ aktuà ¡ lny súbor a stratiÅ ¥ tak zmeny vykonanà © v Notepade + + ? " / > <nl> + < FileLockedWarning title = " Uloženie zlyhalo " message = " Prosà m , skontrolujte Ä i je tento súbor otvorený v inom programe " / > <nl> + < FileAlreadyOpenedInNpp title = " " message = " Súbor už je otvorený v Notepade + + . " / > <nl> + < DeleteFileFailed title = " Odstrà ¡ nenie súboru " message = " Odstrà ¡ nenie súboru zlyhalo " / > <nl> + < / MessageBox > <nl> + < ProjectManager > <nl> + < PanelTitle name = " Projekt " / > <nl> + < WorkspaceRootName name = " Pracovný priestor " / > <nl> + < NewProjectName name = " Nà ¡ zov projektu " / > <nl> + < NewFolderName name = " Nà ¡ zov prieÄ inka " / > <nl> + < Menus > <nl> + < Entries > <nl> + < Item id = " 0 " name = " Pracovný priestor " / > <nl> + < Item id = " 1 " name = " UpraviÅ ¥ " / > <nl> + < / Entries > <nl> + < WorkspaceMenu > <nl> + < Item id = " 3122 " name = " Nový prac . priestor " / > <nl> + < Item id = " 3123 " name = " OtvoriÅ ¥ prac . priestor " / > <nl> + < Item id = " 3124 " name = " Znova naÄ Ã taÅ ¥ prac . priestor " / > <nl> + < Item id = " 3125 " name = " UložiÅ ¥ " / > <nl> + < Item id = " 3126 " name = " UložiÅ ¥ ako . . . " / > <nl> + < Item id = " 3127 " name = " UložiÅ ¥ kópiu ako . . . " / > <nl> + < Item id = " 3121 " name = " PridaÅ ¥ nový projekt " / > <nl> + < / WorkspaceMenu > <nl> + < ProjectMenu > <nl> + < Item id = " 3111 " name = " PremenovaÅ ¥ " / > <nl> + < Item id = " 3112 " name = " PridaÅ ¥ prieÄ inok " / > <nl> + < Item id = " 3113 " name = " PridaÅ ¥ súbory . . . " / > <nl> + < Item id = " 3114 " name = " Odstrà ¡ niÅ ¥ " / > <nl> + < Item id = " 3117 " name = " PridaÅ ¥ súbory z prieÄ inka . . . " / > <nl> + < / ProjectMenu > <nl> + < FolderMenu > <nl> + < Item id = " 3111 " name = " PremenvoaÅ ¥ " / > <nl> + < Item id = " 3112 " name = " PridaÅ ¥ prieÄ inok " / > <nl> + < Item id = " 3113 " name = " PridaÅ ¥ súbory . . . " / > <nl> + < Item id = " 3114 " name = " Odstrà ¡ niÅ ¥ " / > <nl> + < Item id = " 3117 " name = " PridaÅ ¥ súbory z prieÄ inka . . . " / > <nl> + < / FolderMenu > <nl> + < FileMenu > <nl> + < Item id = " 3111 " name = " PremenovaÅ ¥ " / > <nl> + < Item id = " 3115 " name = " Odstrà ¡ niÅ ¥ " / > <nl> + < Item id = " 3116 " name = " UpraviÅ ¥ cestu k súboru " / > <nl> + < / FileMenu > <nl> + < / Menus > <nl> + < / ProjectManager > <nl> < / Native - Langue > <nl> < / NotepadPlus > <nl>
|
[ UPDATE ] Update Localization files .
|
notepad-plus-plus/notepad-plus-plus
|
be0793935508c06683e8a10f1c507f363b7623e3
|
2012-01-02T22:14:25Z
|
mmm a / src / compiler / js - create - lowering . cc <nl> ppp b / src / compiler / js - create - lowering . cc <nl> Reduction JSCreateLowering : : ReduceJSCreateIterResultObject ( Node * node ) { <nl> DCHECK_EQ ( IrOpcode : : kJSCreateIterResultObject , node - > opcode ( ) ) ; <nl> Node * value = NodeProperties : : GetValueInput ( node , 0 ) ; <nl> Node * done = NodeProperties : : GetValueInput ( node , 1 ) ; <nl> - Node * context = NodeProperties : : GetContextInput ( node ) ; <nl> Node * effect = NodeProperties : : GetEffectInput ( node ) ; <nl> <nl> - / / Load the JSIteratorResult map for the { context } . <nl> - Node * native_context = effect = graph ( ) - > NewNode ( <nl> - javascript ( ) - > LoadContext ( 0 , Context : : NATIVE_CONTEXT_INDEX , true ) , <nl> - context , context , effect ) ; <nl> - Node * iterator_result_map = effect = graph ( ) - > NewNode ( <nl> - javascript ( ) - > LoadContext ( 0 , Context : : ITERATOR_RESULT_MAP_INDEX , true ) , <nl> - native_context , native_context , effect ) ; <nl> + Node * iterator_result_map ; <nl> + Handle < Context > native_context ; <nl> + if ( GetSpecializationNativeContext ( node ) . ToHandle ( & native_context ) ) { <nl> + / / Specialize to the constant JSIteratorResult map to enable map check <nl> + / / elimination to eliminate subsequent checks in case of inlining . <nl> + iterator_result_map = jsgraph ( ) - > HeapConstant ( <nl> + handle ( native_context - > iterator_result_map ( ) , isolate ( ) ) ) ; <nl> + } else { <nl> + / / Load the JSIteratorResult map for the { context } . <nl> + Node * context = NodeProperties : : GetContextInput ( node ) ; <nl> + Node * native_context = effect = graph ( ) - > NewNode ( <nl> + javascript ( ) - > LoadContext ( 0 , Context : : NATIVE_CONTEXT_INDEX , true ) , <nl> + context , context , effect ) ; <nl> + iterator_result_map = effect = graph ( ) - > NewNode ( <nl> + javascript ( ) - > LoadContext ( 0 , Context : : ITERATOR_RESULT_MAP_INDEX , true ) , <nl> + native_context , native_context , effect ) ; <nl> + } <nl> <nl> / / Emit code to allocate the JSIteratorResult instance . <nl> AllocationBuilder a ( jsgraph ( ) , effect , graph ( ) - > start ( ) ) ; <nl> MaybeHandle < LiteralsArray > JSCreateLowering : : GetSpecializationLiterals ( <nl> return MaybeHandle < LiteralsArray > ( ) ; <nl> } <nl> <nl> + MaybeHandle < Context > JSCreateLowering : : GetSpecializationNativeContext ( <nl> + Node * node ) { <nl> + Node * const context = NodeProperties : : GetContextInput ( node ) ; <nl> + return NodeProperties : : GetSpecializationNativeContext ( context , <nl> + native_context_ ) ; <nl> + } <nl> + <nl> Factory * JSCreateLowering : : factory ( ) const { return isolate ( ) - > factory ( ) ; } <nl> <nl> Graph * JSCreateLowering : : graph ( ) const { return jsgraph ( ) - > graph ( ) ; } <nl> mmm a / src / compiler / js - create - lowering . h <nl> ppp b / src / compiler / js - create - lowering . h <nl> class JSCreateLowering final : public AdvancedReducer { <nl> public : <nl> JSCreateLowering ( Editor * editor , CompilationDependencies * dependencies , <nl> JSGraph * jsgraph , MaybeHandle < LiteralsArray > literals_array , <nl> - Zone * zone ) <nl> + MaybeHandle < Context > native_context , Zone * zone ) <nl> : AdvancedReducer ( editor ) , <nl> dependencies_ ( dependencies ) , <nl> jsgraph_ ( jsgraph ) , <nl> literals_array_ ( literals_array ) , <nl> + native_context_ ( native_context ) , <nl> zone_ ( zone ) { } <nl> ~ JSCreateLowering ( ) final { } <nl> <nl> class JSCreateLowering final : public AdvancedReducer { <nl> <nl> / / Infers the LiteralsArray to use for a given { node } . <nl> MaybeHandle < LiteralsArray > GetSpecializationLiterals ( Node * node ) ; <nl> + / / Infers the native context to use for a given { node } . <nl> + MaybeHandle < Context > GetSpecializationNativeContext ( Node * node ) ; <nl> <nl> Factory * factory ( ) const ; <nl> Graph * graph ( ) const ; <nl> class JSCreateLowering final : public AdvancedReducer { <nl> CompilationDependencies * const dependencies_ ; <nl> JSGraph * const jsgraph_ ; <nl> MaybeHandle < LiteralsArray > const literals_array_ ; <nl> + MaybeHandle < Context > const native_context_ ; <nl> Zone * const zone_ ; <nl> } ; <nl> <nl> mmm a / src / compiler / pipeline . cc <nl> ppp b / src / compiler / pipeline . cc <nl> struct TypedLoweringPhase { <nl> : MaybeHandle < LiteralsArray > ( ) ; <nl> JSCreateLowering create_lowering ( <nl> & graph_reducer , data - > info ( ) - > dependencies ( ) , data - > jsgraph ( ) , <nl> - literals_array , temp_zone ) ; <nl> + literals_array , data - > native_context ( ) , temp_zone ) ; <nl> JSTypedLowering : : Flags typed_lowering_flags = JSTypedLowering : : kNoFlags ; <nl> if ( data - > info ( ) - > is_deoptimization_enabled ( ) ) { <nl> typed_lowering_flags | = JSTypedLowering : : kDeoptimizationEnabled ; <nl> mmm a / test / unittests / compiler / js - create - lowering - unittest . cc <nl> ppp b / test / unittests / compiler / js - create - lowering - unittest . cc <nl> class JSCreateLoweringTest : public TypedGraphTest { <nl> / / TODO ( titzer ) : mock the GraphReducer here for better unit testing . <nl> GraphReducer graph_reducer ( zone ( ) , graph ( ) ) ; <nl> JSCreateLowering reducer ( & graph_reducer , & deps_ , & jsgraph , <nl> - MaybeHandle < LiteralsArray > ( ) , zone ( ) ) ; <nl> + MaybeHandle < LiteralsArray > ( ) , <nl> + MaybeHandle < Context > ( ) , zone ( ) ) ; <nl> return reducer . Reduce ( node ) ; <nl> } <nl> <nl>
|
[ turbofan ] Properly specialize JSCreateIterResultObject map .
|
v8/v8
|
50c458a389d3f3878c72adc085f1e0caceb51ac6
|
2016-10-05T06:32:15Z
|
mmm a / tests / CMakeLists . txt <nl> ppp b / tests / CMakeLists . txt <nl> if ( NCNN_PIXEL ) <nl> ncnn_add_test ( mat_pixel ) <nl> endif ( ) <nl> <nl> + ncnn_add_test ( cpu ) <nl> ncnn_add_test ( squeezenet ) <nl> <nl> if ( CMAKE_SYSTEM_NAME STREQUAL " Emscripten " ) <nl> new file mode 100644 <nl> index 0000000000 . . b727edd6f6 <nl> mmm / dev / null <nl> ppp b / tests / test_cpu . cpp <nl> <nl> + # include < stdio . h > <nl> + <nl> + # include " cpu . h " <nl> + <nl> + # if defined __ANDROID__ | | defined __linux__ <nl> + <nl> + static int test_cpu_set ( ) <nl> + { <nl> + ncnn : : CpuSet set ; <nl> + <nl> + if ( set . num_enabled ( ) ! = 0 ) <nl> + { <nl> + fprintf ( stderr , " By default all cpus should be disabled \ n " ) ; <nl> + return 1 ; <nl> + } <nl> + <nl> + set . enable ( 0 ) ; <nl> + if ( ! set . is_enabled ( 0 ) ) <nl> + { <nl> + fprintf ( stderr , " CpuSet enable doesn ' t work \ n " ) ; <nl> + return 1 ; <nl> + } <nl> + <nl> + if ( set . num_enabled ( ) ! = 1 ) <nl> + { <nl> + fprintf ( stderr , " Only one cpu should be enabled \ n " ) ; <nl> + return 1 ; <nl> + } <nl> + <nl> + set . disable ( 0 ) ; <nl> + if ( set . is_enabled ( 0 ) ) <nl> + { <nl> + fprintf ( stderr , " CpuSet disable doesn ' t work \ n " ) ; <nl> + return 1 ; <nl> + } <nl> + <nl> + return 0 ; <nl> + } <nl> + <nl> + static int test_cpu_info ( ) <nl> + { <nl> + if ( ncnn : : get_cpu_count ( ) > = 0 & & ncnn : : get_little_cpu_count ( ) > = 0 & & ncnn : : get_big_cpu_count ( ) > = 0 ) <nl> + { <nl> + return 0 ; <nl> + } <nl> + else <nl> + { <nl> + fprintf ( stderr , " The system cannot have a negative number of processors \ n " ) ; <nl> + return 1 ; <nl> + } <nl> + } <nl> + <nl> + static int test_cpu_omp ( ) <nl> + { <nl> + if ( ncnn : : get_omp_num_threads ( ) > = 0 & & ncnn : : get_omp_thread_num ( ) > = 0 & & ncnn : : get_omp_dynamic ( ) > = 0 ) <nl> + { <nl> + return 0 ; <nl> + } <nl> + else <nl> + { <nl> + fprintf ( stderr , " The OMP cannot have a negative number of processors \ n " ) ; <nl> + return 1 ; <nl> + } <nl> + } <nl> + <nl> + # else <nl> + <nl> + static int test_cpu_set ( ) <nl> + { <nl> + return 0 ; <nl> + } <nl> + <nl> + static int test_cpu_info ( ) <nl> + { <nl> + return 0 ; <nl> + } <nl> + <nl> + static int test_cpu_omp ( ) <nl> + { <nl> + return 0 ; <nl> + } <nl> + <nl> + # endif <nl> + <nl> + int main ( ) <nl> + { <nl> + return 0 <nl> + | | test_cpu_set ( ) <nl> + | | test_cpu_info ( ) <nl> + | | test_cpu_omp ( ) ; <nl> + } <nl>
|
Added unittest for cpu module . Improved code coverage . ( )
|
Tencent/ncnn
|
a9cd60a9951c9c5f2b76271fb4223b39902d39f9
|
2020-11-13T03:02:05Z
|
mmm a / tensorflow / python / keras / distribute / BUILD <nl> ppp b / tensorflow / python / keras / distribute / BUILD <nl> py_test ( <nl> srcs = [ " multi_worker_tutorial_test . py " ] , <nl> python_version = " PY3 " , <nl> shard_count = 5 , <nl> + tags = [ <nl> + " noasan " , <nl> + " nomsan " , <nl> + " notsan " , <nl> + ] , # TODO ( b / 156029134 ) <nl> deps = [ <nl> " / / tensorflow / python : platform " , <nl> " / / tensorflow / python / data / ops : dataset_ops " , <nl>
|
Disable a test from sanitizers .
|
tensorflow/tensorflow
|
797ac7bf875ac1924fd7c8e27acb7fc74c091b7c
|
2020-05-07T23:51:18Z
|
mmm a / docs / RELEASE_NOTES . md <nl> ppp b / docs / RELEASE_NOTES . md <nl> <nl> - # cocos2d - x v3 . 3 Release Notes # <nl> + # cocos2d - x v3 . 4 Release Notes # <nl> <nl> * * Table of Contents * * * generated with [ DocToc ] ( http : / / doctoc . herokuapp . com / ) * <nl> <nl> Run <nl> <nl> Please refer to this document : [ ReadMe ] ( . . / README . md ) <nl> <nl> - # v3 . 3 <nl> <nl> - It just fixed some bugs since v3 . 3rc2 . <nl> + # v3 . 4beta0 <nl> <nl> - # v3 . 3rc2 <nl> + # # Highlights of v3 . 4beta0 <nl> <nl> - # # Highlights of v3 . 3rc2 <nl> - * Support for android arm64 architecture , all test cases run on Nexus 9 <nl> - * Cocos Studio Reader : Replace [ Protobuffer ] ( https : / / github . com / google / protobuf ) by [ FlatBuffer ] ( https : / / github . com / google / flatbuffers ) <nl> <nl> - # # Notes of v3 . 3rc1 <nl> - <nl> - * * android * * <nl> - <nl> - Android NDK - r10c is needed . Here is the detailed link for this : <nl> - http : / / discuss . cocos2d - x . org / t / build - android - base - on - ndk - r10c / 18543 . <nl> - <nl> - # v3 . 3rc1 <nl> - <nl> - # # Highlights of v3 . 3rc1 <nl> - <nl> - * WP8 : add Win8 . 1 universal app support <nl> - * Many other bugfix . <nl> - <nl> - # # Notes of v3 . 3rc0 <nl> - <nl> - * * wp8 * * <nl> - <nl> - You need to use ` VS2013 with update 3 ` to use ` Cocos2dShaderCompiler ` used to compile precompiled shaders for WP8 . <nl> - <nl> - * * lua * * <nl> - <nl> - All internal lua files are copied into ` src / cocos ` when creating a new lua project . And we added ` cocos / init . lua ` to load all these internal lua files . ` cocos / init . lua ` is loaded by default which means you don ' t have to load these lua files by yourself . So you have to remove all these codes in your lua codes : <nl> - <nl> - * require " Cocos2d " <nl> - * require " Cocos2dConstants " <nl> - * require " bitExtend " <nl> - * require " DrawPrimitives " <nl> - * require " extern " <nl> - * require " json " <nl> - * require " Opengl " <nl> - * require " OpenglConstants " <nl> - * require " CCBReaderLoad " <nl> - * require " AudioEngine " <nl> - * require “ CocoStudio ” <nl> - * require “ StudioConstants ” <nl> - * require “ ControllerConstants ” <nl> - * require “ ExtensionConstants ” <nl> - * require “ NetworkConstants ” <nl> - * require “ GuiConstants ” <nl> - * require “ experimentalUIConstants ” <nl> - <nl> - ` luaj ` and ` luaoc ` are special . They can not be loaded in ` cocos / init . lua ` because they will return an object to be used in codes . So you have to replace the codes like this : <nl> - <nl> - * require " luaj " - > require " cocos . cocos2d . luaj " <nl> - * require " luaoc " - > require " cocos . cocos2d . luaoc " <nl> - <nl> - All lua files used for deprecated API are not loaded by default . If you want to use deprecated API , you should uncomment a line in ` src / main . lua ` like this : <nl> - <nl> - ` ` ` <nl> mmm uncomment this line to use deprecated API <nl> mmm CC_USE_DEPRECATED_API = true <nl> - require " cocos . init " <nl> - <nl> - ` ` ` <nl> - <nl> - ` cc . EditBox ` and ` cc . Scale9Sprite ` were deprecated , you should use ` ccui . EditBox ` and ` ccui . Scale9Sprite ` instead . <nl> - <nl> - ` ccs . NodeReader ` was removed because native class ` cocostudio : : timeline : : NodeReader ` was removed . In the v3 . 3rc0 , you could use ` cc . CSLoader ` instead . <nl> - <nl> - ` sp . Skeleton ` was removed because native class ` spine : : Skeleton ` was removed after updating spine runtime . <nl> - <nl> - ` registerSpineEventHandler ` of ` sp . SkeletonAnimation ` has changed : <nl> - <nl> - * registerSpineEventHandler ( fucntion ) - > registerSpineEventHandler ( funtion , eventType ) <nl> - <nl> - <nl> - # v3 . 3rc0 <nl> - <nl> - # # Highlights of v3 . 3rc0 <nl> - <nl> - * 3d : added light support : including directional light , point light , spot light and ambient light <nl> - * New audio : more platfroms supported ( Mac OS X and Windows ) <nl> - * Spine runtime : updated to v2 . 0 . 18 <nl> - * Application : added openURL ( ) <nl> - * Added ` AssetsManagerEx ` , it is an enhancement version of ` AssetsManager ` <nl> - * TileMap : supported staggered tile map <nl> - * Added ` ClippingRectangleNode ` , it is more efficient for renctangle clipping <nl> - * Node : schedule / unschedule lambda functions <nl> - * Facebook platform support in ` plugin ` on iOS and Android , all features has been added , but the API needs to be polished with Facebook guys <nl> - <nl> - # # Features in detail <nl> - <nl> - # # # Light <nl> - <nl> - To make 3d objects looks realistic , we add lights to this version . cocos2d - x supports four types of lights , directional light , point light , spot light and ambient light . <nl> - <nl> - ` DirectionLight ` is meant to represent an extremely distant light source ( like the sun or moon ) . Rays cast from directional lights run parallel in a single direction from every point in the sky , and are typically used to simulate the sun light . <nl> - <nl> - The following code can add a directional light to the scene , <nl> - <nl> - ` ` ` c + + <nl> - auto directionalLight = DirectionLight : : create ( Vec3 ( - 1 . 0f , - 1 . 0f , 0 . 0f ) , Color3B ( 200 , 200 , 200 ) ) ; <nl> - addChild ( directionalLight ) ; <nl> - ` ` ` <nl> - <nl> - The light is enabled by default . And it can be disabled using the following code , <nl> - <nl> - ` ` ` c + + <nl> - directionalLight - > setEnabled ( false ) ; <nl> - ` ` ` <nl> - <nl> - You can also set a light flag to the light . <nl> - <nl> - ` ` ` c + + <nl> - directionalLight - > setLightFlag ( LightFlag : : LIGHT0 ) ; <nl> - ` ` ` <nl> - <nl> - Then the 3d sprite whose light mask AND light flag is none zero can effect by the light . <nl> - <nl> - ` PointLight ` casts illumination outward in every direction from a single , infinitely small point in 3D space . It is useful for simulating any omnidirectional light source . <nl> - <nl> - ` SpotLight ` emits a cone shaped light field from a single point in space . It can be used to simulate desk lamps , overhead cone lighting , etc . Note that ` SpotLight ` will take more GPU time . <nl> - <nl> - ` AmbientLight ` casts soft rays in every direction . <nl> - <nl> - Note that we use forward render method , the number of lights can effect the performance . You can set the max number of lights supported in the shader in a the configuration file . <nl> - <nl> - ` ` ` c + + <nl> - < key > cocos2d . x . 3d . max_dir_light_in_shader < / key > <nl> - < integer > 1 < / integer > <nl> - < key > cocos2d . x . 3d . max_point_light_in_shader < / key > <nl> - < integer > 1 < / integer > <nl> - < key > cocos2d . x . 3d . max_spot_light_in_shader < / key > <nl> - < integer > 1 < / integer > <nl> - ` ` ` <nl> - <nl> - # # # Spine runtime <nl> - <nl> - Spine runtime is updated to latest version ` v2 . 0 . 18 ` . This version supports ` Free - Form - Deformation ( FFD ) ` , which allows meshes to stretch , squash , blend and bounce in ways that aren ' t possible using rectangle images . <nl> - <nl> - ` Spine rutnime has updated its license which only allows engine to use unmodified version even it has bugs . So you guys don ' t send pull requests for spine runtime , we can not merge them . ` <nl> - <nl> - Please refer to ` tests / cpp - tests / Classes / SpineTest / SpineTest . cpp ` for usage . <nl> - <nl> - # # # AssetsManagerEx <nl> - <nl> - ` AssetsMangerEx ` is an enhancement version of ` AssetsManager ` . Compared to ` AssetsManager ` , there are some pros using ` AssetsManagerEx ` : <nl> - <nl> - * complex update package support with manifest file <nl> - * multi - thread downloading support <nl> - * continue transferring from breakpoint <nl> - <nl> - Please refer to [ this document ] ( http : / / cocos2d - x . org / wiki / Assets_manager ) for detail information . <nl> - <nl> - # # # Application : : openURL <nl> - <nl> - Because in iOS , there is an function named ` openURL ` in ` UIApplication ` , so we added this function in Application too . You can use this function to open a url . <nl> - <nl> - ` ` ` c + + <nl> - Application : : getInstance ( ) - > openURL ( " http : / / www . cocos2d - x . org / " ) ; <nl> - ` ` ` <nl> - <nl> - # # # ClippingRectangleNode <nl> - <nl> - ` ClippingRectangleNode ` is a lite version of ` ClippingNode ` . Compared to ` ClippingNode ` , there re some pros and cons : <nl> - <nl> - * pros <nl> - * it doesn ' t depend on stencil buffer , which means it can run on more Android devices <nl> - * it is more efficient <nl> - <nl> - * cons <nl> - * it can only used to clip rectangle area <nl> - <nl> - ` ` ` c + + <nl> - auto clipper = ClippingRectangleNode : : create ( ) ; <nl> - clipper - > setClippingRegion ( 0 , 0 , 200 , 200 ) ; <nl> - this - > addChild ( clipper ) ; <nl> - <nl> - auto content = Sprite : : create ( " MyPicture . png " ) ; <nl> - . . . <nl> - clipper - > addChild ( content ) ; <nl> - ` ` ` <nl> - <nl> - # # # Facebook platform support <nl> - <nl> - All features has been added , but the API needs to be polished with Facebook guys . There is a test case in ` plugin ` for it . Steps to run test case <nl> - <nl> - * open ` plugin / pluing - x_ios . xcworkspace ` <nl> - * select ` HelloPlugins ` to run <nl> - * there are ` Test Facebook User ` and ` Test Facebook Share ` items <nl> - <nl> - You can refer to [ this document ] ( http : / / www . cocos2d - x . org / wiki / Integrate_the_Facebook_SDK_for_Cocos2d - x ) for detail information . <nl> - <nl> - # v3 . 3beta0 <nl> - <nl> - # # Highlights of v3 . 3beta0 <nl> - <nl> - * 3d : ` BillBoard ` <nl> - * audio : new audio is added on iOS and Android <nl> - * DrawNode : added as many functions as ` DrawPrimitive ` , and ` DrawPrimitive ` is deprecated <nl> - * Renderer : added ` triangle command ` <nl> - * UI : added ` WebView ` on iOS and Android <nl> - * Many other small features added and many bugs fixed <nl> <nl> # # Features in detail <nl> <nl> - # # # BillBoard <nl> - <nl> - ` BillBoard ` is a rectangle always faces to the camera . It is useful in the 3D world . People use BillBoard to create trees in some racing games . It looks real , but the cost is much lower than 3d tree . <nl> - <nl> - ` BillBoard ` inherits from Sprite , so it also supports animate . Here is example of creating BillBoard . <nl> - <nl> - ` ` ` c + + <nl> - / / create billboard from . png <nl> - auto billboard = BillBoard : : create ( " Images / Icon . png " ) ; <nl> - addChild ( billboard ) ; <nl> - <nl> - / / create camera that is looking at this billboard . Otherwise , it is seen by the default camera <nl> - auto camera = Camera : : createPerspective ( 60 , ( GLfloat ) s . width / s . height , 1 , 1000 ) ; <nl> - camera - > setCameraFlag ( CameraFlag : : CAMERA_USER1 ) ; <nl> - addChild ( camera ) ; / / add this camera <nl> - <nl> - / / This billboard is only seen by the camera with flag CameraFlag : : CAMERA_USER1 . <nl> - billboard - > setCameraMask ( ( unsigned short ) CameraFlag : : CAMERA_USER1 ) ; <nl> - ` ` ` <nl> - <nl> - # # # Triangles command <nl> - <nl> - We have enhanced auto batching feature by introduce ` TrianglesCommand ` , the rendering of the ` Triangles ` can be auto batched . Now if we have anything which can be rendered by ` Triangles ` , we can use ` TrianglesCommand ` or inherit from ` TrianglesCommand ` to take use of auto batching feature and gain rendering improvements . The ` QuadCommand ` , which is used for ` Quad ` rendering , is a good example of inheriting from ` TrianglesCommand ` . <nl> - <nl> - The step to use Triangle Command is very simple . <nl> - <nl> - ` ` ` <nl> - Triangles trs { verts , indices , vertCount , indexCount } ; <nl> - command - > init ( globalZOrder , textureID , glProgramState , blend , trs , matrix ) ; <nl> - renderer - > addCommand ( command ) ; <nl> - ` ` ` <nl> - To improve performance , ` Triangles ` will hold a weak reference to the vertices and indices data to be rendered , which is the same like ` QuadCommand ` . The userer should not release any rendered data before the ` Command ` is executed by ` Renderer ` . <nl> - <nl> - # # # WebView <nl> - <nl> - WebView is an new widget type which allows you to display web content inside Cocos2D - X . We only provide iOS and Android implementation currently , more platform might be added in the future . <nl> - <nl> - The class is under ` cocos2d : : ui : : experimental ` namespace . <nl> - <nl> - As we clarified the ` experimental ` namespace before , the ` experimental ` namespace doesn ' t mean the widget is incomplete , but only due to the lack of full platform support . Feel free to use the WebView <nl> - widget in your game . <nl> - <nl> - To display the website Google in a WebView , we could simply write : <nl> - <nl> - ` ` ` cpp <nl> - _webView = cocos2d : : experimental : : ui : : WebView : : create ( ) ; <nl> - _webView - > setPosition ( winSize / 2 ) ; <nl> - _webView - > setContentSize ( winSize * 0 . 5 ) ; <nl> - _webView - > loadUrl ( " http : / / www . google . com " ) ; <nl> - _webView - > setScalesPageToFit ( true ) ; <nl> - ` ` ` <nl> - <nl> - The ` setscalesPageToFit ` method will adjust the WebView content to fit the content size you set . <nl> - <nl> - We could also set some callback to the WebView : <nl> - <nl> - ` ` ` cpp <nl> - / / we should check the validation of the URL and decide whether to continue or not <nl> - _webView - > shouldStartLoading = CC_CALLBACK_2 ( WebViewTest : : onWebViewShouldStartLoading , this ) ; <nl> - / / called when web page is finish loading <nl> - _webView - > didFinishLoading = CC_CALLBACK_2 ( WebViewTest : : onWebViewDidFinishLoading , this ) ; <nl> - / / called when web page is fail loading <nl> - _webView - > didFailLoading = CC_CALLBACK_2 ( WebViewTest : : onWebViewDidFailLoading , this ) ; <nl> - ` ` ` <nl> - <nl> - For full test case , please refer to [ WebViewTest ] ( https : / / github . com / cocos2d / cocos2d - x / blob / v3 / tests / cpp - tests / Classes / UITest / CocoStudioGUITest / UIWebViewTest / UIWebViewTest . cpp ) <nl> - <nl> - <nl> - # # # New audio <nl> - <nl> - New audio is more powerful than old one , and it is not compatible with old one . We will deprecated old one when new audio is ready on all supported platforms . Now it only supports iOS and Android . We plan to finish it on v3 . 4 . <nl> - <nl> - What ' s enhanced in new audio engine : <nl> - <nl> - * can play more than one backgournd music <nl> - * can have a call back when an audio ( music or effect ) finishs <nl> - * can get duration of an audio <nl> - * can get / set playback position of a playing audio <nl> - * can change loop state when playing <nl> - <nl> - The difference compared to old audio engine <nl> - <nl> - * all functions are static , which means you can more easy to invoke function , such as ` Audio : : play2d ( ) ` <nl> - * there is only one method ` play2d ( ) ` to play music or effect <nl> - * should use ` Audio : : getState ( ) ` to determine an audio is playing , paused <nl> - * its class name is ` cocos2d : : experimental : : AudioEngine ` in c + + , and its module name is ` ccexp . AudioEngine ` in lua - binding <nl> - * there is not preload function , you can play an audio immediately <nl> - <nl> - Full test case please refer to ` tests / cpp - tests / Classes / NewAudioEngineTest / NewAudioEngineTest . cpp ` . <nl> - <nl> - # v3 . 3alpha0 <nl> - <nl> - # # Highlights of v3 . 3alpha0 <nl> - <nl> - * 3d : ` Camera ` , ` Reskin ` , ` Attachment ` , ` Better support for FBX ` , ` New fbx - conv ` , ` AABB ` , ` OBB ` and ` Ray ` <nl> - * ui : added ` Scale9Sprite ` <nl> - * FileUitls : added ` isDirectoryExist ( ) ` , ` createDirectory ( ) ` , ` removeDirectory ( ) ` , ` removeFile ( ) ` , ` renameFile ( ) ` and ` getFileSize ( ) ` <nl> - * Device : added ` setKeepScreenOn ( ) ` on iOS and Android <nl> - * Added c + + 11 random support <nl> - * RenderTexture : added a call back function for ` saveToFile ( ) ` <nl> - * Primitive : Support Points , Lines and Triangles for rendering <nl> - * SpriteFrameCache : support loading from plist file content data <nl> - * Added a consistent way to set GL context attributes for all platforms <nl> - * Only two libraries in cocos2d - x , one for c + + codes , another one for lua - binding codes <nl> - * Many other small features added and many bugs fixed <nl> - <nl> - # # Features in detail <nl> - <nl> - # # # Camera <nl> - <nl> - This version of camera is powerful than previous one . And you can add it as a child anywhere . If you want to let a Node to be visited by a camera , Node ' s camera mask should include Camera ' s flag : <nl> - <nl> - ` ` ` c + + <nl> - / / let sprite to be visited by a camera <nl> - auto sprite = Sprite : : create ( " myFile . png " ) ; <nl> - sprite - > setCameraMask ( CameraFlag : : USER1 ) ; <nl> - auto camera = Camera : : createPerspective ( 60 , winSize . width / winSize . height , 1 , 1000 ) ; <nl> - camera - > setCameraFlag ( CameraFlag : : USER1 ) ; <nl> - scene - > addChild ( camera ) ; <nl> - ` ` ` <nl> - <nl> - If you have many Nodes that want to be visited by a camera , there is a convenient way : <nl> - <nl> - ` ` ` c + + <nl> - auto layer = Layer : : create ( ) ; <nl> - auto sprite1 = Sprite : : create ( ) ; <nl> - auto sprite2 = Sprite : : create ( ) ; <nl> - layer - > addChild ( sprite1 ) ; <nl> - layer - > addChild ( sprite2 ) ; <nl> - / / it will set camera mask for all its children <nl> - layer - > setCameraMask ( CameraFlg : : USER1 ) ; <nl> - <nl> - auto camera = Camera : : createPerspective ( ) ; <nl> - camera - > setCameraFlag ( CameraFlag : : USER1 ) ; <nl> - scene - > addChild ( camera ) ; <nl> - ` ` ` <nl> - <nl> - Full test case please refer to ` tests / cpp - tests / res / Camera3DTest / Camera3DTest . cpp ` . <nl> - <nl> - # # # Reskin <nl> - <nl> - It is a powerful feature , all the user change the appearance of character . <nl> - <nl> - For example , there a model named girl . c3b , which has two coats , coat0 and coat1 . <nl> - The character ' s coat can be changed like this , <nl> - <nl> - ` ` ` c + + <nl> - / / load the girl from file <nl> - auto sprite3d = Sprite3D : : create ( " girl . c3b " ) ; <nl> - / / get the mesh named coat0 <nl> - auto mesh0 = sprite3d - > getMeshByName ( " coat0 " ) ; <nl> - / / you can change texture of this mesh if you like <nl> - mesh0 - > setTexture ( " cloth . png " ) ; <nl> - / / you can change visibility for this mesh , too <nl> - mesh0 - > setVisible ( true ) ; <nl> - / / hide coat1 <nl> - auto mesh1 = sprite3d - > getMeshByName ( " coat1 " ) ; <nl> - mesh1 - > setVisible ( false ) ; <nl> - ` ` ` <nl> - <nl> - Full test case please refer to ' tests / cpp - tests / Classes / Spret3DTest / Sprite3DTest . cpp ' <nl> - <nl> - # # # Attachment <nl> - <nl> - Allows to attach a node to a bone <nl> - <nl> - Usage , <nl> - <nl> - ` ` ` c + + <nl> - auto sprite = Sprite3D : : create ( " girl . c3b " ) ; <nl> - auto weapon = Sprite : : create ( " weapon . c3b " ) ; <nl> - auto attachNode = sprite - > getAttachNode ( " left_hand " ) ; <nl> - attachNode - > addChild ( weapon ) ; <nl> - ` ` ` <nl> - <nl> - Full test case please refer to ' tests / cpp - tests / Classes / Spret3DTest / Sprite3DTest . cpp ' <nl> - <nl> - # # # Better support for FBX <nl> - <nl> - support multiple mesh <nl> - support multiple material <nl> - bones bind to each mesh limited to 40 . But the FBX model can contain more meshes . So the model can contain much more bones . <nl> - <nl> - # # # New fbx - conv <nl> - <nl> - It can export more complex model , which contains multiple meshes and multiple materials . <nl> - <nl> - # # # AABB , OBB and Ray <nl> - <nl> - AABB means Axis Aligned Bounding Box <nl> - OBB means Oriented Bounding Box <nl> - Ray has a origin position and direction <nl> - <nl> - Each Sprite3D or Mesh has its own AABB . <nl> - AABB and OBB can be picked by Ray . <nl> - <nl> - Usage , <nl> - <nl> - ` ` ` c + + <nl> - / / get ray from camera <nl> - Vec3 nearP ( location . x , location . y , - 1 . 0f ) , farP ( location . x , location . y , 1 . 0f ) ; <nl> - auto size = Director : : getInstance ( ) - > getWinSize ( ) ; <nl> - camera - > unproject ( size , & nearP , & nearP ) ; <nl> - camera - > unproject ( size , & farP , & farP ) ; <nl> - ray . _origin = nearP ; <nl> - ray . _direction = farP - nearP ; <nl> - ray . intersects ( sprite3d - > getAABB ( ) ) ; <nl> - ` ` ` <nl> - <nl> - Full test case please refer to ' tests / cpp - tests / Classes / Spret3DTest / Sprite3DTest . cpp ' <nl> - <nl> - # # # ui : : Scale9Sprite <nl> - <nl> - Now we have implemented a new Scale9Sprite class under ui module . Its internal implementation is concise than the previous one plus more features . <nl> - The main reason of reimplementing this class is that the Scale9Sprite is heavily used in ui module . Now the ui module is not dependent from extension module . <nl> - By applying the new ui : : Scale9Sprite , the code inside many widget classes are more cleaner and elegant . <nl> - <nl> - We could manually toggle " slice 9 " feature by one function call : <nl> - <nl> - ` ` ` c + + <nl> - / / ui : : Scale9Sprite is slice 9 enabled on default <nl> - auto sprite = ui : : Scale9Sprite : : create ( " foo . png " ) ; <nl> - sprite - > setScale9Enabled ( false ) ; <nl> - ` ` ` <nl> - <nl> - It also supports Flipping now . <nl> - <nl> - ` ` ` c + + <nl> - auto sprite = ui : : Scale9Sprite : : create ( " bar . png " ) ; <nl> - sprite - > setFlippedX ( true ) ; <nl> - sprite - > setFlippedY ( false ) ; <nl> - ` ` ` <nl> - <nl> - Since the ui : : Scale9Sprite is a Node rather than a Sprite , so you can ' t add it to a batch node . If you do want to do some actions on the internal sprite , <nl> - you could call ` sprite - > getSprite ( ) ` to access it . <nl> - <nl> - Full test case please refer to ` tests / cpp - tests / Classes / UITests / CocostudioGUITest / UIScale9SpriteTest . cpp ` . <nl> - <nl> - # # # c + + 11 random support <nl> - <nl> - Since ` rand ( ) ` is not good ( refer to [ this document ] ( http : / / c - faq . com / lib / randrange . html ) ) , we use c + + 11 random library to do generate random number , and provide a function to easily using : <nl> - <nl> - ` ` ` c + + <nl> - int randInt = cocos2d : : random ( 1 , 10 ) ; <nl> - float randFloat = cocos2d : : random ( 1 . f , 10 . f ) ; <nl> - ` ` ` <nl> - <nl> - # # # RenderTexture save function <nl> - <nl> - ` RenderTexture : : saveToFile ( ) ` will not save rendertexture when the function returns , because it just send render command to renderer . The file will be saved after render command is executed . It is not convenient if you want to use the saved file to do some work . So we added a parameter in ` RenderTexture : : saveToFile ( ) ` to set a call back function when the file is saved . <nl> - <nl> - ` ` ` c + + <nl> - renderTexture - > begin ( ) ; <nl> - . . . <nl> - renderTexture - > end ( ) ; <nl> - <nl> - renderTexture - > saveToFile ( " myFile . png " , true , callback ) ; <nl> - <nl> - ` ` ` <nl> - <nl> - # # # Primitive <nl> - <nl> - ` Primitive ` is added to support ` Points ` , ` Lines ` , ` Triangles ` rendering . Previously , if we want to draw a custom geometry ( sphere , line ) , we can only do this by using ` CustomCommand ` . Now , what is need is to create a Primitive , set datas , and use the corresponding ` PrimitiveCommand ` to draw the Primitive . <nl> - <nl> - Here is a simple example of rendering a quad in ` Sprite ` . <nl> - <nl> - 1 . create verexBuffer <nl> - <nl> - ` ` ` c + + <nl> - auto vertexBuffer = VerexBuffer : : create ( sizeof ( V3F_C4B_T2F ) , 4 ) ; <nl> - vertexBuffer - > updateVertices ( & _quad , 4 , 0 ) ; <nl> - ` ` ` <nl> - <nl> - 2 . create vertexData <nl> - <nl> - ` ` ` c + + <nl> - auto vertexData = VertexData : : create ( ) ; <nl> - vertexData - > addStream ( vertexBuffer , VertexStreamAttribute ( 0 , VERTEX_ATTRIB_POSITION , GL_FLOAT , 3 , fasle ) ) ; <nl> - vertexData - > addStream ( vertexBuffer , VertexStreamAttribute ( 12 , VERTEX_ATTRIB_COLOR , GL_UNSIGNED_BTYE , 4 , true ) ) ; <nl> - vertexData - > addStream ( vertexBuffer , VertexStreamAttribute ( 16 , VERTEX_ATTRIB_TEX_COORD , GL_FLOAT , 2 , fasle ) ) ; <nl> - ` ` ` <nl> - 3 . create IndexBuffer <nl> - <nl> - ` ` ` c + + <nl> - auto indexBuffer = IndexBuffer : : create ( IndexType : : INDEX_TYPE_SHORT_16 , 6 ) ; <nl> - short indices [ 6 ] = { 0 , 1 , 2 , 3 , 2 , 1 } ; <nl> - indexBuffer - > updateIndices ( indices , 6 , 0 ) ; <nl> - ` ` ` <nl> - 4 . create primitive <nl> - <nl> - ` ` ` c + + <nl> - auto primitve = Primitive : : create ( vertexData , indexBuffer , GL_TRIANGLES ) ; <nl> - primitive - > setStart ( 0 ) ; <nl> - primitive - > setCount ( 6 ) ; <nl> - ` ` ` <nl> - 5 . add command to renderer <nl> - <nl> - ` ` ` c + + <nl> - _command - > init ( globalZorder , textureID , glprogramState , blend , primitve , modelViewMatrix ) ; <nl> - renderer - > addCommand ( & _command ) ; <nl> - ` ` ` <nl> - <nl> - Primitive supports three typs of primitives ( POINTS , LINES , TRIANGLES ) , vertex and index sharing , multiple streams . It has some constrains : <nl> - <nl> - 1 . The size of vertex and index Buffer is fixed , which means data must be pre allocated . <nl> - 2 . Batching is not supported . <nl> - <nl> - # # # Consistent way to set GL context attributes <nl> - <nl> - Now you can set GL context attributes by override ` Application : : initGLContextAttrs ( ) ` , then set GL context attributes there . <nl> - <nl> - ` ` ` c + + <nl> - void AppDelegate : : initGLContextAttrs ( ) <nl> - { <nl> - / / r : 8 g : 8 a : 8 depth : 24 stencil : 8 <nl> - GLContextAttrs glContextAttrs = { 8 , 8 , 8 , 8 , 24 , 8 } ; <nl> - GLView : : setGLContextAttrs ( glContextAttrs ) ; <nl> - } <nl> - ` ` ` <nl> - <nl> - Now can only support setting bits of ` r ` , ` g ` , ` b ` , ` a ` , ` depth buffer ` and ` stencil buffer ` . We will support other attributes if needed . <nl> - <nl> - # # # Only two libraries left <nl> - <nl> - Now there are two libraries left : one for all c + + codes and another one for lua - bindings codes . <nl> - <nl> - If you are developing with c + + , you only have to link to ` libcocos2d ` . ` libcocos2d ` includes all c + + codes : <nl> - <nl> - * cocos2d ( including 2d and 3d ) <nl> - * network <nl> - * cocosstudio <nl> - * ui <nl> - * cocosbuilder <nl> - * spine <nl> - * chipmunk <nl> - * box2d <nl> - * . . . <nl> - <nl> - Not used codes will be stripped by linker . <nl> - <nl> - If you are developing with lua , you should link to ` libcocos2d ` and ` libluacocos2d ` . You can comment codes in ` lua_module_register . h ` if you don ' t want to some module . <nl> - <nl> - ` ` ` c + + <nl> - int lua_module_register ( lua_State * L ) <nl> - { <nl> - register_cocosdenshion_module ( L ) ; / / comment this line to remove cocosdenshion <nl> - register_network_module ( L ) ; / / comment this line to remove network <nl> - register_cocosbuilder_module ( L ) ; / / comment this line to remove cocosbuilder <nl> - register_cocostudio_module ( L ) ; / / comment this line to remove cocostudio <nl> - register_extension_module ( L ) ; / / comment this line to remove extension <nl> - register_ui_moudle ( L ) ; / / comment this line to remove ui <nl> - register_spine_module ( L ) ; / / comment this line to remove spine <nl> - register_cocos3d_module ( L ) ; / / comment this line to remove 3d <nl> - return 1 ; <nl> - } <nl> - ` ` ` <nl> <nl>
|
update release note
|
cocos2d/cocos2d-x
|
3de172c4e6e8c0f792c738bfad4f8290de92103f
|
2014-12-24T06:33:41Z
|
mmm a / swoole . c <nl> ppp b / swoole . c <nl> PHP_MINIT_FUNCTION ( swoole ) <nl> SWOOLE_DEFINE ( ERROR_DATA_LENGTH_TOO_LARGE ) ; <nl> SWOOLE_DEFINE ( ERROR_TASK_PACKAGE_TOO_BIG ) ; <nl> SWOOLE_DEFINE ( ERROR_TASK_DISPATCH_FAIL ) ; <nl> + <nl> + / * * <nl> + * AIO <nl> + * / <nl> + SWOOLE_DEFINE ( ERROR_AIO_BAD_REQUEST ) ; <nl> + <nl> + / * * <nl> + * Client <nl> + * / <nl> + SWOOLE_DEFINE ( ERROR_CLIENT_NO_CONNECTION ) ; <nl> + <nl> SWOOLE_DEFINE ( ERROR_HTTP2_STREAM_ID_TOO_BIG ) ; <nl> SWOOLE_DEFINE ( ERROR_HTTP2_STREAM_NO_HEADER ) ; <nl> SWOOLE_DEFINE ( ERROR_SOCKS5_UNSUPPORT_VERSION ) ; <nl>
|
added error SW_ERROR_CLIENT_NO_CONNECTION
|
swoole/swoole-src
|
93b04d75d295cd3509b0b1cca8c2f2ef0522ed41
|
2018-03-02T08:23:05Z
|
mmm a / atom / browser / api / atom_api_auto_updater . cc <nl> ppp b / atom / browser / api / atom_api_auto_updater . cc <nl> void AutoUpdater : : OnWindowAllClosed ( ) { <nl> QuitAndInstall ( ) ; <nl> } <nl> <nl> + std : : string AutoUpdater : : GetFeedURL ( ) { <nl> + return " " ; <nl> + } <nl> + <nl> void AutoUpdater : : SetFeedURL ( const std : : string & url , mate : : Arguments * args ) { <nl> auto_updater : : AutoUpdater : : HeaderMap headers ; <nl> args - > GetNext ( & headers ) ; <nl> void AutoUpdater : : BuildPrototype ( <nl> v8 : : Isolate * isolate , v8 : : Local < v8 : : ObjectTemplate > prototype ) { <nl> mate : : ObjectTemplateBuilder ( isolate , prototype ) <nl> . SetMethod ( " checkForUpdates " , & auto_updater : : AutoUpdater : : CheckForUpdates ) <nl> + . SetMethod ( " getFeedURL " , & auto_updater : : AutoUpdater : : GetFeedURL ) <nl> . SetMethod ( " setFeedURL " , & AutoUpdater : : SetFeedURL ) <nl> . SetMethod ( " quitAndInstall " , & AutoUpdater : : QuitAndInstall ) ; <nl> } <nl> mmm a / atom / browser / api / atom_api_auto_updater . h <nl> ppp b / atom / browser / api / atom_api_auto_updater . h <nl> class AutoUpdater : public mate : : EventEmitter < AutoUpdater > , <nl> void OnWindowAllClosed ( ) override ; <nl> <nl> private : <nl> + std : : string GetFeedURL ( ) ; <nl> void SetFeedURL ( const std : : string & url , mate : : Arguments * args ) ; <nl> void QuitAndInstall ( ) ; <nl> <nl> mmm a / atom / browser / auto_updater . cc <nl> ppp b / atom / browser / auto_updater . cc <nl> void AutoUpdater : : SetDelegate ( Delegate * delegate ) { <nl> } <nl> <nl> # if ! defined ( OS_MACOSX ) | | defined ( MAS_BUILD ) <nl> + std : : string AutoUpdater : : GetFeedURL ( ) { <nl> + return " " ; <nl> + } <nl> + <nl> void AutoUpdater : : SetFeedURL ( const std : : string & url , <nl> const HeaderMap & requestHeaders ) { <nl> } <nl> mmm a / atom / browser / auto_updater . h <nl> ppp b / atom / browser / auto_updater . h <nl> class AutoUpdater { <nl> static Delegate * GetDelegate ( ) ; <nl> static void SetDelegate ( Delegate * delegate ) ; <nl> <nl> + static std : : string GetFeedURL ( ) ; <nl> static void SetFeedURL ( const std : : string & url , <nl> const HeaderMap & requestHeaders ) ; <nl> static void CheckForUpdates ( ) ; <nl> mmm a / atom / browser / auto_updater_mac . mm <nl> ppp b / atom / browser / auto_updater_mac . mm <nl> <nl> namespace { <nl> <nl> bool g_update_available = false ; <nl> + std : : string update_url_ = " " ; <nl> <nl> } <nl> <nl> + std : : string AutoUpdater : : GetFeedURL ( ) { <nl> + return update_url_ ; <nl> + } <nl> + <nl> / / static <nl> void AutoUpdater : : SetFeedURL ( const std : : string & feed , <nl> const HeaderMap & requestHeaders ) { <nl> <nl> if ( ! delegate ) <nl> return ; <nl> <nl> + update_url_ = feed ; <nl> + <nl> NSURL * url = [ NSURL URLWithString : base : : SysUTF8ToNSString ( feed ) ] ; <nl> NSMutableURLRequest * urlRequest = [ NSMutableURLRequest requestWithURL : url ] ; <nl> <nl> mmm a / lib / browser / api / auto - updater / auto - updater - win . js <nl> ppp b / lib / browser / api / auto - updater / auto - updater - win . js <nl> AutoUpdater . prototype . quitAndInstall = function ( ) { <nl> return app . quit ( ) <nl> } <nl> <nl> + AutoUpdater . prototype . GetFeedURL = function ( ) { <nl> + return this . updateURL ; <nl> + } <nl> + <nl> AutoUpdater . prototype . setFeedURL = function ( updateURL , headers ) { <nl> this . updateURL = updateURL <nl> } <nl>
|
Add the getFeedURL API for macOS and Windows
|
electron/electron
|
51687e1bc947800e641315ff1d25bf22d8111f98
|
2016-07-14T12:04:48Z
|
mmm a / dbms / src / Processors / Formats / IInputFormat . cpp <nl> ppp b / dbms / src / Processors / Formats / IInputFormat . cpp <nl> void IInputFormat : : resetParser ( ) <nl> if ( in . hasPendingData ( ) ) <nl> throw Exception ( " Unread data in IInputFormat : : resetParser . Most likely it ' s a bug . " , ErrorCodes : : LOGICAL_ERROR ) ; <nl> <nl> - / / those are protected attributes from ISource ( i didn ' t want to propagate resetParser up there ) <nl> + / / those are protected attributes from ISource ( I didn ' t want to propagate resetParser up there ) <nl> finished = false ; <nl> got_exception = false ; <nl> <nl>
|
Update IInputFormat . cpp
|
ClickHouse/ClickHouse
|
a7521b97f9525345652263b2d91642d9d5c24786
|
2019-12-03T00:49:05Z
|
mmm a / Marlin / src / lcd / extui / lib / mks_ui / printer_opration . cpp <nl> ppp b / Marlin / src / lcd / extui / lib / mks_ui / printer_opration . cpp <nl> <nl> if ( uiCfg . waitEndMoves > 20 ) { <nl> uiCfg . waitEndMoves = 0 ; <nl> planner . synchronize ( ) ; <nl> - gcode . process_subcommands_now_P ( PSTR ( " M25 " ) ) ; <nl> - gcode . process_subcommands_now_P ( PSTR ( " G91 " ) ) ; <nl> - gcode . process_subcommands_now_P ( PSTR ( " G1 Z5 " ) ) ; <nl> - gcode . process_subcommands_now_P ( PSTR ( " G90 " ) ) ; <nl> + gcode . process_subcommands_now_P ( PSTR ( " M25 \ nG91 \ nG1 Z5 \ nG90 " ) ) ; <nl> <nl> uiCfg . print_state = PAUSED ; <nl> <nl> <nl> <nl> if ( uiCfg . print_state = = RESUMING ) { <nl> if ( IS_SD_PAUSED ( ) ) { <nl> - gcode . process_subcommands_now_P ( PSTR ( " G91 " ) ) ; <nl> - gcode . process_subcommands_now_P ( PSTR ( " G1 Z - 5 " ) ) ; <nl> - gcode . process_subcommands_now_P ( PSTR ( " G90 " ) ) ; <nl> - gcode . process_subcommands_now_P ( PSTR ( " M24 " ) ) ; <nl> + gcode . process_subcommands_now_P ( PSTR ( " G91 \ nG1 Z - 5 \ nG90 \ nM24 " ) ) ; <nl> uiCfg . print_state = WORKING ; <nl> start_print_time ( ) ; <nl> <nl> <nl> } <nl> # endif <nl> <nl> - if ( gCfgItems . pause_reprint = = 1 ) { <nl> - gcode . process_subcommands_now_P ( PSTR ( " G91 " ) ) ; <nl> - gcode . process_subcommands_now_P ( PSTR ( " G1 Z - 5 " ) ) ; <nl> - gcode . process_subcommands_now_P ( PSTR ( " G90 " ) ) ; <nl> - } <nl> + if ( gCfgItems . pause_reprint = = 1 ) <nl> + gcode . process_subcommands_now_P ( PSTR ( " G91 \ nG1 Z - 5 \ nG90 " ) ) ; <nl> recovery . resume ( ) ; <nl> <nl> uiCfg . print_state = WORKING ; <nl>
|
Combine command macros
|
MarlinFirmware/Marlin
|
ea94716a87885653ae88d2ba92c6cccb22286f12
|
2020-07-07T07:30:26Z
|
mmm a / src / common / file_util . cpp <nl> ppp b / src / common / file_util . cpp <nl> bool ForeachDirectoryEntry ( unsigned * num_entries_out , const std : : string & directo <nl> if ( virtual_name = = " . " | | virtual_name = = " . . " ) <nl> continue ; <nl> <nl> - unsigned ret_entries ; <nl> + unsigned ret_entries = 0 ; <nl> if ( ! callback ( & ret_entries , directory , virtual_name ) ) { <nl> callback_error = true ; <nl> break ; <nl> mmm a / src / core / file_sys / disk_archive . cpp <nl> ppp b / src / core / file_sys / disk_archive . cpp <nl> bool DiskFile : : Close ( ) const { <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> - DiskDirectory : : DiskDirectory ( const DiskArchive & archive , const Path & path ) { <nl> + DiskDirectory : : DiskDirectory ( const DiskArchive & archive , const Path & path ) : directory ( ) { <nl> / / TODO ( Link Mauve ) : normalize path into an absolute path without " . . " , it can currently bypass <nl> / / the root directory we set while opening the archive . <nl> / / For example , opening / . . / . . / usr / bin can give the emulated program your installed programs . <nl> DiskDirectory : : DiskDirectory ( const DiskArchive & archive , const Path & path ) { <nl> bool DiskDirectory : : Open ( ) { <nl> if ( ! FileUtil : : IsDirectory ( path ) ) <nl> return false ; <nl> - FileUtil : : ScanDirectoryTree ( path , directory ) ; <nl> + unsigned size = FileUtil : : ScanDirectoryTree ( path , directory ) ; <nl> + directory . size = size ; <nl> + directory . isDirectory = true ; <nl> children_iterator = directory . children . begin ( ) ; <nl> return true ; <nl> } <nl>
|
Merge pull request from Subv / saves
|
yuzu-emu/yuzu
|
cddb9bd2aac86482f177c115d92d6aaf71d83f04
|
2016-03-01T22:16:05Z
|
mmm a / addons / skin . confluence / 720p / DialogSeekBar . xml <nl> ppp b / addons / skin . confluence / 720p / DialogSeekBar . xml <nl> <nl> < controls > <nl> < control type = " group " > <nl> < visible > player . chaptercount + Window . IsVisible ( FullScreenVideo ) < / visible > <nl> - < left > 665r < / left > <nl> + < left > 705r < / left > <nl> < top > - 6 < / top > <nl> < include > VisibleFadeEffect < / include > <nl> < control type = " image " > <nl> <nl> < / control > <nl> < / control > <nl> < control type = " group " > <nl> - < left > 520r < / left > <nl> + < left > 560r < / left > <nl> < top > - 6 < / top > <nl> < control type = " image " > <nl> < left > 0 < / left > <nl>
|
[ Confluence ] seekbar would overlap osd time - fixes
|
xbmc/xbmc
|
6c1d0a34f13bb8c779a8345076a37c26c6c3c77a
|
2014-02-18T22:12:25Z
|
mmm a / RELEASE . md <nl> ppp b / RELEASE . md <nl> <nl> - # Changes since last release <nl> + # Release 0 . 7 . 0 <nl> <nl> - # # Breaking changes to the API <nl> + # # Major Features and Improvements <nl> + <nl> + * Allow using any installed Cuda > = 7 . 0 and cuDNN > = R2 , and add support <nl> + for cuDNN R4 <nl> + * Added a ` contrib / ` directory for unsupported or experimental features , <nl> + including higher level ` layers ` module <nl> + * Added an easy way to add and dynamically load user - defined ops <nl> + * Built out a good suite of tests , things should break less ! <nl> + * Added ` MetaGraphDef ` which makes it easier to save graphs with metadata <nl> + * Added assignments for " Deep Learning with TensorFlow " udacity course <nl> + <nl> + <nl> + # # Bug Fixes and Other Changes <nl> + <nl> + * Scalar strictness : TensorFlow doesn ' t pretend that ` [ 1 ] = = 1 ` any more <nl> + * Added a versioning framework for ` GraphDef ` s to ensure compatibility <nl> + * Enforced Python 3 compatibility <nl> + * Internal changes now show up as sensibly separated commits <nl> + * Open - sourced the doc generator <nl> + * Un - fork Eigen <nl> + * Simplified the ` BUILD ` files and cleaned up C + + headers <nl> + * TensorFlow can now be used as a submodule in another bazel build <nl> + * New ops ( e . g . , ` * fft ` , ` * _matrix_solve ` ) <nl> + * Support for more data types in many ops <nl> + * Performance improvements <nl> + * Various bugfixes <nl> + * Documentation fixes and improvements <nl> + <nl> + <nl> + # # Breaking Changes to the API <nl> <nl> * ` AdjustContrast ` kernel deprecated , new kernel ` AdjustContrastv2 ` takes and <nl> outputs float only . ` adjust_contrast ` now takes all data types . <nl> <nl> * Renamed ` tf . test . GetTempDir ` and ` tf . test . IsBuiltWithCuda ` to <nl> ` tf . test . get_temp_dir ` and ` tf . test . is_built_with_cuda ` for PEP - 8 <nl> compatibility . <nl> - <nl> - <nl> - # # Bug fixes <nl> - <nl> + * ` parse_example ` ' s interface has changed , the old interface is accessible in <nl> + ` legacy_parse_example ` ( same for related functions ) . <nl> + * New ` Variable ` s are not added to the same collection several times even if <nl> + a list with duplicates is passed to the constructor . <nl> * The Python API will now properly set the ` list ` member of ` AttrValue ` in <nl> constructed ` GraphDef ` messages for empty lists . The serialization of some <nl> graphs will change , but the change is both forwards and backwards compatible . <nl> It will break tests that compare a generated ` GraphDef ` to a golden serialized <nl> - ` GraphDef ` . <nl> + ` GraphDef ` ( which is discouraged ) . <nl> + <nl> + <nl> + # # Thanks to our Contributors <nl> + <nl> + This release contains contributions from many people at Google , as well as : <nl> + <nl> + Akiomi Kamakura , Alex Vig , Alexander Rosenberg Johansen , Andre Cruz , Arun Ahuja , <nl> + Bart Coppens , Bernardo Pires , Carl Vondrick , Cesar Salgado , Chen Yu , <nl> + Christian Jauvin , Damien Aymeric , Dan Vanderkam , Denny Britz , Dongjoon Hyun , <nl> + Eren Güven , Erik Erwitt , Fabrizio Milo , G . Hussain Chinoy , Jim Fleming , <nl> + Joao Felipe Santos , Jonas Meinertz Hansen , Joshi Rekha , Julian Viereck , <nl> + Keiji Ariyama , Kenton Lee , Krishna Sankar , Kristina Chodorow , Linchao Zhu , <nl> + Lukas Krecan , Mark Borgerding , Mark Daoust , Moussa Taifi , <nl> + Nathan Howell , Naveen Sundar Govindarajulu , Nick Sweeting , Niklas Riekenbrauck , <nl> + Olivier Grisel , Patrick Christ , Povilas Liubauskas , Rainer Wasserfuhr , <nl> + Romain Thouvenin , Sagan Bolliger , Sam Abrahams , Taehoon Kim , Timothy J Laurent , <nl> + Vlad Zavidovych , Yangqing Jia , Yi - Lin Juang , Yuxin Wu , Zachary Lipton , <nl> + Zero Chen , Alan Wu , @ brchiu , @ emmjaykay , @ jalammar , @ Mandar - Shinde , <nl> + @ nsipplswezey , @ ninotoshi , @ panmari , @ prolearner and @ rizzomichaelg . <nl> + <nl> + We are also grateful to all who filed issues or helped resolve them , asked and <nl> + answered questions , and were part of inspiring discussions . <nl> <nl> <nl> # Release 0 . 6 . 0 <nl> <nl> come in later releases . <nl> <nl> <nl> - # # Bug fixes <nl> + # # Bug Fixes <nl> <nl> * Lots of fixes to documentation and tutorials , many contributed <nl> by the public . <nl> <nl> * 271 closed issues on github issues . <nl> <nl> - # # Backwards - incompatible changes <nl> + # # Backwards - Incompatible Changes <nl> <nl> * ` tf . nn . fixed_unigram_candidate_sampler ` changed its default ' distortion ' <nl> attribute from 0 . 0 to 1 . 0 . This was a bug in the original release <nl>
|
Update release notes for 0 . 7
|
tensorflow/tensorflow
|
34efcdcd2b40171195f6be1145166c986e0591a4
|
2016-02-15T08:39:56Z
|
mmm a / xbmc / XBDateTime . cpp <nl> ppp b / xbmc / XBDateTime . cpp <nl> bool CDateTime : : SetFromRFC1123DateTime ( const std : : string & dateTime ) <nl> return SetDateTime ( year , month , day , hour , min , sec ) ; <nl> } <nl> <nl> + CDateTime CDateTime : : FromDateString ( const std : : string & date ) <nl> + { <nl> + CDateTime dt ; <nl> + dt . SetFromDateString ( date ) ; <nl> + return dt ; <nl> + } <nl> + <nl> + CDateTime CDateTime : : FromDBDateTime ( const std : : string & dateTime ) <nl> + { <nl> + CDateTime dt ; <nl> + dt . SetFromDBDateTime ( dateTime ) ; <nl> + return dt ; <nl> + } <nl> + <nl> + CDateTime CDateTime : : FromDBDate ( const std : : string & date ) <nl> + { <nl> + CDateTime dt ; <nl> + dt . SetFromDBDate ( date ) ; <nl> + return dt ; <nl> + } <nl> + <nl> + CDateTime CDateTime : : FromDBTime ( const std : : string & time ) <nl> + { <nl> + CDateTime dt ; <nl> + dt . SetFromDBTime ( time ) ; <nl> + return dt ; <nl> + } <nl> + <nl> + CDateTime CDateTime : : FromW3CDate ( const std : : string & date ) <nl> + { <nl> + CDateTime dt ; <nl> + dt . SetFromW3CDate ( date ) ; <nl> + return dt ; <nl> + } <nl> + <nl> + CDateTime CDateTime : : FromW3CDateTime ( const std : : string & date , bool ignoreTimezone / * = false * / ) <nl> + { <nl> + CDateTime dt ; <nl> + dt . SetFromW3CDateTime ( date , ignoreTimezone ) ; <nl> + return dt ; <nl> + } <nl> + <nl> + CDateTime CDateTime : : FromUTCDateTime ( const CDateTime & dateTime ) <nl> + { <nl> + CDateTime dt ; <nl> + dt . SetFromUTCDateTime ( dateTime ) ; <nl> + return dt ; <nl> + } <nl> + <nl> + CDateTime CDateTime : : FromUTCDateTime ( const time_t & dateTime ) <nl> + { <nl> + CDateTime dt ; <nl> + dt . SetFromUTCDateTime ( dateTime ) ; <nl> + return dt ; <nl> + } <nl> + <nl> + CDateTime CDateTime : : FromRFC1123DateTime ( const std : : string & dateTime ) <nl> + { <nl> + CDateTime dt ; <nl> + dt . SetFromRFC1123DateTime ( dateTime ) ; <nl> + return dt ; <nl> + } <nl> + <nl> std : : string CDateTime : : GetAsLocalizedTime ( const std : : string & format , bool withSeconds ) const <nl> { <nl> std : : string strOut ; <nl> mmm a / xbmc / XBDateTime . h <nl> ppp b / xbmc / XBDateTime . h <nl> class CDateTime : public IArchivable <nl> CDateTime ( int year , int month , int day , int hour , int minute , int second ) ; <nl> virtual ~ CDateTime ( ) { } <nl> <nl> - bool SetFromDateString ( const std : : string & date ) ; <nl> - <nl> static CDateTime GetCurrentDateTime ( ) ; <nl> static CDateTime GetUTCDateTime ( ) ; <nl> static int MonthStringToMonthNum ( const std : : string & month ) ; <nl> <nl> + static CDateTime FromDBDateTime ( const std : : string & dateTime ) ; <nl> + static CDateTime FromDateString ( const std : : string & date ) ; <nl> + static CDateTime FromDBDate ( const std : : string & date ) ; <nl> + static CDateTime FromDBTime ( const std : : string & time ) ; <nl> + static CDateTime FromW3CDate ( const std : : string & date ) ; <nl> + static CDateTime FromW3CDateTime ( const std : : string & date , bool ignoreTimezone = false ) ; <nl> + static CDateTime FromUTCDateTime ( const CDateTime & dateTime ) ; <nl> + static CDateTime FromUTCDateTime ( const time_t & dateTime ) ; <nl> + static CDateTime FromRFC1123DateTime ( const std : : string & dateTime ) ; <nl> + <nl> const CDateTime & operator = ( const SYSTEMTIME & right ) ; <nl> const CDateTime & operator = ( const FILETIME & right ) ; <nl> const CDateTime & operator = ( const time_t & right ) ; <nl> class CDateTime : public IArchivable <nl> bool SetDateTime ( int year , int month , int day , int hour , int minute , int second ) ; <nl> bool SetDate ( int year , int month , int day ) ; <nl> bool SetTime ( int hour , int minute , int second ) ; <nl> + <nl> + bool SetFromDateString ( const std : : string & date ) ; <nl> bool SetFromDBDate ( const std : : string & date ) ; <nl> bool SetFromDBTime ( const std : : string & time ) ; <nl> bool SetFromW3CDate ( const std : : string & date ) ; <nl>
|
CDateTime : add factory methods
|
xbmc/xbmc
|
9bcb0d136614e8d05eeeb9ff359cc73c855bee90
|
2016-02-11T13:51:23Z
|
mmm a / android / build / filament - tasks . gradle <nl> ppp b / android / build / filament - tasks . gradle <nl> class MaterialCompiler extends DefaultTask { <nl> / / This task handles incremental builds <nl> class IblGenerator extends DefaultTask { <nl> File cmgenPath <nl> + String cmgenArgs = null ; <nl> <nl> @ SuppressWarnings ( " GroovyUnusedDeclaration " ) <nl> @ InputFile <nl> class IblGenerator extends DefaultTask { <nl> <nl> project . exec { <nl> standardOutput out <nl> + if ( ! cmgenArgs ) { <nl> + cmgenArgs = ' - - format = rgb32f - - extract - blur = 0 . 08 - - extract = $ { outputDir . absolutePath } ' <nl> + } <nl> + cmgenArgs = cmgenArgs + " " + file <nl> errorOutput err <nl> executable " $ { cmgenPath } " <nl> - args ( ' - - format = rgb32f ' , ' - - extract - blur = 0 . 08 ' , " - - extract = $ { outputDir . absolutePath } " , file ) <nl> + args ( cmgenArgs . split ( ) ) <nl> } <nl> } <nl> <nl> mmm a / android / samples / gltf - bloom / app / build . gradle <nl> ppp b / android / samples / gltf - bloom / app / build . gradle <nl> task copyMesh ( type : Copy ) { <nl> into file ( " src / main / assets / models " ) <nl> } <nl> <nl> - task copySky ( type : Copy ) { <nl> - from file ( " . . / . . / . . / . . / samples / envs / venetian_crossroads / venetian_crossroads_ibl . ktx " ) <nl> - into file ( " src / main / assets / envs " ) <nl> - } <nl> + generateIbl { <nl> + group ' Filament ' <nl> + description ' Generate IBL ' <nl> <nl> - task copyIbl ( type : Copy ) { <nl> - from file ( " . . / . . / . . / . . / samples / envs / venetian_crossroads / venetian_crossroads_skybox . ktx " ) <nl> - into file ( " src / main / assets / envs " ) <nl> + cmgenArgs = " - - format = ktx - - size = 256 - - extract - blur = 0 . 1 - - deploy = src / main / assets / envs " <nl> + inputFile = file ( " . . / . . / . . / . . / third_party / environments / venetian_crossroads_2k . hdr " ) <nl> + outputDir = file ( " src / main / assets / envs " ) <nl> } <nl> <nl> preBuild . dependsOn compileMaterials <nl> preBuild . dependsOn copyMesh <nl> - preBuild . dependsOn copySky <nl> - preBuild . dependsOn copyIbl <nl> + preBuild . dependsOn generateIbl <nl> <nl> clean . doFirst { <nl> delete " src / main / assets " <nl> mmm a / ios / samples / hello - ar / build - resources . sh <nl> ppp b / ios / samples / hello - ar / build - resources . sh <nl> set - e <nl> filamesh_path = " . . / . . / . . / out / release / filament / bin / filamesh " <nl> matc_path = " . . / . . / . . / out / release / filament / bin / matc " <nl> resgen_path = " . . / . . / . . / out / release / filament / bin / resgen " <nl> + cmgen_path = " . . / . . / . . / out / release / filament / bin / cmgen " <nl> <nl> # Ensure that the required tools are present in the out / directory . <nl> # These can be built by running . / build . sh - p desktop - i release at Filament ' s root directory . <nl> if [ [ ! - e " $ { resgen_path } " ] ] ; then <nl> exit 1 <nl> fi <nl> <nl> + if [ [ ! - e " $ { cmgen_path } " ] ] ; then <nl> + echo " No cmgen binary could be found in . . / . . / . . / out / release / filament / bin / . " <nl> + echo " Ensure Filament has been built / installed before building this app . " <nl> + exit 1 <nl> + fi <nl> + <nl> # The filamesh tool converts the . obj file into a Filament - specific filamesh file that has been <nl> # optimized for loading into Filament . <nl> mkdir - p " $ { PROJECT_DIR } / generated / " <nl> mkdir - p " $ { PROJECT_DIR } / generated / " <nl> - o " $ { PROJECT_DIR } / generated / camera_feed . filamat " \ <nl> " $ { PROJECT_DIR } / Materials / camera_feed . mat " <nl> <nl> + # cmgen consumes an HDR environment map and generates two mipmapped KTX files ( IBL and skybox ) <nl> + " $ { cmgen_path } " \ <nl> + - - deploy = " $ { PROJECT_DIR } / generated " \ <nl> + - - format = ktx - - size = 256 - - extract - blur = 0 . 1 \ <nl> + " $ { PROJECT_DIR } / . . / . . / . . / third_party / environments / venetian_crossroads_2k . hdr " <nl> + <nl> # The resgen tool generates an assembly file , resources . apple . S that gets compiled and linked <nl> # into the final binary . It contains all the resources consumed by the app . <nl> " $ { resgen_path } " \ <nl> mkdir - p " $ { PROJECT_DIR } / generated / " <nl> " $ { PROJECT_DIR } / generated / clear_coat . filamat " \ <nl> " $ { PROJECT_DIR } / generated / shadow_plane . filamat " \ <nl> " $ { PROJECT_DIR } / generated / camera_feed . filamat " \ <nl> - " $ { PROJECT_DIR } / . . / . . / . . / samples / envs / venetian_crossroads / venetian_crossroads_ibl . ktx " <nl> + " $ { PROJECT_DIR } / generated / venetian_crossroads_2k / venetian_crossroads_2k_ibl . ktx " <nl> <nl> # FilamentApp . cpp and Resources . S include files generated by resgen . <nl> # Touch them to force Xcode to recompile . <nl> mmm a / ios / samples / hello - ar / hello - ar / FilamentArView / FilamentApp . cpp <nl> ppp b / ios / samples / hello - ar / hello - ar / FilamentArView / FilamentApp . cpp <nl> void FilamentApp : : setupFilament ( ) { <nl> } <nl> <nl> void FilamentApp : : setupIbl ( ) { <nl> - image : : KtxBundle * iblBundle = new image : : KtxBundle ( RESOURCES_VENETIAN_CROSSROADS_IBL_DATA , <nl> - RESOURCES_VENETIAN_CROSSROADS_IBL_SIZE ) ; <nl> + image : : KtxBundle * iblBundle = new image : : KtxBundle ( RESOURCES_VENETIAN_CROSSROADS_2K_IBL_DATA , <nl> + RESOURCES_VENETIAN_CROSSROADS_2K_IBL_SIZE ) ; <nl> float3 harmonics [ 9 ] ; <nl> iblBundle - > getSphericalHarmonics ( harmonics ) ; <nl> app . iblTexture = image : : KtxUtility : : createTexture ( engine , iblBundle , false ) ; <nl> mmm a / ios / samples / hello - gltf / build - resources . sh <nl> ppp b / ios / samples / hello - gltf / build - resources . sh <nl> set - e <nl> # These will be compiled into the final binary via the resgen tool . <nl> <nl> resgen_path = " . . / . . / . . / out / release / filament / bin / resgen " <nl> + cmgen_path = " . . / . . / . . / out / release / filament / bin / cmgen " <nl> <nl> # Ensure that the required tools are present in the out / directory . <nl> # These can be built by running . / build . sh - p desktop - i release at Filament ' s root directory . <nl> if [ [ ! - e " $ { resgen_path } " ] ] ; then <nl> exit 1 <nl> fi <nl> <nl> + if [ [ ! - e " $ { cmgen_path } " ] ] ; then <nl> + echo " No cmgen binary could be found in . . / . . / . . / out / release / filament / bin / . " <nl> + echo " Ensure Filament has been built / installed before building this app . " <nl> + exit 1 <nl> + fi <nl> + <nl> # The resgen tool generates an assembly file , resources . apple . S that gets compiled and linked <nl> # into the final binary . It contains all the resources consumed by the app . <nl> " $ { resgen_path } " \ <nl> - - deploy = " $ { PROJECT_DIR } / generated " \ <nl> - " $ { PROJECT_DIR } / . . / . . / . . / samples / envs / venetian_crossroads / venetian_crossroads_ibl . ktx " \ <nl> - " $ { PROJECT_DIR } / . . / . . / . . / samples / envs / venetian_crossroads / venetian_crossroads_skybox . ktx " <nl> + " $ { PROJECT_DIR } / generated / venetian_crossroads_2k / venetian_crossroads_2k_skybox . ktx " \ <nl> + " $ { PROJECT_DIR } / generated / venetian_crossroads_2k / venetian_crossroads_2k_ibl . ktx " <nl> <nl> # App . cpp and Resources . S include files generated by resgen . <nl> # Touch them to force Xcode to recompile . <nl> mmm a / ios / samples / hello - gltf / hello - gltf / FilamentView / App . cpp <nl> ppp b / ios / samples / hello - gltf / hello - gltf / FilamentView / App . cpp <nl> void App : : setupFilament ( ) { <nl> } <nl> <nl> void App : : setupIbl ( ) { <nl> - image : : KtxBundle * iblBundle = new image : : KtxBundle ( RESOURCES_VENETIAN_CROSSROADS_IBL_DATA , <nl> - RESOURCES_VENETIAN_CROSSROADS_IBL_SIZE ) ; <nl> + image : : KtxBundle * iblBundle = new image : : KtxBundle ( RESOURCES_VENETIAN_CROSSROADS_2K_IBL_DATA , <nl> + RESOURCES_VENETIAN_CROSSROADS_2K_IBL_SIZE ) ; <nl> float3 harmonics [ 9 ] ; <nl> iblBundle - > getSphericalHarmonics ( harmonics ) ; <nl> app . iblTexture = image : : KtxUtility : : createTexture ( engine , iblBundle , false ) ; <nl> <nl> - image : : KtxBundle * skyboxBundle = new image : : KtxBundle ( RESOURCES_VENETIAN_CROSSROADS_SKYBOX_DATA , <nl> - RESOURCES_VENETIAN_CROSSROADS_SKYBOX_SIZE ) ; <nl> + image : : KtxBundle * skyboxBundle = new image : : KtxBundle ( RESOURCES_VENETIAN_CROSSROADS_2K_SKYBOX_DATA , <nl> + RESOURCES_VENETIAN_CROSSROADS_2K_SKYBOX_SIZE ) ; <nl> app . skyboxTexture = image : : KtxUtility : : createTexture ( engine , skyboxBundle , false ) ; <nl> <nl> app . skybox = Skybox : : Builder ( ) <nl> mmm a / ios / samples / hello - pbr / build - resources . sh <nl> ppp b / ios / samples / hello - pbr / build - resources . sh <nl> set - e <nl> filamesh_path = " . . / . . / . . / out / release / filament / bin / filamesh " <nl> matc_path = " . . / . . / . . / out / release / filament / bin / matc " <nl> resgen_path = " . . / . . / . . / out / release / filament / bin / resgen " <nl> + cmgen_path = " . . / . . / . . / out / release / filament / bin / cmgen " <nl> <nl> # Ensure that the required tools are present in the out / directory . <nl> # These can be built by running . / build . sh - p desktop - i release at Filament ' s root directory . <nl> if [ [ ! - e " $ { resgen_path } " ] ] ; then <nl> exit 1 <nl> fi <nl> <nl> + if [ [ ! - e " $ { cmgen_path } " ] ] ; then <nl> + echo " No cmgen binary could be found in . . / . . / . . / out / release / filament / bin / . " <nl> + echo " Ensure Filament has been built / installed before building this app . " <nl> + exit 1 <nl> + fi <nl> + <nl> # The filamesh tool converts the . obj file into a Filament - specific filamesh file that has been <nl> # optimized for loading into Filament . <nl> mkdir - p " $ { PROJECT_DIR } / generated / " <nl> mkdir - p " $ { PROJECT_DIR } / generated / " <nl> - o " $ { PROJECT_DIR } / generated / clear_coat . filamat " \ <nl> " $ { PROJECT_DIR } / Materials / clear_coat . mat " <nl> <nl> + # cmgen consumes an HDR environment map and generates two mipmapped KTX files ( IBL and skybox ) <nl> + " $ { cmgen_path } " \ <nl> + - - deploy = " $ { PROJECT_DIR } / generated " \ <nl> + - - format = ktx - - size = 256 - - extract - blur = 0 . 1 \ <nl> + " $ { PROJECT_DIR } / . . / . . / . . / third_party / environments / venetian_crossroads_2k . hdr " <nl> + <nl> # The resgen tool generates an assembly file , resources . apple . S that gets compiled and linked <nl> # into the final binary . It contains all the resources consumed by the app . <nl> " $ { resgen_path } " \ <nl> - - deploy = " $ { PROJECT_DIR } / generated " \ <nl> " $ { PROJECT_DIR } / generated / material_sphere . filamesh " \ <nl> " $ { PROJECT_DIR } / generated / clear_coat . filamat " \ <nl> - " $ { PROJECT_DIR } / . . / . . / . . / samples / envs / venetian_crossroads / venetian_crossroads_ibl . ktx " \ <nl> - " $ { PROJECT_DIR } / . . / . . / . . / samples / envs / venetian_crossroads / venetian_crossroads_skybox . ktx " <nl> + " $ { PROJECT_DIR } / generated / venetian_crossroads_2k / venetian_crossroads_2k_ibl . ktx " \ <nl> + " $ { PROJECT_DIR } / generated / venetian_crossroads_2k / venetian_crossroads_2k_skybox . ktx " <nl> <nl> # FilamentApp . cpp and Resources . S include files generated by resgen . <nl> # Touch them to force Xcode to recompile . <nl> mmm a / ios / samples / hello - pbr / hello - pbr / FilamentApp . cpp <nl> ppp b / ios / samples / hello - pbr / hello - pbr / FilamentApp . cpp <nl> void FilamentApp : : initialize ( ) { <nl> filaView = engine - > createView ( ) ; <nl> filaView - > setDepthPrepass ( filament : : View : : DepthPrepass : : DISABLED ) ; <nl> <nl> - image : : KtxBundle * iblBundle = new image : : KtxBundle ( RESOURCES_VENETIAN_CROSSROADS_IBL_DATA , <nl> - RESOURCES_VENETIAN_CROSSROADS_IBL_SIZE ) ; <nl> + image : : KtxBundle * iblBundle = new image : : KtxBundle ( RESOURCES_VENETIAN_CROSSROADS_2K_IBL_DATA , <nl> + RESOURCES_VENETIAN_CROSSROADS_2K_IBL_SIZE ) ; <nl> filament : : math : : float3 harmonics [ 9 ] ; <nl> iblBundle - > getSphericalHarmonics ( harmonics ) ; <nl> app . iblTexture = image : : KtxUtility : : createTexture ( engine , iblBundle , false ) ; <nl> <nl> - image : : KtxBundle * skyboxBundle = new image : : KtxBundle ( RESOURCES_VENETIAN_CROSSROADS_SKYBOX_DATA , <nl> - RESOURCES_VENETIAN_CROSSROADS_SKYBOX_SIZE ) ; <nl> + image : : KtxBundle * skyboxBundle = new image : : KtxBundle ( RESOURCES_VENETIAN_CROSSROADS_2K_SKYBOX_DATA , <nl> + RESOURCES_VENETIAN_CROSSROADS_2K_SKYBOX_SIZE ) ; <nl> app . skyboxTexture = image : : KtxUtility : : createTexture ( engine , skyboxBundle , false ) ; <nl> <nl> app . skybox = Skybox : : Builder ( ) <nl> mmm a / samples / CMakeLists . txt <nl> ppp b / samples / CMakeLists . txt <nl> add_custom_command ( OUTPUT $ { DUMMY_SRC } COMMAND echo " / / " > $ { DUMMY_SRC } ) <nl> <nl> add_library ( common - resources $ { DUMMY_SRC } $ { RESGEN_SOURCE } ) <nl> <nl> + # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> + # Invoke cmgen to build KTX files for the default IBL and skybox <nl> + # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> + <nl> + set ( CMGEN_ARGS - x . - - format = ktx - - size = 256 - - extract - blur = 0 . 1 ) <nl> + <nl> + function ( add_envmap SOURCE TARGET ) <nl> + set ( source_envmap " $ { ROOT_DIR } / $ { SOURCE } " ) <nl> + <nl> + set ( target_skybox " $ { PROJECT_BINARY_DIR } / $ { TARGET } / $ { TARGET } _skybox . ktx " ) <nl> + set ( target_envmap " $ { PROJECT_BINARY_DIR } / $ { TARGET } / $ { TARGET } _ibl . ktx " ) <nl> + <nl> + set ( target_envmaps $ { target_envmaps } $ { target_skybox } PARENT_SCOPE ) <nl> + set ( target_envmaps $ { target_envmaps } $ { target_envmap } PARENT_SCOPE ) <nl> + <nl> + add_custom_command ( OUTPUT $ { target_skybox } $ { target_envmap } <nl> + COMMAND cmgen $ { CMGEN_ARGS } $ { source_envmap } <nl> + MAIN_DEPENDENCY $ { source_envmap } <nl> + DEPENDS cmgen ) <nl> + endfunction ( ) <nl> + <nl> + add_envmap ( " third_party / environments / venetian_crossroads_2k . hdr " " venetian_crossroads_2k " ) <nl> + <nl> # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> # Build suzanne resources <nl> # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> endif ( ) <nl> # / assets / fonts copied from REPO / assets <nl> # / assets / models copied from REPO / assets <nl> # / textures copied from REPO / third_party <nl> - # / envs copied from REPO / samples / envs <nl> # <nl> # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> <nl> file ( COPY . . / assets DESTINATION $ { PROJECT_BINARY_DIR } <nl> add_custom_target ( assets ALL DEPENDS assets ) <nl> add_dependencies ( filament assets ) <nl> <nl> - file ( COPY . . / samples / envs DESTINATION $ { PROJECT_BINARY_DIR } ) <nl> - add_custom_target ( envs ALL DEPENDS envs ) <nl> + add_custom_target ( envs DEPENDS $ { target_envmaps } ) <nl> add_dependencies ( filament envs ) <nl> deleted file mode 100644 <nl> index 94a1dee9e . . 000000000 <nl> mmm a / samples / envs / README <nl> ppp / dev / null <nl> <nl> - The contents of this folder were built using cmgen as follows : <nl> - <nl> - export CMGEN = . . / . . / out / cmake - release / tools / cmgen / cmgen <nl> - $ CMGEN - x . - - format = ktx - - size = 256 - - extract - blur = 0 . 1 . . / . . / assets / environments / white_furnace / white_furnace . exr <nl> - $ CMGEN - x . - - format = ktx - - size = 256 - - extract - blur = 0 . 1 . . / . . / third_party / environments / venetian_crossroads_2k . hdr <nl> - $ CMGEN - x . - - format = ktx - - size = 256 - - extract - blur = 0 . 1 . . / . . / third_party / environments / pillars_2k . hdr <nl> - <nl> - $ CMGEN - x s3tc - - format = ktx - - size = 256 - - extract - blur = 0 . 1 - - compression = s3tc_rgba_dxt5 . . / . . / third_party / environments / venetian_crossroads_2k . hdr <nl> - mv s3tc / venetian_crossroads_2k / venetian_crossroads_2k_ibl . ktx venetian_crossroads / venetian_crossroads_ibl_s3tc . ktx <nl> - mv s3tc / venetian_crossroads_2k / venetian_crossroads_2k_skybox . ktx venetian_crossroads / venetian_crossroads_skybox_s3tc . ktx <nl> - rm - rf s3tc <nl> deleted file mode 100644 <nl> index cf00cd0d7 . . 000000000 <nl> Binary files a / samples / envs / pillars / pillars_ibl . ktx and / dev / null differ <nl> deleted file mode 100644 <nl> index 5700e8472 . . 000000000 <nl> Binary files a / samples / envs / pillars / pillars_skybox . ktx and / dev / null differ <nl> deleted file mode 100644 <nl> index 8b0a6b721 . . 000000000 <nl> Binary files a / samples / envs / venetian_crossroads / venetian_crossroads_ibl . ktx and / dev / null differ <nl> deleted file mode 100644 <nl> index bac7b47f9 . . 000000000 <nl> Binary files a / samples / envs / venetian_crossroads / venetian_crossroads_skybox . ktx and / dev / null differ <nl> deleted file mode 100644 <nl> index 6aa050ba9 . . 000000000 <nl> Binary files a / samples / envs / white_furnace / white_furnace_ibl . ktx and / dev / null differ <nl> deleted file mode 100644 <nl> index 4daa09bb8 . . 000000000 <nl> Binary files a / samples / envs / white_furnace / white_furnace_skybox . ktx and / dev / null differ <nl> mmm a / samples / gltf_baker . cpp <nl> ppp b / samples / gltf_baker . cpp <nl> enum class Visualization : int { <nl> IMAGE_GBUFFER_NORMALS <nl> } ; <nl> <nl> - static const char * DEFAULT_IBL = " envs / venetian_crossroads " ; <nl> + static const char * DEFAULT_IBL = " venetian_crossroads_2k " ; <nl> static const char * INI_FILENAME = " gltf_baker . ini " ; <nl> static const char * TMP_UV_FILENAME = " gltf_baker_tmp_uv . png " ; <nl> static const char * TMP_AO_FILENAME = " gltf_baker_tmp_ao . png " ; <nl> mmm a / samples / gltf_viewer . cpp <nl> ppp b / samples / gltf_viewer . cpp <nl> struct App { <nl> bool actualSize = false ; <nl> } ; <nl> <nl> - static const char * DEFAULT_IBL = " envs / venetian_crossroads " ; <nl> + static const char * DEFAULT_IBL = " venetian_crossroads_2k " ; <nl> <nl> static void printUsage ( char * name ) { <nl> std : : string exec_name ( Path ( name ) . getName ( ) ) ; <nl> mmm a / web / samples / CMakeLists . txt <nl> ppp b / web / samples / CMakeLists . txt <nl> function ( add_envmap SOURCE TARGET ) <nl> <nl> set ( target_skyboxes $ { target_skyboxes } $ { target_skybox } $ { target_skybox_tiny } PARENT_SCOPE ) <nl> <nl> - set ( target_envmaps $ { target_envmaps } <nl> - $ { target_envmap } $ { target_envmap_etc } $ { target_envmap_s3tc } PARENT_SCOPE ) <nl> + set ( target_envmaps $ { target_envmaps } $ { target_envmap } PARENT_SCOPE ) <nl> <nl> - add_custom_command ( OUTPUT $ { target_skybox } $ { target_skybox_tiny } <nl> - $ { target_envmap } $ { target_envmap_etc } $ { target_envmap_s3tc } <nl> + add_custom_command ( OUTPUT $ { target_skybox } $ { target_skybox_tiny } $ { target_envmap } <nl> <nl> # Create a low - resolution skybox , then rename it . <nl> COMMAND cmgen $ { CMGEN_ARGS_TINY } $ { source_envmap } <nl>
|
Replace prebuilt KTX with a build step .
|
google/filament
|
91ff1d87eb2ab4f9df6eb78bcd406e7c5e959595
|
2019-08-08T17:41:13Z
|
mmm a / DEPS <nl> ppp b / DEPS <nl> vars = { <nl> ' check_v8_header_includes ' : False , <nl> <nl> # GN CIPD package version . <nl> - ' gn_version ' : ' git_revision : 9a0496a74efd13c1bb2abd866d8a227404615068 ' , <nl> + ' gn_version ' : ' git_revision : fbe7aec770944d17c9f3006f6cbb5c19e8cd43ea ' , <nl> <nl> # luci - go CIPD package version . <nl> ' luci_go ' : ' git_revision : 56ae79476e3caf14da59d75118408aa778637936 ' , <nl> vars = { <nl> <nl> deps = { <nl> ' v8 / build ' : <nl> - Var ( ' chromium_url ' ) + ' / chromium / src / build . git ' + ' @ ' + ' 908ea81374add4a90badc005c5c85fed5b0e6798 ' , <nl> + Var ( ' chromium_url ' ) + ' / chromium / src / build . git ' + ' @ ' + ' a980f85fdc0b6eee68b3470dc3b6c2a909f3bb1c ' , <nl> ' v8 / third_party / depot_tools ' : <nl> - Var ( ' chromium_url ' ) + ' / chromium / tools / depot_tools . git ' + ' @ ' + ' 03705f60de6cc7b06ddaabe9649c14fb70b62c4e ' , <nl> + Var ( ' chromium_url ' ) + ' / chromium / tools / depot_tools . git ' + ' @ ' + ' e364dd820b29ab33721f12c448f7454092295ef6 ' , <nl> ' v8 / third_party / icu ' : <nl> Var ( ' chromium_url ' ) + ' / chromium / deps / icu . git ' + ' @ ' + ' 9e7dae8c9a3f3b41afdf1a9f5e78f0299fb93e4e ' , <nl> ' v8 / third_party / instrumented_libraries ' : <nl> Var ( ' chromium_url ' ) + ' / chromium / src / third_party / instrumented_libraries . git ' + ' @ ' + ' bb3f1802c237dd19105dd0f7919f99e536a39d10 ' , <nl> ' v8 / buildtools ' : <nl> - Var ( ' chromium_url ' ) + ' / chromium / src / buildtools . git ' + ' @ ' + ' 574cbd5df82c6ae48805b2aa8d75e0ef76aa15aa ' , <nl> + Var ( ' chromium_url ' ) + ' / chromium / src / buildtools . git ' + ' @ ' + ' 3200e0f147c59e57507a26afd098de801bd96777 ' , <nl> ' v8 / buildtools / clang_format / script ' : <nl> Var ( ' chromium_url ' ) + ' / chromium / llvm - project / cfe / tools / clang - format . git ' + ' @ ' + ' 96636aa0e9f047f17447f2d45a094d0b59ed7917 ' , <nl> ' v8 / buildtools / linux64 ' : { <nl> deps = { <nl> ' dep_type ' : ' cipd ' , <nl> } , <nl> ' v8 / third_party / catapult ' : { <nl> - ' url ' : Var ( ' chromium_url ' ) + ' / catapult . git ' + ' @ ' + ' b919b0064c9225d234b07d9ed28be10716ab6ae3 ' , <nl> + ' url ' : Var ( ' chromium_url ' ) + ' / catapult . git ' + ' @ ' + ' 9253b254e24be0e953c5562420167c6d63277672 ' , <nl> ' condition ' : ' checkout_android ' , <nl> } , <nl> ' v8 / third_party / colorama / src ' : { <nl> deps = { <nl> ' packages ' : [ <nl> { <nl> ' package ' : ' fuchsia / third_party / aemu / linux - amd64 ' , <nl> - ' version ' : ' VTMne1aEixrBYfQxsfnRBgzudRPhjV - iUQeXgznyNqgC ' <nl> + ' version ' : ' T98d0T9VlsHV98PPahwzBa8kF94z5dghLKOTUDCTmwYC ' <nl> } , <nl> ] , <nl> ' condition ' : ' host_os = = " linux " and checkout_fuchsia ' , <nl> deps = { <nl> ' dep_type ' : ' cipd ' , <nl> } , <nl> ' v8 / tools / clang ' : <nl> - Var ( ' chromium_url ' ) + ' / chromium / src / tools / clang . git ' + ' @ ' + ' 79a04200ec76e8027caee51ed69f02961743f92f ' , <nl> + Var ( ' chromium_url ' ) + ' / chromium / src / tools / clang . git ' + ' @ ' + ' 0d67b22eb5a41adfe6da73749a39e3ec56aa39fe ' , <nl> ' v8 / tools / luci - go ' : { <nl> ' packages ' : [ <nl> { <nl>
|
Update V8 DEPS .
|
v8/v8
|
aa320aaa5c4ac8937db950e8db6f884eb64bb99c
|
2020-06-16T12:06:29Z
|
mmm a / torch / csrc / jit / assert . h <nl> ppp b / torch / csrc / jit / assert . h <nl> struct assert_error final : public std : : exception { <nl> virtual const char * what ( ) const noexcept { return msg . c_str ( ) ; } <nl> } ; <nl> <nl> + [ [ noreturn ] ] <nl> void barf ( const char * fmt , . . . ) ; <nl> <nl> } } / / namespace torch : : jit <nl> mmm a / torch / csrc / toffee . h <nl> ppp b / torch / csrc / toffee . h <nl> struct MicroProto { <nl> } <nl> } ; <nl> <nl> - / / TODO : add more of these as necessary <nl> - const toffee_TensorProto_DataType TensorProto_DataType_FLOAT = toffee_TensorProto_DataType_FLOAT ; <nl> - <nl> + using DataType = toffee_TensorProto_DataType ; <nl> + <nl> + # define DEFINE_CONST ( C ) \ <nl> + const auto k # # C = toffee_TensorProto_DataType_ # # C ; <nl> + DEFINE_CONST ( FLOAT ) <nl> + DEFINE_CONST ( UINT8 ) <nl> + DEFINE_CONST ( INT8 ) <nl> + DEFINE_CONST ( UINT16 ) <nl> + DEFINE_CONST ( INT16 ) <nl> + DEFINE_CONST ( INT32 ) <nl> + DEFINE_CONST ( INT64 ) <nl> + DEFINE_CONST ( STRING ) <nl> + DEFINE_CONST ( BOOL ) <nl> + # undef DEFINE_CONST <nl> / / C + + wrappers which simulate the Google C + + Protobuf API <nl> / / <nl> / / These are NOT COMPLETE wrappers . If you find something is missing , add it ! <nl> class TensorProto : public MicroProto < toffee_TensorProto > { <nl> void set_name ( const std : : string & s ) { proto . name = string ( & name , s ) ; } <nl> void add_dims ( int64_t d ) { dims . emplace_back ( new int64_t ( d ) ) ; } <nl> void add_tensor ( const at : : Tensor & t ) { <nl> - if ( t . type ( ) . scalarType ( ) = = at : : kFloat ) { <nl> - proto . raw_data = tensor ( & tensor_data , t ) ; <nl> - } else { <nl> - JIT_ASSERTM ( 0 , " non - float tensors not supported yet " ) ; <nl> - } <nl> + proto . raw_data = tensor ( & tensor_data , t ) ; <nl> } <nl> void set_data_type ( toffee_TensorProto_DataType t ) { proto . has_data_type = true ; proto . data_type = t ; } <nl> } ; <nl> mmm a / torch / csrc / toffee / export . cpp <nl> ppp b / torch / csrc / toffee / export . cpp <nl> static void encodeTensor ( toffee : : TensorProto * p , const at : : Tensor & tensor ) { <nl> for ( auto d : tensor . sizes ( ) ) { <nl> p - > add_dims ( d ) ; <nl> } <nl> - p - > set_data_type ( toffee : : TensorProto_DataType_FLOAT ) ; <nl> - / / TODO : other types , we force conversion here <nl> - at : : Tensor cont = tensor . toType ( at : : CPU ( at : : kFloat ) ) ; <nl> + at : : ScalarType at_type ; <nl> + toffee : : DataType toffee_type ; <nl> + switch ( tensor . type ( ) . scalarType ( ) ) { <nl> + case at : : kDouble : <nl> + case at : : kFloat : <nl> + case at : : kHalf : <nl> + toffee_type = toffee : : kFLOAT ; <nl> + at_type = at : : kFloat ; <nl> + break ; <nl> + case at : : kByte : <nl> + case at : : kChar : <nl> + toffee_type = toffee : : kINT8 ; <nl> + at_type = at : : kByte ; <nl> + break ; <nl> + case at : : kShort : <nl> + toffee_type = toffee : : kINT16 ; <nl> + at_type = at : : kShort ; <nl> + break ; <nl> + case at : : kInt : <nl> + toffee_type = toffee : : kINT32 ; <nl> + at_type = at : : kInt ; <nl> + break ; <nl> + case at : : kLong : <nl> + toffee_type = toffee : : kINT64 ; <nl> + at_type = at : : kLong ; <nl> + break ; <nl> + default : <nl> + jit : : barf ( " unexpected tensor scalar type " ) ; <nl> + break ; <nl> + } <nl> + p - > set_data_type ( toffee_type ) ; <nl> + at : : Tensor cont = tensor . toType ( at : : CPU ( at_type ) ) . contiguous ( ) ; <nl> p - > add_tensor ( cont ) ; <nl> } <nl> static void encodeGraph ( toffee : : GraphProto * p_g , std : : shared_ptr < Graph > & g , const std : : vector < at : : Tensor > & initializers ) ; <nl>
|
support more types in export
|
pytorch/pytorch
|
4f6a7f4e2eeba2f77be5405740efdf170e388fec
|
2017-09-05T21:48:55Z
|
mmm a / aten / src / ATen / TensorUtils . cpp <nl> ppp b / aten / src / ATen / TensorUtils . cpp <nl> void checkAllDefined ( CheckedFrom c , ArrayRef < TensorArg > ts ) { <nl> <nl> void checkBackend ( CheckedFrom c , const Tensor & t , Backend backend ) { <nl> AT_CHECK ( <nl> - t . type ( ) . backend ( ) = = backend , <nl> + ! t . defined ( ) | | t . type ( ) . backend ( ) = = backend , <nl> " Expected tensor to have " , toString ( backend ) , <nl> " Backend , but got tensor with " , toString ( t . type ( ) . backend ( ) ) , " Backend " , <nl> " ( while checking arguments for " , c , " ) " ) ; <nl> mmm a / aten / src / ATen / native / Normalization . cpp <nl> ppp b / aten / src / ATen / native / Normalization . cpp <nl> std : : tuple < Tensor , Tensor > batch_norm_update_stats_cpu ( <nl> std : : tuple < Tensor , Tensor , Tensor > batch_norm_cpu ( const Tensor & self , const Tensor & weight , const Tensor & bias , <nl> const Tensor & running_mean , const Tensor & running_var , <nl> bool train , double momentum , double eps ) { <nl> + checkBackend ( " batch_norm_cpu " , { self , weight , bias , running_mean , running_var } , Backend : : CPU ) ; <nl> + <nl> return AT_DISPATCH_FLOATING_TYPES ( self . type ( ) , " batch_norm " , [ & ] { <nl> if ( ! train ) { <nl> return batch_norm_cpu_transform_input_template < scalar_t > ( self , weight , bias , { } , { } , running_mean , running_var , train , eps ) ; <nl> mmm a / aten / src / ATen / native / cuda / Normalization . cuh <nl> ppp b / aten / src / ATen / native / cuda / Normalization . cuh <nl> std : : tuple < Tensor , Tensor , Tensor > batch_norm_cuda_template ( const Tensor & input_ <nl> const Tensor & running_mean_ , const Tensor & running_var_ , <nl> bool train , double momentum , double epsilon ) { <nl> <nl> + TensorArg input_arg { input_ , " input " , 1 } , <nl> + weight_arg { weight_ , " weight " , 2 } , <nl> + bias_arg { bias_ , " bias " , 3 } , <nl> + run_mean_arg { running_mean_ , " running_mean " , 4 } , <nl> + run_var_arg { running_var_ , " running_var " , 5 } ; <nl> + CheckedFrom c = " batch_norm_cuda " ; <nl> + checkAllSameGPU ( c , { input_arg , weight_arg , bias_arg , run_mean_arg , run_var_arg } ) ; <nl> + <nl> using accscalar_t = at : : acc_type < scalar_t , true > ; <nl> int64_t n_input = input_ . size ( 1 ) ; <nl> Tensor save_mean_ ; <nl>
|
Add backend checks for batch norm ( )
|
pytorch/pytorch
|
e07cca13123446d61576a2f54b9c5a680ff9f364
|
2019-01-11T19:28:45Z
|
mmm a / src / php / lib / Grpc / ActiveCall . php <nl> ppp b / src / php / lib / Grpc / ActiveCall . php <nl> <nl> * Represents an active call that allows sending and recieving binary data <nl> * / <nl> class ActiveCall { <nl> - private $ completion_queue ; <nl> private $ call ; <nl> - private $ flags ; <nl> private $ metadata ; <nl> <nl> / * * <nl> class ActiveCall { <nl> * @ param Channel $ channel The channel to communicate on <nl> * @ param string $ method The method to call on the remote server <nl> * @ param array $ metadata Metadata to send with the call , if applicable <nl> - * @ param long $ flags Write flags to use with this call <nl> * / <nl> public function __construct ( Channel $ channel , <nl> $ method , <nl> - $ metadata = array ( ) , <nl> - $ flags = 0 ) { <nl> - $ this - > completion_queue = new CompletionQueue ( ) ; <nl> + $ metadata = array ( ) ) { <nl> $ this - > call = new Call ( $ channel , $ method , Timeval : : inf_future ( ) ) ; <nl> - $ this - > call - > add_metadata ( $ metadata , 0 ) ; <nl> - $ this - > flags = $ flags ; <nl> <nl> - / / Invoke the call . <nl> - $ this - > call - > invoke ( $ this - > completion_queue , <nl> - CLIENT_METADATA_READ , <nl> - FINISHED , 0 ) ; <nl> - $ metadata_event = $ this - > completion_queue - > pluck ( CLIENT_METADATA_READ , <nl> - Timeval : : inf_future ( ) ) ; <nl> - $ this - > metadata = $ metadata_event - > data ; <nl> + $ event = $ this - > call - > start_batch ( [ OP_SEND_INITIAL_METADATA = > $ metadata ] ) ; <nl> + <nl> + $ this - > metadata = $ event - > metadata ; <nl> } <nl> <nl> / * * <nl> public function cancel ( ) { <nl> * @ return The next message from the server , or null if there is none . <nl> * / <nl> public function read ( ) { <nl> - $ this - > call - > start_read ( READ ) ; <nl> - $ read_event = $ this - > completion_queue - > pluck ( READ , Timeval : : inf_future ( ) ) ; <nl> + $ read_event = $ this - > call - > start_batch ( [ OP_RECV_MESSAGE = > true ] ) ; <nl> return $ read_event - > data ; <nl> } <nl> <nl> public function read ( ) { <nl> * @ param ByteBuffer $ data The data to write <nl> * / <nl> public function write ( $ data ) { <nl> - $ this - > call - > start_write ( $ data , WRITE_ACCEPTED , $ this - > flags ) ; <nl> - $ this - > completion_queue - > pluck ( WRITE_ACCEPTED , Timeval : : inf_future ( ) ) ; <nl> + $ this - > call - > start_batch ( [ OP_SEND_MESSAGE = > $ data ] ) ; <nl> } <nl> <nl> / * * <nl> * Indicate that no more writes will be sent . <nl> * / <nl> public function writesDone ( ) { <nl> - $ this - > call - > writes_done ( FINISH_ACCEPTED ) ; <nl> - $ this - > completion_queue - > pluck ( FINISH_ACCEPTED , Timeval : : inf_future ( ) ) ; <nl> + $ this - > call - > start_batch ( [ OP_SEND_CLOSE_FROM_CLIENT = > true ] ) ; <nl> } <nl> <nl> / * * <nl> public function writesDone ( ) { <nl> * and array $ metadata members <nl> * / <nl> public function getStatus ( ) { <nl> - $ status_event = $ this - > completion_queue - > pluck ( FINISHED , <nl> - Timeval : : inf_future ( ) ) ; <nl> + $ status_event = $ this - > call - > start_batch ( [ RECV_STATUS_ON_CLIENT = > true ] ) ; <nl> return $ status_event - > data ; <nl> } <nl> } <nl>
|
Updated ActiveCall . php to use batch API
|
grpc/grpc
|
73aefecd6f3e9d2148b50cdadbee48e2c1ccd64b
|
2015-03-11T23:36:14Z
|
mmm a / dbms / tests / queries / 0_stateless / 00155_merges . sh <nl> ppp b / dbms / tests / queries / 0_stateless / 00155_merges . sh <nl> function create { <nl> clickhouse - client - - query = " DROP TABLE IF EXISTS test . aggregating " <nl> <nl> clickhouse - client - - query = " CREATE TABLE test . summing ( d Date DEFAULT today ( ) , x UInt64 , s UInt64 DEFAULT 1 ) ENGINE = SummingMergeTree ( d , x , 8192 ) " <nl> - clickhouse - client - - query = " CREATE TABLE test . collapsing ( d Date DEFAULT today ( ) , x UInt64 , s UInt64 DEFAULT 1 ) ENGINE = CollapsingMergeTree ( d , x , 8192 , s ) " <nl> + clickhouse - client - - query = " CREATE TABLE test . collapsing ( d Date DEFAULT today ( ) , x UInt64 , s Int8 DEFAULT 1 ) ENGINE = CollapsingMergeTree ( d , x , 8192 , s ) " <nl> clickhouse - client - - query = " CREATE TABLE test . aggregating ( d Date DEFAULT today ( ) , x UInt64 , s AggregateFunction ( sum , UInt64 ) ) ENGINE = AggregatingMergeTree ( d , x , 8192 ) " <nl> } <nl> <nl>
|
Fixed test [ # METR - 12588 ] .
|
ClickHouse/ClickHouse
|
8f68bd3bb27faff3359cb78697f765b01800a9a1
|
2016-04-13T04:43:55Z
|
new file mode 100755 <nl> index 00000000000 . . 042bf9dab24 <nl> mmm / dev / null <nl> ppp b / ports / openmvs / cgal - 5 . 0 . patch <nl> <nl> pppmmm a / libs / MVS / DepthMap . cpp <nl> ppp + b / libs / MVS / DepthMap . cpp <nl> + void MVS : : EstimatePointNormals ( const ImageArr & images , PointCloud & pointcloud , i <nl> + / / estimates normals direction ; <nl> + / / Note : pca_estimate_normals ( ) requires an iterator over points <nl> + / / as well as property maps to access each point ' s position and normal . <nl> + - # if CGAL_VERSION_NR < 1040800000 <nl> + - CGAL : : pca_estimate_normals ( <nl> + - # else <nl> + - CGAL : : pca_estimate_normals < CGAL : : Sequential_tag > ( <nl> + - # endif <nl> + - pointvectors . begin ( ) , pointvectors . end ( ) , <nl> + - CGAL : : First_of_pair_property_map < PointVectorPair > ( ) , <nl> + - CGAL : : Second_of_pair_property_map < PointVectorPair > ( ) , <nl> + - numNeighbors <nl> + - ) ; <nl> + + # if CGAL_VERSION_NR < 1041301000 <nl> + + # if CGAL_VERSION_NR < 1040800000 <nl> + + CGAL : : pca_estimate_normals ( <nl> + + # else <nl> + + CGAL : : pca_estimate_normals < CGAL : : Sequential_tag > ( <nl> + + # endif <nl> + + pointvectors . begin ( ) , pointvectors . end ( ) , <nl> + + CGAL : : First_of_pair_property_map < PointVectorPair > ( ) , <nl> + + CGAL : : Second_of_pair_property_map < PointVectorPair > ( ) , <nl> + + numNeighbors <nl> + + ) ; <nl> + + # else <nl> + + CGAL : : pca_estimate_normals < CGAL : : Sequential_tag > ( <nl> + + pointvectors , <nl> + + numNeighbors , <nl> + + CGAL : : parameters : : point_map ( CGAL : : First_of_pair_property_map < PointVectorPair > ( ) ) <nl> + + . normal_map ( CGAL : : Second_of_pair_property_map < PointVectorPair > ( ) ) <nl> + + ) ; <nl> + + # endif <nl> + / / store the point normals <nl> + pointcloud . normals . Resize ( pointcloud . points . GetSize ( ) ) ; <nl> + FOREACH ( i , pointcloud . normals ) { <nl> mmm a / ports / openmvs / portfile . cmake <nl> ppp b / ports / openmvs / portfile . cmake <nl> vcpkg_from_github ( <nl> PATCHES <nl> glfw3_target_compat . patch <nl> boost - 1 . 71 . patch <nl> + cgal - 5 . 0 . patch <nl> ) <nl> <nl> vcpkg_configure_cmake ( <nl>
|
Add a patch for openmvs
|
microsoft/vcpkg
|
77c50e27ebb3c4c98d7610a9cd9b29293eb85d0c
|
2019-10-21T13:26:33Z
|
mmm a / dbms / src / Storages / tests / merge_tree . cpp <nl> ppp b / dbms / src / Storages / tests / merge_tree . cpp <nl> int main ( int argc , char * * argv ) <nl> " . / " , " default " , " test " , <nl> names_and_types , { } , { } , ColumnDefaults { } , <nl> context , primary_expr , " d " , <nl> - nullptr , 101 , MergeTreeData : : Ordinary , { } , { } , { } ) ; <nl> + nullptr , 101 , MergeTreeData : : MergingParams : : Ordinary , { } ) ; <nl> <nl> / / / пишем в неё <nl> { <nl>
|
Fixed build of test [ # METR - 21048 ] .
|
ClickHouse/ClickHouse
|
9ae0277632c032f454bf2afebd24eac153e58894
|
2016-04-24T19:47:10Z
|
mmm a / lib / IRGen / IRGenDebugInfo . cpp <nl> ppp b / lib / IRGen / IRGenDebugInfo . cpp <nl> static void mangleIdent ( llvm : : raw_string_ostream & OS , StringRef Id ) { <nl> } <nl> <nl> / / / Return the size reported by a type . <nl> - static unsigned getSizeInBits ( llvm : : MDType * Ty , <nl> - const TrackingDIRefMap & Map ) { <nl> + static unsigned getSizeInBits ( llvm : : DIType * Ty , const TrackingDIRefMap & Map ) { <nl> / / Follow derived types until we reach a type that <nl> / / reports back a size . <nl> - while ( isa < llvm : : MDDerivedType > ( Ty ) & & ! Ty - > getSizeInBits ( ) ) { <nl> - auto * DT = cast < llvm : : MDDerivedType > ( Ty ) ; <nl> + while ( isa < llvm : : DIDerivedType > ( Ty ) & & ! Ty - > getSizeInBits ( ) ) { <nl> + auto * DT = cast < llvm : : DIDerivedType > ( Ty ) ; <nl> Ty = DT - > getBaseType ( ) . resolve ( Map ) ; <nl> if ( ! Ty ) <nl> return 0 ; <nl> static unsigned getSizeInBits ( llvm : : MDType * Ty , <nl> } <nl> <nl> / / / Return the size reported by the variable ' s type . <nl> - static unsigned getSizeInBits ( const llvm : : MDLocalVariable * Var , <nl> + static unsigned getSizeInBits ( const llvm : : DILocalVariable * Var , <nl> const TrackingDIRefMap & Map ) { <nl> - llvm : : MDType * Ty = Var - > getType ( ) . resolve ( Map ) ; <nl> + llvm : : DIType * Ty = Var - > getType ( ) . resolve ( Map ) ; <nl> return getSizeInBits ( Ty , Map ) ; <nl> } <nl> <nl> llvm : : MDNode * IRGenDebugInfo : : createInlinedAt ( SILDebugScope * InlinedScope ) { <nl> <nl> # ifndef NDEBUG <nl> auto * S = getOrCreateScope ( InlinedScope ) ; <nl> - while ( ! isa < llvm : : MDSubprogram > ( S ) ) { <nl> - auto * LB = dyn_cast < llvm : : MDLexicalBlockBase > ( S ) ; <nl> + while ( ! isa < llvm : : DISubprogram > ( S ) ) { <nl> + auto * LB = dyn_cast < llvm : : DILexicalBlockBase > ( S ) ; <nl> S = LB - > getScope ( ) ; <nl> assert ( S & & " Lexical block parent chain must contain a subprogram " ) ; <nl> } <nl> void IRGenDebugInfo : : setCurrentLoc ( IRBuilder & Builder , SILDebugScope * DS , <nl> } <nl> <nl> / / / getOrCreateScope - Translate a SILDebugScope into an llvm : : DIDescriptor . <nl> - llvm : : MDScope * IRGenDebugInfo : : getOrCreateScope ( SILDebugScope * DS ) { <nl> + llvm : : DIScope * IRGenDebugInfo : : getOrCreateScope ( SILDebugScope * DS ) { <nl> if ( DS = = 0 ) <nl> return MainFile ; <nl> <nl> / / Try to find it in the cache first . <nl> auto CachedScope = ScopeCache . find ( DS ) ; <nl> if ( CachedScope ! = ScopeCache . end ( ) ) <nl> - return cast < llvm : : MDScope > ( CachedScope - > second ) ; <nl> + return cast < llvm : : DIScope > ( CachedScope - > second ) ; <nl> <nl> / / If this is a ( inlined ) function scope , the function may <nl> / / not have been created yet . <nl> llvm : : MDScope * IRGenDebugInfo : : getOrCreateScope ( SILDebugScope * DS ) { <nl> <nl> auto CachedScope = ScopeCache . find ( FnScope ) ; <nl> if ( CachedScope ! = ScopeCache . end ( ) ) <nl> - return cast < llvm : : MDScope > ( CachedScope - > second ) ; <nl> + return cast < llvm : : DIScope > ( CachedScope - > second ) ; <nl> <nl> / / Force the debug info for the function to be emitted , even if it <nl> / / is external or has been inlined . <nl> llvm : : MDScope * IRGenDebugInfo : : getOrCreateScope ( SILDebugScope * DS ) { <nl> return SP ; <nl> } <nl> <nl> - llvm : : MDScope * Parent = getOrCreateScope ( DS - > Parent ) ; <nl> + llvm : : DIScope * Parent = getOrCreateScope ( DS - > Parent ) ; <nl> if ( Opts . DebugInfoKind = = IRGenDebugInfoKind : : LineTables ) <nl> return Parent ; <nl> <nl> assert ( DS - > Parent & & " lexical block must have a parent subprogram " ) ; <nl> Location L = getStartLocation ( SM , DS - > Loc ) ; <nl> - llvm : : MDFile * File = getOrCreateFile ( L . Filename ) ; <nl> + llvm : : DIFile * File = getOrCreateFile ( L . Filename ) ; <nl> auto * DScope = DBuilder . createLexicalBlock ( Parent , File , L . Line , L . Col ) ; <nl> <nl> / / Cache it . <nl> StringRef IRGenDebugInfo : : getCurrentDirname ( ) { <nl> } <nl> <nl> / / / getOrCreateFile - Translate filenames into DIFiles . <nl> - llvm : : MDFile * IRGenDebugInfo : : getOrCreateFile ( const char * Filename ) { <nl> + llvm : : DIFile * IRGenDebugInfo : : getOrCreateFile ( const char * Filename ) { <nl> if ( ! Filename ) <nl> return MainFile ; <nl> <nl> llvm : : MDFile * IRGenDebugInfo : : getOrCreateFile ( const char * Filename ) { <nl> if ( CachedFile ! = DIFileCache . end ( ) ) { <nl> / / Verify that the information still exists . <nl> if ( llvm : : Metadata * V = CachedFile - > second ) <nl> - return cast < llvm : : MDFile > ( V ) ; <nl> + return cast < llvm : : DIFile > ( V ) ; <nl> } <nl> <nl> / / Create a new one . <nl> StringRef File = BumpAllocatedString ( llvm : : sys : : path : : filename ( Filename ) ) ; <nl> llvm : : SmallString < 512 > Path ( Filename ) ; <nl> llvm : : sys : : path : : remove_filename ( Path ) ; <nl> - llvm : : MDFile * F = DBuilder . createFile ( File , BumpAllocatedString ( Path ) ) ; <nl> + llvm : : DIFile * F = DBuilder . createFile ( File , BumpAllocatedString ( Path ) ) ; <nl> <nl> / / Cache it . <nl> DIFileCache [ Filename ] = llvm : : TrackingMDNodeRef ( F ) ; <nl> static CanSILFunctionType getFunctionType ( SILType SILTy ) { <nl> } <nl> <nl> / / / Build the context chain for a given DeclContext . <nl> - llvm : : MDScope * IRGenDebugInfo : : getOrCreateContext ( DeclContext * DC ) { <nl> + llvm : : DIScope * IRGenDebugInfo : : getOrCreateContext ( DeclContext * DC ) { <nl> if ( ! DC ) <nl> return TheCU ; <nl> <nl> llvm : : MDScope * IRGenDebugInfo : : getOrCreateContext ( DeclContext * DC ) { <nl> case DeclContextKind : : ExtensionDecl : <nl> return getOrCreateContext ( DC - > getParent ( ) ) ; <nl> case DeclContextKind : : TopLevelCodeDecl : <nl> - return cast < llvm : : MDScope > ( EntryPointFn ) ; <nl> + return cast < llvm : : DIScope > ( EntryPointFn ) ; <nl> case DeclContextKind : : Module : { <nl> auto File = getOrCreateFile ( getFilenameFromDC ( DC ) ) ; <nl> return getOrCreateModule ( TheCU , cast < Module > ( DC ) - > getName ( ) . str ( ) , File ) ; <nl> llvm : : MDScope * IRGenDebugInfo : : getOrCreateContext ( DeclContext * DC ) { <nl> if ( CachedType ! = DITypeCache . end ( ) ) { <nl> / / Verify that the information still exists . <nl> if ( llvm : : Metadata * Val = CachedType - > second ) <nl> - return cast < llvm : : MDType > ( Val ) ; <nl> + return cast < llvm : : DIType > ( Val ) ; <nl> } <nl> <nl> / / Create a Forward - declared type . <nl> void IRGenDebugInfo : : createParameterType ( <nl> } <nl> <nl> / / / Create the array of function parameters for FnTy . SIL Version . <nl> - llvm : : MDTypeRefArray <nl> + llvm : : DITypeRefArray <nl> IRGenDebugInfo : : createParameterTypes ( SILType SILTy , DeclContext * DeclCtx ) { <nl> if ( ! SILTy ) <nl> return nullptr ; <nl> IRGenDebugInfo : : createParameterTypes ( SILType SILTy , DeclContext * DeclCtx ) { <nl> } <nl> <nl> / / / Create the array of function parameters for a function type . <nl> - llvm : : MDTypeRefArray <nl> + llvm : : DITypeRefArray <nl> IRGenDebugInfo : : createParameterTypes ( CanSILFunctionType FnTy , <nl> DeclContext * DeclCtx ) { <nl> SmallVector < llvm : : Metadata * , 16 > Parameters ; <nl> static bool isAllocatingConstructor ( SILFunctionTypeRepresentation Rep , <nl> & & DeclCtx & & isa < ConstructorDecl > ( DeclCtx ) ; <nl> } <nl> <nl> - llvm : : MDSubprogram * IRGenDebugInfo : : <nl> - emitFunction ( SILModule & SILMod , SILDebugScope * DS , llvm : : Function * Fn , <nl> - SILFunctionTypeRepresentation Rep , SILType SILTy , <nl> - DeclContext * DeclCtx ) { <nl> + llvm : : DISubprogram * IRGenDebugInfo : : emitFunction ( <nl> + SILModule & SILMod , SILDebugScope * DS , llvm : : Function * Fn , <nl> + SILFunctionTypeRepresentation Rep , SILType SILTy , DeclContext * DeclCtx ) { <nl> / / Returned a previously cached entry for an abstract ( inlined ) function . <nl> auto cached = ScopeCache . find ( DS ) ; <nl> if ( cached ! = ScopeCache . end ( ) ) <nl> - return cast < llvm : : MDSubprogram > ( cached - > second ) ; <nl> + return cast < llvm : : DISubprogram > ( cached - > second ) ; <nl> <nl> StringRef LinkageName ; <nl> if ( Fn ) <nl> emitFunction ( SILModule & SILMod , SILDebugScope * DS , llvm : : Function * Fn , <nl> auto Params = Opts . DebugInfoKind = = IRGenDebugInfoKind : : LineTables <nl> ? nullptr <nl> : createParameterTypes ( SILTy , DeclCtx ) ; <nl> - llvm : : MDSubroutineType * DIFnTy = DBuilder . createSubroutineType ( File , Params ) ; <nl> + llvm : : DISubroutineType * DIFnTy = DBuilder . createSubroutineType ( File , Params ) ; <nl> llvm : : MDNode * TemplateParameters = nullptr ; <nl> - llvm : : MDSubprogram * Decl = nullptr ; <nl> + llvm : : DISubprogram * Decl = nullptr ; <nl> <nl> / / Various flags <nl> bool IsLocalToUnit = Fn ? Fn - > hasInternalLinkage ( ) : true ; <nl> emitFunction ( SILModule & SILMod , SILDebugScope * DS , llvm : : Function * Fn , <nl> / / never want to set a breakpoint there . <nl> ( Rep = = SILFunctionTypeRepresentation : : ObjCMethod ) | | <nl> isAllocatingConstructor ( Rep , DeclCtx ) ) { <nl> - Flags | = llvm : : DebugNode : : FlagArtificial ; <nl> + Flags | = llvm : : DINode : : FlagArtificial ; <nl> ScopeLine = 0 ; <nl> } <nl> <nl> if ( FnTy & & FnTy - > getRepresentation ( ) <nl> = = SILFunctionType : : Representation : : Block ) <nl> - Flags | = llvm : : DebugNode : : FlagAppleBlock ; <nl> + Flags | = llvm : : DINode : : FlagAppleBlock ; <nl> <nl> - llvm : : MDSubprogram * SP = DBuilder . createFunction ( <nl> + llvm : : DISubprogram * SP = DBuilder . createFunction ( <nl> Scope , Name , LinkageName , File , Line , DIFnTy , IsLocalToUnit , IsDefinition , <nl> ScopeLine , Flags , IsOptimized , Fn , TemplateParameters , Decl ) ; <nl> <nl> void IRGenDebugInfo : : createImportedModule ( StringRef Name , StringRef Mangled , <nl> } <nl> <nl> / / / Return a cached module for an access path or create a new one . <nl> - llvm : : MDModule * IRGenDebugInfo : : getOrCreateModule ( llvm : : MDScope * Parent , <nl> + llvm : : MDModule * IRGenDebugInfo : : getOrCreateModule ( llvm : : DIScope * Parent , <nl> std : : string Name , <nl> - llvm : : MDFile * File ) { <nl> + llvm : : DIFile * File ) { <nl> / / Look in the cache first . <nl> auto CachedM = DIModuleCache . find ( Name ) ; <nl> <nl> llvm : : MDModule * IRGenDebugInfo : : getOrCreateModule ( llvm : : MDScope * Parent , <nl> return M ; <nl> } <nl> <nl> - llvm : : MDSubprogram * IRGenDebugInfo : : emitFunction ( SILFunction & SILFn , <nl> + llvm : : DISubprogram * IRGenDebugInfo : : emitFunction ( SILFunction & SILFn , <nl> llvm : : Function * Fn ) { <nl> auto * DS = SILFn . getDebugScope ( ) ; <nl> if ( DS & & ! DS - > SILFn ) <nl> void IRGenDebugInfo : : emitArgVariableDeclaration ( <nl> Indirection , IsArtificial ) ; <nl> } <nl> <nl> - / / / Return the MDFile that is the ancestor of Scope . <nl> - llvm : : MDFile * IRGenDebugInfo : : getFile ( llvm : : MDScope * Scope ) { <nl> - while ( ! isa < llvm : : MDFile > ( Scope ) ) { <nl> + / / / Return the DIFile that is the ancestor of Scope . <nl> + llvm : : DIFile * IRGenDebugInfo : : getFile ( llvm : : DIScope * Scope ) { <nl> + while ( ! isa < llvm : : DIFile > ( Scope ) ) { <nl> switch ( Scope - > getTag ( ) ) { <nl> case llvm : : dwarf : : DW_TAG_lexical_block : <nl> - Scope = cast < llvm : : MDLexicalBlock > ( Scope ) - > getScope ( ) ; <nl> + Scope = cast < llvm : : DILexicalBlock > ( Scope ) - > getScope ( ) ; <nl> break ; <nl> case llvm : : dwarf : : DW_TAG_subprogram : { <nl> / / Scopes are not indexed by UID . <nl> llvm : : DITypeIdentifierMap EmptyMap ; <nl> - Scope = cast < llvm : : MDSubprogram > ( Scope ) - > getScope ( ) . resolve ( EmptyMap ) ; <nl> + Scope = cast < llvm : : DISubprogram > ( Scope ) - > getScope ( ) . resolve ( EmptyMap ) ; <nl> break ; <nl> } <nl> default : <nl> llvm : : MDFile * IRGenDebugInfo : : getFile ( llvm : : MDScope * Scope ) { <nl> if ( Scope ) <nl> return MainFile ; <nl> } <nl> - return cast < llvm : : MDFile > ( Scope ) ; <nl> + return cast < llvm : : DIFile > ( Scope ) ; <nl> } <nl> <nl> / / / Return the storage size of an explosion value . <nl> static uint64_t getSizeFromExplosionValue ( const clang : : TargetInfo & TI , <nl> / / / composite type . <nl> class ElementSizes { <nl> const TrackingDIRefMap & DIRefMap ; <nl> - SmallVector < const llvm : : MDType * , 12 > Stack ; <nl> + SmallVector < const llvm : : DIType * , 12 > Stack ; <nl> <nl> public : <nl> - ElementSizes ( const llvm : : MDType * DITy , const TrackingDIRefMap & DIRefMap ) <nl> + ElementSizes ( const llvm : : DIType * DITy , const TrackingDIRefMap & DIRefMap ) <nl> : DIRefMap ( DIRefMap ) , Stack ( 1 , DITy ) { } <nl> <nl> struct SizeAlign { <nl> class ElementSizes { <nl> return { 0 , 0 } ; <nl> <nl> auto * Cur = Stack . pop_back_val ( ) ; <nl> - if ( isa < llvm : : MDCompositeType > ( Cur ) & & <nl> + if ( isa < llvm : : DICompositeType > ( Cur ) & & <nl> Cur - > getTag ( ) ! = llvm : : dwarf : : DW_TAG_subroutine_type ) { <nl> - auto * CTy = cast < llvm : : MDCompositeType > ( Cur ) ; <nl> + auto * CTy = cast < llvm : : DICompositeType > ( Cur ) ; <nl> auto Elts = CTy - > getElements ( ) ; <nl> unsigned N = Cur - > getTag ( ) = = llvm : : dwarf : : DW_TAG_union_type <nl> ? std : : min ( 1U , Elts . size ( ) ) / / For unions , pick any one . <nl> class ElementSizes { <nl> / / FIXME : With a little more state we don ' t need to actually <nl> / / store them on the Stack . <nl> for ( unsigned I = N ; I > 0 ; - - I ) <nl> - Stack . push_back ( cast < llvm : : MDType > ( Elts [ I - 1 ] ) ) ; <nl> + Stack . push_back ( cast < llvm : : DIType > ( Elts [ I - 1 ] ) ) ; <nl> return getNext ( ) ; <nl> } <nl> } <nl> class ElementSizes { <nl> case llvm : : dwarf : : DW_TAG_member : <nl> case llvm : : dwarf : : DW_TAG_typedef : { <nl> / / Replace top of stack . <nl> - auto * DTy = cast < llvm : : MDDerivedType > ( Cur ) ; <nl> + auto * DTy = cast < llvm : : DIDerivedType > ( Cur ) ; <nl> Stack . push_back ( DTy - > getBaseType ( ) . resolve ( DIRefMap ) ) ; <nl> return getNext ( ) ; <nl> } <nl> void IRGenDebugInfo : : emitVariableDeclaration ( <nl> if ( ! DbgTy . size ) <nl> DbgTy . size = getStorageSize ( IGM . DataLayout , Storage ) ; <nl> <nl> - auto * Scope = dyn_cast < llvm : : MDLocalScope > ( getOrCreateScope ( DS ) ) ; <nl> + auto * Scope = dyn_cast < llvm : : DILocalScope > ( getOrCreateScope ( DS ) ) ; <nl> assert ( Scope & & " variable has no local scope " ) ; <nl> Location Loc = getLoc ( SM , DbgTy . getDecl ( ) ) ; <nl> <nl> / / FIXME : this should be the scope of the type ' s declaration . <nl> / / If this is an argument , attach it to the current function scope . <nl> if ( ArgNo > 0 ) { <nl> - while ( isa < llvm : : MDLexicalBlock > ( Scope ) ) <nl> - Scope = cast < llvm : : MDLexicalBlock > ( Scope ) - > getScope ( ) ; <nl> + while ( isa < llvm : : DILexicalBlock > ( Scope ) ) <nl> + Scope = cast < llvm : : DILexicalBlock > ( Scope ) - > getScope ( ) ; <nl> } <nl> - assert ( Scope & & isa < llvm : : MDScope > ( Scope ) & & " variable has no scope " ) ; <nl> - llvm : : MDFile * Unit = getFile ( Scope ) ; <nl> - llvm : : MDType * DITy = getOrCreateType ( DbgTy ) ; <nl> + assert ( Scope & & isa < llvm : : DIScope > ( Scope ) & & " variable has no scope " ) ; <nl> + llvm : : DIFile * Unit = getFile ( Scope ) ; <nl> + llvm : : DIType * DITy = getOrCreateType ( DbgTy ) ; <nl> assert ( DITy & & " could not determine debug type of variable " ) ; <nl> <nl> unsigned Line = Loc . Line ; <nl> unsigned Flags = 0 ; <nl> if ( Artificial | | DITy - > isArtificial ( ) | | DITy = = InternalType ) <nl> - Flags | = llvm : : DebugNode : : FlagArtificial ; <nl> + Flags | = llvm : : DINode : : FlagArtificial ; <nl> <nl> / / Create the descriptor for the variable . <nl> - llvm : : MDLocalVariable * Var = nullptr ; <nl> - llvm : : MDExpression * Expr = DBuilder . createExpression ( ) ; <nl> + llvm : : DILocalVariable * Var = nullptr ; <nl> + llvm : : DIExpression * Expr = DBuilder . createExpression ( ) ; <nl> <nl> if ( Indirection ) { <nl> / / Classes are always passed by reference . <nl> void IRGenDebugInfo : : emitVariableDeclaration ( <nl> } <nl> } <nl> <nl> - void IRGenDebugInfo : : <nl> - emitDbgIntrinsic ( llvm : : BasicBlock * BB , <nl> - llvm : : Value * Storage , llvm : : MDLocalVariable * Var , <nl> - llvm : : MDExpression * Expr , <nl> - unsigned Line , unsigned Col , llvm : : MDLocalScope * Scope , <nl> - SILDebugScope * DS ) { <nl> + void IRGenDebugInfo : : emitDbgIntrinsic ( llvm : : BasicBlock * BB , <nl> + llvm : : Value * Storage , <nl> + llvm : : DILocalVariable * Var , <nl> + llvm : : DIExpression * Expr , unsigned Line , <nl> + unsigned Col , llvm : : DILocalScope * Scope , <nl> + SILDebugScope * DS ) { <nl> / / Set the location / scope of the intrinsic . <nl> llvm : : MDNode * InlinedAt = nullptr ; <nl> if ( DS & & DS - > InlinedCallSite ) { <nl> void IRGenDebugInfo : : emitGlobalVariableDeclaration ( llvm : : GlobalValue * Var , <nl> if ( Opts . DebugInfoKind = = IRGenDebugInfoKind : : LineTables ) <nl> return ; <nl> <nl> - llvm : : MDType * Ty = getOrCreateType ( DbgTy ) ; <nl> + llvm : : DIType * Ty = getOrCreateType ( DbgTy ) ; <nl> if ( Ty - > isArtificial ( ) | | Ty = = InternalType | | <nl> Var - > getVisibility ( ) = = llvm : : GlobalValue : : HiddenVisibility ) <nl> / / FIXME : Really these should be marked as artificial , but LLVM <nl> StringRef IRGenDebugInfo : : getMangledName ( DebugTypeInfo DbgTy ) { <nl> } <nl> <nl> / / / Create a member of a struct , class , tuple , or enum . <nl> - llvm : : MDDerivedType * IRGenDebugInfo : : createMemberType ( <nl> - DebugTypeInfo DbgTy , StringRef Name , unsigned & OffsetInBits , <nl> - llvm : : MDScope * Scope , llvm : : MDFile * File , unsigned Flags ) { <nl> + llvm : : DIDerivedType * <nl> + IRGenDebugInfo : : createMemberType ( DebugTypeInfo DbgTy , StringRef Name , <nl> + unsigned & OffsetInBits , llvm : : DIScope * Scope , <nl> + llvm : : DIFile * File , unsigned Flags ) { <nl> unsigned SizeOfByte = CI . getTargetInfo ( ) . getCharWidth ( ) ; <nl> auto * Ty = getOrCreateType ( DbgTy ) ; <nl> auto * DITy = DBuilder . createMemberType ( <nl> llvm : : MDDerivedType * IRGenDebugInfo : : createMemberType ( <nl> } <nl> <nl> / / / Return an array with the DITypes for each of a tuple ' s elements . <nl> - llvm : : DebugNodeArray IRGenDebugInfo : : getTupleElements ( <nl> - TupleType * TupleTy , llvm : : MDScope * Scope , llvm : : MDFile * File , <nl> + llvm : : DINodeArray IRGenDebugInfo : : getTupleElements ( <nl> + TupleType * TupleTy , llvm : : DIScope * Scope , llvm : : DIFile * File , <nl> unsigned Flags , DeclContext * DeclContext , unsigned & SizeInBits ) { <nl> SmallVector < llvm : : Metadata * , 16 > Elements ; <nl> unsigned OffsetInBits = 0 ; <nl> llvm : : DebugNodeArray IRGenDebugInfo : : getTupleElements ( <nl> } <nl> <nl> / / / Return an array with the DITypes for each of a struct ' s elements . <nl> - llvm : : DebugNodeArray IRGenDebugInfo : : getStructMembers ( NominalTypeDecl * D , <nl> - Type BaseTy , <nl> - llvm : : MDScope * Scope , <nl> - llvm : : MDFile * File , <nl> - unsigned Flags , <nl> - unsigned & SizeInBits ) { <nl> + llvm : : DINodeArray <nl> + IRGenDebugInfo : : getStructMembers ( NominalTypeDecl * D , Type BaseTy , <nl> + llvm : : DIScope * Scope , llvm : : DIFile * File , <nl> + unsigned Flags , unsigned & SizeInBits ) { <nl> SmallVector < llvm : : Metadata * , 16 > Elements ; <nl> unsigned OffsetInBits = 0 ; <nl> for ( VarDecl * VD : D - > getStoredProperties ( ) ) { <nl> llvm : : DebugNodeArray IRGenDebugInfo : : getStructMembers ( NominalTypeDecl * D , <nl> <nl> / / / Create a temporary forward declaration for a struct and add it to <nl> / / / the type cache so we can safely build recursive types . <nl> - llvm : : MDCompositeType * IRGenDebugInfo : : createStructType ( <nl> + llvm : : DICompositeType * IRGenDebugInfo : : createStructType ( <nl> DebugTypeInfo DbgTy , NominalTypeDecl * Decl , Type BaseTy , <nl> - llvm : : MDScope * Scope , llvm : : MDFile * File , unsigned Line , <nl> + llvm : : DIScope * Scope , llvm : : DIFile * File , unsigned Line , <nl> unsigned SizeInBits , unsigned AlignInBits , unsigned Flags , <nl> - llvm : : MDType * DerivedFrom , unsigned RuntimeLang , StringRef UniqueID ) { <nl> + llvm : : DIType * DerivedFrom , unsigned RuntimeLang , StringRef UniqueID ) { <nl> StringRef Name = Decl - > getName ( ) . str ( ) ; <nl> <nl> / / Forward declare this first because types may be recursive . <nl> llvm : : MDCompositeType * IRGenDebugInfo : : createStructType ( <nl> } <nl> <nl> / / / Return an array with the DITypes for each of an enum ' s elements . <nl> - llvm : : DebugNodeArray IRGenDebugInfo : : getEnumElements ( DebugTypeInfo DbgTy , <nl> - EnumDecl * D , <nl> - llvm : : MDScope * Scope , <nl> - llvm : : MDFile * File , <nl> - unsigned Flags ) { <nl> + llvm : : DINodeArray IRGenDebugInfo : : getEnumElements ( DebugTypeInfo DbgTy , <nl> + EnumDecl * D , <nl> + llvm : : DIScope * Scope , <nl> + llvm : : DIFile * File , <nl> + unsigned Flags ) { <nl> SmallVector < llvm : : Metadata * , 16 > Elements ; <nl> for ( auto * ElemDecl : D - > getAllElements ( ) ) { <nl> / / FIXME < rdar : / / problem / 14845818 > Support enums . <nl> llvm : : DebugNodeArray IRGenDebugInfo : : getEnumElements ( DebugTypeInfo DbgTy , <nl> <nl> / / / Create a temporary forward declaration for an enum and add it to <nl> / / / the type cache so we can safely build recursive types . <nl> - llvm : : MDCompositeType * <nl> - IRGenDebugInfo : : createEnumType ( DebugTypeInfo DbgTy , EnumDecl * Decl , <nl> - StringRef MangledName , llvm : : MDScope * Scope , <nl> - llvm : : MDFile * File , unsigned Line , <nl> - unsigned Flags ) { <nl> + llvm : : DICompositeType * IRGenDebugInfo : : createEnumType ( <nl> + DebugTypeInfo DbgTy , EnumDecl * Decl , StringRef MangledName , <nl> + llvm : : DIScope * Scope , llvm : : DIFile * File , unsigned Line , unsigned Flags ) { <nl> unsigned SizeOfByte = CI . getTargetInfo ( ) . getCharWidth ( ) ; <nl> unsigned SizeInBits = DbgTy . size . getValue ( ) * SizeOfByte ; <nl> unsigned AlignInBits = DbgTy . align . getValue ( ) * SizeOfByte ; <nl> IRGenDebugInfo : : createEnumType ( DebugTypeInfo DbgTy , EnumDecl * Decl , <nl> return DITy ; <nl> } <nl> <nl> - / / / Return a MDType for Ty reusing any DeclContext found in DbgTy . <nl> - llvm : : MDType * IRGenDebugInfo : : getOrCreateDesugaredType ( Type Ty , <nl> + / / / Return a DIType for Ty reusing any DeclContext found in DbgTy . <nl> + llvm : : DIType * IRGenDebugInfo : : getOrCreateDesugaredType ( Type Ty , <nl> DebugTypeInfo DbgTy ) { <nl> DebugTypeInfo BlandDbgTy ( Ty , DbgTy . StorageType , DbgTy . size , DbgTy . align , <nl> DbgTy . getDeclContext ( ) ) ; <nl> uint64_t IRGenDebugInfo : : getSizeOfBasicType ( DebugTypeInfo DbgTy ) { <nl> } <nl> <nl> / / / Convenience function that creates a forward declaration for PointeeTy . <nl> - llvm : : MDType * IRGenDebugInfo : : createPointerSizedStruct ( <nl> - llvm : : MDScope * Scope , StringRef Name , llvm : : MDFile * File , unsigned Line , <nl> + llvm : : DIType * IRGenDebugInfo : : createPointerSizedStruct ( <nl> + llvm : : DIScope * Scope , StringRef Name , llvm : : DIFile * File , unsigned Line , <nl> unsigned Flags , StringRef MangledName ) { <nl> auto FwdDecl = DBuilder . createForwardDecl ( llvm : : dwarf : : DW_TAG_structure_type , <nl> Name , Scope , File , Line , <nl> llvm : : MDType * IRGenDebugInfo : : createPointerSizedStruct ( <nl> <nl> / / / Create a pointer - sized struct with a mangled name and a single <nl> / / / member of PointeeTy . <nl> - llvm : : MDType * IRGenDebugInfo : : createPointerSizedStruct ( <nl> - llvm : : MDScope * Scope , StringRef Name , llvm : : MDType * PointeeTy , <nl> - llvm : : MDFile * File , unsigned Line , unsigned Flags , StringRef MangledName ) { <nl> + llvm : : DIType * IRGenDebugInfo : : createPointerSizedStruct ( <nl> + llvm : : DIScope * Scope , StringRef Name , llvm : : DIType * PointeeTy , <nl> + llvm : : DIFile * File , unsigned Line , unsigned Flags , StringRef MangledName ) { <nl> unsigned PtrSize = CI . getTargetInfo ( ) . getPointerWidth ( 0 ) ; <nl> unsigned PtrAlign = CI . getTargetInfo ( ) . getPointerAlign ( 0 ) ; <nl> auto PtrTy = DBuilder . createPointerType ( PointeeTy , PtrSize , PtrAlign ) ; <nl> llvm : : MDType * IRGenDebugInfo : : createPointerSizedStruct ( <nl> nullptr , MangledName ) ; <nl> } <nl> <nl> - / / / Construct a MDType from a DebugTypeInfo object . <nl> + / / / Construct a DIType from a DebugTypeInfo object . <nl> / / / <nl> / / / At this point we do not plan to emit full DWARF for all swift <nl> / / / types , the goal is to emit only the name and provenance of the <nl> llvm : : MDType * IRGenDebugInfo : : createPointerSizedStruct ( <nl> / / / The ultimate goal is to emit something like a <nl> / / / DW_TAG_APPLE_ast_ref_type ( an external reference ) instead of a <nl> / / / local reference to the type . <nl> - llvm : : MDType * IRGenDebugInfo : : createType ( DebugTypeInfo DbgTy , <nl> - StringRef MangledName , <nl> - llvm : : MDScope * Scope , <nl> - llvm : : MDFile * File ) { <nl> + llvm : : DIType * IRGenDebugInfo : : createType ( DebugTypeInfo DbgTy , <nl> + StringRef MangledName , <nl> + llvm : : DIScope * Scope , <nl> + llvm : : DIFile * File ) { <nl> / / FIXME : For SizeInBits , clang uses the actual size of the type on <nl> / / the target machine instead of the storage size that is alloca ' d <nl> / / in the LLVM IR . For all types that are boxed in a struct , we are <nl> llvm : : MDType * IRGenDebugInfo : : createType ( DebugTypeInfo DbgTy , <nl> case TypeKind : : ExistentialMetatype : <nl> case TypeKind : : Metatype : { <nl> / / Metatypes are ( mostly ) singleton type descriptors , often without storage . <nl> - Flags | = llvm : : DebugNode : : FlagArtificial ; <nl> + Flags | = llvm : : DINode : : FlagArtificial ; <nl> Location L = getLoc ( SM , DbgTy . getDecl ( ) ) ; <nl> auto File = getOrCreateFile ( L . Filename ) ; <nl> return DBuilder . createStructType ( <nl> static bool canMangle ( TypeBase * Ty ) { <nl> } <nl> } <nl> <nl> - / / / Get the MDType corresponding to this DebugTypeInfo from the cache , <nl> - / / / or build a fresh MDType otherwise . There is the underlying <nl> + / / / Get the DIType corresponding to this DebugTypeInfo from the cache , <nl> + / / / or build a fresh DIType otherwise . There is the underlying <nl> / / / assumption that no two types that share the same canonical type <nl> / / / can have different storage size or alignment . <nl> - llvm : : MDType * IRGenDebugInfo : : getOrCreateType ( DebugTypeInfo DbgTy ) { <nl> + llvm : : DIType * IRGenDebugInfo : : getOrCreateType ( DebugTypeInfo DbgTy ) { <nl> / / Is this an empty type ? <nl> if ( DbgTy . isNull ( ) ) <nl> / / We can ' t use the empty type as an index into DenseMap . <nl> llvm : : MDType * IRGenDebugInfo : : getOrCreateType ( DebugTypeInfo DbgTy ) { <nl> if ( CachedType ! = DITypeCache . end ( ) ) { <nl> / / Verify that the information still exists . <nl> if ( llvm : : Metadata * Val = CachedType - > second ) { <nl> - auto DITy = cast < llvm : : MDType > ( Val ) ; <nl> + auto DITy = cast < llvm : : DIType > ( Val ) ; <nl> return DITy ; <nl> } <nl> } <nl> llvm : : MDType * IRGenDebugInfo : : getOrCreateType ( DebugTypeInfo DbgTy ) { <nl> MangledName = getMangledName ( DbgTy ) ; <nl> UID = llvm : : MDString : : get ( IGM . getLLVMContext ( ) , MangledName ) ; <nl> if ( llvm : : Metadata * CachedTy = DIRefMap . lookup ( UID ) ) { <nl> - auto DITy = cast < llvm : : MDType > ( CachedTy ) ; <nl> + auto DITy = cast < llvm : : DIType > ( CachedTy ) ; <nl> return DITy ; <nl> } <nl> } <nl> llvm : : MDType * IRGenDebugInfo : : getOrCreateType ( DebugTypeInfo DbgTy ) { <nl> DeclContext * Context = DbgTy . getType ( ) - > getNominalOrBoundGenericNominal ( ) ; <nl> if ( Context ) <nl> Context = Context - > getParent ( ) ; <nl> - llvm : : MDScope * Scope = getOrCreateContext ( Context ) ; <nl> - llvm : : MDType * DITy = createType ( DbgTy , MangledName , Scope , getFile ( Scope ) ) ; <nl> + llvm : : DIScope * Scope = getOrCreateContext ( Context ) ; <nl> + llvm : : DIType * DITy = createType ( DbgTy , MangledName , Scope , getFile ( Scope ) ) ; <nl> <nl> / / Incrementally build the DIRefMap . <nl> - if ( auto * CTy = dyn_cast < llvm : : MDCompositeType > ( DITy ) ) { <nl> + if ( auto * CTy = dyn_cast < llvm : : DICompositeType > ( DITy ) ) { <nl> # ifndef NDEBUG <nl> / / Sanity check . <nl> if ( llvm : : Metadata * V = DIRefMap . lookup ( UID ) ) { <nl> - auto * CachedTy = cast < llvm : : MDType > ( V ) ; <nl> + auto * CachedTy = cast < llvm : : DIType > ( V ) ; <nl> assert ( CachedTy = = DITy & & " conflicting types for one UID " ) ; <nl> } <nl> # endif <nl> mmm a / lib / IRGen / IRGenDebugInfo . h <nl> ppp b / lib / IRGen / IRGenDebugInfo . h <nl> class IRGenDebugInfo { <nl> llvm : : SmallString < 256 > MainFilename ; <nl> llvm : : BumpPtrAllocator DebugInfoNames ; <nl> StringRef CWDName ; / / / The current working directory . <nl> - llvm : : MDCompileUnit * TheCU = nullptr ; / / / The current compilation unit . <nl> - llvm : : MDFile * MainFile = nullptr ; / / / The main file . <nl> + llvm : : DICompileUnit * TheCU = nullptr ; / / / The current compilation unit . <nl> + llvm : : DIFile * MainFile = nullptr ; / / / The main file . <nl> llvm : : MDModule * MainModule = nullptr ; / / / The current module . <nl> llvm : : MDNode * EntryPointFn ; / / / Scope of SWIFT_ENTRY_POINT_FUNCTION . <nl> TypeAliasDecl * MetadataTypeDecl ; / / / The type decl for swift . type . <nl> - llvm : : MDType * InternalType ; / / / Catch - all type for opaque internal types . <nl> + llvm : : DIType * InternalType ; / / / Catch - all type for opaque internal types . <nl> <nl> Location LastDebugLoc ; / / / The last location that was emitted . <nl> SILDebugScope * LastScope ; / / / The scope of that last location . <nl> class IRGenDebugInfo { <nl> / / / \ param Fn The IR representation of the function . <nl> / / / \ param Rep The calling convention of the function . <nl> / / / \ param Ty The signature of the function . <nl> - llvm : : MDSubprogram * emitFunction ( SILModule & SILMod , SILDebugScope * DS , <nl> + llvm : : DISubprogram * emitFunction ( SILModule & SILMod , SILDebugScope * DS , <nl> llvm : : Function * Fn , <nl> SILFunctionTypeRepresentation Rep , <nl> - SILType Ty , <nl> - DeclContext * DeclCtx = nullptr ) ; <nl> + SILType Ty , DeclContext * DeclCtx = nullptr ) ; <nl> <nl> / / / Emit debug info for a given SIL function . <nl> - llvm : : MDSubprogram * emitFunction ( SILFunction & SILFn , llvm : : Function * Fn ) ; <nl> + llvm : : DISubprogram * emitFunction ( SILFunction & SILFn , llvm : : Function * Fn ) ; <nl> <nl> / / / Convenience function useful for functions without any source <nl> / / / location . Internally calls emitFunction , emits a debug <nl> class IRGenDebugInfo { <nl> <nl> / / / Emit a dbg . declare or dbg . value intrinsic , depending on Storage . <nl> void emitDbgIntrinsic ( llvm : : BasicBlock * BB , llvm : : Value * Storage , <nl> - llvm : : MDLocalVariable * Var , llvm : : MDExpression * Expr , <nl> - unsigned Line , unsigned Col , llvm : : MDLocalScope * Scope , <nl> + llvm : : DILocalVariable * Var , llvm : : DIExpression * Expr , <nl> + unsigned Line , unsigned Col , llvm : : DILocalScope * Scope , <nl> SILDebugScope * DS ) ; <nl> <nl> / / / Create debug metadata for a global variable . <nl> class IRGenDebugInfo { <nl> void createImportedModule ( StringRef Name , StringRef MangledPrefix , <nl> llvm : : MDModule * Module , unsigned Line ) ; <nl> <nl> - llvm : : MDType * createType ( DebugTypeInfo DbgTy , StringRef MangledName , <nl> - llvm : : MDScope * Scope , llvm : : MDFile * File ) ; <nl> - llvm : : MDType * getOrCreateType ( DebugTypeInfo DbgTy ) ; <nl> - llvm : : MDScope * getOrCreateScope ( SILDebugScope * DS ) ; <nl> - llvm : : MDScope * getOrCreateContext ( DeclContext * DC ) ; <nl> + llvm : : DIType * createType ( DebugTypeInfo DbgTy , StringRef MangledName , <nl> + llvm : : DIScope * Scope , llvm : : DIFile * File ) ; <nl> + llvm : : DIType * getOrCreateType ( DebugTypeInfo DbgTy ) ; <nl> + llvm : : DIScope * getOrCreateScope ( SILDebugScope * DS ) ; <nl> + llvm : : DIScope * getOrCreateContext ( DeclContext * DC ) ; <nl> llvm : : MDNode * createInlinedAt ( SILDebugScope * Scope ) ; <nl> <nl> StringRef getCurrentDirname ( ) ; <nl> - llvm : : MDFile * getOrCreateFile ( const char * Filename ) ; <nl> - llvm : : MDType * getOrCreateDesugaredType ( Type Ty , DebugTypeInfo DTI ) ; <nl> + llvm : : DIFile * getOrCreateFile ( const char * Filename ) ; <nl> + llvm : : DIType * getOrCreateDesugaredType ( Type Ty , DebugTypeInfo DTI ) ; <nl> StringRef getName ( const FuncDecl & FD ) ; <nl> StringRef getName ( SILLocation L ) ; <nl> StringRef getMangledName ( TypeAliasDecl * Decl ) ; <nl> StringRef getMangledName ( DebugTypeInfo DTI ) ; <nl> - llvm : : MDTypeRefArray createParameterTypes ( CanSILFunctionType FnTy , <nl> + llvm : : DITypeRefArray createParameterTypes ( CanSILFunctionType FnTy , <nl> DeclContext * DeclCtx ) ; <nl> - llvm : : MDTypeRefArray createParameterTypes ( SILType SILTy , <nl> + llvm : : DITypeRefArray createParameterTypes ( SILType SILTy , <nl> DeclContext * DeclCtx ) ; <nl> void createParameterType ( llvm : : SmallVectorImpl < llvm : : Metadata * > & Parameters , <nl> SILType CanTy , DeclContext * DeclCtx ) ; <nl> - llvm : : DebugNodeArray getTupleElements ( TupleType * TupleTy , <nl> - llvm : : MDScope * Scope , <nl> - llvm : : MDFile * File , unsigned Flags , <nl> - DeclContext * DeclContext , <nl> - unsigned & SizeInBits ) ; <nl> - llvm : : MDFile * getFile ( llvm : : MDScope * Scope ) ; <nl> - llvm : : MDModule * getOrCreateModule ( llvm : : MDScope * Parent , std : : string Name , <nl> - llvm : : MDFile * File ) ; <nl> - llvm : : MDScope * getModule ( StringRef MangledName ) ; <nl> - llvm : : DebugNodeArray getStructMembers ( NominalTypeDecl * D , Type BaseTy , <nl> - llvm : : MDScope * Scope , <nl> - llvm : : MDFile * File , <nl> - unsigned Flags , unsigned & SizeInBits ) ; <nl> - llvm : : MDCompositeType * <nl> + llvm : : DINodeArray getTupleElements ( TupleType * TupleTy , llvm : : DIScope * Scope , <nl> + llvm : : DIFile * File , unsigned Flags , <nl> + DeclContext * DeclContext , <nl> + unsigned & SizeInBits ) ; <nl> + llvm : : DIFile * getFile ( llvm : : DIScope * Scope ) ; <nl> + llvm : : MDModule * getOrCreateModule ( llvm : : DIScope * Parent , std : : string Name , <nl> + llvm : : DIFile * File ) ; <nl> + llvm : : DIScope * getModule ( StringRef MangledName ) ; <nl> + llvm : : DINodeArray getStructMembers ( NominalTypeDecl * D , Type BaseTy , <nl> + llvm : : DIScope * Scope , llvm : : DIFile * File , <nl> + unsigned Flags , unsigned & SizeInBits ) ; <nl> + llvm : : DICompositeType * <nl> createStructType ( DebugTypeInfo DbgTy , NominalTypeDecl * Decl , Type BaseTy , <nl> - llvm : : MDScope * Scope , llvm : : MDFile * File , unsigned Line , <nl> + llvm : : DIScope * Scope , llvm : : DIFile * File , unsigned Line , <nl> unsigned SizeInBits , unsigned AlignInBits , unsigned Flags , <nl> - llvm : : MDType * DerivedFrom , unsigned RuntimeLang , <nl> + llvm : : DIType * DerivedFrom , unsigned RuntimeLang , <nl> StringRef UniqueID ) ; <nl> - llvm : : MDDerivedType * createMemberType ( DebugTypeInfo DTI , StringRef Name , <nl> + llvm : : DIDerivedType * createMemberType ( DebugTypeInfo DTI , StringRef Name , <nl> unsigned & OffsetInBits , <nl> - llvm : : MDScope * Scope , <nl> - llvm : : MDFile * File , unsigned Flags ) ; <nl> - llvm : : DebugNodeArray getEnumElements ( DebugTypeInfo DbgTy , EnumDecl * D , <nl> - llvm : : MDScope * Scope , llvm : : MDFile * File , <nl> - unsigned Flags ) ; <nl> - llvm : : MDCompositeType * createEnumType ( DebugTypeInfo DbgTy , EnumDecl * Decl , <nl> + llvm : : DIScope * Scope , <nl> + llvm : : DIFile * File , unsigned Flags ) ; <nl> + llvm : : DINodeArray getEnumElements ( DebugTypeInfo DbgTy , EnumDecl * D , <nl> + llvm : : DIScope * Scope , llvm : : DIFile * File , <nl> + unsigned Flags ) ; <nl> + llvm : : DICompositeType * createEnumType ( DebugTypeInfo DbgTy , EnumDecl * Decl , <nl> StringRef MangledName , <nl> - llvm : : MDScope * Scope , <nl> - llvm : : MDFile * File , unsigned Line , <nl> + llvm : : DIScope * Scope , <nl> + llvm : : DIFile * File , unsigned Line , <nl> unsigned Flags ) ; <nl> - llvm : : MDType * createPointerSizedStruct ( llvm : : MDScope * Scope , <nl> - StringRef Name , llvm : : MDFile * File , <nl> - unsigned Line , unsigned Flags , <nl> - StringRef MangledName ) ; <nl> - llvm : : MDType * createPointerSizedStruct ( llvm : : MDScope * Scope , <nl> - StringRef Name , llvm : : MDType * PointeeTy , <nl> - llvm : : MDFile * File , unsigned Line , <nl> - unsigned Flags , StringRef MangledName ) ; <nl> + llvm : : DIType * createPointerSizedStruct ( llvm : : DIScope * Scope , StringRef Name , <nl> + llvm : : DIFile * File , unsigned Line , <nl> + unsigned Flags , StringRef MangledName ) ; <nl> + llvm : : DIType * createPointerSizedStruct ( llvm : : DIScope * Scope , StringRef Name , <nl> + llvm : : DIType * PointeeTy , <nl> + llvm : : DIFile * File , unsigned Line , <nl> + unsigned Flags , StringRef MangledName ) ; <nl> uint64_t getSizeOfBasicType ( DebugTypeInfo DbgTy ) ; <nl> TypeAliasDecl * getMetadataType ( ) ; <nl> } ; <nl> mmm a / test / DebugInfo / Constructors . swift <nl> ppp b / test / DebugInfo / Constructors . swift <nl> <nl> / / RUN : % target - swift - frontend % s - emit - ir - g - o - | FileCheck % s <nl> struct Foo { <nl> / / Allocating constructor - should have no line table info . <nl> - / / CHECK : ! MDSubprogram ( name : " init " , linkageName : " _TFV12Constructors3FooCfMS0_FT1xSi_S0_ " , <nl> + / / CHECK : ! DISubprogram ( name : " init " , linkageName : " _TFV12Constructors3FooCfMS0_FT1xSi_S0_ " , <nl> / / CHECK - SAME : line : [ [ @ LINE + 3 ] ] <nl> / / CHECK - NOT : scopeLine : 0 <nl> / / CHECK - SAME : isDefinition : true <nl> mmm a / test / DebugInfo / Destructors . swift <nl> ppp b / test / DebugInfo / Destructors . swift <nl> <nl> / / RUN : % target - swift - frontend % s - emit - ir - g - o - | FileCheck % s <nl> <nl> class Foo { <nl> - / / CHECK : ! MDSubprogram ( name : " deinit " , linkageName : " _TFC11Destructors3FooD " <nl> + / / CHECK : ! DISubprogram ( name : " deinit " , linkageName : " _TFC11Destructors3FooD " <nl> / / CHECK - SAME : line : [ [ @ LINE - 2 ] ] <nl> / / CHECK - SAME : isDefinition : true <nl> var x : Int <nl> mmm a / test / DebugInfo / DynamicSelf . swift <nl> ppp b / test / DebugInfo / DynamicSelf . swift <nl> class C { <nl> extension C { <nl> class func Factory ( ) - > Self { <nl> / / Currently we emit the static type C for r . <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " r " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " r " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> let r = self ( number : 0 ) <nl> return r <nl> } <nl> mmm a / test / DebugInfo / Imports . swift <nl> ppp b / test / DebugInfo / Imports . swift <nl> <nl> / / RUN : % target - swift - frontend - c - module - name Foo % s - I % t - g - o - | llvm - dwarfdump - | FileCheck - - check - prefix = DWARF % s <nl> <nl> / / CHECK - DAG : ! [ [ FOOMODULE : [ 0 - 9 ] + ] ] = ! MDModule ( name : " Foo " <nl> - / / CHECK - DAG : ! MDImportedEntity ( tag : DW_TAG_imported_module , scope : ! [ [ THISFILE : [ 0 - 9 ] + ] ] , entity : ! [ [ FOOMODULE ] ] <nl> - / / CHECK - DAG : ! [ [ THISFILE ] ] = ! MDFile ( filename : " Imports . swift " , directory : " { { . * } } test / DebugInfo " ) <nl> - / / CHECK - DAG : ! [ [ SWIFTFILE : [ 0 - 9 ] + ] ] = ! MDFile ( filename : " Swift . swiftmodule " <nl> + / / CHECK - DAG : ! DIImportedEntity ( tag : DW_TAG_imported_module , scope : ! [ [ THISFILE : [ 0 - 9 ] + ] ] , entity : ! [ [ FOOMODULE ] ] <nl> + / / CHECK - DAG : ! [ [ THISFILE ] ] = ! DIFile ( filename : " Imports . swift " , directory : " { { . * } } test / DebugInfo " ) <nl> + / / CHECK - DAG : ! [ [ SWIFTFILE : [ 0 - 9 ] + ] ] = ! DIFile ( filename : " Swift . swiftmodule " <nl> / / CHECK - DAG : ! [ [ SWIFTMODULE : [ 0 - 9 ] + ] ] = ! MDModule ( name : " Swift " <nl> - / / CHECK - DAG : ! MDImportedEntity ( tag : DW_TAG_imported_module , scope : ! [ [ SWIFTFILE ] ] , entity : ! [ [ SWIFTMODULE ] ] <nl> - / / CHECK - DAG : ! [ [ BASICFILE : [ 0 - 9 ] + ] ] = ! MDFile ( filename : " basic . swiftmodule " <nl> + / / CHECK - DAG : ! DIImportedEntity ( tag : DW_TAG_imported_module , scope : ! [ [ SWIFTFILE ] ] , entity : ! [ [ SWIFTMODULE ] ] <nl> + / / CHECK - DAG : ! [ [ BASICFILE : [ 0 - 9 ] + ] ] = ! DIFile ( filename : " basic . swiftmodule " <nl> / / CHECK - DAG : ! [ [ BASICMODULE : [ 0 - 9 ] + ] ] = ! MDModule ( name : " basic " <nl> - / / CHECK - DAG : ! MDImportedEntity ( tag : DW_TAG_imported_module , scope : ! [ [ BASICFILE ] ] , entity : ! [ [ BASICMODULE ] ] <nl> + / / CHECK - DAG : ! DIImportedEntity ( tag : DW_TAG_imported_module , scope : ! [ [ BASICFILE ] ] , entity : ! [ [ BASICMODULE ] ] <nl> import basic <nl> import typealias Swift . Optional <nl> <nl> mmm a / test / DebugInfo / PrivateDiscriminator . swift <nl> ppp b / test / DebugInfo / PrivateDiscriminator . swift <nl> <nl> / / Private discriminators should only be emitted for multi - file projects . <nl> <nl> / / RUN : % target - swift - frontend - emit - ir % s - g - o - | FileCheck - - check - prefix = SINGLE % s <nl> - / / SINGLE - NOT : ! MDCompileUnit ( { { . * } } - private - discriminator <nl> + / / SINGLE - NOT : ! DICompileUnit ( { { . * } } - private - discriminator <nl> <nl> / / RUN : % target - swift - frontend % S / . . / Inputs / empty . swift - primary - file % s - emit - ir - g | FileCheck % s <nl> - / / CHECK : ! MDCompileUnit ( { { . * } } flags : { { [ ^ , ] * } } - private - discriminator [ [ DISCRIMINATOR : _ [ A - Z0 - 9 ] + ] ] <nl> + / / CHECK : ! DICompileUnit ( { { . * } } flags : { { [ ^ , ] * } } - private - discriminator [ [ DISCRIMINATOR : _ [ A - Z0 - 9 ] + ] ] <nl> <nl> private class A { <nl> init ( val : Int ) { member = val } <nl> private let member : Int <nl> - / / CHECK : ! MDSubprogram ( name : " getMember " <nl> + / / CHECK : ! DISubprogram ( name : " getMember " <nl> / / CHECK - SAME : linkageName : " { { [ ^ " ] * } } [ [ DISCRIMINATOR ] ] <nl> / / CHECK - SAME : line : [ [ @ LINE + 2 ] ] <nl> / / CHECK - SAME : isLocal : true , isDefinition : true <nl> mmm a / test / DebugInfo / ProtocolContainer . swift <nl> ppp b / test / DebugInfo / ProtocolContainer . swift <nl> class AClass : AProtocol { <nl> / / CHECK - NEXT : entry : <nl> / / CHECK - NEXT : % [ [ X : . * ] ] = alloca % P17ProtocolContainer9AProtocol_ , align { { ( 4 | 8 ) } } <nl> / / CHECK : call void @ llvm . dbg . declare ( metadata % P17ProtocolContainer9AProtocol_ * % [ [ X ] ] , metadata ! [ [ XMD : . * ] ] , metadata ! { { [ 0 - 9 ] + } } ) <nl> - / / CHECK - NOT : ! MDLocalVariable ( { { . * } } name : " x " <nl> - / / CHECK : ! [ [ XMD ] ] = ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " x " , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> - / / CHECK - NOT : ! MDLocalVariable ( { { . * } } name : " x " <nl> + / / CHECK - NOT : ! DILocalVariable ( { { . * } } name : " x " <nl> + / / CHECK : ! [ [ XMD ] ] = ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " x " , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> + / / CHECK - NOT : ! DILocalVariable ( { { . * } } name : " x " <nl> func foo ( var x : AProtocol ) { <nl> x . print ( ) / / Set breakpoint here <nl> } <nl> mmm a / test / DebugInfo / accessors . swift <nl> ppp b / test / DebugInfo / accessors . swift <nl> <nl> / / RUN : % target - swift - frontend - primary - file % s - emit - ir - g - o - | FileCheck % s <nl> <nl> / / Verify that we generate appropriate names for accessors . <nl> - / / CHECK : ! MDSubprogram ( name : " x . get " <nl> - / / CHECK : ! MDSubprogram ( name : " x . set " <nl> + / / CHECK : ! DISubprogram ( name : " x . get " <nl> + / / CHECK : ! DISubprogram ( name : " x . set " <nl> <nl> / / Variable getter / setter <nl> var _x : Int = 0 <nl> mmm a / test / DebugInfo / anonymous . swift <nl> ppp b / test / DebugInfo / anonymous . swift <nl> <nl> / / RUN : % target - swift - frontend - primary - file % s - emit - ir - g - o - | FileCheck % s <nl> <nl> / / Don ' t crash when emitting debug info for anonymous variables . <nl> - / / CHECK : ! MDLocalVariable ( { { . * } } name : " _ " <nl> + / / CHECK : ! DILocalVariable ( { { . * } } name : " _ " <nl> protocol F_ { <nl> func successor ( ) - > Self <nl> } <nl> mmm a / test / DebugInfo / any . swift <nl> ppp b / test / DebugInfo / any . swift <nl> <nl> <nl> func main ( ) { <nl> / / CHECK : call void @ llvm . dbg . declare ( metadata % " protocol < > " * { { . * } } , metadata ! [ [ S : . * ] ] , metadata ! { { [ 0 - 9 ] + } } ) , ! dbg ! [ [ DBG : . * ] ] <nl> - / / CHECK : ! [ [ S ] ] = ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " s " , { { . * } } line : [ [ @ LINE + 3 ] ] <nl> - / / CHECK : ! [ [ SCOPE : . * ] ] = distinct ! MDLexicalBlock ( { { . * } } line : 3 , column : 13 ) <nl> - / / CHECK : ! [ [ DBG ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 6 , scope : ! [ [ SCOPE ] ] ) <nl> + / / CHECK : ! [ [ S ] ] = ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " s " , { { . * } } line : [ [ @ LINE + 3 ] ] <nl> + / / CHECK : ! [ [ SCOPE : . * ] ] = distinct ! DILexicalBlock ( { { . * } } line : 3 , column : 13 ) <nl> + / / CHECK : ! [ [ DBG ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 6 , scope : ! [ [ SCOPE ] ] ) <nl> var s : Any = " hello world " <nl> var n : Any = 12 <nl> var t : Any = ( 1 , 2 ) <nl> mmm a / test / DebugInfo / apple - types - accel . swift <nl> ppp b / test / DebugInfo / apple - types - accel . swift <nl> <nl> / / CHECK - DWARF - NEXT : AT_linkage_name ( " _TtC4main3foo " ) <nl> <nl> / / Verify the IR interface : <nl> - / / CHECK : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " foo " <nl> + / / CHECK : ! DICompositeType ( tag : DW_TAG_structure_type , name : " foo " <nl> / / CHECK - SAME : line : [ [ @ LINE + 2 ] ] <nl> / / CHECK - SAME : identifier : " _TtC4main3foo " <nl> class foo { <nl> mmm a / test / DebugInfo / archetype . swift <nl> ppp b / test / DebugInfo / archetype . swift <nl> protocol RandomAccessIndexType : IntegerArithmeticType { <nl> static func uncheckedSubtract ( lhs : Self , rhs : Self ) - > ( Distance , Bool ) <nl> } <nl> <nl> - / / CHECK : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " _TtTQQq_F9archetype16ExistentialTuple <nl> + / / CHECK : ! DICompositeType ( tag : DW_TAG_structure_type , name : " _TtTQQq_F9archetype16ExistentialTuple <nl> / / CHECK - SAME : identifier : [ [ TT : " . + " ] ] ) <nl> / / archetype . ExistentialTuple < A : RandomAccessIndexType , B > ( x : A , y : A ) - > B <nl> - / / CHECK : ! MDSubprogram ( name : " ExistentialTuple " , linkageName : " _TF9archetype16ExistentialTuple <nl> + / / CHECK : ! DISubprogram ( name : " ExistentialTuple " , linkageName : " _TF9archetype16ExistentialTuple <nl> / / CHECK - SAME : line : [ [ @ LINE + 2 ] ] <nl> / / CHECK - SAME : isDefinition : true <nl> func ExistentialTuple < T : RandomAccessIndexType > ( x : T , y : T ) - > T . Distance { <nl> / / ( B , Swift . Bool ) <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " tmp " <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " tmp " <nl> / / CHECK - SAME : line : [ [ @ LINE + 2 ] ] <nl> / / CHECK - SAME : type : ! [ [ TT ] ] <nl> var tmp : ( T . Distance , Bool ) = T . uncheckedSubtract ( x , rhs : y ) <nl> mmm a / test / DebugInfo / archetypes2 . swift <nl> ppp b / test / DebugInfo / archetypes2 . swift <nl> <nl> / / RUN : % target - swift - frontend % s - emit - ir - verify - g - o - | FileCheck % s <nl> <nl> class C < A > { <nl> - / / CHECK - DAG : ! [ [ A : [ 0 - 9 ] + ] ] = ! MDCompositeType ( tag : DW_TAG_structure_type , name : " _TtQq_C11archetypes21C " <nl> - / / CHECK - DAG : ! [ [ B : [ 0 - 9 ] + ] ] = ! MDCompositeType ( tag : DW_TAG_structure_type , name : " _TtQq_FC11archetypes21C3foo <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " x " , { { . * } } line : [ [ @ LINE + 2 ] ] , { { . * } } type : ! [ [ A ] ] <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " y " , { { . * } } line : [ [ @ LINE + 1 ] ] , { { . * } } type : ! [ [ B ] ] <nl> + / / CHECK - DAG : ! [ [ A : [ 0 - 9 ] + ] ] = ! DICompositeType ( tag : DW_TAG_structure_type , name : " _TtQq_C11archetypes21C " <nl> + / / CHECK - DAG : ! [ [ B : [ 0 - 9 ] + ] ] = ! DICompositeType ( tag : DW_TAG_structure_type , name : " _TtQq_FC11archetypes21C3foo <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " x " , { { . * } } line : [ [ @ LINE + 2 ] ] , { { . * } } type : ! [ [ A ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " y " , { { . * } } line : [ [ @ LINE + 1 ] ] , { { . * } } type : ! [ [ B ] ] <nl> func foo < B > ( var x : A , var y : B ) <nl> { <nl> println ( " hello world " ) <nl> mmm a / test / DebugInfo / argument . swift <nl> ppp b / test / DebugInfo / argument . swift <nl> <nl> / / RUN : % target - swift - frontend - primary - file % s - emit - ir - g - o - | FileCheck % s <nl> <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " arg " , arg : 1 , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " arg " , arg : 1 , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> func a ( arg : Int ) <nl> { <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " local " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " local " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> var local = arg <nl> } <nl> <nl> / / Why is c arg : 4 ? Note that " b " shows up as both arg 2 and 3 . <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " a " , arg : 1 , { { . * } } line : [ [ @ LINE + 3 ] ] <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " b " , arg : 2 , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " c " , arg : 4 , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " a " , arg : 1 , { { . * } } line : [ [ @ LINE + 3 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " b " , arg : 2 , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " c " , arg : 4 , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> func many ( a : Int , b : ( Int , Int ) , c : Int ) - > Int { <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " i1 " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " i1 " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> var i1 = a <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " i2 " , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " i3 " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " i2 " , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " i3 " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> var ( i2 , i3 ) : ( Int , Int ) = b <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " i4 " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " i4 " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> var i4 = c <nl> return i1 + i2 + i3 + i4 <nl> } <nl> <nl> class A { <nl> var member : Int <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " a " , arg : 1 , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " a " , arg : 1 , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> init ( a : Int ) { member = a } <nl> <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " offset " , arg : 1 , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " self " , arg : 2 , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " offset " , arg : 1 , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " self " , arg : 2 , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> func getValuePlus ( offset : Int ) - > Int { <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " a " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " a " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> var a = member <nl> return a + offset <nl> } <nl> <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " factor " , arg : 1 , { { . * } } line : [ [ @ LINE + 3 ] ] <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " offset " , arg : 2 , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " self " , arg : 3 , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " factor " , arg : 1 , { { . * } } line : [ [ @ LINE + 3 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " offset " , arg : 2 , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " self " , arg : 3 , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> func getValueTimesPlus ( factor : Int , offset : Int ) - > Int { <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " a " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " a " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> var a = member <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " f " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " f " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> var f = factor <nl> return a * f + offset <nl> } <nl> <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " self " , arg : 1 , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " self " , arg : 1 , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> deinit { <nl> println ( member ) <nl> } <nl> class A { <nl> } <nl> <nl> / / Curried functions have their arguments backwards . <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " b " , arg : 1 , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " a " , arg : 2 , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " b " , arg : 1 , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " a " , arg : 2 , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> func uncurry ( a : Int ) ( b : Int ) - > ( Int , Int ) { <nl> return ( a , b ) <nl> } <nl> <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " x " , arg : 1 , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " y " , arg : 2 , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " x " , arg : 1 , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " y " , arg : 2 , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> func tuple ( x : Int , y : ( Int , Float , String ) ) - > Int { <nl> return x + y . 0 ; <nl> } <nl> mmm a / test / DebugInfo / attributes . swift <nl> ppp b / test / DebugInfo / attributes . swift <nl> <nl> <nl> / / REQUIRES : objc_interop <nl> <nl> - / / CHECK - DAG : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " ObjCClass " , { { . * } } line : [ [ @ LINE + 1 ] ] , { { . * } } runtimeLang : DW_LANG_Swift , { { . * } } identifier : [ [ TY0 : " [ ^ " ] * " ] ] ) <nl> + / / CHECK - DAG : ! DICompositeType ( tag : DW_TAG_structure_type , name : " ObjCClass " , { { . * } } line : [ [ @ LINE + 1 ] ] , { { . * } } runtimeLang : DW_LANG_Swift , { { . * } } identifier : [ [ TY0 : " [ ^ " ] * " ] ] ) <nl> @ objc class ObjCClass { <nl> @ IBAction func click ( _ : AnyObject ? ) - > ( ) { } <nl> } <nl> / / DW_LANG_Swift = 0xa000 [ FIXME : this number will change ! ] <nl> - / / CHECK - DAG : ! [ [ TY1 : [ 0 - 9 ] + ] ] = ! MDCompositeType ( tag : DW_TAG_structure_type , name : " SwiftClass " , { { . * } } line : [ [ @ LINE + 1 ] ] , { { . * } } runtimeLang : DW_LANG_Swift <nl> + / / CHECK - DAG : ! [ [ TY1 : [ 0 - 9 ] + ] ] = ! DICompositeType ( tag : DW_TAG_structure_type , name : " SwiftClass " , { { . * } } line : [ [ @ LINE + 1 ] ] , { { . * } } runtimeLang : DW_LANG_Swift <nl> class SwiftClass { <nl> @ objc func objcmethod ( ) - > ( ) { } <nl> func swiftmethod ( ) - > ( ) { } <nl> class SwiftClass { <nl> / / an artificial variable . <nl> / / DISABLED : [ DW_TAG_variable ] [ OBJC_METACLASS_ $ __TtC10attributes9ObjCClass ] <nl> <nl> - / / CHECK - DAG : ! MDGlobalVariable ( name : " strongRef0 " , { { . * } } line : [ [ @ LINE + 1 ] ] , { { . * } } type : ! [ [ TY0 ] ] , { { . * } } isLocal : false , isDefinition : true <nl> + / / CHECK - DAG : ! DIGlobalVariable ( name : " strongRef0 " , { { . * } } line : [ [ @ LINE + 1 ] ] , { { . * } } type : ! [ [ TY0 ] ] , { { . * } } isLocal : false , isDefinition : true <nl> var strongRef0 : ObjCClass <nl> var strongRef1 : SwiftClass = SwiftClass ( ) <nl> <nl> - / / CHECK - DAG : ! MDDerivedType ( tag : DW_TAG_typedef , name : " _TtXwGSqC10attributes10SwiftClass_ " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK - DAG : ! DIDerivedType ( tag : DW_TAG_typedef , name : " _TtXwGSqC10attributes10SwiftClass_ " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> weak var weakRef1 : SwiftClass ? = strongRef1 <nl> - / / CHECK - DAG : ! MDDerivedType ( tag : DW_TAG_typedef , name : " _TtXoC10attributes10SwiftClass " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK - DAG : ! DIDerivedType ( tag : DW_TAG_typedef , name : " _TtXoC10attributes10SwiftClass " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> unowned var unownedRef1 : SwiftClass <nl> <nl> protocol Protocol1 : class { <nl> mmm a / test / DebugInfo / autoclosure . swift <nl> ppp b / test / DebugInfo / autoclosure . swift <nl> func & & & & & ( lhs : BooleanType , @ autoclosure rhs : ( ) - > BooleanType ) - > Bool { <nl> func call_me ( var input : Int ) - > Void { <nl> / / rdar : / / problem / 14627460 <nl> / / An autoclosure should have a line number in the debug info and a scope line of 0 . <nl> - / / CHECK - DAG : ! MDSubprogram ( { { . * } } linkageName : " _TFF11autoclosure7call_meFSiT_u_KT_PSs11BooleanType_ " , { { . * } } line : [ [ @ LINE + 3 ] ] , { { . * } } isLocal : false , isDefinition : true <nl> + / / CHECK - DAG : ! DISubprogram ( { { . * } } linkageName : " _TFF11autoclosure7call_meFSiT_u_KT_PSs11BooleanType_ " , { { . * } } line : [ [ @ LINE + 3 ] ] , { { . * } } isLocal : false , isDefinition : true <nl> / / But not in the line table . <nl> - / / CHECK - DAG : ! [ [ DBG ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , <nl> + / / CHECK - DAG : ! [ [ DBG ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , <nl> if input ! = 0 & & & & & ( get_truth ( input * 2 + 1 ) > 0 ) <nl> { <nl> println ( " Whew , passed that test . " ) <nl> mmm a / test / DebugInfo / basic . swift <nl> ppp b / test / DebugInfo / basic . swift <nl> <nl> / / <nl> / / CHECK : foo <nl> / / CHECK - DAG : ret { { . * } } , ! dbg ! [ [ RET : [ 0 - 9 ] + ] ] <nl> - / / CHECK - DAG : ! [ [ FOO : [ 0 - 9 ] + ] ] = ! MDSubprogram ( name : " foo " , { { . * } } line : [ [ @ LINE + 2 ] ] , { { . * } } type : ! [ [ FOOTYPE : [ 0 - 9 ] + ] ] <nl> + / / CHECK - DAG : ! [ [ FOO : [ 0 - 9 ] + ] ] = ! DISubprogram ( name : " foo " , { { . * } } line : [ [ @ LINE + 2 ] ] , { { . * } } type : ! [ [ FOOTYPE : [ 0 - 9 ] + ] ] <nl> public <nl> func foo ( var a : Int64 , var _ b : Int64 ) - > Int64 { <nl> - / / CHECK - DAG : ! MDLexicalBlock ( scope : ! [ [ FOO ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , column : 49 ) <nl> - / / CHECK - DAG : ! [ [ ASCOPE : . * ] ] = ! MDLocation ( line : [ [ @ LINE - 2 ] ] , column : 14 , scope : ! [ [ FOO ] ] ) <nl> + / / CHECK - DAG : ! DILexicalBlock ( scope : ! [ [ FOO ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , column : 49 ) <nl> + / / CHECK - DAG : ! [ [ ASCOPE : . * ] ] = ! DILocation ( line : [ [ @ LINE - 2 ] ] , column : 14 , scope : ! [ [ FOO ] ] ) <nl> / / Check that a is the first and b is the second argument . <nl> / / CHECK - DAG : store i64 % 0 , i64 * [ [ AVAL : . * ] ] , align 8 <nl> / / CHECK - DAG : store i64 % 1 , i64 * [ [ BVAL : . * ] ] , align 8 <nl> func foo ( var a : Int64 , var _ b : Int64 ) - > Int64 { <nl> / / CHECK - DAG : [ [ BVAL ] ] = getelementptr inbounds { { . * } } , [ [ BMEM : . * ] ] , i32 0 , i32 0 <nl> / / CHECK - DAG : call void @ llvm . dbg . declare ( metadata [ [ AMEM ] ] , metadata ! [ [ AARG : . * ] ] , metadata ! { { [ 0 - 9 ] + } } ) , ! dbg ! [ [ ASCOPE ] ] <nl> / / CHECK - DAG : call void @ llvm . dbg . declare ( metadata [ [ BMEM ] ] , metadata ! [ [ BARG : . * ] ] , metadata ! { { [ 0 - 9 ] + } } ) <nl> - / / CHECK - DAG : ! [ [ AARG ] ] = ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " a " <nl> - / / CHECK - DAG : ! [ [ BARG ] ] = ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " b " <nl> + / / CHECK - DAG : ! [ [ AARG ] ] = ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " a " <nl> + / / CHECK - DAG : ! [ [ BARG ] ] = ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " b " <nl> if b ! = 0 { <nl> - / / CHECK - DAG : ! MDLexicalBlock ( { { . * } } line : [ [ @ LINE - 1 ] ] <nl> + / / CHECK - DAG : ! DILexicalBlock ( { { . * } } line : [ [ @ LINE - 1 ] ] <nl> / / Transparent inlined multiply : <nl> / / CHECK - DAG : smul { { . * } } , ! dbg ! [ [ MUL : [ 0 - 9 ] + ] ] <nl> - / / CHECK - DAG : [ [ MUL ] ] = ! MDLocation ( line : [ [ @ LINE + 4 ] ] , column : 16 , <nl> + / / CHECK - DAG : [ [ MUL ] ] = ! DILocation ( line : [ [ @ LINE + 4 ] ] , column : 16 , <nl> / / Runtime call to multiply function : <nl> / / CHECK - NOSIL : @ _TZFSsoi1mFTVSs5Int64S__S_ { { . * } } , ! dbg ! [ [ MUL : [ 0 - 9 ] + ] ] <nl> - / / CHECK - NOSIL : [ [ MUL ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 16 , <nl> + / / CHECK - NOSIL : [ [ MUL ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 16 , <nl> return a * b <nl> } else { <nl> - / / CHECK - DAG : [ [ PARENT : [ 0 - 9 ] + ] ] = distinct ! MDLexicalBlock ( { { . * } } line : [ [ @ LINE - 1 ] ] , column : 13 ) <nl> + / / CHECK - DAG : [ [ PARENT : [ 0 - 9 ] + ] ] = distinct ! DILexicalBlock ( { { . * } } line : [ [ @ LINE - 1 ] ] , column : 13 ) <nl> var c : Int64 = 42 <nl> if a = = 0 { <nl> - / / CHECK - DAG : ! MDLexicalBlock ( scope : ! [ [ PARENT ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , column : 18 ) <nl> + / / CHECK - DAG : ! DILexicalBlock ( scope : ! [ [ PARENT ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , column : 18 ) <nl> / / What about a nested scope ? <nl> return 0 <nl> } <nl> func foo ( var a : Int64 , var _ b : Int64 ) - > Int64 { <nl> } <nl> } <nl> <nl> - / / CHECK - DAG : ! [ [ MAINFILE : [ 0 - 9 ] + ] ] = ! MDFile ( filename : " basic . swift " , directory : " { { . * } } DebugInfo " ) <nl> - / / CHECK - DAG : ! MDCompileUnit ( { { . * } } file : ! [ [ MAINFILE ] ] , { { . * } } producer : " { { . * } } Swift version { { . * } } , { { . * } } flags : " { { [ ^ " ] * } } - emit - ir <nl> - / / CHECK - DAG : ! MDSubprogram ( name : " main " <nl> + / / CHECK - DAG : ! [ [ MAINFILE : [ 0 - 9 ] + ] ] = ! DIFile ( filename : " basic . swift " , directory : " { { . * } } DebugInfo " ) <nl> + / / CHECK - DAG : ! DICompileUnit ( { { . * } } file : ! [ [ MAINFILE ] ] , { { . * } } producer : " { { . * } } Swift version { { . * } } , { { . * } } flags : " { { [ ^ " ] * } } - emit - ir <nl> + / / CHECK - DAG : ! DISubprogram ( name : " main " <nl> <nl> / / Function type for foo . <nl> - / / CHECK - DAG : ! [ [ FOOTYPE ] ] = ! MDSubroutineType ( types : ! [ [ PARAMTYPES : [ 0 - 9 ] + ] ] ) <nl> + / / CHECK - DAG : ! [ [ FOOTYPE ] ] = ! DISubroutineType ( types : ! [ [ PARAMTYPES : [ 0 - 9 ] + ] ] ) <nl> / / CHECK - DAG : ! [ [ PARAMTYPES ] ] = ! { ! " _TtVSs5Int64 " , ! " _TtVSs5Int64 " , ! " _TtVSs5Int64 " } <nl> / / Import of the main module . <nl> - / / CHECK - DAG : ! MDImportedEntity ( tag : DW_TAG_imported_module , scope : ! [ [ MAINFILE ] ] , entity : ! [ [ MAINMODULE : [ 0 - 9 ] + ] ] , line : 1 ) <nl> + / / CHECK - DAG : ! DIImportedEntity ( tag : DW_TAG_imported_module , scope : ! [ [ MAINFILE ] ] , entity : ! [ [ MAINMODULE : [ 0 - 9 ] + ] ] , line : 1 ) <nl> / / CHECK - DAG : ! [ [ MAINMODULE ] ] = ! MDModule ( name : " basic " <nl> <nl> / / Import of the swift standard library . <nl> - / / CHECK - DAG : ! [ [ SWIFTFILE : [ 0 - 9 ] + ] ] = ! MDFile ( filename : " { { . * } } Swift . swiftmodule " , <nl> - / / CHECK - DAG : ! MDImportedEntity ( tag : DW_TAG_imported_module , scope : ! [ [ SWIFTFILE ] ] , entity : ! [ [ SWIFTMODULE : [ 0 - 9 ] + ] ] ) <nl> + / / CHECK - DAG : ! [ [ SWIFTFILE : [ 0 - 9 ] + ] ] = ! DIFile ( filename : " { { . * } } Swift . swiftmodule " , <nl> + / / CHECK - DAG : ! DIImportedEntity ( tag : DW_TAG_imported_module , scope : ! [ [ SWIFTFILE ] ] , entity : ! [ [ SWIFTMODULE : [ 0 - 9 ] + ] ] ) <nl> / / CHECK - DAG : ! [ [ SWIFTMODULE ] ] = ! MDModule ( name : " Swift " <nl> <nl> / / DWARF Version <nl> mmm a / test / DebugInfo / bool . swift <nl> ppp b / test / DebugInfo / bool . swift <nl> <nl> / / RUN : % target - swift - frontend % s - emit - ir - g - o - | FileCheck % s <nl> <nl> / / Int1 uses 1 bit , but is aligned at 8 bits . <nl> - / / CHECK : ! MDBasicType ( name : " _TtBi1_ " , size : 1 , align : 8 , encoding : DW_ATE_unsigned ) <nl> + / / CHECK : ! DIBasicType ( name : " _TtBi1_ " , size : 1 , align : 8 , encoding : DW_ATE_unsigned ) <nl> func main ( ) <nl> { <nl> var t = true <nl> mmm a / test / DebugInfo / bound - namealiastype . swift <nl> ppp b / test / DebugInfo / bound - namealiastype . swift <nl> <nl> / / REQUIRES : objc_interop <nl> <nl> import Dispatch <nl> - / / CHECK - DAG : ! MDCompositeType ( tag : DW_TAG_union_type , { { . * } } identifier : " _TtGSQaSC21dispatch_queue_attr_t_ " <nl> - / / CHECK - DAG : ! MDGlobalVariable ( name : " queue " , { { . * } } line : [ [ @ LINE + 1 ] ] , type : ! " _TtGSQaSC21dispatch_queue_attr_t_ " <nl> + / / CHECK - DAG : ! DICompositeType ( tag : DW_TAG_union_type , { { . * } } identifier : " _TtGSQaSC21dispatch_queue_attr_t_ " <nl> + / / CHECK - DAG : ! DIGlobalVariable ( name : " queue " , { { . * } } line : [ [ @ LINE + 1 ] ] , type : ! " _TtGSQaSC21dispatch_queue_attr_t_ " <nl> var queue = dispatch_queue_create ( " queue " , nil ) <nl> <nl> dispatch_sync ( queue ) { println ( " Hello world " ) ; } <nl> mmm a / test / DebugInfo / byref - capture . swift <nl> ppp b / test / DebugInfo / byref - capture . swift <nl> func makeIncrementor ( inc : Int ) - > ( ) - > Int <nl> / / CHECK : define { { . * } } 5inner <nl> func inner ( ) - > Int { <nl> / / CHECK : call void @ llvm . dbg . declare ( metadata % Si * * % { { . * } } , metadata ! [ [ SUM_CAPTURE : [ 0 - 9 ] + ] ] , metadata ! [ [ DEREF : [ 0 - 9 ] + ] ] ) <nl> - / / CHECK - DAG : ! [ [ SUM_CAPTURE ] ] = ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " sum " , { { . * } } line : [ [ @ LINE - 4 ] ] <nl> - / / CHECK - DAG : ! [ [ DEREF ] ] = ! MDExpression ( DW_OP_deref <nl> + / / CHECK - DAG : ! [ [ SUM_CAPTURE ] ] = ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " sum " , { { . * } } line : [ [ @ LINE - 4 ] ] <nl> + / / CHECK - DAG : ! [ [ DEREF ] ] = ! DIExpression ( DW_OP_deref <nl> sum + = inc <nl> return sum <nl> } <nl> mmm a / test / DebugInfo / callexpr . swift <nl> ppp b / test / DebugInfo / callexpr . swift <nl> func foo ( a : Int , _ b : Int ) - > Int { <nl> / / CHECK : call { { . * } } foo { { . * } } , ! dbg ! [ [ ARG1 : . * ] ] <nl> / / CHECK : call { { . * } } foo { { . * } } , ! dbg ! [ [ ARG2 : . * ] ] <nl> / / CHECK : call { { . * } } foo { { . * } } , ! dbg ! [ [ OUTER : . * ] ] <nl> - let r = foo ( foo ( 1 , 23 ) , / / CHECK : ! [ [ ARG1 ] ] = ! MDLocation ( line : [ [ @ LINE ] ] , <nl> - foo ( 2 , 42 ) / / CHECK : ! [ [ ARG2 ] ] = ! MDLocation ( line : [ [ @ LINE ] ] , <nl> - ) / / CHECK : ! [ [ OUTER ] ] = ! MDLocation ( line : [ [ @ LINE ] ] , <nl> + let r = foo ( foo ( 1 , 23 ) , / / CHECK : ! [ [ ARG1 ] ] = ! DILocation ( line : [ [ @ LINE ] ] , <nl> + foo ( 2 , 42 ) / / CHECK : ! [ [ ARG2 ] ] = ! DILocation ( line : [ [ @ LINE ] ] , <nl> + ) / / CHECK : ! [ [ OUTER ] ] = ! DILocation ( line : [ [ @ LINE ] ] , <nl> println ( r ) <nl> <nl> mmm a / test / DebugInfo / class . swift <nl> ppp b / test / DebugInfo / class . swift <nl> <nl> / / RUN : % target - swift - frontend - primary - file % s - emit - ir - g - o - | FileCheck % s <nl> <nl> / / FIXME : This is more of a crash test than anything else . <nl> - / / CHECK : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " Tree " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK : ! DICompositeType ( tag : DW_TAG_structure_type , name : " Tree " , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> class Tree < T > { <nl> var l , r : Tree < T > ? <nl> } <nl> mmm a / test / DebugInfo / closure - args . swift <nl> ppp b / test / DebugInfo / closure - args . swift <nl> func main ( ) - > Void <nl> / / stack pointer will be decremented after it . <nl> / / CHECK - NOT : ! dbg <nl> / / CHECK - NEXT : call void @ llvm . dbg . declare ( metadata % SS * * % [ [ RHS_ADDR ] ] , metadata ! { { . * } } , metadata ! { { [ 0 - 9 ] + } } ) , ! dbg <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " lhs " , { { . * } } line : [ [ @ LINE + 5 ] ] , <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " rhs " , { { . * } } line : [ [ @ LINE + 4 ] ] , <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " random_string " , { { . * } } line : 8 , <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " random_int " , { { . * } } line : 9 , <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " out_only " , { { . * } } line : 10 , <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " lhs " , { { . * } } line : [ [ @ LINE + 5 ] ] , <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " rhs " , { { . * } } line : [ [ @ LINE + 4 ] ] , <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " random_string " , { { . * } } line : 8 , <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " random_int " , { { . * } } line : 9 , <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " out_only " , { { . * } } line : 10 , <nl> { ( lhs : String , rhs : String ) - > Bool in <nl> if rhs = = random_string <nl> | | count ( rhs . unicodeScalars ) = = random_int <nl> { <nl> / / Ensure the two local_vars are in different lexical scopes . <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " local_var " , scope : ! [ [ THENSCOPE : [ 0 - 9 ] + ] ] , { { . * } } line : [ [ @ LINE + 2 ] ] , <nl> - / / CHECK - DAG : ! [ [ THENSCOPE ] ] = distinct ! MDLexicalBlock ( { { . * } } line : [ [ @ LINE - 3 ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " local_var " , scope : ! [ [ THENSCOPE : [ 0 - 9 ] + ] ] , { { . * } } line : [ [ @ LINE + 2 ] ] , <nl> + / / CHECK - DAG : ! [ [ THENSCOPE ] ] = distinct ! DILexicalBlock ( { { . * } } line : [ [ @ LINE - 3 ] ] <nl> var local_var : Int = 10 <nl> print ( " I have an int here \ ( local_var ) . \ n " ) <nl> return false <nl> } <nl> else <nl> { <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " local_var " , scope : ! [ [ ELSESCOPE : [ 0 - 9 ] + ] ] , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> - / / CHECK - DAG : ! [ [ ELSESCOPE ] ] = distinct ! MDLexicalBlock ( { { . * } } line : [ [ @ LINE - 2 ] ] , <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " local_var " , scope : ! [ [ ELSESCOPE : [ 0 - 9 ] + ] ] , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> + / / CHECK - DAG : ! [ [ ELSESCOPE ] ] = distinct ! DILexicalBlock ( { { . * } } line : [ [ @ LINE - 2 ] ] , <nl> var local_var : String = " g " <nl> print ( " I have another string here \ ( local_var ) . \ n " ) <nl> / / Assign to all the captured variables to inhibit capture promotion . <nl> mmm a / test / DebugInfo / closure - args2 . swift <nl> ppp b / test / DebugInfo / closure - args2 . swift <nl> func main ( ) - > Void <nl> { ( lhs : String , rhs : String ) - > Bool in <nl> <nl> / / CHECK - NOT : llvm . dbg . { { . * } } % swift . refcounted * <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " lhs " <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " rhs " <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " random_string " <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " random_int " <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " lhs " <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " rhs " <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " random_string " <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " random_int " <nl> <nl> if rhs = = random_string <nl> | | count ( rhs . unicodeScalars ) = = random_int { <nl> mmm a / test / DebugInfo / closure - multivalue . swift <nl> ppp b / test / DebugInfo / closure - multivalue . swift <nl> <nl> / / CHECK : call void @ llvm . dbg . value ( metadata i8 * { { . * } } , metadata ! [ [ B : . * ] ] , metadata ! [ [ P1 ] ] ) <nl> / / CHECK : call void @ llvm . dbg . value ( metadata i { { [ 0 - 9 ] + } } { { . * } } , metadata ! [ [ B ] ] , metadata ! [ [ P2 ] ] ) <nl> / / CHECK : call void @ llvm . dbg . value ( metadata i { { [ 0 - 9 ] + } } { { . * } } , metadata ! [ [ B ] ] , metadata ! [ [ P3 ] ] ) <nl> - / / CHECK - DAG : ! [ [ A ] ] = ! MDLocalVariable ( { { . * } } name : " a " , { { . * } } line : 15 <nl> - / / CHECK - DAG : ! [ [ B ] ] = ! MDLocalVariable ( { { . * } } name : " b " , { { . * } } line : 15 <nl> - / / CHECK - DAG : ! [ [ P1 ] ] = ! MDExpression ( DW_OP_bit_piece , 0 , { { ( 32 | 64 ) } } ) <nl> - / / CHECK - DAG : ! [ [ P2 ] ] = ! MDExpression ( DW_OP_bit_piece , { { ( 32 , 32 | 64 , 64 ) } } ) <nl> - / / CHECK - DAG : ! [ [ P3 ] ] = ! MDExpression ( DW_OP_bit_piece , { { ( 64 , 32 | 128 , 64 ) } } ) <nl> + / / CHECK - DAG : ! [ [ A ] ] = ! DILocalVariable ( { { . * } } name : " a " , { { . * } } line : 15 <nl> + / / CHECK - DAG : ! [ [ B ] ] = ! DILocalVariable ( { { . * } } name : " b " , { { . * } } line : 15 <nl> + / / CHECK - DAG : ! [ [ P1 ] ] = ! DIExpression ( DW_OP_bit_piece , 0 , { { ( 32 | 64 ) } } ) <nl> + / / CHECK - DAG : ! [ [ P2 ] ] = ! DIExpression ( DW_OP_bit_piece , { { ( 32 , 32 | 64 , 64 ) } } ) <nl> + / / CHECK - DAG : ! [ [ P3 ] ] = ! DIExpression ( DW_OP_bit_piece , { { ( 64 , 32 | 128 , 64 ) } } ) <nl> func sort ( a : String , b : String ) - > Bool { <nl> println ( " Sorting . . \ ( a ) & \ ( b ) " ) <nl> return ( a < b ) <nl> demo ( ) <nl> / / RUN : % target - swift - frontend % s - emit - ir - g - o - | FileCheck % s - - check - prefix = CHECK - O0 <nl> / / Verify that a reabstraction thunk does not have a line number . <nl> / / CHECK - O0 - NOT : DW_OP_bit_piece <nl> - / / CHECK - O0 : ! MDSubprogram ( { { . * } } linkageName : " _TTRXFo_oSSoSS_dSb_XFo_iSSiSS_dSb_ " <nl> + / / CHECK - O0 : ! DISubprogram ( { { . * } } linkageName : " _TTRXFo_oSSoSS_dSb_XFo_iSSiSS_dSb_ " <nl> / / CHECK - O0 - NOT : line : <nl> / / CHECK - O0 - SAME : ) { { $ } } <nl> / / CHECK - O0 - NOT : DW_OP_bit_piece <nl> - / / CHECK - O0 : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " a " , { { . * } } line : 15 , <nl> + / / CHECK - O0 : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " a " , { { . * } } line : 15 , <nl> / / CHECK - O0 - NOT : DW_OP_bit_piece <nl> - / / CHECK - O0 : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " b " , { { . * } } line : 15 , <nl> + / / CHECK - O0 : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " b " , { { . * } } line : 15 , <nl> / / CHECK - O0 - NOT : DW_OP_bit_piece <nl> mmm a / test / DebugInfo / closure . swift <nl> ppp b / test / DebugInfo / closure . swift <nl> func foldl1 < T > ( list : [ T ] , _ function : ( a : T , b : T ) - > T ) - > T { <nl> var a = [ Int ] ( count : 10 , repeatedValue : 0 ) <nl> for i in 0 . . < 10 { a [ i ] = i } <nl> / / A closure is not an artificial function ( the last i32 0 ) . <nl> - / / CHECK : ! MDSubprogram ( { { . * } } linkageName : " _TF7closureU_FTSiSi_Si " , { { . * } } line : 18 , { { . * } } scopeLine : 18 , <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " $ 0 " , { { . * } } line : [ [ @ LINE + 2 ] ] , <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " $ 1 " , { { . * } } line : [ [ @ LINE + 1 ] ] , <nl> + / / CHECK : ! DISubprogram ( { { . * } } linkageName : " _TF7closureU_FTSiSi_Si " , { { . * } } line : 18 , { { . * } } scopeLine : 18 , <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " $ 0 " , { { . * } } line : [ [ @ LINE + 2 ] ] , <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " $ 1 " , { { . * } } line : [ [ @ LINE + 1 ] ] , <nl> var sum : Int = foldl1 ( a , { $ 0 + $ 1 } ) <nl> println ( sum ) <nl> mmm a / test / DebugInfo / dynamic_layout . swift <nl> ppp b / test / DebugInfo / dynamic_layout . swift <nl> class Class < T > { <nl> init ( _x : T ) { x = _x } <nl> <nl> / / Verify that the mangling of the decl context of the type U is correct . <nl> - / / CHECK : ! MDCompositeType ( { { . * } } name : " { { [ ^ " ] * } } _TtQq_FC14dynamic_layout5Class3foo { { [ ^ " ] * } } " <nl> + / / CHECK : ! DICompositeType ( { { . * } } name : " { { [ ^ " ] * } } _TtQq_FC14dynamic_layout5Class3foo { { [ ^ " ] * } } " <nl> func foo < U > ( y : U ) - > ( T , U ) { <nl> var tuple = ( x , y ) <nl> return tuple <nl> mmm a / test / DebugInfo / enum . swift <nl> ppp b / test / DebugInfo / enum . swift <nl> <nl> / / RUN : % target - swift - frontend % s - emit - ir - g - o - | FileCheck % s <nl> <nl> / / CHECK : ! [ [ EMPTY : . * ] ] = ! { } <nl> - / / CHECK : ! MDCompositeType ( tag : DW_TAG_union_type , name : " Color " , <nl> + / / CHECK : ! DICompositeType ( tag : DW_TAG_union_type , name : " Color " , <nl> / / CHECK - SAME : line : [ [ @ LINE + 3 ] ] <nl> / / CHECK - SAME : size : 8 , align : 8 , <nl> / / CHECK - SAME : identifier : " _TtO4enum5Color " <nl> enum Color : UInt { <nl> - / / CHECK : ! MDDerivedType ( tag : DW_TAG_member , name : " Red " <nl> + / / CHECK : ! DIDerivedType ( tag : DW_TAG_member , name : " Red " <nl> / / CHECK - SAME : baseType : ! " _TtSu " <nl> / / CHECK - SAME : size : 8 , align : 8 { { [ , ) ] } } <nl> case Red , Green , Blue <nl> } <nl> <nl> - / / CHECK : ! MDCompositeType ( tag : DW_TAG_union_type , name : " MaybeIntPair " , <nl> + / / CHECK : ! DICompositeType ( tag : DW_TAG_union_type , name : " MaybeIntPair " , <nl> / / CHECK - SAME : line : [ [ @ LINE + 3 ] ] , <nl> / / CHECK - SAME : size : 136 , align : 64 { { [ , ) ] } } <nl> / / CHECK - SAME : identifier : " _TtO4enum12MaybeIntPair " <nl> enum MaybeIntPair { <nl> - / / CHECK : ! MDDerivedType ( tag : DW_TAG_member , name : " None " <nl> + / / CHECK : ! DIDerivedType ( tag : DW_TAG_member , name : " None " <nl> / / CHECK - SAME : baseType : ! " _TtSi " <nl> / / CHECK - SAME : size : 136 , align : 64 { { [ , ) ] } } <nl> case None <nl> - / / CHECK : ! MDDerivedType ( tag : DW_TAG_member , name : " Just " <nl> + / / CHECK : ! DIDerivedType ( tag : DW_TAG_member , name : " Just " <nl> / / CHECK - SAME : baseType : ! " _TtTVSs5Int64S__ " <nl> / / CHECK - SAME : size : 136 , align : 64 { { [ , ) ] } } <nl> case Just ( Int64 , Int64 ) <nl> enum Maybe < T > { <nl> <nl> let r = Color . Red <nl> let c = MaybeIntPair . Just ( 74 , 75 ) <nl> - / / CHECK : ! MDCompositeType ( tag : DW_TAG_union_type , name : " Maybe " , <nl> + / / CHECK : ! DICompositeType ( tag : DW_TAG_union_type , name : " Maybe " , <nl> / / CHECK - SAME : line : [ [ @ LINE - 8 ] ] , <nl> / / CHECK - SAME : size : 8 , align : 8 { { [ , ) ] } } <nl> / / CHECK - SAME : identifier : " _TtGO4enum5MaybeOS_5Color_ " <nl> let movie : Maybe < Color > = . None <nl> <nl> public enum Nothing { } <nl> public func foo ( empty : Nothing ) { } <nl> - / / CHECK : ! MDCompositeType ( { { . * } } name : " Nothing " , { { . * } } elements : ! [ [ EMPTY ] ] <nl> + / / CHECK : ! DICompositeType ( { { . * } } name : " Nothing " , { { . * } } elements : ! [ [ EMPTY ] ] <nl> mmm a / test / DebugInfo / fnptr . swift <nl> ppp b / test / DebugInfo / fnptr . swift <nl> <nl> / / RUN : % target - swift - frontend % s - emit - ir - g - o - | FileCheck % s <nl> <nl> - / / CHECK - DAG : ! [ [ SINODE : . * ] ] = ! MDCompositeType ( tag : DW_TAG_structure_type , name : " Int " , { { . * } } identifier : [ [ SI : . * ] ] ) <nl> - / / CHECK - DAG : ! [ [ SFNODE : . * ] ] = ! MDCompositeType ( tag : DW_TAG_structure_type , name : " Float " , { { . * } } identifier : [ [ SF : . * ] ] ) <nl> - / / CHECK - DAG : ! [ [ VOIDNODE : . * ] ] = ! MDCompositeType ( tag : DW_TAG_structure_type , name : " _TtT_ " , { { . * } } identifier : [ [ VOID : . * ] ] ) <nl> + / / CHECK - DAG : ! [ [ SINODE : . * ] ] = ! DICompositeType ( tag : DW_TAG_structure_type , name : " Int " , { { . * } } identifier : [ [ SI : . * ] ] ) <nl> + / / CHECK - DAG : ! [ [ SFNODE : . * ] ] = ! DICompositeType ( tag : DW_TAG_structure_type , name : " Float " , { { . * } } identifier : [ [ SF : . * ] ] ) <nl> + / / CHECK - DAG : ! [ [ VOIDNODE : . * ] ] = ! DICompositeType ( tag : DW_TAG_structure_type , name : " _TtT_ " , { { . * } } identifier : [ [ VOID : . * ] ] ) <nl> func bar ( ) { <nl> print ( " bar ( ) " ) <nl> } <nl> func baz ( i : Float ) - > Int { return 0 ; } <nl> func barz ( i : Float , _ j : Float ) - > Int { return 0 ; } <nl> func main ( ) - > Int { <nl> <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " bar_function_pointer " , { { . * } } line : [ [ @ LINE + 1 ] ] , { { . * } } type : ! " [ [ BARPT : [ ^ , ] + ] ] " <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " bar_function_pointer " , { { . * } } line : [ [ @ LINE + 1 ] ] , { { . * } } type : ! " [ [ BARPT : [ ^ , ] + ] ] " <nl> var bar_function_pointer = bar <nl> - / / CHECK - DAG : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " [ [ BARPT ] ] " , { { . * } } elements : ! [ [ BARMEMBERS : [ 0 - 9 ] + ] ] <nl> + / / CHECK - DAG : ! DICompositeType ( tag : DW_TAG_structure_type , name : " [ [ BARPT ] ] " , { { . * } } elements : ! [ [ BARMEMBERS : [ 0 - 9 ] + ] ] <nl> / / CHECK - DAG : ! [ [ BARMEMBERS ] ] = ! { ! [ [ BARMEMBER : . * ] ] } <nl> - / / CHECK - DAG : ! [ [ BARMEMBER ] ] = ! MDDerivedType ( tag : DW_TAG_member , { { . * } } baseType : ! [ [ BARPTR : [ 0 - 9 ] + ] ] <nl> - / / CHECK - DAG : ! [ [ BARPTR ] ] = ! MDDerivedType ( tag : DW_TAG_pointer_type , { { . * } } baseType : ! [ [ BART : [ 0 - 9 ] + ] ] <nl> - / / CHECK - DAG : ! [ [ BART ] ] = ! MDSubroutineType ( types : ! [ [ BARARGS : [ 0 - 9 ] + ] ] ) <nl> + / / CHECK - DAG : ! [ [ BARMEMBER ] ] = ! DIDerivedType ( tag : DW_TAG_member , { { . * } } baseType : ! [ [ BARPTR : [ 0 - 9 ] + ] ] <nl> + / / CHECK - DAG : ! [ [ BARPTR ] ] = ! DIDerivedType ( tag : DW_TAG_pointer_type , { { . * } } baseType : ! [ [ BART : [ 0 - 9 ] + ] ] <nl> + / / CHECK - DAG : ! [ [ BART ] ] = ! DISubroutineType ( types : ! [ [ BARARGS : [ 0 - 9 ] + ] ] ) <nl> / / CHECK - DAG : ! [ [ BARARGS ] ] = ! { ! " _TtT_ " } <nl> bar_function_pointer ( ) ; / / Set breakpoint here <nl> <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " baz_function_pointer " , { { . * } } type : ! " [ [ BAZPT : [ ^ , ] + ] ] " <nl> - / / CHECK - DAG : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " [ [ BAZPT ] ] " , { { . * } } elements : ! [ [ BAZMEMBERS : [ 0 - 9 ] + ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " baz_function_pointer " , { { . * } } type : ! " [ [ BAZPT : [ ^ , ] + ] ] " <nl> + / / CHECK - DAG : ! DICompositeType ( tag : DW_TAG_structure_type , name : " [ [ BAZPT ] ] " , { { . * } } elements : ! [ [ BAZMEMBERS : [ 0 - 9 ] + ] ] <nl> / / CHECK - DAG : ! [ [ BAZMEMBERS ] ] = ! { ! [ [ BAZMEMBER : . * ] ] } <nl> - / / CHECK - DAG : ! [ [ BAZMEMBER ] ] = ! MDDerivedType ( tag : DW_TAG_member , { { . * } } baseType : ! [ [ BAZPTR : [ 0 - 9 ] + ] ] <nl> - / / CHECK - DAG : ! [ [ BAZPTR ] ] = ! MDDerivedType ( tag : DW_TAG_pointer_type , { { . * } } baseType : ! [ [ BAZT : [ 0 - 9 ] + ] ] <nl> - / / CHECK - DAG : ! [ [ BAZT ] ] = ! MDSubroutineType ( types : ! [ [ BAZARGS : . * ] ] ) <nl> + / / CHECK - DAG : ! [ [ BAZMEMBER ] ] = ! DIDerivedType ( tag : DW_TAG_member , { { . * } } baseType : ! [ [ BAZPTR : [ 0 - 9 ] + ] ] <nl> + / / CHECK - DAG : ! [ [ BAZPTR ] ] = ! DIDerivedType ( tag : DW_TAG_pointer_type , { { . * } } baseType : ! [ [ BAZT : [ 0 - 9 ] + ] ] <nl> + / / CHECK - DAG : ! [ [ BAZT ] ] = ! DISubroutineType ( types : ! [ [ BAZARGS : . * ] ] ) <nl> / / CHECK - DAG : ! [ [ BAZARGS ] ] = ! { ! " _TtSi " , ! " _TtSf " } <nl> var baz_function_pointer = baz <nl> baz_function_pointer ( 2 . 89 ) <nl> <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " barz_function_pointer " , { { . * } } type : ! " [ [ BARZPT : [ ^ , ] + ] ] " <nl> - / / CHECK - DAG : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " [ [ BARZPT ] ] " , { { . * } } elements : ! [ [ BARZMEMBERS : [ 0 - 9 ] + ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " barz_function_pointer " , { { . * } } type : ! " [ [ BARZPT : [ ^ , ] + ] ] " <nl> + / / CHECK - DAG : ! DICompositeType ( tag : DW_TAG_structure_type , name : " [ [ BARZPT ] ] " , { { . * } } elements : ! [ [ BARZMEMBERS : [ 0 - 9 ] + ] ] <nl> / / CHECK - DAG : ! [ [ BARZMEMBERS ] ] = ! { ! [ [ BARZMEMBER : . * ] ] } <nl> - / / CHECK - DAG : ! [ [ BARZMEMBER ] ] = ! MDDerivedType ( tag : DW_TAG_member , { { . * } } baseType : ! [ [ BARZPTR : [ 0 - 9 ] + ] ] <nl> - / / CHECK - DAG : ! [ [ BARZPTR ] ] = ! MDDerivedType ( tag : DW_TAG_pointer_type , { { . * } } baseType : ! [ [ BARZT : [ 0 - 9 ] + ] ] <nl> - / / CHECK - DAG : ! [ [ BARZT ] ] = ! MDSubroutineType ( types : ! [ [ BARZARGS : . * ] ] ) <nl> + / / CHECK - DAG : ! [ [ BARZMEMBER ] ] = ! DIDerivedType ( tag : DW_TAG_member , { { . * } } baseType : ! [ [ BARZPTR : [ 0 - 9 ] + ] ] <nl> + / / CHECK - DAG : ! [ [ BARZPTR ] ] = ! DIDerivedType ( tag : DW_TAG_pointer_type , { { . * } } baseType : ! [ [ BARZT : [ 0 - 9 ] + ] ] <nl> + / / CHECK - DAG : ! [ [ BARZT ] ] = ! DISubroutineType ( types : ! [ [ BARZARGS : . * ] ] ) <nl> / / CHECK - DAG : ! [ [ BARZARGS ] ] = ! { ! " _TtSi " , ! " _TtSf " , ! " _TtSf " } <nl> var barz_function_pointer = barz <nl> return barz_function_pointer ( 2 . 89 , - 1 . 0 ) <nl> mmm a / test / DebugInfo / generic_arg2 . swift <nl> ppp b / test / DebugInfo / generic_arg2 . swift <nl> <nl> / / Make sure there is no conflicting dbg . value for this variable . x <nl> / / CHECK - NOT : dbg . value { { . * } } metadata ! [ [ U ] ] <nl> class Class < T > { <nl> - / / CHECK : ! [ [ U ] ] = ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " y " , { { . * } } line : [ [ @ LINE + 1 ] ] , <nl> + / / CHECK : ! [ [ U ] ] = ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " y " , { { . * } } line : [ [ @ LINE + 1 ] ] , <nl> func foo < U > ( var x : T , var y : U ) <nl> { <nl> println ( " hello world " ) <nl> mmm a / test / DebugInfo / generic_args . swift <nl> ppp b / test / DebugInfo / generic_args . swift <nl> class AnotherClass : AProtocol { <nl> } <nl> <nl> <nl> - / / CHECK - DAG : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " _TtQq_F12generic_args9aFunction { { . * } } " , { { . * } } elements : ! [ [ PROTOS : [ 0 - 9 ] + ] ] <nl> + / / CHECK - DAG : ! DICompositeType ( tag : DW_TAG_structure_type , name : " _TtQq_F12generic_args9aFunction { { . * } } " , { { . * } } elements : ! [ [ PROTOS : [ 0 - 9 ] + ] ] <nl> / / CHECK - DAG : ! [ [ PROTOS ] ] = ! { ! [ [ INHERIT : . * ] ] } <nl> - / / CHECK - DAG : ! [ [ INHERIT ] ] = ! MDDerivedType ( tag : DW_TAG_inheritance , { { . * } } baseType : ! [ [ PROTOCOL : " [ ^ " ] + " ] ] <nl> - / / CHECK - DAG : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " _TtMP12generic_args9AProtocol_ " , { { . * } } identifier : [ [ PROTOCOL ] ] <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " x " , arg : 1 , { { . * } } type : ! [ [ T : . * ] ] ) <nl> - / / CHECK - DAG : ! [ [ T ] ] = ! MDCompositeType ( tag : DW_TAG_structure_type , name : " _TtQq_F12generic_args9aFunction { { . * } } <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " y " , arg : 2 , { { . * } } type : ! [ [ Q : . * ] ] ) <nl> - / / CHECK - DAG : ! [ [ Q ] ] = ! MDCompositeType ( tag : DW_TAG_structure_type , name : " _TtQq0_F12generic_args9aFunction { { . * } } <nl> + / / CHECK - DAG : ! [ [ INHERIT ] ] = ! DIDerivedType ( tag : DW_TAG_inheritance , { { . * } } baseType : ! [ [ PROTOCOL : " [ ^ " ] + " ] ] <nl> + / / CHECK - DAG : ! DICompositeType ( tag : DW_TAG_structure_type , name : " _TtMP12generic_args9AProtocol_ " , { { . * } } identifier : [ [ PROTOCOL ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " x " , arg : 1 , { { . * } } type : ! [ [ T : . * ] ] ) <nl> + / / CHECK - DAG : ! [ [ T ] ] = ! DICompositeType ( tag : DW_TAG_structure_type , name : " _TtQq_F12generic_args9aFunction { { . * } } <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " y " , arg : 2 , { { . * } } type : ! [ [ Q : . * ] ] ) <nl> + / / CHECK - DAG : ! [ [ Q ] ] = ! DICompositeType ( tag : DW_TAG_structure_type , name : " _TtQq0_F12generic_args9aFunction { { . * } } <nl> func aFunction < T : AProtocol , Q : AProtocol > ( var x : T , var _ y : Q , _ z : String ) { <nl> println ( " I am in \ ( z ) : \ ( x . f ( ) ) \ ( y . f ( ) ) " ) <nl> } <nl> aFunction ( AClass ( ) , AnotherClass ( ) , " aFunction " ) <nl> struct Wrapper < T : AProtocol > { <nl> <nl> init < U : AProtocol > ( from : Wrapper < U > ) { <nl> - / / CHECK - DAG : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " Wrapper " , { { . * } } identifier : " _TtGV12generic_args7WrapperQq_FS0_cUS_9AProtocol__FMGS0_Q__US1___FT4fromGS0_Q___GS0_Qd____ " ) <nl> + / / CHECK - DAG : ! DICompositeType ( tag : DW_TAG_structure_type , name : " Wrapper " , { { . * } } identifier : " _TtGV12generic_args7WrapperQq_FS0_cUS_9AProtocol__FMGS0_Q__US1___FT4fromGS0_Q___GS0_Qd____ " ) <nl> var wrapped = from <nl> } <nl> <nl> func passthrough ( t : T ) - > T { <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " local " , { { . * } } line : [ [ @ LINE + 1 ] ] , { { . * } } type : ! [ [ LOCAL_T : [ 0 - 9 ] + ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " local " , { { . * } } line : [ [ @ LINE + 1 ] ] , { { . * } } type : ! [ [ LOCAL_T : [ 0 - 9 ] + ] ] <nl> var local = t <nl> / / The type of local should have the context Wrapper < T > . <nl> - / / CHECK - DAG : ! [ [ LOCAL_T ] ] = ! MDCompositeType ( tag : DW_TAG_structure_type , name : " _TtQq_V12generic_args7Wrapper " <nl> + / / CHECK - DAG : ! [ [ LOCAL_T ] ] = ! DICompositeType ( tag : DW_TAG_structure_type , name : " _TtQq_V12generic_args7Wrapper " <nl> return local <nl> } <nl> } <nl> mmm a / test / DebugInfo / generic_enum . swift <nl> ppp b / test / DebugInfo / generic_enum . swift <nl> func unwrapTrivialGeneric < T , U > ( tg : TrivialGeneric < T , U > ) - > ( T , U ) { <nl> func wrapTrivialGeneric < T , U > ( t : T , u : U ) - > TrivialGeneric < T , U > { <nl> return . x ( t , u ) <nl> } <nl> - / / CHECK - DAG : ! MDGlobalVariable ( name : " tg " , { { . * } } line : [ [ @ LINE + 2 ] ] , { { . * } } type : ! " _TtGO12generic_enum14TrivialGenericSiSS_ " , { { . * } } isLocal : false , isDefinition : true <nl> - / / CHECK - DAG : ! MDCompositeType ( tag : DW_TAG_union_type , name : " TrivialGeneric " , { { . * } } identifier : " _TtGO12generic_enum14TrivialGenericSiSS_ " <nl> + / / CHECK - DAG : ! DIGlobalVariable ( name : " tg " , { { . * } } line : [ [ @ LINE + 2 ] ] , { { . * } } type : ! " _TtGO12generic_enum14TrivialGenericSiSS_ " , { { . * } } isLocal : false , isDefinition : true <nl> + / / CHECK - DAG : ! DICompositeType ( tag : DW_TAG_union_type , name : " TrivialGeneric " , { { . * } } identifier : " _TtGO12generic_enum14TrivialGenericSiSS_ " <nl> var tg : TrivialGeneric < Int , String > = . x ( 23 , " skidoo " ) <nl> switch tg { <nl> case . x ( var t , var u ) : <nl> mmm a / test / DebugInfo / generic_enum_closure . swift <nl> ppp b / test / DebugInfo / generic_enum_closure . swift <nl> struct CErrorOr < T > <nl> / / CHECK - NOT : define <nl> / / This is a SIL - level debug_value_addr instruction . <nl> / / CHECK : call void @ llvm . dbg . value ( { { . * } } , metadata ! [ [ SELF : . * ] ] , metadata ! { { [ 0 - 9 ] + } } ) <nl> - / / CHECK - DAG : ! [ [ SELF ] ] = ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " self " , { { . * } } type : ! " _TtGV20generic_enum_closure8CErrorOrQq_S0__ " <nl> + / / CHECK - DAG : ! [ [ SELF ] ] = ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " self " , { { . * } } type : ! " _TtGV20generic_enum_closure8CErrorOrQq_S0__ " <nl> value = . None <nl> } <nl> func isError ( ) - > Bool { <nl> mmm a / test / DebugInfo / hello . swift <nl> ppp b / test / DebugInfo / hello . swift <nl> <nl> / / RUN : % target - swift - frontend % s - emit - ir - g - o - | FileCheck % s <nl> <nl> println ( " Hello World ! " ) <nl> - / / CHECK : ! MDFile ( filename : " Swift . swiftmodule " , <nl> + / / CHECK : ! DIFile ( filename : " Swift . swiftmodule " , <nl> mmm a / test / DebugInfo / implicitdecl . swift <nl> ppp b / test / DebugInfo / implicitdecl . swift <nl> <nl> <nl> / / REQUIRES : objc_interop <nl> <nl> - / / CHECK : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " Protocol " , <nl> + / / CHECK : ! DICompositeType ( tag : DW_TAG_structure_type , name : " Protocol " , <nl> / / CHECK - SAME : scope : ! [ [ ObjectiveC : [ 0 - 9 ] + ] ] <nl> / / CHECK - SAME : identifier : " _TtCSo8Protocol " <nl> / / CHECK : ! [ [ ObjectiveC ] ] = ! MDModule ( name : " ObjectiveC " <nl> mmm a / test / DebugInfo / initializer . swift <nl> ppp b / test / DebugInfo / initializer . swift <nl> protocol Named { <nl> / / CHECK : define hidden % C11initializer6Person * @ _TFC11initializer6PersonCfMS0_FT_S0_ ( % swift . type * ) { <nl> / / CHECK : call % C11initializer6Person * @ _TFC11initializer6PersoncfMS0_FT_S0_ ( % C11initializer6Person * % 3 ) , ! dbg ! [ [ ALLOCATING_INIT : . * ] ] <nl> <nl> - / / CHECK - DAG : ! [ [ ALLOCATING_INIT ] ] = ! MDLocation ( line : 0 , scope <nl> + / / CHECK - DAG : ! [ [ ALLOCATING_INIT ] ] = ! DILocation ( line : 0 , scope <nl> class Person : Named { <nl> var name : String { get { return " No Name " } } <nl> var age = 0 <nl> mmm a / test / DebugInfo / inlinescopes . swift <nl> ppp b / test / DebugInfo / inlinescopes . swift <nl> <nl> <nl> / / CHECK : define i32 @ main <nl> / / CHECK : tail call { i64 , i1 } @ llvm . smul . with . overflow . i64 ( i64 % [ [ C : . * ] ] , i64 % [ [ C ] ] ) , ! dbg ! [ [ MULSCOPE : . * ] ] <nl> - / / CHECK - DAG : ! [ [ TOPLEVEL : . * ] ] = ! MDFile ( filename : " inlinescopes . swift " <nl> - / / CHECK - DAG : ! [ [ MAIN : . * ] ] = ! MDSubprogram ( name : " main " <nl> - / / CHECK - DAG : ! [ [ INLINED_TOPLEVEL : . * ] ] = ! MDLocation ( line : 0 , scope : ! [ [ MAIN : . * ] ] ) <nl> + / / CHECK - DAG : ! [ [ TOPLEVEL : . * ] ] = ! DIFile ( filename : " inlinescopes . swift " <nl> + / / CHECK - DAG : ! [ [ MAIN : . * ] ] = ! DISubprogram ( name : " main " <nl> + / / CHECK - DAG : ! [ [ INLINED_TOPLEVEL : . * ] ] = ! DILocation ( line : 0 , scope : ! [ [ MAIN : . * ] ] ) <nl> <nl> import FooBar <nl> <nl> func square ( x : Int64 ) - > Int64 { <nl> - / / CHECK - DAG : ! [ [ MULSCOPE ] ] = ! MDLocation ( line : [ [ @ LINE + 2 ] ] , column : { { . * } } , scope : ! [ [ MUL : . * ] ] , inlinedAt : ! [ [ INLINED : . * ] ] ) <nl> - / / CHECK - DAG : ! [ [ MUL : . * ] ] = distinct ! MDLexicalBlock ( <nl> + / / CHECK - DAG : ! [ [ MULSCOPE ] ] = ! DILocation ( line : [ [ @ LINE + 2 ] ] , column : { { . * } } , scope : ! [ [ MUL : . * ] ] , inlinedAt : ! [ [ INLINED : . * ] ] ) <nl> + / / CHECK - DAG : ! [ [ MUL : . * ] ] = distinct ! DILexicalBlock ( <nl> let res = x * x <nl> / / * ( Int , Int ) is a transparent function and should not show up in the debug info . <nl> - / / TRANSPARENT - CHECK - NOT : ! MDSubprogram ( name : " _TFSsoi1mFTSiSi_Si " <nl> + / / TRANSPARENT - CHECK - NOT : ! DISubprogram ( name : " _TFSsoi1mFTSiSi_Si " <nl> return res <nl> } <nl> let c = Int64 ( x ) <nl> - / / CHECK - DAG ! [ [ INLINED ] ] = ! MDLocation ( i32 [ [ @ LINE + 1 ] ] , column : { { . * } } , scope : ! { { . * } } , inlinedAt : ! [ [ INLINED_TOPLEVEL : . * ] ] ) <nl> - / / CHECK - DAG : ! MDGlobalVariable ( name : " y " , { { . * } } file : ! [ [ TOPLEVEL ] ] , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> + / / CHECK - DAG ! [ [ INLINED ] ] = ! DILocation ( i32 [ [ @ LINE + 1 ] ] , column : { { . * } } , scope : ! { { . * } } , inlinedAt : ! [ [ INLINED_TOPLEVEL : . * ] ] ) <nl> + / / CHECK - DAG : ! DIGlobalVariable ( name : " y " , { { . * } } file : ! [ [ TOPLEVEL ] ] , { { . * } } line : [ [ @ LINE + 1 ] ] <nl> let y = square ( c ) <nl> println ( y ) <nl> <nl> / / Check if the inlined and removed square function still has the correct linkage name in the debug info . <nl> - / / CHECK - DAG : ! MDSubprogram ( name : " square " , linkageName : " _TF4main6squareFVSs5Int64S0_ " <nl> + / / CHECK - DAG : ! DISubprogram ( name : " square " , linkageName : " _TF4main6squareFVSs5Int64S0_ " <nl> mmm a / test / DebugInfo / inout . swift <nl> ppp b / test / DebugInfo / inout . swift <nl> typealias MyFloat = Float <nl> / / PROMO - CHECK : define { { . * } } @ _TTSf2d_i___TFF5inout13modifyFooHeapFTRSiSf_T_U_FT_Si <nl> / / PROMO - CHECK : call void @ llvm . dbg . declare ( metadata { { ( i32 | i64 ) } } * % { { . * } } , metadata ! [ [ A1 : [ 0 - 9 ] + ] ] , metadata ! [ [ EMPTY_EXPR : [ 0 - 9 ] + ] ] ) <nl> <nl> - / / PROMO - CHECK - DAG : ! [ [ EMPTY_EXPR ] ] = ! MDExpression ( ) <nl> - / / PROMO - CHECK - DAG : ! [ [ REFINT : . * ] ] = ! MDCompositeType ( tag : DW_TAG_structure_type , name : " _TtRSi " <nl> - / / PROMO - CHECK - DAG : ! [ [ A1 ] ] = ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " a " , { { . * } } type : ! " _TtSi " <nl> - / / PROMO - CHECK - DAG : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " _TtRSi " <nl> + / / PROMO - CHECK - DAG : ! [ [ EMPTY_EXPR ] ] = ! DIExpression ( ) <nl> + / / PROMO - CHECK - DAG : ! [ [ REFINT : . * ] ] = ! DICompositeType ( tag : DW_TAG_structure_type , name : " _TtRSi " <nl> + / / PROMO - CHECK - DAG : ! [ [ A1 ] ] = ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " a " , { { . * } } type : ! " _TtSi " <nl> + / / PROMO - CHECK - DAG : ! DICompositeType ( tag : DW_TAG_structure_type , name : " _TtRSi " <nl> func modifyFooHeap ( inout a : Int , <nl> - / / CHECK - DAG : ! [ [ A ] ] = ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " a " , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! " _TtRSi " <nl> - / / CHECK - DAG : ! [ [ B ] ] = ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " b " , { { . * } } line : [ [ @ LINE + 2 ] ] , { { . * } } type : ! [ [ MYFLOAT : [ 0 - 9 ] + ] ] <nl> - / / CHECK - DAG : ! [ [ MYFLOAT ] ] = ! MDDerivedType ( tag : DW_TAG_typedef , name : " _Tta5inout7MyFloat " , { { . * } } baseType : ! " _TtSf " <nl> + / / CHECK - DAG : ! [ [ A ] ] = ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " a " , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! " _TtRSi " <nl> + / / CHECK - DAG : ! [ [ B ] ] = ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " b " , { { . * } } line : [ [ @ LINE + 2 ] ] , { { . * } } type : ! [ [ MYFLOAT : [ 0 - 9 ] + ] ] <nl> + / / CHECK - DAG : ! [ [ MYFLOAT ] ] = ! DIDerivedType ( tag : DW_TAG_typedef , name : " _Tta5inout7MyFloat " , { { . * } } baseType : ! " _TtSf " <nl> var _ b : MyFloat ) <nl> { <nl> if ( b > 2 . 71 ) { <nl> func modifyFooHeap ( inout a : Int , <nl> / / Inout reference type . <nl> / / FOO - CHECK : define { { . * } } @ _TF5inout9modifyFooFTRSiSf_T_ <nl> / / FOO - CHECK : call void @ llvm . dbg . declare ( metadata % Si * * % { { . * } } , metadata ! [ [ U : [ 0 - 9 ] + ] ] , metadata ! [ [ EMPTY_EXPR : . * ] ] ) <nl> - / / FOO - CHECK - DAG : ! [ [ EMPTY_EXPR ] ] = ! MDExpression ( ) <nl> + / / FOO - CHECK - DAG : ! [ [ EMPTY_EXPR ] ] = ! DIExpression ( ) <nl> func modifyFoo ( inout u : Int , <nl> - / / FOO - CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " v " , { { . * } } line : [ [ @ LINE + 2 ] ] , { { . * } } type : ! [ [ MYFLOAT : [ 0 - 9 ] + ] ] <nl> - / / FOO - CHECK - DAG : [ [ U ] ] = ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " u " , { { . * } } line : [ [ @ LINE - 2 ] ] , { { . * } } type : ! " _TtRSi " <nl> + / / FOO - CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " v " , { { . * } } line : [ [ @ LINE + 2 ] ] , { { . * } } type : ! [ [ MYFLOAT : [ 0 - 9 ] + ] ] <nl> + / / FOO - CHECK - DAG : [ [ U ] ] = ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " u " , { { . * } } line : [ [ @ LINE - 2 ] ] , { { . * } } type : ! " _TtRSi " <nl> var _ v : MyFloat ) <nl> - / / FOO - CHECK - DAG : ! [ [ MYFLOAT ] ] = ! MDDerivedType ( tag : DW_TAG_typedef , name : " _Tta5inout7MyFloat " , { { . * } } baseType : ! " _TtSf " <nl> + / / FOO - CHECK - DAG : ! [ [ MYFLOAT ] ] = ! DIDerivedType ( tag : DW_TAG_typedef , name : " _Tta5inout7MyFloat " , { { . * } } baseType : ! " _TtSf " <nl> { <nl> if ( v > 2 . 71 ) { <nl> u = u - 41 <nl> mmm a / test / DebugInfo / inout2 . swift <nl> ppp b / test / DebugInfo / inout2 . swift <nl> struct Struct { <nl> } <nl> <nl> func foo ( inout x : Class ) { <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " x " , { { . * } } line : [ [ @ LINE - 1 ] ] <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " x " , { { . * } } line : [ [ @ LINE - 1 ] ] <nl> println ( x . ivar ) <nl> x . ivar + + / / Set breakpoint here <nl> } <nl> <nl> func foo ( inout x : Struct ) { <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " x " , { { . * } } line : [ [ @ LINE - 1 ] ] <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " x " , { { . * } } line : [ [ @ LINE - 1 ] ] <nl> println ( x . ivar ) <nl> x . ivar + + / / Set breakpoint here <nl> } <nl> mmm a / test / DebugInfo / iteration . swift <nl> ppp b / test / DebugInfo / iteration . swift <nl> <nl> <nl> var puzzleInput = " great minds think alike " <nl> var puzzleOutput = " " <nl> - / / CHECK - NOT : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " $ letter $ generator " <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " letter " , <nl> + / / CHECK - NOT : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " $ letter $ generator " <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " letter " , <nl> / / CHECK - SAME : line : [ [ @ LINE + 1 ] ] <nl> for letter in puzzleInput { <nl> switch letter { <nl> println ( puzzleOutput ) <nl> <nl> <nl> func count ( ) { <nl> - / / CHECK - NOT : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " $ i $ generator " <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " i " , <nl> + / / CHECK - NOT : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " $ i $ generator " <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " i " , <nl> / / CHECK - SAME : line : [ [ @ LINE + 1 ] ] <nl> for i in 0 . . . 100 { <nl> println ( i ) <nl> mmm a / test / DebugInfo / iuo_arg . swift <nl> ppp b / test / DebugInfo / iuo_arg . swift <nl> class MyClass { <nl> / / Test that image is in an alloca , but not an indirect location . <nl> / / CHECK : store { { ( i32 | i64 ) } } % 0 , { { ( i32 | i64 ) } } * % [ [ ALLOCA : . * ] ] , <nl> / / CHECK : call void @ llvm . dbg . declare ( metadata { { ( i32 | i64 ) } } * % [ [ ALLOCA ] ] , metadata ! [ [ IMAGE : . * ] ] , metadata ! { { [ 0 - 9 ] + } } ) <nl> - / / CHECK : ! [ [ IMAGE ] ] = ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " image " <nl> + / / CHECK : ! [ [ IMAGE ] ] = ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " image " <nl> / / CHECK - NOT : flags : <nl> / / CHECK - SAME : line : [ [ @ LINE - 7 ] ] <nl> / / CHECK - NOT : flags : <nl> mmm a / test / DebugInfo / let . swift <nl> ppp b / test / DebugInfo / let . swift <nl> class DeepThought { <nl> func foo ( ) - > Int { <nl> / / CHECK : call void @ llvm . dbg . declare ( metadata % C3let11DeepThought * * { { . * } } , metadata ! [ [ A : . * ] ] , metadata ! { { [ 0 - 9 ] + } } ) <nl> / / CHECK ! [ [ A ] ] = { { . * } } i32 0 } ; [ DW_TAG_auto_variable ] [ machine ] [ line [ [ @ LINE + 1 ] ] ] <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " machine " <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " machine " <nl> / / CHECK - NOT : flags : <nl> / / CHECK - SAME : line : [ [ @ LINE + 1 ] ] , <nl> let machine = DeepThought ( ) <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " a " <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " a " <nl> / / CHECK - SAME : line : [ [ @ LINE + 1 ] ] , <nl> let a = machine . query ( ) <nl> return a <nl> mmm a / test / DebugInfo / letclause . swift <nl> ppp b / test / DebugInfo / letclause . swift <nl> func peek ( ) - > Symbol ? { return Symbol ( ) } <nl> func foo ( ) { <nl> / / CHECK : define { { . * } } foo <nl> / / CHECK : call void @ llvm . dbg . declare ( metadata % V9letclause6Symbol undef , metadata ! [ [ S : . * ] ] , metadata ! { { [ 0 - 9 ] + } } ) <nl> - / / CHECK : ! [ [ S ] ] = ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " s " <nl> + / / CHECK : ! [ [ S ] ] = ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " s " <nl> / / CHECK - SAME : line : [ [ @ LINE + 1 ] ] , <nl> while let s = peek ( ) { <nl> print ( s ) <nl> mmm a / test / DebugInfo / letstring . swift <nl> ppp b / test / DebugInfo / letstring . swift <nl> class AppDelegate { <nl> / / CHECK - NOT : call void @ llvm . dbg . value ( { { . * } } , metadata ! [ [ SELF ] ] , metadata ! { { [ 0 - 9 ] + } } ) <nl> / / CHECK : call void @ llvm . dbg . declare ( { { . * } } , metadata ! [ [ A : . * ] ] , metadata ! { { [ 0 - 9 ] + } } ) <nl> / / CHECK - NOT : call void @ llvm . dbg . value ( { { . * } } , metadata ! [ [ A ] ] , metadata ! { { [ 0 - 9 ] + } } ) <nl> - / / CHECK - DAG : ! [ [ A ] ] = ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " a " , { { . * } } line : [ [ @ LINE - 4 ] ] , <nl> - / / CHECK - DAG : ! [ [ SELF ] ] = ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " self " , { { . * } } line : [ [ @ LINE - 10 ] ] , <nl> - / / CHECK - DAG : ! [ [ B ] ] = ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " b " , { { . * } } line : [ [ @ LINE + 1 ] ] , <nl> + / / CHECK - DAG : ! [ [ A ] ] = ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " a " , { { . * } } line : [ [ @ LINE - 4 ] ] , <nl> + / / CHECK - DAG : ! [ [ SELF ] ] = ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " self " , { { . * } } line : [ [ @ LINE - 10 ] ] , <nl> + / / CHECK - DAG : ! [ [ B ] ] = ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " b " , { { . * } } line : [ [ @ LINE + 1 ] ] , <nl> var b = " var " <nl> self . window = UIWindow ( ) <nl> return true <nl> mmm a / test / DebugInfo / linetable - cleanups . swift <nl> ppp b / test / DebugInfo / linetable - cleanups . swift <nl> func main ( ) { <nl> / / CHECK : call void { { . * } } elease ( { { . * } } ) { { # [ 0 - 9 ] + } } , ! dbg ! [ [ CLEANUPS : . * ] ] <nl> / / CHECK - NEXT : ! dbg ! [ [ CLEANUPS ] ] <nl> / / CHECK - NEXT : ret void , ! dbg ! [ [ CLEANUPS ] ] <nl> - / / CHECK : ! [ [ CLEANUPS ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> + / / CHECK : ! [ [ CLEANUPS ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> } <nl> main ( ) <nl> mmm a / test / DebugInfo / linetable . swift <nl> ppp b / test / DebugInfo / linetable . swift <nl> func main ( x : Int ) - > Void <nl> / / CHECK : call { { . * } } @ swift_release { { . * } } <nl> / / CHECK : call { { . * } } @ swift_release { { . * } } , ! dbg ! [ [ CLOSURE_END : . * ] ] <nl> / / CHECK - NEXT : ret void , ! dbg ! [ [ CLOSURE_END ] ] <nl> - / / CHECK : ! [ [ CLOSURE_END ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , <nl> + / / CHECK : ! [ [ CLOSURE_END ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , <nl> } <nl> ) <nl> <nl> mmm a / test / DebugInfo / mangling - stdlib . swift <nl> ppp b / test / DebugInfo / mangling - stdlib . swift <nl> <nl> / / RUN : % target - swift - frontend - parse - stdlib % s - emit - ir - g - o - | FileCheck % s <nl> - / / CHECK : ! MDDerivedType ( tag : DW_TAG_typedef , name : " _TtBb " , <nl> + / / CHECK : ! DIDerivedType ( tag : DW_TAG_typedef , name : " _TtBb " , <nl> var bo : Builtin . BridgeObject <nl> mmm a / test / DebugInfo / mangling . swift <nl> ppp b / test / DebugInfo / mangling . swift <nl> <nl> <nl> / / Type : <nl> / / Swift . Dictionary < Swift . Int64 , Swift . String > <nl> - / / CHECK : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " Dictionary " , { { . * } } identifier : [ [ DT : [ ^ , ) ] + ] ] ) <nl> - / / CHECK : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " _TtT4NameSS2IdSi_ " , { { . * } } identifier : [ [ TT1 : [ ^ , ) ] + ] ] ) <nl> - / / CHECK : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " _TtTSS2IdSi_ " , { { . * } } identifier : [ [ TT2 : [ ^ , ) ] + ] ] ) <nl> + / / CHECK : ! DICompositeType ( tag : DW_TAG_structure_type , name : " Dictionary " , { { . * } } identifier : [ [ DT : [ ^ , ) ] + ] ] ) <nl> + / / CHECK : ! DICompositeType ( tag : DW_TAG_structure_type , name : " _TtT4NameSS2IdSi_ " , { { . * } } identifier : [ [ TT1 : [ ^ , ) ] + ] ] ) <nl> + / / CHECK : ! DICompositeType ( tag : DW_TAG_structure_type , name : " _TtTSS2IdSi_ " , { { . * } } identifier : [ [ TT2 : [ ^ , ) ] + ] ] ) <nl> <nl> / / Variable : <nl> / / mangling . myDict : Swift . Dictionary < Swift . Int64 , Swift . String > <nl> - / / CHECK : ! MDGlobalVariable ( name : " myDict " , linkageName : " _Tv8mangling6myDictGVSs10DictionarySiSS_ " , <nl> + / / CHECK : ! DIGlobalVariable ( name : " myDict " , linkageName : " _Tv8mangling6myDictGVSs10DictionarySiSS_ " , <nl> / / CHECK - SAME : line : [ [ @ LINE + 2 ] ] <nl> / / CHECK - SAME : type : ! [ [ DT ] ] <nl> var myDict = Dictionary < Int , String > ( ) <nl> myDict [ 12 ] = " Hello ! " <nl> <nl> / / mangling . myTuple1 : ( Name : Swift . String , Id : Swift . Int64 ) <nl> - / / CHECK : ! MDGlobalVariable ( name : " myTuple1 " , linkageName : " _Tv8mangling8myTuple1T4NameSS2IdSi_ " , <nl> + / / CHECK : ! DIGlobalVariable ( name : " myTuple1 " , linkageName : " _Tv8mangling8myTuple1T4NameSS2IdSi_ " , <nl> / / CHECK - SAME : line : [ [ @ LINE + 2 ] ] <nl> / / CHECK - SAME : type : ! [ [ TT1 ] ] <nl> var myTuple1 : ( Name : String , Id : Int ) = ( " A " , 1 ) <nl> / / mangling . myTuple2 : ( Swift . String , Id : Swift . Int64 ) <nl> - / / CHECK : ! MDGlobalVariable ( name : " myTuple2 " , linkageName : " _Tv8mangling8myTuple2TSS2IdSi_ " , <nl> + / / CHECK : ! DIGlobalVariable ( name : " myTuple2 " , linkageName : " _Tv8mangling8myTuple2TSS2IdSi_ " , <nl> / / CHECK - SAME : line : [ [ @ LINE + 2 ] ] <nl> / / CHECK - SAME : type : ! [ [ TT2 ] ] <nl> var myTuple2 : ( String , Id : Int ) = ( " B " , 2 ) <nl> mmm a / test / DebugInfo / multi - file . swift <nl> ppp b / test / DebugInfo / multi - file . swift <nl> <nl> / / RUN : % target - swift - frontend % S / . . / Inputs / empty . swift - primary - file % s - emit - ir - g - module - name multi | FileCheck % s <nl> / / RUN : % target - swift - frontend - primary - file % S / . . / Inputs / empty . swift % s - emit - ir - g - module - name multi | FileCheck % s - - check - prefix = CHECK - OTHER <nl> / / RUN : % target - swift - frontend % s - primary - file % S / . . / Inputs / empty . swift - emit - ir - g - module - name multi | FileCheck % s - - check - prefix = CHECK - OTHER <nl> - / / CHECK : ! MDCompileUnit ( { { . * } } file : ! [ [ FILE : [ 0 - 9 ] + ] ] <nl> - / / CHECK : ! [ [ FILE ] ] = ! MDFile ( filename : " multi - file . swift " <nl> - / / CHECK - OTHER : ! MDCompileUnit ( { { . * } } file : ! [ [ FILE : [ 0 - 9 ] + ] ] <nl> - / / CHECK - OTHER : ! [ [ FILE ] ] = ! MDFile ( filename : " empty . swift " <nl> + / / CHECK : ! DICompileUnit ( { { . * } } file : ! [ [ FILE : [ 0 - 9 ] + ] ] <nl> + / / CHECK : ! [ [ FILE ] ] = ! DIFile ( filename : " multi - file . swift " <nl> + / / CHECK - OTHER : ! DICompileUnit ( { { . * } } file : ! [ [ FILE : [ 0 - 9 ] + ] ] <nl> + / / CHECK - OTHER : ! [ [ FILE ] ] = ! DIFile ( filename : " empty . swift " <nl> mmm a / test / DebugInfo / nested_functions . swift <nl> ppp b / test / DebugInfo / nested_functions . swift <nl> func outer ( a : Int ) - > Int { <nl> / / Inner functions have a linkage name of " closure [ 0 - 9 ] + " , but <nl> / / their DW_AT_name is preserved . <nl> <nl> - / / CHECK : ! MDSubprogram ( name : " inner " , linkageName : " _TFF16nested_functions5outerFSiSiL_5innerfSiSi " <nl> + / / CHECK : ! DISubprogram ( name : " inner " , linkageName : " _TFF16nested_functions5outerFSiSiL_5innerfSiSi " <nl> / / CHECK - SAME : line : [ [ @ LINE + 1 ] ] <nl> func inner ( b : Int ) - > Int { <nl> return a + b <nl> mmm a / test / DebugInfo / nostorage . swift <nl> ppp b / test / DebugInfo / nostorage . swift <nl> func app ( ) { <nl> var ac : AClass = AnotherClass ( ) <nl> / / No members ? No storage ! Emitted as a constant 0 , because . <nl> / / CHECK : call void @ llvm . dbg . value ( metadata { { . * } } , i64 0 , metadata ! [ [ AT : . * ] ] , metadata ! { { [ 0 - 9 ] + } } ) , ! dbg <nl> - / / CHECK : ! [ [ AT ] ] = ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " at " , <nl> + / / CHECK : ! [ [ AT ] ] = ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " at " , <nl> / / CHECK - SAME : line : [ [ @ LINE + 1 ] ] <nl> var at = AStruct ( ) <nl> println ( " \ ( ac . f ( ) ) \ ( at . f ( ) ) " ) <nl> mmm a / test / DebugInfo / patternmatching . swift <nl> ppp b / test / DebugInfo / patternmatching . swift <nl> func classifyPoint2 ( p : ( Double , Double ) ) { <nl> / / CHECK : call double { { . * } } return_same { { . * } } , ! dbg ! [ [ LOC1 : . * ] ] <nl> / / CHECK : br { { . * } } , label { { . * } } , label { { . * } } , ! dbg ! [ [ LOC2 : . * ] ] <nl> / / CHECK : builtinStringLiteral { { . * } } , ! dbg ! [ [ LOC3 : . * ] ] <nl> - / / CHECK : ! [ [ LOC1 ] ] = ! MDLocation ( line : [ [ @ LINE + 2 ] ] , <nl> - / / CHECK : ! [ [ LOC2 ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , <nl> + / / CHECK : ! [ [ LOC1 ] ] = ! DILocation ( line : [ [ @ LINE + 2 ] ] , <nl> + / / CHECK : ! [ [ LOC2 ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , <nl> return_same ( x ) = = return_same ( y ) : <nl> - / / CHECK : ! [ [ LOC3 ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , <nl> + / / CHECK : ! [ [ LOC3 ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , <nl> println ( " ( \ ( x ) , \ ( y ) ) is on the + diagonal " ) <nl> / / SIL - CHECK : dealloc_stack { { . * } } line : [ [ @ LINE - 1 ] ] : 54 : cleanup <nl> / / Verify that the branch has a location > = the cleanup . <nl> / / SIL - CHECK - NEXT : br { { . * } } line : [ [ @ LINE - 3 ] ] : 54 : cleanup <nl> case ( var x , var y ) where x = = - y : <nl> / / Verify that all variables end up in the appropriate scopes . <nl> - / / CHECK - SCOPES : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " x " , scope : ! [ [ SCOPE1 : [ 0 - 9 ] + ] ] , { { . * } } line : [ [ @ LINE - 2 ] ] <nl> - / / CHECK - SCOPES : ! [ [ SCOPE1 ] ] = distinct ! MDLexicalBlock ( <nl> + / / CHECK - SCOPES : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " x " , scope : ! [ [ SCOPE1 : [ 0 - 9 ] + ] ] , { { . * } } line : [ [ @ LINE - 2 ] ] <nl> + / / CHECK - SCOPES : ! [ [ SCOPE1 ] ] = distinct ! DILexicalBlock ( <nl> println ( " on the - diagonal " ) <nl> case ( var x , var y ) where x > = - 10 & & x < 10 & & y > = - 10 & & y < 10 : <nl> - / / CHECK - SCOPES : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " x " , scope : ! [ [ SCOPE2 : [ 0 - 9 ] + ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] <nl> - / / CHECK - SCOPES : ! [ [ SCOPE2 ] ] = distinct ! MDLexicalBlock ( <nl> + / / CHECK - SCOPES : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " x " , scope : ! [ [ SCOPE2 : [ 0 - 9 ] + ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] <nl> + / / CHECK - SCOPES : ! [ [ SCOPE2 ] ] = distinct ! DILexicalBlock ( <nl> println ( " near the origin " ) <nl> case ( var x , var y ) : <nl> - / / CHECK - SCOPES : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " x " , scope : ! [ [ SCOPE3 : [ 0 - 9 ] + ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] <nl> - / / CHECK - SCOPES : ! [ [ SCOPE3 ] ] = distinct ! MDLexicalBlock ( <nl> + / / CHECK - SCOPES : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " x " , scope : ! [ [ SCOPE3 : [ 0 - 9 ] + ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] <nl> + / / CHECK - SCOPES : ! [ [ SCOPE3 ] ] = distinct ! DILexicalBlock ( <nl> println ( " sqrt ( \ ( x * x + y * y ) ) units from the origin " ) <nl> } <nl> - / / CHECK : ! MDLocation ( line : [ [ @ LINE + 1 ] ] , <nl> + / / CHECK : ! DILocation ( line : [ [ @ LINE + 1 ] ] , <nl> } <nl> mmm a / test / DebugInfo / pcomp . swift <nl> ppp b / test / DebugInfo / pcomp . swift <nl> class SomeOtherClass : SomeClass { <nl> override func f ( ) - > Int { return 1 } <nl> } <nl> / / This is an indirect value . <nl> - / / CHECK - DAG : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " SomeProto " , { { . * } } identifier : " _TtP5pcomp9SomeProto_ " <nl> + / / CHECK - DAG : ! DICompositeType ( tag : DW_TAG_structure_type , name : " SomeProto " , { { . * } } identifier : " _TtP5pcomp9SomeProto_ " <nl> func main ( ) { <nl> var p : SomeProto = SomeOtherClass ( ) <nl> println ( " \ ( p . f ( ) ) " ) <nl> mmm a / test / DebugInfo / protocol . swift <nl> ppp b / test / DebugInfo / protocol . swift <nl> func main ( ) - > Int64 { <nl> } <nl> <nl> / / Self should be artificial . <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " self " , { { . * } } line : 16 <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " self " , { { . * } } line : 16 <nl> / / CHECK - SAME : DIFlagArtificial <nl> <nl> - / / CHECK : ! [ [ LOC ] ] = ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " loc2d " , { { . * } } line : [ [ @ LINE - 10 ] ] <nl> + / / CHECK : ! [ [ LOC ] ] = ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " loc2d " , { { . * } } line : [ [ @ LINE - 10 ] ] <nl> <nl> main ( ) <nl> mmm a / test / DebugInfo / protocolarg . swift <nl> ppp b / test / DebugInfo / protocolarg . swift <nl> <nl> / / RUN : % target - swift - frontend % s - emit - ir - g - o - | FileCheck % s <nl> <nl> / / FIXME : Should be DW_TAG_interface_type <nl> - / / CHECK : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " IGiveOutInts " <nl> + / / CHECK : ! DICompositeType ( tag : DW_TAG_structure_type , name : " IGiveOutInts " <nl> / / CHECK - SAME : identifier : [ [ PT : " [ ^ " ] + " ] ] <nl> protocol IGiveOutInts { <nl> func callMe ( ) - > Int <nl> class AFancierImplementor : IGiveOutInts { <nl> } <nl> <nl> func printSomeNumbers ( var gen : IGiveOutInts ) { <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " gen " , <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " gen " , <nl> / / CHECK - SAME : line : [ [ @ LINE - 2 ] ] <nl> / / CHECK - SAME : type : ! [ [ PT ] ] <nl> var i = 1 <nl> mmm a / test / DebugInfo / return . swift <nl> ppp b / test / DebugInfo / return . swift <nl> public func ifelseexpr ( ) - > Int { <nl> / / CHECK : @ swift_release to void ( % C6return1X * ) * ) ( % C6return1X * [ [ X ] ] ) <nl> / / CHECK : @ swift_release to void ( % C6return1X * ) * ) ( % C6return1X * [ [ X ] ] ) { { . * } } , ! dbg ! [ [ RET : . * ] ] <nl> / / CHECK : ret { { . * } } , ! dbg ! [ [ RET ] ] <nl> - return x . x ; / / CHECK : ! [ [ RET ] ] = ! MDLocation ( line : [ [ @ LINE ] ] , <nl> + return x . x ; / / CHECK : ! [ [ RET ] ] = ! DILocation ( line : [ [ @ LINE ] ] , <nl> } <nl> <nl> mmm a / test / DebugInfo / returnlocation . swift <nl> ppp b / test / DebugInfo / returnlocation . swift <nl> public func none ( inout a : Int ) { <nl> / / CHECK_NONE : ! dbg ! [ [ NONE_INIT : . * ] ] <nl> a - = 2 ; <nl> / / CHECK_NONE : ret { { . * } } , ! dbg ! [ [ NONE_RET : . * ] ] <nl> - / / CHECK_NONE : ! [ [ NONE_INIT ] ] = ! MDLocation ( line : [ [ @ LINE - 2 ] ] , column : <nl> - / / CHECK_NONE : ! [ [ NONE_RET ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> + / / CHECK_NONE : ! [ [ NONE_INIT ] ] = ! DILocation ( line : [ [ @ LINE - 2 ] ] , column : <nl> + / / CHECK_NONE : ! [ [ NONE_RET ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> } <nl> <nl> / / RUN : FileCheck % s - - check - prefix = CHECK_EMPTY < % t . ll <nl> public func none ( inout a : Int ) { <nl> public func empty ( inout a : Int ) { <nl> if a > 24 { <nl> / / CHECK - DAG_EMPTY : br { { . * } } , ! dbg ! [ [ EMPTY_RET1 : . * ] ] <nl> - / / CHECK - DAG_EMPTY_RET1 : ! [ [ EMPTY_RET1 ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 6 , <nl> + / / CHECK - DAG_EMPTY_RET1 : ! [ [ EMPTY_RET1 ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 6 , <nl> return <nl> } <nl> <nl> a - = 2 ; <nl> / / CHECK - DAG_EMPTY : br { { . * } } , ! dbg ! [ [ EMPTY_RET2 : . * ] ] <nl> - / / CHECK - DAG_EMPTY_RET2 : ! [ [ EMPTY_RET ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 3 , <nl> + / / CHECK - DAG_EMPTY_RET2 : ! [ [ EMPTY_RET ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 3 , <nl> return <nl> / / CHECK - DAG_EMPTY : ret { { . * } } , ! dbg ! [ [ EMPTY_RET : . * ] ] <nl> - / / CHECK - DAG_EMPTY : ! [ [ EMPTY_RET ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> + / / CHECK - DAG_EMPTY : ! [ [ EMPTY_RET ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> } <nl> <nl> / / RUN : FileCheck % s - - check - prefix = CHECK_EMPTY_NONE < % t . ll <nl> public func empty_none ( inout a : Int ) { <nl> <nl> a - = 2 ; <nl> / / CHECK_EMPTY_NONE : ret { { . * } } , ! dbg ! [ [ EMPTY_NONE_RET : . * ] ] <nl> - / / CHECK_EMPTY_NONE : ! [ [ EMPTY_NONE_RET ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> + / / CHECK_EMPTY_NONE : ! [ [ EMPTY_NONE_RET ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> } <nl> <nl> / / RUN : FileCheck % s - - check - prefix = CHECK_SIMPLE_RET < % t . ll <nl> public func simple ( a : Int ) - > Int { <nl> } <nl> return 1 <nl> / / CHECK_SIMPLE_RET : ret i { { . * } } , ! dbg ! [ [ SIMPLE_RET : . * ] ] <nl> - / / CHECK_SIMPLE_RET : ! [ [ SIMPLE_RET ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> + / / CHECK_SIMPLE_RET : ! [ [ SIMPLE_RET ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> } <nl> <nl> / / RUN : FileCheck % s - - check - prefix = CHECK_COMPLEX_RET < % t . ll <nl> public func complex ( a : Int ) - > Int { <nl> } <nl> return a / 2 <nl> / / CHECK_COMPLEX_RET : ret i { { . * } } , ! dbg ! [ [ COMPLEX_RET : . * ] ] <nl> - / / CHECK_COMPLEX_RET : ! [ [ COMPLEX_RET ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> + / / CHECK_COMPLEX_RET : ! [ [ COMPLEX_RET ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> } <nl> <nl> / / RUN : FileCheck % s - - check - prefix = CHECK_COMPLEX_SIMPLE < % t . ll <nl> public func complex_simple ( a : Int ) - > Int { <nl> } <nl> return 2 <nl> / / CHECK_COMPLEX_SIMPLE : ret i { { . * } } , ! dbg ! [ [ COMPLEX_SIMPLE_RET : . * ] ] <nl> - / / CHECK_COMPLEX_SIMPLE : ! [ [ COMPLEX_SIMPLE_RET ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> + / / CHECK_COMPLEX_SIMPLE : ! [ [ COMPLEX_SIMPLE_RET ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> } <nl> <nl> / / RUN : FileCheck % s - - check - prefix = CHECK_SIMPLE_COMPLEX < % t . ll <nl> public func simple_complex ( a : Int ) - > Int { <nl> } <nl> return 2 <nl> / / CHECK_SIMPLE_COMPLEX : ret { { . * } } , ! dbg ! [ [ SIMPLE_COMPLEX_RET : . * ] ] <nl> - / / CHECK_SIMPLE_COMPLEX : ! [ [ SIMPLE_COMPLEX_RET ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> + / / CHECK_SIMPLE_COMPLEX : ! [ [ SIMPLE_COMPLEX_RET ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> } <nl> <nl> <nl> public func simple_complex ( a : Int ) - > Int { <nl> public func cleanup_none ( inout a : NSString ) { <nl> a = " empty " <nl> / / CHECK_CLEANUP_NONE : ret void , ! dbg ! [ [ CLEANUP_NONE_RET : . * ] ] <nl> - / / CHECK_CLEANUP_NONE : ! [ [ CLEANUP_NONE_RET ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> + / / CHECK_CLEANUP_NONE : ! [ [ CLEANUP_NONE_RET ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> } <nl> <nl> / / RUN : FileCheck % s - - check - prefix = CHECK_CLEANUP_EMPTY < % t . ll <nl> public func cleanup_empty ( inout a : NSString ) { <nl> a = " empty " <nl> return <nl> / / CHECK_CLEANUP_EMPTY : ret void , ! dbg ! [ [ CLEANUP_EMPTY_RET : . * ] ] <nl> - / / CHECK_CLEANUP_EMPTY : ! [ [ CLEANUP_EMPTY_RET ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> + / / CHECK_CLEANUP_EMPTY : ! [ [ CLEANUP_EMPTY_RET ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> } <nl> <nl> / / RUN : FileCheck % s - - check - prefix = CHECK_CLEANUP_EMPTY_NONE < % t . ll <nl> public func cleanup_empty_none ( inout a : NSString ) { <nl> <nl> a = " empty " <nl> / / CHECK_CLEANUP_EMPTY_NONE : ret { { . * } } , ! dbg ! [ [ CLEANUP_EMPTY_NONE_RET : . * ] ] <nl> - / / CHECK_CLEANUP_EMPTY_NONE : ! [ [ CLEANUP_EMPTY_NONE_RET ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> + / / CHECK_CLEANUP_EMPTY_NONE : ! [ [ CLEANUP_EMPTY_NONE_RET ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> } <nl> <nl> / / RUN : FileCheck % s - - check - prefix = CHECK_CLEANUP_SIMPLE_RET < % t . ll <nl> public func cleanup_simple ( a : NSString ) - > Int { <nl> <nl> return 1 <nl> / / CHECK_CLEANUP_SIMPLE_RET : ret { { . * } } , ! dbg ! [ [ CLEANUP_SIMPLE_RET : . * ] ] <nl> - / / CHECK_CLEANUP_SIMPLE_RET : ! [ [ CLEANUP_SIMPLE_RET ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> + / / CHECK_CLEANUP_SIMPLE_RET : ! [ [ CLEANUP_SIMPLE_RET ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> } <nl> <nl> / / RUN : FileCheck % s - - check - prefix = CHECK_CLEANUP_COMPLEX < % t . ll <nl> public func cleanup_complex ( a : NSString ) - > Int { <nl> <nl> return a . length / 2 <nl> / / CHECK_CLEANUP_COMPLEX : ret i { { . * } } , ! dbg ! [ [ CLEANUP_COMPLEX_RET : . * ] ] <nl> - / / CHECK_CLEANUP_COMPLEX : ! [ [ CLEANUP_COMPLEX_RET ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> + / / CHECK_CLEANUP_COMPLEX : ! [ [ CLEANUP_COMPLEX_RET ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> } <nl> <nl> / / RUN : FileCheck % s - - check - prefix = CHECK_CLEANUP_COMPLEX_SIMPLE < % t . ll <nl> public func cleanup_complex_simple ( a : NSString ) - > Int { <nl> <nl> return 2 <nl> / / CHECK_CLEANUP_COMPLEX_SIMPLE : ret { { . * } } , ! dbg ! [ [ CLEANUP_COMPLEX_SIMPLE_RET : . * ] ] <nl> - / / CHECK_CLEANUP_COMPLEX_SIMPLE : ! [ [ CLEANUP_COMPLEX_SIMPLE_RET ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> + / / CHECK_CLEANUP_COMPLEX_SIMPLE : ! [ [ CLEANUP_COMPLEX_SIMPLE_RET ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> } <nl> <nl> / / RUN : FileCheck % s - - check - prefix = CHECK_CLEANUP_SIMPLE_COMPLEX < % t . ll <nl> public func cleanup_simple_complex ( a : NSString ) - > Int { <nl> } <nl> return 2 <nl> / / CHECK_CLEANUP_SIMPLE_COMPLEX : ret { { . * } } , ! dbg ! [ [ CLEANUP_SIMPLE_COMPLEX_RET : . * ] ] <nl> - / / CHECK_CLEANUP_SIMPLE_COMPLEX : ! [ [ CLEANUP_SIMPLE_COMPLEX_RET ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> + / / CHECK_CLEANUP_SIMPLE_COMPLEX : ! [ [ CLEANUP_SIMPLE_COMPLEX_RET ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 1 , <nl> } <nl> <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> mmm a / test / DebugInfo / scopes . swift <nl> ppp b / test / DebugInfo / scopes . swift <nl> class AppDelegate { <nl> var window : UIWindow ? <nl> <nl> func application ( ) - > Bool { <nl> - / / CHECK - DAG : ! MDLexicalBlock ( { { . * } } line : [ [ @ LINE + 1 ] ] , column : 13 <nl> + / / CHECK - DAG : ! DILexicalBlock ( { { . * } } line : [ [ @ LINE + 1 ] ] , column : 13 <nl> if true { <nl> / / Verify that all debug line table entries for the expression <nl> / / below are in the same scope . <nl> / / <nl> - / / CHECK - DAG : ! { { . * } } = ! MDLocation ( line : [ [ @ LINE + 2 ] ] , column : 46 , scope : ! [ [ S : . * ] ] ) <nl> - / / CHECK - DAG : ! { { . * } } = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 11 , scope : ! [ [ S ] ] ) <nl> + / / CHECK - DAG : ! { { . * } } = ! DILocation ( line : [ [ @ LINE + 2 ] ] , column : 46 , scope : ! [ [ S : . * ] ] ) <nl> + / / CHECK - DAG : ! { { . * } } = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 11 , scope : ! [ [ S ] ] ) <nl> let splitViewController = self . window ! . rootViewController as ! UISplitViewController <nl> } <nl> return true <nl> mmm a / test / DebugInfo / sdk . swift <nl> ppp b / test / DebugInfo / sdk . swift <nl> <nl> / / Check that the sdk and resource dirs end up in the debug info . <nl> / / RUN : % target - swiftc_driver % s - emit - ir - g - o - | FileCheck % s <nl> / / RUN : % target - swiftc_driver % s - emit - ir - sdk " / Weird Location / SDK " - g - o - | FileCheck - - check - prefix CHECK - EXPLICIT % s <nl> - / / CHECK : ! MDCompileUnit ( { { . * } } producer : " { { ( Apple ) ? Swift version [ ^ " ] + } } " <nl> + / / CHECK : ! DICompileUnit ( { { . * } } producer : " { { ( Apple ) ? Swift version [ ^ " ] + } } " <nl> / / CHECK - SAME : flags : " <nl> / / CHECK - NOT : " <nl> / / CHECK - SAME : - resource - dir <nl> - / / CHECK - EXPLICIT : ! MDCompileUnit ( { { . * } } producer : " { { ( Apple ) ? Swift version [ ^ " ] + } } " <nl> + / / CHECK - EXPLICIT : ! DICompileUnit ( { { . * } } producer : " { { ( Apple ) ? Swift version [ ^ " ] + } } " <nl> / / CHECK - EXPLICIT - SAME : flags : " <nl> / / CHECK - EXPLICIT - NOT : " <nl> / / CHECK - EXPLICIT - SAME : - sdk \ 22 / Weird Location / SDK \ 22 <nl> mmm a / test / DebugInfo / self . swift <nl> ppp b / test / DebugInfo / self . swift <nl> public func f ( ) { <nl> / / CHECK - NEXT : entry : <nl> / / CHECK - NEXT : % [ [ ALLOCA : . * ] ] = alloca % V4self11stuffStruct , align { { ( 4 | 8 ) } } <nl> / / CHECK : call void @ llvm . dbg . declare ( metadata % V4self11stuffStruct * % [ [ ALLOCA ] ] , metadata ! [ [ SELF : . * ] ] , metadata ! { { [ 0 - 9 ] + } } ) , ! dbg <nl> - / / CHECK : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " stuffStruct " , <nl> + / / CHECK : ! DICompositeType ( tag : DW_TAG_structure_type , name : " stuffStruct " , <nl> / / CHECK - SAME : identifier : [ [ STUFFSTRUCT : " [ ^ " ] + " ] ] <nl> - / / CHECK : ! [ [ SELF ] ] = ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " self " , { { . * } } type : ! [ [ STUFFSTRUCT ] ] <nl> + / / CHECK : ! [ [ SELF ] ] = ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " self " , { { . * } } type : ! [ [ STUFFSTRUCT ] ] <nl> <nl> mmm a / test / DebugInfo / simple . sil <nl> ppp b / test / DebugInfo / simple . sil <nl> bb0 ( % 0 : $ Int32 ) : <nl> cond_fail % 8 : $ Builtin . Int1 / / id : % 9 <nl> % 10 = struct $ Int32 ( % 7 : $ Builtin . Int32 ) / / user : % 11 <nl> / / CHECK : ret i32 % { { . * } } , ! dbg ! [ [ LOC : . * ] ] <nl> - / / CHECK : ! [ [ LOC ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , <nl> + / / CHECK : ! [ [ LOC ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , <nl> return % 10 : $ Int32 / / id : % 11 <nl> } <nl> <nl> mmm a / test / DebugInfo / structs . swift <nl> ppp b / test / DebugInfo / structs . swift <nl> func test ( var x : A ) { } <nl> / / CHECK : define hidden void @ _TF7structs4test <nl> / / CHECK : [ [ X : % . * ] ] = alloca [ [ A : % . * ] ] , align { { ( 4 | 8 ) } } <nl> / / CHECK - NEXT : call void @ llvm . dbg . declare ( metadata [ [ A ] ] * [ [ X ] ] , metadata [ [ X_DBG : ! . * ] ] , metadata ! { { [ 0 - 9 ] + } } ) <nl> - / / CHECK : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " A " <nl> + / / CHECK : ! DICompositeType ( tag : DW_TAG_structure_type , name : " A " <nl> / / CHECK - SAME : identifier : [ [ A_DI : " [ ^ " ] + " ] ] <nl> - / / CHECK : [ [ X_DBG ] ] = ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " x " , <nl> + / / CHECK : [ [ X_DBG ] ] = ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " x " , <nl> / / CHECK - SAME : type : ! [ [ A_DI ] ] <nl> mmm a / test / DebugInfo / test - foundation . swift <nl> ppp b / test / DebugInfo / test - foundation . swift <nl> <nl> <nl> / / Sanity check for the regex above . <nl> / / SANITY : { { ^ * ret } } <nl> - / / SANITY : ! MDCompileUnit ( <nl> + / / SANITY : ! DICompileUnit ( <nl> <nl> / / CHECK - HIDDEN : @ [ [ HIDDEN_GV : _TWVVSC . * ] ] = linkonce_odr hidden <nl> - / / CHECK - HIDDEN - NOT : ! MDGlobalVariable ( { { . * } } [ [ HIDDEN_GV ] ] <nl> + / / CHECK - HIDDEN - NOT : ! DIGlobalVariable ( { { . * } } [ [ HIDDEN_GV ] ] <nl> <nl> import ObjectiveC <nl> import Foundation <nl> class MyObject : NSObject { <nl> / / IMPORT - CHECK : % Si = type < { i [ [ PTRSIZE : [ 0 - 9 ] + ] ] } > <nl> / / IMPORT - CHECK : filename : " test - foundation . swift " <nl> / / IMPORT - CHECK : ! MDModule ( name : " ObjectiveC " <nl> - / / IMPORT - CHECK : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " NSArray " , scope : ! [ [ FOUNDATION : [ 0 - 9 ] + ] ] <nl> + / / IMPORT - CHECK : ! DICompositeType ( tag : DW_TAG_structure_type , name : " NSArray " , scope : ! [ [ FOUNDATION : [ 0 - 9 ] + ] ] <nl> / / IMPORT - CHECK - SAME : identifier : [ [ NSARRAY : " [ ^ " ] + " ] ] <nl> / / IMPORT - CHECK : [ [ FOUNDATION ] ] = ! MDModule ( name : " Foundation " , { { . * } } file : ! [ [ FOUNDATION_FILE : [ 0 - 9 ] + ] ] <nl> - / / IMPORT - CHECK : ! [ [ FOUNDATION_FILE ] ] = ! MDFile ( filename : " Foundation - { { . * } } . pcm " <nl> - / / IMPORT - CHECK : ! MDDerivedType ( tag : DW_TAG_member , name : " MyArr " , <nl> + / / IMPORT - CHECK : ! [ [ FOUNDATION_FILE ] ] = ! DIFile ( filename : " Foundation - { { . * } } . pcm " <nl> + / / IMPORT - CHECK : ! DIDerivedType ( tag : DW_TAG_member , name : " MyArr " , <nl> / / IMPORT - CHECK - NOT : line : <nl> / / IMPORT - CHECK - SAME : baseType : ! [ [ NSARRAY ] ] <nl> / / IMPORT - CHECK - SAME : size : [ [ PTRSIZE ] ] , align : [ [ PTRSIZE ] ] <nl> / / IMPORT - CHECK - NOT : offset : 0 <nl> / / IMPORT - CHECK - SAME : ) { { $ } } <nl> - / / IMPORT - CHECK : ! MDImportedEntity ( tag : DW_TAG_imported_module , { { . * } } entity : ! [ [ FOUNDATION ] ] <nl> + / / IMPORT - CHECK : ! DIImportedEntity ( tag : DW_TAG_imported_module , { { . * } } entity : ! [ [ FOUNDATION ] ] <nl> <nl> <nl> / / Force the use of Int . <nl> class MyObject : NSObject { <nl> } <nl> <nl> / / FIXME ( LLVM - branch ) : The [ local ] attribute means ObjectiveC - CC . <nl> - / / SANITY - DAG : ! MDSubprogram ( name : " blah " , { { . * } } line : [ [ @ LINE + 2 ] ] , { { . * } } isDefinition : true <nl> + / / SANITY - DAG : ! DISubprogram ( name : " blah " , { { . * } } line : [ [ @ LINE + 2 ] ] , { { . * } } isDefinition : true <nl> extension MyObject { <nl> func blah ( ) { <nl> println ( " blah blah blah " ) <nl> } <nl> } <nl> <nl> - / / SANITY - DAG : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " NSObject " , { { . * } } identifier : " _TtCSo8NSObject " <nl> - / / SANITY - DAG : ! MDGlobalVariable ( name : " NsObj " , { { . * } } line : [ [ @ LINE + 1 ] ] , { { . * } } type : ! " _TtCSo8NSObject " , { { . * } } isDefinition : true <nl> + / / SANITY - DAG : ! DICompositeType ( tag : DW_TAG_structure_type , name : " NSObject " , { { . * } } identifier : " _TtCSo8NSObject " <nl> + / / SANITY - DAG : ! DIGlobalVariable ( name : " NsObj " , { { . * } } line : [ [ @ LINE + 1 ] ] , { { . * } } type : ! " _TtCSo8NSObject " , { { . * } } isDefinition : true <nl> var NsObj : NSObject <nl> NsObj = MyObject ( ) <nl> var MyObj : MyObject <nl> public func date ( ) { <nl> d2 . dateFormat = " mm dd yyyy " / / LOC - CHECK : call { { . * } } objc_msgSend { { . * } } , ! dbg ! [ [ L4 ] ] <nl> } <nl> <nl> - / / LOC - CHECK : ! [ [ THUNK : . * ] ] = ! MDSubprogram ( { { . * } } linkageName : " _TToFC4main8MyObjectg5MyArrCSo7NSArray " <nl> + / / LOC - CHECK : ! [ [ THUNK : . * ] ] = ! DISubprogram ( { { . * } } linkageName : " _TToFC4main8MyObjectg5MyArrCSo7NSArray " <nl> / / LOC - CHECK - NOT : line : <nl> / / LOC - CHECK - SAME : isDefinition : true <nl> - / / LOC - CHECK : ! [ [ DBG ] ] = ! MDLocation ( line : 0 , scope : ! [ [ THUNK ] ] ) <nl> + / / LOC - CHECK : ! [ [ DBG ] ] = ! DILocation ( line : 0 , scope : ! [ [ THUNK ] ] ) <nl> <nl> / / These debug locations should all be in ordered by increasing line number . <nl> / / LOC - CHECK : ! [ [ L1 ] ] = <nl> mmm a / test / DebugInfo / test_ints . swift <nl> ppp b / test / DebugInfo / test_ints . swift <nl> <nl> / / RUN : % target - swift - frontend % s - emit - ir - g - o - | FileCheck % s <nl> <nl> / / These two should not have the same type . <nl> - / / CHECK : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " Int64 " <nl> + / / CHECK : ! DICompositeType ( tag : DW_TAG_structure_type , name : " Int64 " <nl> / / CHECK - SAME : size : 64 , align : 64 <nl> / / CHECK - NOT : offset : 0 <nl> / / CHECK - NOT : DIFlagFwdDecl <nl> / / CHECK - SAME : identifier : " _TtVSs5Int64 " <nl> - / / CHECK : ! MDGlobalVariable ( name : " a " , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> + / / CHECK : ! DIGlobalVariable ( name : " a " , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> / / CHECK - SAME : type : ! " _TtVSs5Int64 " <nl> var a : Int64 = 2 <nl> <nl> - / / CHECK : ! MDGlobalVariable ( name : " b " , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> + / / CHECK : ! DIGlobalVariable ( name : " b " , { { . * } } line : [ [ @ LINE + 2 ] ] <nl> / / CHECK - SAME : type : ! " _TtSi " <nl> var b = 2 <nl> <nl> mmm a / test / DebugInfo / thunks . swift <nl> ppp b / test / DebugInfo / thunks . swift <nl> let i = foo . foo ( - , x : y ) <nl> / / CHECK : define { { . * } } @ _TTRXFdCb_dSi_dSi_XFo_dSi_dSi_ <nl> / / CHECK - NOT : ret <nl> / / CHECK : call { { . * } } , ! dbg ! [ [ LOC : . * ] ] <nl> - / / CHECK : ! [ [ THUNK : . * ] ] = ! MDSubprogram ( name : " _TTRXFdCb_dSi_dSi_XFo_dSi_dSi_ " <nl> + / / CHECK : ! [ [ THUNK : . * ] ] = ! DISubprogram ( name : " _TTRXFdCb_dSi_dSi_XFo_dSi_dSi_ " <nl> / / CHECK - NOT : line : <nl> / / CHECK - SAME : ) { { $ } } <nl> - / / CHECK : ! [ [ LOC ] ] = ! MDLocation ( line : 0 , scope : ! [ [ THUNK ] ] ) <nl> + / / CHECK : ! [ [ LOC ] ] = ! DILocation ( line : 0 , scope : ! [ [ THUNK ] ] ) <nl> <nl> / / SIL - CHECK : sil shared { { . * } } @ _TTRXFo_dSi_dSi_XFdCb_dSi_dSi_ <nl> / / SIL - CHECK - NOT : return <nl> mmm a / test / DebugInfo / top_level_var . swift <nl> ppp b / test / DebugInfo / top_level_var . swift <nl> var a = 1 <nl> println ( a ) <nl> / / Verify that global variables are emitted once in main , once as <nl> / / global variable . <nl> - / / CHECK : ! [ [ MAIN : . * ] ] = ! MDSubprogram ( name : " main " , { { . * } } line : 1 <nl> + / / CHECK : ! [ [ MAIN : . * ] ] = ! DISubprogram ( name : " main " , { { . * } } line : 1 <nl> / / CHECK : ! [ [ MOD : . * ] ] = ! MDModule ( name : " top_level_var " <nl> - / / CHECK : ! MDGlobalVariable ( name : " a " , <nl> + / / CHECK : ! DIGlobalVariable ( name : " a " , <nl> / / CHECK - SAME : scope : ! [ [ MOD ] ] <nl> / / CHECK - SAME : isDefinition : true <nl> mmm a / test / DebugInfo / trap - optimized . swift <nl> ppp b / test / DebugInfo / trap - optimized . swift <nl> <nl> / / CHECK - LABEL : define { { . * } } 2fn <nl> func fn ( ) { <nl> println ( " two " ) <nl> - / / CHECK - DAG : ! [ [ LOC : . * ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 13 , <nl> + / / CHECK - DAG : ! [ [ LOC : . * ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 13 , <nl> println ( 0 - UInt ( Process . arguments . count ) ) <nl> - / / CHECK - DAG : ! [ [ LOC2 : . * ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , column : 13 , <nl> + / / CHECK - DAG : ! [ [ LOC2 : . * ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , column : 13 , <nl> println ( 1 - UInt ( Process . arguments . count ) ) <nl> println ( " three " ) <nl> } <nl> mmm a / test / DebugInfo / trap . swift <nl> ppp b / test / DebugInfo / trap . swift <nl> import Swift <nl> func f ( x : Int ) - > Int { <nl> if x < 23 { <nl> / / CHECK - DAG : call void @ llvm . trap ( ) , ! dbg ! [ [ LOC1 : . * ] ] <nl> - / / CHECK - DAG : ! [ [ LOC1 ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , <nl> + / / CHECK - DAG : ! [ [ LOC1 ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , <nl> Builtin . int_trap ( ) <nl> } <nl> if x > 42 { <nl> - / / CHECK - DAG : ! [ [ LOC2 : . * ] ] = ! MDLocation ( line : [ [ @ LINE + 1 ] ] , <nl> + / / CHECK - DAG : ! [ [ LOC2 : . * ] ] = ! DILocation ( line : [ [ @ LINE + 1 ] ] , <nl> Builtin . int_trap ( ) <nl> / / CHECK - DAG : call void @ llvm . trap ( ) , ! dbg ! [ [ LOC2 ] ] <nl> } <nl> mmm a / test / DebugInfo / tuple . swift <nl> ppp b / test / DebugInfo / tuple . swift <nl> <nl> / / RUN : % target - swift - frontend - primary - file % s - emit - ir - g - o - | FileCheck % s <nl> / / Don ' t emit a line number for tuple types . They are unnamed <nl> / / and have no declaration , so the line number is nonsensical . <nl> - / / CHECK : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " _TtTSiSf_ " <nl> + / / CHECK : ! DICompositeType ( tag : DW_TAG_structure_type , name : " _TtTSiSf_ " <nl> let tuple : ( Int , Float ) = ( 1 , 2 . 89 ) <nl> mmm a / test / DebugInfo / typealias . swift <nl> ppp b / test / DebugInfo / typealias . swift <nl> <nl> <nl> class DWARF <nl> { <nl> - / / CHECK - DAG : ! [ [ DIEOFFSET : . * ] ] = ! MDDerivedType ( tag : DW_TAG_typedef , name : " _TtaC9typealias5DWARF9DIEOffset " , { { . * } } line : [ [ @ LINE + 1 ] ] , baseType : ! " _TtVSs6UInt32 " ) <nl> + / / CHECK - DAG : ! [ [ DIEOFFSET : . * ] ] = ! DIDerivedType ( tag : DW_TAG_typedef , name : " _TtaC9typealias5DWARF9DIEOffset " , { { . * } } line : [ [ @ LINE + 1 ] ] , baseType : ! " _TtVSs6UInt32 " ) <nl> typealias DIEOffset = UInt32 <nl> } <nl> <nl> func main ( ) { <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " a " , { { . * } } type : ! [ [ DIEOFFSET ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " a " , { { . * } } type : ! [ [ DIEOFFSET ] ] <nl> var a : DWARF . DIEOffset = 123 <nl> println ( " a is \ ( a ) " ) <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " b " , { { . * } } type : ! [ [ DIEOFFSET ] ] <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " b " , { { . * } } type : ! [ [ DIEOFFSET ] ] <nl> var b = DWARF . DIEOffset ( 456 ) as DWARF . DIEOffset <nl> println ( " b is \ ( b ) " ) <nl> } <nl> mmm a / test / DebugInfo / typearg . swift <nl> ppp b / test / DebugInfo / typearg . swift <nl> class AClass : AProtocol { <nl> <nl> / / CHECK : define hidden void @ { { . * } } aFunction <nl> / / CHECK : call void @ llvm . dbg . declare ( metadata % swift . type * * % { { . * } } , metadata ! [ [ TYPEARG : . * ] ] , metadata ! { { [ 0 - 9 ] + } } ) , <nl> - / / CHECK : ! [ [ VOIDPTR : [ 0 - 9 ] + ] ] = ! MDDerivedType ( tag : DW_TAG_pointer_type , name : " _TtBp " , baseType : null <nl> - / / CHECK : ! [ [ TYPEARG ] ] = ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " $ swift . type . T " <nl> + / / CHECK : ! [ [ VOIDPTR : [ 0 - 9 ] + ] ] = ! DIDerivedType ( tag : DW_TAG_pointer_type , name : " _TtBp " , baseType : null <nl> + / / CHECK : ! [ [ TYPEARG ] ] = ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " $ swift . type . T " <nl> / / CHECK - SAME : type : ! [ [ SWIFTMETATYPE : [ ^ , ) ] + ] ] <nl> / / CHECK - SAME : flags : DIFlagArtificial <nl> - / / CHECK : ! [ [ SWIFTMETATYPE ] ] = ! MDDerivedType ( tag : DW_TAG_typedef , name : " $ swift . type " , <nl> + / / CHECK : ! [ [ SWIFTMETATYPE ] ] = ! DIDerivedType ( tag : DW_TAG_typedef , name : " $ swift . type " , <nl> / / CHECK - SAME : baseType : ! [ [ VOIDPTR ] ] <nl> func aFunction < T : AProtocol > ( x : T ) { <nl> println ( " I am in aFunction : \ ( x . f ( ) ) " ) <nl> class Foo < Bar > { <nl> } <nl> <nl> func two < Baz > ( x : Baz ) { <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " $ swift . type . Bar " <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " $ swift . type . Baz " <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " $ swift . type . Bar " <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " $ swift . type . Baz " <nl> } <nl> } <nl> <nl> mmm a / test / DebugInfo / unowned - capture . swift <nl> ppp b / test / DebugInfo / unowned - capture . swift <nl> class Foo <nl> / / Verify that we only emit the implicit argument , <nl> / / and not the unowned local copy of self . <nl> / / <nl> - / / CHECK - NOT : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " self " <nl> - / / CHECK : ! MDLocalVariable ( tag : DW_TAG_arg_variable , name : " self " <nl> - / / CHECK - NOT : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " self " <nl> + / / CHECK - NOT : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " self " <nl> + / / CHECK : ! DILocalVariable ( tag : DW_TAG_arg_variable , name : " self " <nl> + / / CHECK - NOT : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " self " <nl> return { [ unowned self ] in <nl> var tmp_string = a_string <nl> return tmp_string <nl> mmm a / test / DebugInfo / variables . swift <nl> ppp b / test / DebugInfo / variables . swift <nl> <nl> <nl> / / Global variables . <nl> var glob_i8 : Int8 = 8 ; <nl> - / / CHECK - DAG : ! MDGlobalVariable ( name : " glob_i8 " , { { . * } } scope : ! [ [ TLC ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! [ [ I8 : [ ^ , ] + ] ] <nl> + / / CHECK - DAG : ! DIGlobalVariable ( name : " glob_i8 " , { { . * } } scope : ! [ [ TLC ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! [ [ I8 : [ ^ , ] + ] ] <nl> var glob_i16 : Int16 = 16 ; <nl> - / / CHECK - DAG : ! MDGlobalVariable ( name : " glob_i16 " , { { . * } } scope : ! [ [ TLC ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! [ [ I16 : [ ^ , ] + ] ] <nl> + / / CHECK - DAG : ! DIGlobalVariable ( name : " glob_i16 " , { { . * } } scope : ! [ [ TLC ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! [ [ I16 : [ ^ , ] + ] ] <nl> var glob_i32 : Int32 = 32 ; <nl> - / / CHECK - DAG : ! MDGlobalVariable ( name : " glob_i32 " , { { . * } } scope : ! [ [ TLC ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! [ [ I32 : [ ^ , ] + ] ] <nl> + / / CHECK - DAG : ! DIGlobalVariable ( name : " glob_i32 " , { { . * } } scope : ! [ [ TLC ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! [ [ I32 : [ ^ , ] + ] ] <nl> var glob_i64 : Int64 = 64 ; <nl> - / / CHECK - DAG : ! MDGlobalVariable ( name : " glob_i64 " , { { . * } } scope : ! [ [ TLC ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! [ [ I64 : [ ^ , ] + ] ] <nl> + / / CHECK - DAG : ! DIGlobalVariable ( name : " glob_i64 " , { { . * } } scope : ! [ [ TLC ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! [ [ I64 : [ ^ , ] + ] ] <nl> var glob_f : Float = 2 . 89 ; <nl> - / / CHECK - DAG : ! MDGlobalVariable ( name : " glob_f " , { { . * } } scope : ! [ [ TLC ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! [ [ F : [ ^ , ] + ] ] <nl> + / / CHECK - DAG : ! DIGlobalVariable ( name : " glob_f " , { { . * } } scope : ! [ [ TLC ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! [ [ F : [ ^ , ] + ] ] <nl> var glob_d : Double = 3 . 14 ; <nl> - / / CHECK - DAG : ! MDGlobalVariable ( name : " glob_d " , { { . * } } scope : ! [ [ TLC ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! [ [ D : [ ^ , ] + ] ] <nl> + / / CHECK - DAG : ! DIGlobalVariable ( name : " glob_d " , { { . * } } scope : ! [ [ TLC ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! [ [ D : [ ^ , ] + ] ] <nl> var glob_b : Bool = true <nl> - / / CHECK - DAG : ! MDGlobalVariable ( name : " glob_b " , { { . * } } scope : ! [ [ TLC ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! [ [ B : [ ^ , ] + ] ] <nl> + / / CHECK - DAG : ! DIGlobalVariable ( name : " glob_b " , { { . * } } scope : ! [ [ TLC ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! [ [ B : [ ^ , ] + ] ] <nl> var glob_s : String = " 😄 " <nl> - / / CHECK - DAG : ! MDGlobalVariable ( name : " glob_s " , { { . * } } scope : ! [ [ TLC ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! [ [ S : [ ^ , ] + ] ] <nl> + / / CHECK - DAG : ! DIGlobalVariable ( name : " glob_s " , { { . * } } scope : ! [ [ TLC ] ] , { { . * } } line : [ [ @ LINE - 1 ] ] , { { . * } } type : ! [ [ S : [ ^ , ] + ] ] <nl> / / FIXME : Dreadful type - checker performance prevents this from being this single <nl> / / print expression : <nl> / / print ( " \ ( glob_v ) , \ ( glob_i8 ) , \ ( glob_i16 ) , \ ( glob_i32 ) , \ ( glob_i64 ) , \ ( glob_f ) , \ ( glob_d ) , \ ( glob_b ) , \ ( glob_s ) " ) <nl> var unused : Int32 = - 1 <nl> / / Stack variables . <nl> func foo ( dt : Float ) - > Float { <nl> / / CHECK - DAG : call void @ llvm . dbg . declare <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " f " <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " f " <nl> var f : Float = 9 . 78 ; <nl> - / / CHECK - DAG : ! MDLocalVariable ( tag : DW_TAG_auto_variable , name : " r " <nl> + / / CHECK - DAG : ! DILocalVariable ( tag : DW_TAG_auto_variable , name : " r " <nl> var r : Float = f * dt ; <nl> return r ; <nl> } <nl> var g = foo ( 1 . 0 ) ; <nl> <nl> / / Tuple types . <nl> var tuple : ( Int , Bool ) = ( 1 , true ) <nl> - / / CHECK - DAG : ! MDGlobalVariable ( name : " tuple " , linkageName : " _Tv { { 9variables | 4main } } 5tupleTSiSb_ " , { { . * } } type : ! [ [ TUPTY : [ ^ , ) ] + ] ] <nl> - / / CHECK - DAG : ! MDCompositeType ( tag : DW_TAG_structure_type , { { . * } } elements : ! [ [ ELEMS : [ 0 - 9 ] + ] ] , { { . * } } identifier : [ [ TUPTY ] ] <nl> + / / CHECK - DAG : ! DIGlobalVariable ( name : " tuple " , linkageName : " _Tv { { 9variables | 4main } } 5tupleTSiSb_ " , { { . * } } type : ! [ [ TUPTY : [ ^ , ) ] + ] ] <nl> + / / CHECK - DAG : ! DICompositeType ( tag : DW_TAG_structure_type , { { . * } } elements : ! [ [ ELEMS : [ 0 - 9 ] + ] ] , { { . * } } identifier : [ [ TUPTY ] ] <nl> / / CHECK - DAG : ! [ [ ELEMS ] ] = ! { ! [ [ MI64 : [ 0 - 9 ] + ] ] , ! [ [ MB : [ 0 - 9 ] + ] ] } <nl> - / / CHECK - DAG : ! [ [ MI64 ] ] = ! MDDerivedType ( tag : DW_TAG_member , { { . * } } baseType : ! " _TtSi " <nl> - / / CHECK - DAG : ! [ [ MB ] ] = ! MDDerivedType ( tag : DW_TAG_member , { { . * } } baseType : ! [ [ B ] ] <nl> + / / CHECK - DAG : ! [ [ MI64 ] ] = ! DIDerivedType ( tag : DW_TAG_member , { { . * } } baseType : ! " _TtSi " <nl> + / / CHECK - DAG : ! [ [ MB ] ] = ! DIDerivedType ( tag : DW_TAG_member , { { . * } } baseType : ! [ [ B ] ] <nl> func println ( p : ( i : Int , b : Bool ) ) { <nl> println ( " \ ( p . i ) - > \ ( p . b ) " ) <nl> } <nl> func println ( p : ( i : Int , b : Bool ) ) { <nl> println ( tuple ) <nl> <nl> / / Arrays are represented as an instantiation of Array . <nl> - / / CHECK - DAG : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " Array " , { { . * } } identifier : [ [ Array : " [ ^ " ] + " ] ] <nl> - / / CHECK - DAG : ! MDGlobalVariable ( name : " array_of_tuples " , { { . * } } type : ! [ [ Array ] ] <nl> + / / CHECK - DAG : ! DICompositeType ( tag : DW_TAG_structure_type , name : " Array " , { { . * } } identifier : [ [ Array : " [ ^ " ] + " ] ] <nl> + / / CHECK - DAG : ! DIGlobalVariable ( name : " array_of_tuples " , { { . * } } type : ! [ [ Array ] ] <nl> var array_of_tuples : [ ( a : Int , b : Int ) ] = [ ( 1 , 2 ) ] <nl> var twod : [ [ Int ] ] = [ [ 1 ] ] <nl> <nl> func bar ( x : [ ( a : Int , b : Int ) ] , y : [ [ Int ] ] ) { <nl> } <nl> <nl> <nl> - / / CHECK - DAG : ! MDGlobalVariable ( name : " P " , { { . * } } type : ! [ [ PTY : [ 0 - 9 ] + ] ] <nl> - / / CHECK - DAG : ! MDCompositeType ( tag : DW_TAG_structure_type , name : " _TtT1xSd1ySd1zSd_ " , { { . * } } identifier : [ [ PTUP : [ ^ , ) ] + ] ] <nl> - / / CHECK - DAG : ! [ [ PTY ] ] = ! MDDerivedType ( tag : DW_TAG_typedef , name : " _Tta { { 9variables | 4main } } 5Point " , { { . * } } baseType : ! [ [ PTUP ] ] <nl> + / / CHECK - DAG : ! DIGlobalVariable ( name : " P " , { { . * } } type : ! [ [ PTY : [ 0 - 9 ] + ] ] <nl> + / / CHECK - DAG : ! DICompositeType ( tag : DW_TAG_structure_type , name : " _TtT1xSd1ySd1zSd_ " , { { . * } } identifier : [ [ PTUP : [ ^ , ) ] + ] ] <nl> + / / CHECK - DAG : ! [ [ PTY ] ] = ! DIDerivedType ( tag : DW_TAG_typedef , name : " _Tta { { 9variables | 4main } } 5Point " , { { . * } } baseType : ! [ [ PTUP ] ] <nl> typealias Point = ( x : Double , y : Double , z : Double ) <nl> var P : Point = ( 1 , 2 , 3 ) <nl> func println ( p : ( x : Double , y : Double , z : Double ) ) { <nl> func println ( p : ( x : Double , y : Double , z : Double ) ) { <nl> } <nl> println ( P ) <nl> <nl> - / / CHECK - DAG : ! MDGlobalVariable ( name : " P2 " , { { . * } } type : ! [ [ APTY : [ 0 - 9 ] + ] ] <nl> - / / CHECK - DAG : ! [ [ APTY ] ] = ! MDDerivedType ( tag : DW_TAG_typedef , name : " _Tta { { 9variables | 4main } } 13AliasForPoint " , { { . * } } baseType : ! [ [ PTY : [ 0 - 9 ] + ] ] <nl> + / / CHECK - DAG : ! DIGlobalVariable ( name : " P2 " , { { . * } } type : ! [ [ APTY : [ 0 - 9 ] + ] ] <nl> + / / CHECK - DAG : ! [ [ APTY ] ] = ! DIDerivedType ( tag : DW_TAG_typedef , name : " _Tta { { 9variables | 4main } } 13AliasForPoint " , { { . * } } baseType : ! [ [ PTY : [ 0 - 9 ] + ] ] <nl> typealias AliasForPoint = Point <nl> var P2 : AliasForPoint = ( 4 , 5 , 6 ) <nl> println ( P2 ) <nl> enum TriValue { <nl> case true_ <nl> case top <nl> } <nl> - / / CHECK - DAG : ! MDGlobalVariable ( name : " unknown " , { { . * } } type : ! " _TtO { { 9variables | 4main } } 8TriValue " <nl> - / / CHECK - DAG : ! MDCompositeType ( tag : DW_TAG_union_type , name : " TriValue " , { { . * } } identifier : " _TtO { { 9variables | 4main } } 8TriValue " <nl> + / / CHECK - DAG : ! DIGlobalVariable ( name : " unknown " , { { . * } } type : ! " _TtO { { 9variables | 4main } } 8TriValue " <nl> + / / CHECK - DAG : ! DICompositeType ( tag : DW_TAG_union_type , name : " TriValue " , { { . * } } identifier : " _TtO { { 9variables | 4main } } 8TriValue " <nl> var unknown = TriValue . top <nl> func println ( value : TriValue ) { <nl> switch value { <nl> func println ( value : TriValue ) { <nl> } <nl> println ( unknown ) <nl> <nl> - / / CHECK - DAG : ! MDFile ( filename : " variables . swift " <nl> + / / CHECK - DAG : ! DIFile ( filename : " variables . swift " <nl> mmm a / test / SILPasses / dead_inlined_func . swift <nl> ppp b / test / SILPasses / dead_inlined_func . swift <nl> <nl> / / CHECK - IR - NOT : define { { . * } } to_be_inlined <nl> <nl> / / But : we want debug info for it . <nl> - / / CHECK - IR : ! MDSubprogram ( name : " to_be_inlined " <nl> + / / CHECK - IR : ! DISubprogram ( name : " to_be_inlined " <nl> <nl> private func to_be_inlined ( x : Int ) - > Int { <nl> return x + 1 <nl>
|
Adapt to MD * = > DI * renaming of debug info types
|
apple/swift
|
c6d42db07033934e8a3b1e7c659c3d97ec55901b
|
2015-04-29T21:40:21Z
|
new file mode 100644 <nl> index 000000000000 . . e109a7989741 <nl> mmm / dev / null <nl> ppp b / utils / type - layout - fuzzer . py <nl> <nl> + # ! / usr / bin / env python <nl> + <nl> + # This script outputs a Swift source with randomly - generated type definitions , <nl> + # which can be used for ABI or layout algorithm fuzzing . <nl> + <nl> + # TODO : generate types with generics , existentials , compositions <nl> + # TODO : prevent cycles in inline storage <nl> + <nl> + import collections <nl> + import random <nl> + <nl> + maxDepth = 5 <nl> + maxMembers = 5 <nl> + typesToDefine = collections . deque ( [ 0 ] ) <nl> + nextName = 1 <nl> + random . seed ( ) <nl> + <nl> + <nl> + def randomTypeList ( depth ) : <nl> + count = random . randint ( 0 , maxMembers ) <nl> + result = " ( " <nl> + for i in xrange ( count ) : <nl> + if i > 0 : <nl> + result + = " , " <nl> + result + = randomTypeReference ( depth + 1 ) <nl> + result + = " ) " <nl> + return result <nl> + <nl> + <nl> + def randomTypeReference ( depth ) : <nl> + def nominal ( ) : <nl> + global nextName <nl> + global typesToDefine <nl> + which = random . randint ( 0 , <nl> + nextName if depth < maxDepth else nextName - 1 ) <nl> + if which = = nextName : <nl> + typesToDefine . append ( which ) <nl> + nextName + = 1 <nl> + return " T " + str ( which ) <nl> + <nl> + def tuple ( ) : <nl> + return randomTypeList ( depth + 1 ) <nl> + <nl> + def metatype ( ) : <nl> + return " ( " + randomTypeReference ( depth + 1 ) + " ) . Type " <nl> + <nl> + def leaf ( ) : <nl> + leaves = [ " Int " , " String " , " Int8 " , " Int16 " , " Int32 " , " Int64 " ] <nl> + return random . choice ( leaves ) <nl> + <nl> + if depth < maxDepth : <nl> + kinds = [ nominal , tuple , metatype , leaf , leaf , leaf , leaf , leaf ] <nl> + else : <nl> + kinds = [ leaf ] <nl> + return random . choice ( kinds ) ( ) <nl> + <nl> + <nl> + def defineRandomProduct ( kind , name , depth ) : <nl> + print ( kind + " " + name + " { " ) <nl> + # Suppress errors about missing initializers <nl> + print ( " init ( ) { fatalError ( ) } " ) <nl> + <nl> + numMembers = random . randint ( 0 , maxMembers ) <nl> + for i in xrange ( numMembers ) : <nl> + print ( " var x " + str ( i ) + " : " + randomTypeReference ( depth + 1 ) ) <nl> + <nl> + print ( " } " ) <nl> + <nl> + <nl> + def defineRandomEnum ( name , depth ) : <nl> + # TODO : indirect cases <nl> + print ( " enum " + name + " { " ) <nl> + <nl> + numCases = random . randint ( 0 , maxMembers ) <nl> + for i in xrange ( numCases ) : <nl> + print ( " case x " + str ( i ) + randomTypeList ( depth + 1 ) ) <nl> + <nl> + print ( " } " ) <nl> + <nl> + <nl> + def defineRandomType ( name , depth ) : <nl> + def struct ( ) : <nl> + defineRandomProduct ( " struct " , name , depth ) <nl> + <nl> + def clas ( ) : <nl> + defineRandomProduct ( " class " , name , depth ) <nl> + <nl> + def enum ( ) : <nl> + defineRandomEnum ( name , depth ) <nl> + <nl> + kinds = [ struct , clas , enum ] <nl> + return random . choice ( kinds ) ( ) <nl> + <nl> + <nl> + while len ( typesToDefine ) > 0 : <nl> + ty = typesToDefine . popleft ( ) <nl> + defineRandomType ( " T " + str ( ty ) , 0 ) <nl>
|
Merge pull request from jckarter / type - layout - fuzzer
|
apple/swift
|
f6b110479bd26c7520422241915869c8b979e643
|
2017-09-20T16:44:16Z
|
mmm a / editor / plugins / canvas_item_editor_plugin . cpp <nl> ppp b / editor / plugins / canvas_item_editor_plugin . cpp <nl> bool CanvasItemEditor : : _gui_input_scale ( const Ref < InputEvent > & p_event ) { <nl> if ( drag_type = = DRAG_SCALE_BOTH ) { <nl> Size2 scale_factor = drag_to_local / drag_from_local ; <nl> if ( uniform ) { <nl> - if ( ABS ( scale_factor . x - 1 . 0 ) > ABS ( scale_factor . y - 1 . 0 ) ) { <nl> - scale . x * = scale_factor . x ; <nl> - scale . y = scale . x * ratio ; <nl> - } else { <nl> - scale . y * = scale_factor . y ; <nl> - scale . x = scale . y / ratio ; <nl> - } <nl> + scale * = ( scale_factor . x + scale_factor . y ) / 2 . 0 ; <nl> } else { <nl> scale * = scale_factor ; <nl> } <nl>
|
Merge pull request from groud / fix_scaling
|
godotengine/godot
|
5099b9d79ac4aee0c4dd22ecf64d0ff8669f9c28
|
2018-11-06T21:07:00Z
|
mmm a / include / swift / AST / Expr . h <nl> ppp b / include / swift / AST / Expr . h <nl> class CodeCompletionExpr : public Expr { <nl> <nl> / / / LiteralExpr - Common base class between the literals . <nl> class LiteralExpr : public Expr { <nl> + / / Set by Sema : <nl> + ConcreteDeclRef Initializer ; <nl> + <nl> public : <nl> LiteralExpr ( ExprKind Kind , bool Implicit ) : Expr ( Kind , Implicit ) { } <nl> <nl> class LiteralExpr : public Expr { <nl> return E - > getKind ( ) > = ExprKind : : First_LiteralExpr & & <nl> E - > getKind ( ) < = ExprKind : : Last_LiteralExpr ; <nl> } <nl> + <nl> + / / / Retrieve the initializer that will be used to construct the <nl> + / / / literal from the result of the initializer . <nl> + / / / <nl> + / / / Only literals that have no builtin literal conformance will have <nl> + / / / this initializer , which will be called on the result of the builtin <nl> + / / / initializer . <nl> + ConcreteDeclRef getInitializer ( ) const { return Initializer ; } <nl> + <nl> + / / / Set the initializer that will be used to construct the literal . <nl> + void setInitializer ( ConcreteDeclRef initializer ) { <nl> + Initializer = initializer ; <nl> + } <nl> + } ; <nl> + <nl> + / / / BuiltinLiteralExpr - Common base class between all literals <nl> + / / / that provides BuiltinInitializer <nl> + class BuiltinLiteralExpr : public LiteralExpr { <nl> + / / Set by Seam : <nl> + ConcreteDeclRef BuiltinInitializer ; <nl> + <nl> + public : <nl> + BuiltinLiteralExpr ( ExprKind Kind , bool Implicit ) <nl> + : LiteralExpr ( Kind , Implicit ) { } <nl> + <nl> + static bool classof ( const Expr * E ) { <nl> + return E - > getKind ( ) > = ExprKind : : First_BuiltinLiteralExpr & & <nl> + E - > getKind ( ) < = ExprKind : : Last_BuiltinLiteralExpr ; <nl> + } <nl> + <nl> + / / / Retrieve the builtin initializer that will be used to construct the <nl> + / / / literal . <nl> + / / / <nl> + / / / Any type - checked literal will have a builtin initializer , which is <nl> + / / / called first to form a concrete Swift type . <nl> + ConcreteDeclRef getBuiltinInitializer ( ) const { return BuiltinInitializer ; } <nl> + <nl> + / / / Set the builtin initializer that will be used to construct the <nl> + / / / literal . <nl> + void setBuiltinInitializer ( ConcreteDeclRef builtinInitializer ) { <nl> + BuiltinInitializer = builtinInitializer ; <nl> + } <nl> } ; <nl> <nl> / / / The ' nil ' literal . <nl> / / / <nl> class NilLiteralExpr : public LiteralExpr { <nl> SourceLoc Loc ; <nl> - ConcreteDeclRef Initializer ; <nl> + <nl> public : <nl> NilLiteralExpr ( SourceLoc Loc , bool Implicit = false ) <nl> : LiteralExpr ( ExprKind : : NilLiteral , Implicit ) , Loc ( Loc ) { <nl> class NilLiteralExpr : public LiteralExpr { <nl> SourceRange getSourceRange ( ) const { <nl> return Loc ; <nl> } <nl> - <nl> - / / / Retrieve the initializer that will be used to construct the ' nil ' <nl> - / / / literal from the result of the initializer . <nl> - ConcreteDeclRef getInitializer ( ) const { return Initializer ; } <nl> - <nl> - / / / Set the initializer that will be used to construct the ' nil ' literal . <nl> - void setInitializer ( ConcreteDeclRef initializer ) { <nl> - Initializer = initializer ; <nl> - } <nl> <nl> static bool classof ( const Expr * E ) { <nl> return E - > getKind ( ) = = ExprKind : : NilLiteral ; <nl> class NilLiteralExpr : public LiteralExpr { <nl> } ; <nl> <nl> / / / Abstract base class for numeric literals , potentially with a sign . <nl> - class NumberLiteralExpr : public LiteralExpr { <nl> + class NumberLiteralExpr : public BuiltinLiteralExpr { <nl> / / / The value of the literal as an ASTContext - owned string . Underscores must <nl> / / / be stripped . <nl> StringRef Val ; / / Use StringRef instead of APInt or APFloat , which leak . <nl> - ConcreteDeclRef BuiltinInitializer ; <nl> - ConcreteDeclRef Initializer ; <nl> <nl> protected : <nl> SourceLoc MinusLoc ; <nl> SourceLoc DigitsLoc ; <nl> <nl> public : <nl> - NumberLiteralExpr ( ExprKind Kind , <nl> - StringRef Val , SourceLoc DigitsLoc , bool Implicit ) <nl> - : LiteralExpr ( Kind , Implicit ) , Val ( Val ) , DigitsLoc ( DigitsLoc ) <nl> - { <nl> - Bits . NumberLiteralExpr . IsNegative = false ; <nl> - Bits . NumberLiteralExpr . IsExplicitConversion = false ; <nl> - } <nl> - <nl> + NumberLiteralExpr ( ExprKind Kind , StringRef Val , SourceLoc DigitsLoc , <nl> + bool Implicit ) <nl> + : BuiltinLiteralExpr ( Kind , Implicit ) , Val ( Val ) , DigitsLoc ( DigitsLoc ) { <nl> + Bits . NumberLiteralExpr . IsNegative = false ; <nl> + Bits . NumberLiteralExpr . IsExplicitConversion = false ; <nl> + } <nl> + <nl> bool isNegative ( ) const { return Bits . NumberLiteralExpr . IsNegative ; } <nl> void setNegative ( SourceLoc Loc ) { <nl> MinusLoc = Loc ; <nl> class NumberLiteralExpr : public LiteralExpr { <nl> return DigitsLoc ; <nl> } <nl> <nl> - / / / Retrieve the builtin initializer that will be used to construct the <nl> - / / / boolean literal . <nl> - / / / <nl> - / / / Any type - checked boolean literal will have a builtin initializer , which is <nl> - / / / called first to form a concrete Swift type . <nl> - ConcreteDeclRef getBuiltinInitializer ( ) const { return BuiltinInitializer ; } <nl> - <nl> - / / / Set the builtin initializer that will be used to construct the boolean <nl> - / / / literal . <nl> - void setBuiltinInitializer ( ConcreteDeclRef builtinInitializer ) { <nl> - BuiltinInitializer = builtinInitializer ; <nl> - } <nl> - <nl> - / / / Retrieve the initializer that will be used to construct the boolean <nl> - / / / literal from the result of the initializer . <nl> - / / / <nl> - / / / Only boolean literals that have no builtin literal conformance will have <nl> - / / / this initializer , which will be called on the result of the builtin <nl> - / / / initializer . <nl> - ConcreteDeclRef getInitializer ( ) const { return Initializer ; } <nl> - <nl> - / / / Set the initializer that will be used to construct the boolean literal . <nl> - void setInitializer ( ConcreteDeclRef initializer ) { <nl> - Initializer = initializer ; <nl> - } <nl> - <nl> static bool classof ( const Expr * E ) { <nl> return E - > getKind ( ) > = ExprKind : : First_NumberLiteralExpr <nl> & & E - > getKind ( ) < = ExprKind : : Last_NumberLiteralExpr ; <nl> class FloatLiteralExpr : public NumberLiteralExpr { <nl> <nl> / / / A Boolean literal ( ' true ' or ' false ' ) <nl> / / / <nl> - class BooleanLiteralExpr : public LiteralExpr { <nl> + class BooleanLiteralExpr : public BuiltinLiteralExpr { <nl> SourceLoc Loc ; <nl> - ConcreteDeclRef BuiltinInitializer ; <nl> - ConcreteDeclRef Initializer ; <nl> <nl> public : <nl> BooleanLiteralExpr ( bool Value , SourceLoc Loc , bool Implicit = false ) <nl> - : LiteralExpr ( ExprKind : : BooleanLiteral , Implicit ) , Loc ( Loc ) { <nl> + : BuiltinLiteralExpr ( ExprKind : : BooleanLiteral , Implicit ) , Loc ( Loc ) { <nl> Bits . BooleanLiteralExpr . Value = Value ; <nl> } <nl> <nl> class BooleanLiteralExpr : public LiteralExpr { <nl> return Loc ; <nl> } <nl> <nl> - / / / Retrieve the builtin initializer that will be used to construct the <nl> - / / / boolean literal . <nl> - / / / <nl> - / / / Any type - checked boolean literal will have a builtin initializer , which is <nl> - / / / called first to form a concrete Swift type . <nl> - ConcreteDeclRef getBuiltinInitializer ( ) const { return BuiltinInitializer ; } <nl> - <nl> - / / / Set the builtin initializer that will be used to construct the boolean <nl> - / / / literal . <nl> - void setBuiltinInitializer ( ConcreteDeclRef builtinInitializer ) { <nl> - BuiltinInitializer = builtinInitializer ; <nl> - } <nl> - <nl> - / / / Retrieve the initializer that will be used to construct the boolean <nl> - / / / literal from the result of the initializer . <nl> - / / / <nl> - / / / Only boolean literals that have no builtin literal conformance will have <nl> - / / / this initializer , which will be called on the result of the builtin <nl> - / / / initializer . <nl> - ConcreteDeclRef getInitializer ( ) const { return Initializer ; } <nl> - <nl> - / / / Set the initializer that will be used to construct the boolean literal . <nl> - void setInitializer ( ConcreteDeclRef initializer ) { <nl> - Initializer = initializer ; <nl> - } <nl> - <nl> static bool classof ( const Expr * E ) { <nl> return E - > getKind ( ) = = ExprKind : : BooleanLiteral ; <nl> } <nl> } ; <nl> - <nl> + <nl> / / / StringLiteralExpr - String literal , like ' " foo " ' . <nl> - class StringLiteralExpr : public LiteralExpr { <nl> + class StringLiteralExpr : public BuiltinLiteralExpr { <nl> StringRef Val ; <nl> SourceRange Range ; <nl> - ConcreteDeclRef BuiltinInitializer ; <nl> - ConcreteDeclRef Initializer ; <nl> <nl> public : <nl> / / / The encoding that should be used for the string literal . <nl> class StringLiteralExpr : public LiteralExpr { <nl> return Bits . StringLiteralExpr . IsSingleExtendedGraphemeCluster ; <nl> } <nl> <nl> - / / / Retrieve the builtin initializer that will be used to construct the string <nl> - / / / literal . <nl> - / / / <nl> - / / / Any type - checked string literal will have a builtin initializer , which is <nl> - / / / called first to form a concrete Swift type . <nl> - ConcreteDeclRef getBuiltinInitializer ( ) const { return BuiltinInitializer ; } <nl> - <nl> - / / / Set the builtin initializer that will be used to construct the string <nl> - / / / literal . <nl> - void setBuiltinInitializer ( ConcreteDeclRef builtinInitializer ) { <nl> - BuiltinInitializer = builtinInitializer ; <nl> - } <nl> - <nl> - / / / Retrieve the initializer that will be used to construct the string <nl> - / / / literal from the result of the initializer . <nl> - / / / <nl> - / / / Only string literals that have no builtin literal conformance will have <nl> - / / / this initializer , which will be called on the result of the builtin <nl> - / / / initializer . <nl> - ConcreteDeclRef getInitializer ( ) const { return Initializer ; } <nl> - <nl> - / / / Set the initializer that will be used to construct the string literal . <nl> - void setInitializer ( ConcreteDeclRef initializer ) { <nl> - Initializer = initializer ; <nl> - } <nl> - <nl> static bool classof ( const Expr * E ) { <nl> return E - > getKind ( ) = = ExprKind : : StringLiteral ; <nl> } <nl> class InterpolatedStringLiteralExpr : public LiteralExpr { <nl> / / Set by Sema : <nl> OpaqueValueExpr * interpolationExpr = nullptr ; <nl> ConcreteDeclRef builderInit ; <nl> - ConcreteDeclRef resultInit ; <nl> Expr * interpolationCountExpr = nullptr ; <nl> Expr * literalCapacityExpr = nullptr ; <nl> <nl> class InterpolatedStringLiteralExpr : public LiteralExpr { <nl> void setBuilderInit ( ConcreteDeclRef decl ) { builderInit = decl ; } <nl> ConcreteDeclRef getBuilderInit ( ) const { return builderInit ; } <nl> <nl> - / / / Sets the decl that constructs the final result type after the <nl> - / / / AppendingExpr has been evaluated . <nl> - void setResultInit ( ConcreteDeclRef decl ) { resultInit = decl ; } <nl> - ConcreteDeclRef getResultInit ( ) const { return resultInit ; } <nl> - <nl> / / / Sets the OpaqueValueExpr that is passed into AppendingExpr as the SubExpr <nl> / / / that the tap operates on . <nl> void setInterpolationExpr ( OpaqueValueExpr * expr ) { interpolationExpr = expr ; } <nl> class InterpolatedStringLiteralExpr : public LiteralExpr { <nl> <nl> / / / MagicIdentifierLiteralExpr - A magic identifier like # file which expands <nl> / / / out to a literal at SILGen time . <nl> - class MagicIdentifierLiteralExpr : public LiteralExpr { <nl> + class MagicIdentifierLiteralExpr : public BuiltinLiteralExpr { <nl> public : <nl> enum Kind : unsigned { <nl> # define MAGIC_IDENTIFIER ( NAME , STRING , SYNTAX_KIND ) NAME , <nl> class MagicIdentifierLiteralExpr : public LiteralExpr { <nl> <nl> private : <nl> SourceLoc Loc ; <nl> - ConcreteDeclRef BuiltinInitializer ; <nl> - ConcreteDeclRef Initializer ; <nl> <nl> public : <nl> MagicIdentifierLiteralExpr ( Kind kind , SourceLoc loc , bool implicit = false ) <nl> - : LiteralExpr ( ExprKind : : MagicIdentifierLiteral , implicit ) , Loc ( loc ) { <nl> + : BuiltinLiteralExpr ( ExprKind : : MagicIdentifierLiteral , implicit ) , <nl> + Loc ( loc ) { <nl> Bits . MagicIdentifierLiteralExpr . Kind = static_cast < unsigned > ( kind ) ; <nl> Bits . MagicIdentifierLiteralExpr . StringEncoding <nl> = static_cast < unsigned > ( StringLiteralExpr : : UTF8 ) ; <nl> } <nl> - <nl> + <nl> Kind getKind ( ) const { <nl> return static_cast < Kind > ( Bits . MagicIdentifierLiteralExpr . Kind ) ; <nl> } <nl> class MagicIdentifierLiteralExpr : public LiteralExpr { <nl> = static_cast < unsigned > ( encoding ) ; <nl> } <nl> <nl> - / / / Retrieve the builtin initializer that will be used to construct the <nl> - / / / literal . <nl> - / / / <nl> - / / / Any type - checked literal will have a builtin initializer , which is <nl> - / / / called first to form a concrete Swift type . <nl> - ConcreteDeclRef getBuiltinInitializer ( ) const { <nl> - return BuiltinInitializer ; <nl> - } <nl> - <nl> - / / / Set the builtin initializer that will be used to construct the literal . <nl> - void setBuiltinInitializer ( ConcreteDeclRef builtinInitializer ) { <nl> - BuiltinInitializer = builtinInitializer ; <nl> - } <nl> - <nl> - / / / Retrieve the initializer that will be used to construct the literal from <nl> - / / / the result of the initializer . <nl> - / / / <nl> - / / / Only literals that have no builtin literal conformance will have <nl> - / / / this initializer , which will be called on the result of the builtin <nl> - / / / initializer . <nl> - ConcreteDeclRef getInitializer ( ) const { <nl> - return Initializer ; <nl> - } <nl> - <nl> - / / / Set the initializer that will be used to construct the literal . <nl> - void setInitializer ( ConcreteDeclRef initializer ) { <nl> - Initializer = initializer ; <nl> - } <nl> - <nl> static bool classof ( const Expr * E ) { <nl> return E - > getKind ( ) = = ExprKind : : MagicIdentifierLiteral ; <nl> } <nl> class ObjectLiteralExpr final <nl> private : <nl> Expr * Arg ; <nl> SourceLoc PoundLoc ; <nl> - ConcreteDeclRef Initializer ; <nl> <nl> ObjectLiteralExpr ( SourceLoc PoundLoc , LiteralKind LitKind , <nl> Expr * Arg , <nl> class ObjectLiteralExpr final <nl> <nl> StringRef getLiteralKindPlainName ( ) const ; <nl> <nl> - / / / Retrieve the initializer that will be used to construct the ' object ' <nl> - / / / literal from the result of the initializer . <nl> - ConcreteDeclRef getInitializer ( ) const { return Initializer ; } <nl> - <nl> - / / / Set the initializer that will be used to construct the ' object ' literal . <nl> - void setInitializer ( ConcreteDeclRef initializer ) { <nl> - Initializer = initializer ; <nl> - } <nl> - <nl> static bool classof ( const Expr * E ) { <nl> return E - > getKind ( ) = = ExprKind : : ObjectLiteral ; <nl> } <nl> mmm a / include / swift / AST / ExprNodes . def <nl> ppp b / include / swift / AST / ExprNodes . def <nl> <nl> EXPR ( Error , Expr ) <nl> ABSTRACT_EXPR ( Literal , Expr ) <nl> LITERAL_EXPR ( NilLiteral , LiteralExpr ) <nl> - ABSTRACT_EXPR ( NumberLiteral , LiteralExpr ) <nl> - LITERAL_EXPR ( IntegerLiteral , NumberLiteralExpr ) <nl> - LITERAL_EXPR ( FloatLiteral , NumberLiteralExpr ) <nl> - EXPR_RANGE ( NumberLiteral , IntegerLiteral , FloatLiteral ) <nl> - LITERAL_EXPR ( BooleanLiteral , LiteralExpr ) <nl> - LITERAL_EXPR ( StringLiteral , LiteralExpr ) <nl> + ABSTRACT_EXPR ( BuiltinLiteral , LiteralExpr ) <nl> + LITERAL_EXPR ( BooleanLiteral , BuiltinLiteralExpr ) <nl> + ABSTRACT_EXPR ( NumberLiteral , BuiltinLiteralExpr ) <nl> + LITERAL_EXPR ( IntegerLiteral , NumberLiteralExpr ) <nl> + LITERAL_EXPR ( FloatLiteral , NumberLiteralExpr ) <nl> + EXPR_RANGE ( NumberLiteral , IntegerLiteral , FloatLiteral ) <nl> + LITERAL_EXPR ( StringLiteral , BuiltinLiteralExpr ) <nl> + LITERAL_EXPR ( MagicIdentifierLiteral , BuiltinLiteralExpr ) <nl> + EXPR_RANGE ( BuiltinLiteral , BooleanLiteral , MagicIdentifierLiteral ) <nl> LITERAL_EXPR ( InterpolatedStringLiteral , LiteralExpr ) <nl> LITERAL_EXPR ( ObjectLiteral , LiteralExpr ) <nl> - LITERAL_EXPR ( MagicIdentifierLiteral , LiteralExpr ) <nl> - EXPR_RANGE ( Literal , NilLiteral , MagicIdentifierLiteral ) <nl> + EXPR_RANGE ( Literal , NilLiteral , ObjectLiteral ) <nl> EXPR ( DiscardAssignment , Expr ) <nl> EXPR ( DeclRef , Expr ) <nl> EXPR ( SuperRef , Expr ) <nl> mmm a / lib / AST / ASTDumper . cpp <nl> ppp b / lib / AST / ASTDumper . cpp <nl> class PrintExpr : public ExprVisitor < PrintExpr > { <nl> PrintWithColorRAII ( OS , LiteralValueColor ) < < " builder_init = " ; <nl> E - > getBuilderInit ( ) . dump ( PrintWithColorRAII ( OS , LiteralValueColor ) . getOS ( ) ) ; <nl> PrintWithColorRAII ( OS , LiteralValueColor ) < < " result_init = " ; <nl> - E - > getResultInit ( ) . dump ( PrintWithColorRAII ( OS , LiteralValueColor ) . getOS ( ) ) ; <nl> + E - > getInitializer ( ) . dump ( PrintWithColorRAII ( OS , LiteralValueColor ) . getOS ( ) ) ; <nl> OS < < " \ n " ; <nl> printRec ( E - > getAppendingExpr ( ) ) ; <nl> PrintWithColorRAII ( OS , ParenthesisColor ) < < ' ) ' ; <nl> mmm a / lib / AST / Expr . cpp <nl> ppp b / lib / AST / Expr . cpp <nl> llvm : : APFloat FloatLiteralExpr : : getValue ( ) const { <nl> <nl> StringLiteralExpr : : StringLiteralExpr ( StringRef Val , SourceRange Range , <nl> bool Implicit ) <nl> - : LiteralExpr ( ExprKind : : StringLiteral , Implicit ) , Val ( Val ) , <nl> + : BuiltinLiteralExpr ( ExprKind : : StringLiteral , Implicit ) , Val ( Val ) , <nl> Range ( Range ) { <nl> Bits . StringLiteralExpr . Encoding = static_cast < unsigned > ( UTF8 ) ; <nl> Bits . StringLiteralExpr . IsSingleUnicodeScalar = <nl> mmm a / lib / SILGen / SILGenApply . cpp <nl> ppp b / lib / SILGen / SILGenApply . cpp <nl> static bool hasUnownedInnerPointerResult ( CanSILFunctionType fnType ) { <nl> return false ; <nl> } <nl> <nl> + / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> + / / Argument Emission for Builtin Initializer <nl> + / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> + static inline PreparedArguments <nl> + buildBuiltinLiteralArgs ( SILGenFunction & SGF , SGFContext C , <nl> + StringLiteralExpr * stringLiteral ) { <nl> + return emitStringLiteral ( SGF , stringLiteral , stringLiteral - > getValue ( ) , C , <nl> + stringLiteral - > getEncoding ( ) ) ; <nl> + } <nl> + <nl> + static inline PreparedArguments <nl> + buildBuiltinLiteralArgs ( NilLiteralExpr * nilLiteral ) { <nl> + PreparedArguments builtinLiteralArgs ; <nl> + builtinLiteralArgs . emplace ( { } ) ; <nl> + return builtinLiteralArgs ; <nl> + } <nl> + <nl> + static inline PreparedArguments <nl> + buildBuiltinLiteralArgs ( SILGenFunction & SGF , SGFContext C , <nl> + BooleanLiteralExpr * booleanLiteral ) { <nl> + PreparedArguments builtinLiteralArgs ; <nl> + auto i1Ty = SILType : : getBuiltinIntegerType ( 1 , SGF . getASTContext ( ) ) ; <nl> + SILValue boolValue = SGF . B . createIntegerLiteral ( booleanLiteral , i1Ty , <nl> + booleanLiteral - > getValue ( ) ) ; <nl> + ManagedValue boolManaged = ManagedValue : : forUnmanaged ( boolValue ) ; <nl> + CanType ty = boolManaged . getType ( ) . getASTType ( ) - > getCanonicalType ( ) ; <nl> + builtinLiteralArgs . emplace ( AnyFunctionType : : Param ( ty ) ) ; <nl> + builtinLiteralArgs . add ( booleanLiteral , RValue ( SGF , { boolManaged } , ty ) ) ; <nl> + return builtinLiteralArgs ; <nl> + } <nl> + <nl> + static inline PreparedArguments <nl> + buildBuiltinLiteralArgs ( SILGenFunction & SGF , SGFContext C , <nl> + IntegerLiteralExpr * integerLiteral ) { <nl> + PreparedArguments builtinLiteralArgs ; <nl> + ManagedValue integerManaged = <nl> + ManagedValue : : forUnmanaged ( SGF . B . createIntegerLiteral ( <nl> + integerLiteral , <nl> + SILType : : getBuiltinIntegerLiteralType ( SGF . getASTContext ( ) ) , <nl> + integerLiteral - > getRawValue ( ) ) ) ; <nl> + CanType ty = integerManaged . getType ( ) . getASTType ( ) ; <nl> + builtinLiteralArgs . emplace ( AnyFunctionType : : Param ( ty ) ) ; <nl> + builtinLiteralArgs . add ( integerLiteral , RValue ( SGF , { integerManaged } , ty ) ) ; <nl> + return builtinLiteralArgs ; <nl> + } <nl> + <nl> + static inline PreparedArguments <nl> + buildBuiltinLiteralArgs ( SILGenFunction & SGF , SGFContext C , <nl> + FloatLiteralExpr * floatLiteral ) { <nl> + PreparedArguments builtinLiteralArgs ; <nl> + auto * litTy = floatLiteral - > getBuiltinType ( ) - > castTo < BuiltinFloatType > ( ) ; <nl> + ManagedValue floatManaged = <nl> + ManagedValue : : forUnmanaged ( SGF . B . createFloatLiteral ( <nl> + floatLiteral , <nl> + SILType : : getBuiltinFloatType ( litTy - > getFPKind ( ) , SGF . getASTContext ( ) ) , <nl> + floatLiteral - > getValue ( ) ) ) ; <nl> + <nl> + CanType ty = floatManaged . getType ( ) . getASTType ( ) ; <nl> + builtinLiteralArgs . emplace ( AnyFunctionType : : Param ( ty ) ) ; <nl> + builtinLiteralArgs . add ( floatLiteral , RValue ( SGF , { floatManaged } , ty ) ) ; <nl> + return builtinLiteralArgs ; <nl> + } <nl> + <nl> + static inline PreparedArguments <nl> + buildBuiltinLiteralArgs ( SILGenFunction & SGF , SGFContext C , <nl> + MagicIdentifierLiteralExpr * magicLiteral ) { <nl> + ASTContext & ctx = SGF . getASTContext ( ) ; <nl> + SourceLoc loc = magicLiteral - > getStartLoc ( ) ; <nl> + <nl> + switch ( magicLiteral - > getKind ( ) ) { <nl> + case MagicIdentifierLiteralExpr : : FileIDSpelledAsFile : <nl> + case MagicIdentifierLiteralExpr : : FileID : { <nl> + std : : string value = loc . isValid ( ) ? SGF . getMagicFileIDString ( loc ) : " " ; <nl> + return emitStringLiteral ( SGF , magicLiteral , value , C , <nl> + magicLiteral - > getStringEncoding ( ) ) ; <nl> + } <nl> + <nl> + case MagicIdentifierLiteralExpr : : FilePathSpelledAsFile : <nl> + case MagicIdentifierLiteralExpr : : FilePath : { <nl> + StringRef value = loc . isValid ( ) ? SGF . getMagicFilePathString ( loc ) : " " ; <nl> + return emitStringLiteral ( SGF , magicLiteral , value , C , <nl> + magicLiteral - > getStringEncoding ( ) ) ; <nl> + } <nl> + <nl> + case MagicIdentifierLiteralExpr : : Function : { <nl> + StringRef value = loc . isValid ( ) ? SGF . getMagicFunctionString ( ) : " " ; <nl> + return emitStringLiteral ( SGF , magicLiteral , value , C , <nl> + magicLiteral - > getStringEncoding ( ) ) ; <nl> + } <nl> + <nl> + case MagicIdentifierLiteralExpr : : Line : <nl> + case MagicIdentifierLiteralExpr : : Column : { <nl> + SourceLoc Loc = magicLiteral - > getStartLoc ( ) ; <nl> + unsigned Value = 0 ; <nl> + if ( Loc . isValid ( ) ) { <nl> + Value = magicLiteral - > getKind ( ) = = MagicIdentifierLiteralExpr : : Line <nl> + ? ctx . SourceMgr . getPresumedLineAndColumnForLoc ( Loc ) . first <nl> + : ctx . SourceMgr . getPresumedLineAndColumnForLoc ( Loc ) . second ; <nl> + } <nl> + <nl> + auto silTy = SILType : : getBuiltinIntegerLiteralType ( ctx ) ; <nl> + auto ty = silTy . getASTType ( ) ; <nl> + SILValue integer = SGF . B . createIntegerLiteral ( magicLiteral , silTy , Value ) ; <nl> + ManagedValue integerManaged = ManagedValue : : forUnmanaged ( integer ) ; <nl> + PreparedArguments builtinLiteralArgs ; <nl> + builtinLiteralArgs . emplace ( AnyFunctionType : : Param ( ty ) ) ; <nl> + builtinLiteralArgs . add ( magicLiteral , RValue ( SGF , { integerManaged } , ty ) ) ; <nl> + return builtinLiteralArgs ; <nl> + } <nl> + case MagicIdentifierLiteralExpr : : DSOHandle : <nl> + llvm_unreachable ( " handled elsewhere " ) ; <nl> + } <nl> + } <nl> + <nl> + static inline PreparedArguments buildBuiltinLiteralArgs ( SILGenFunction & SGF , <nl> + SGFContext C , <nl> + LiteralExpr * literal ) { <nl> + if ( auto stringLiteral = dyn_cast < StringLiteralExpr > ( literal ) ) { <nl> + return buildBuiltinLiteralArgs ( SGF , C , stringLiteral ) ; <nl> + } else if ( auto nilLiteral = dyn_cast < NilLiteralExpr > ( literal ) ) { <nl> + return buildBuiltinLiteralArgs ( nilLiteral ) ; <nl> + } else if ( auto booleanLiteral = dyn_cast < BooleanLiteralExpr > ( literal ) ) { <nl> + return buildBuiltinLiteralArgs ( SGF , C , booleanLiteral ) ; <nl> + } else if ( auto integerLiteral = dyn_cast < IntegerLiteralExpr > ( literal ) ) { <nl> + return buildBuiltinLiteralArgs ( SGF , C , integerLiteral ) ; <nl> + } else if ( auto floatLiteral = dyn_cast < FloatLiteralExpr > ( literal ) ) { <nl> + return buildBuiltinLiteralArgs ( SGF , C , floatLiteral ) ; <nl> + } else { <nl> + return buildBuiltinLiteralArgs ( <nl> + SGF , C , cast < MagicIdentifierLiteralExpr > ( literal ) ) ; <nl> + } <nl> + } <nl> + <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> / / Argument Emission <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> RValue SILGenFunction : : emitApplyOfPropertyWrapperBackingInitializer ( <nl> RValue SILGenFunction : : emitLiteral ( LiteralExpr * literal , SGFContext C ) { <nl> ConcreteDeclRef builtinInit ; <nl> ConcreteDeclRef init ; <nl> - / / Emit the raw , builtin literal arguments . <nl> - PreparedArguments builtinLiteralArgs ; <nl> - if ( auto stringLiteral = dyn_cast < StringLiteralExpr > ( literal ) ) { <nl> - builtinLiteralArgs = emitStringLiteral ( * this , literal , <nl> - stringLiteral - > getValue ( ) , C , <nl> - stringLiteral - > getEncoding ( ) ) ; <nl> - builtinInit = stringLiteral - > getBuiltinInitializer ( ) ; <nl> - init = stringLiteral - > getInitializer ( ) ; <nl> - } else if ( auto nilLiteral = dyn_cast < NilLiteralExpr > ( literal ) ) { <nl> - builtinLiteralArgs . emplace ( { } ) ; <nl> - builtinInit = nilLiteral - > getInitializer ( ) ; <nl> - } else if ( auto booleanLiteral = dyn_cast < BooleanLiteralExpr > ( literal ) ) { <nl> - auto i1Ty = SILType : : getBuiltinIntegerType ( 1 , getASTContext ( ) ) ; <nl> - SILValue boolValue = B . createIntegerLiteral ( booleanLiteral , i1Ty , <nl> - booleanLiteral - > getValue ( ) ) ; <nl> - ManagedValue boolManaged = ManagedValue : : forUnmanaged ( boolValue ) ; <nl> - CanType ty = boolManaged . getType ( ) . getASTType ( ) - > getCanonicalType ( ) ; <nl> - builtinLiteralArgs . emplace ( AnyFunctionType : : Param ( ty ) ) ; <nl> - builtinLiteralArgs . add ( literal , RValue ( * this , { boolManaged } , ty ) ) ; <nl> - builtinInit = booleanLiteral - > getBuiltinInitializer ( ) ; <nl> - init = booleanLiteral - > getInitializer ( ) ; <nl> - } else if ( auto integerLiteral = dyn_cast < IntegerLiteralExpr > ( literal ) ) { <nl> - ManagedValue integerManaged = <nl> - ManagedValue : : forUnmanaged ( B . createIntegerLiteral ( <nl> - integerLiteral , <nl> - SILType : : getBuiltinIntegerLiteralType ( getASTContext ( ) ) , <nl> - integerLiteral - > getRawValue ( ) ) ) ; <nl> - CanType ty = integerManaged . getType ( ) . getASTType ( ) ; <nl> - builtinLiteralArgs . emplace ( AnyFunctionType : : Param ( ty ) ) ; <nl> - builtinLiteralArgs . add ( literal , RValue ( * this , { integerManaged } , ty ) ) ; <nl> - builtinInit = integerLiteral - > getBuiltinInitializer ( ) ; <nl> - init = integerLiteral - > getInitializer ( ) ; <nl> - } else if ( auto floatLiteral = dyn_cast < FloatLiteralExpr > ( literal ) ) { <nl> - auto * litTy = floatLiteral - > getBuiltinType ( ) - > castTo < BuiltinFloatType > ( ) ; <nl> - ManagedValue floatManaged = ManagedValue : : forUnmanaged ( B . createFloatLiteral ( <nl> - floatLiteral , <nl> - SILType : : getBuiltinFloatType ( litTy - > getFPKind ( ) , getASTContext ( ) ) , <nl> - floatLiteral - > getValue ( ) ) ) ; <nl> - <nl> - CanType ty = floatManaged . getType ( ) . getASTType ( ) ; <nl> - builtinLiteralArgs . emplace ( AnyFunctionType : : Param ( ty ) ) ; <nl> - builtinLiteralArgs . add ( literal , RValue ( * this , { floatManaged } , ty ) ) ; <nl> - builtinInit = floatLiteral - > getBuiltinInitializer ( ) ; <nl> - init = floatLiteral - > getInitializer ( ) ; <nl> + if ( auto builtinLiteral = dyn_cast < BuiltinLiteralExpr > ( literal ) ) { <nl> + builtinInit = builtinLiteral - > getBuiltinInitializer ( ) ; <nl> + init = builtinLiteral - > getInitializer ( ) ; <nl> } else { <nl> - ASTContext & ctx = getASTContext ( ) ; <nl> - SourceLoc loc = literal - > getStartLoc ( ) ; <nl> - <nl> - auto magicLiteral = cast < MagicIdentifierLiteralExpr > ( literal ) ; <nl> - switch ( magicLiteral - > getKind ( ) ) { <nl> - case MagicIdentifierLiteralExpr : : FileIDSpelledAsFile : <nl> - case MagicIdentifierLiteralExpr : : FileID : { <nl> - std : : string value = loc . isValid ( ) ? getMagicFileIDString ( loc ) : " " ; <nl> - builtinLiteralArgs = emitStringLiteral ( * this , literal , value , C , <nl> - magicLiteral - > getStringEncoding ( ) ) ; <nl> - builtinInit = magicLiteral - > getBuiltinInitializer ( ) ; <nl> - init = magicLiteral - > getInitializer ( ) ; <nl> - break ; <nl> - } <nl> - <nl> - case MagicIdentifierLiteralExpr : : FilePathSpelledAsFile : <nl> - case MagicIdentifierLiteralExpr : : FilePath : { <nl> - StringRef value = loc . isValid ( ) ? getMagicFilePathString ( loc ) : " " ; <nl> - builtinLiteralArgs = emitStringLiteral ( * this , literal , value , C , <nl> - magicLiteral - > getStringEncoding ( ) ) ; <nl> - builtinInit = magicLiteral - > getBuiltinInitializer ( ) ; <nl> - init = magicLiteral - > getInitializer ( ) ; <nl> - break ; <nl> - } <nl> - <nl> - case MagicIdentifierLiteralExpr : : Function : { <nl> - StringRef value = loc . isValid ( ) ? getMagicFunctionString ( ) : " " ; <nl> - builtinLiteralArgs = emitStringLiteral ( * this , literal , value , C , <nl> - magicLiteral - > getStringEncoding ( ) ) ; <nl> - builtinInit = magicLiteral - > getBuiltinInitializer ( ) ; <nl> - init = magicLiteral - > getInitializer ( ) ; <nl> - break ; <nl> - } <nl> - <nl> - case MagicIdentifierLiteralExpr : : Line : <nl> - case MagicIdentifierLiteralExpr : : Column : { <nl> - SourceLoc Loc = literal - > getStartLoc ( ) ; <nl> - unsigned Value = 0 ; <nl> - if ( Loc . isValid ( ) ) { <nl> - Value = magicLiteral - > getKind ( ) = = MagicIdentifierLiteralExpr : : Line <nl> - ? ctx . SourceMgr . getPresumedLineAndColumnForLoc ( Loc ) . first <nl> - : ctx . SourceMgr . getPresumedLineAndColumnForLoc ( Loc ) . second ; <nl> - } <nl> - <nl> - auto silTy = SILType : : getBuiltinIntegerLiteralType ( ctx ) ; <nl> - auto ty = silTy . getASTType ( ) ; <nl> - SILValue integer = B . createIntegerLiteral ( literal , silTy , Value ) ; <nl> - ManagedValue integerManaged = ManagedValue : : forUnmanaged ( integer ) ; <nl> - builtinLiteralArgs . emplace ( AnyFunctionType : : Param ( ty ) ) ; <nl> - builtinLiteralArgs . add ( literal , RValue ( * this , { integerManaged } , ty ) ) ; <nl> - builtinInit = magicLiteral - > getBuiltinInitializer ( ) ; <nl> - init = magicLiteral - > getInitializer ( ) ; <nl> - break ; <nl> - } <nl> - case MagicIdentifierLiteralExpr : : DSOHandle : <nl> - llvm_unreachable ( " handled elsewhere " ) ; <nl> - } <nl> + builtinInit = literal - > getInitializer ( ) ; <nl> } <nl> <nl> + / / Emit the raw , builtin literal arguments . <nl> + PreparedArguments builtinLiteralArgs = <nl> + buildBuiltinLiteralArgs ( * this , C , literal ) ; <nl> + <nl> / / Call the builtin initializer . <nl> - RValue builtinLiteral = <nl> - emitApplyAllocatingInitializer ( literal , builtinInit , <nl> - std : : move ( builtinLiteralArgs ) , <nl> - Type ( ) , <nl> - init ? SGFContext ( ) : C ) ; <nl> + RValue builtinResult = emitApplyAllocatingInitializer ( <nl> + literal , builtinInit , std : : move ( builtinLiteralArgs ) , Type ( ) , <nl> + init ? SGFContext ( ) : C ) ; <nl> <nl> / / If we were able to directly initialize the literal we wanted , we ' re done . <nl> - if ( ! init ) return builtinLiteral ; <nl> + if ( ! init ) <nl> + return builtinResult ; <nl> <nl> / / Otherwise , perform the second initialization step . <nl> - auto ty = builtinLiteral . getType ( ) ; <nl> + auto ty = builtinResult . getType ( ) ; <nl> PreparedArguments args ( ( AnyFunctionType : : Param ( ty ) ) ) ; <nl> - args . add ( literal , std : : move ( builtinLiteral ) ) ; <nl> + args . add ( literal , std : : move ( builtinResult ) ) ; <nl> <nl> RValue result = emitApplyAllocatingInitializer ( literal , init , <nl> std : : move ( args ) , <nl> mmm a / lib / SILGen / SILGenExpr . cpp <nl> ppp b / lib / SILGen / SILGenExpr . cpp <nl> visitInterpolatedStringLiteralExpr ( InterpolatedStringLiteralExpr * E , <nl> resultInitArgs . add ( E , std : : move ( interpolation ) ) ; <nl> <nl> return SGF . emitApplyAllocatingInitializer ( <nl> - E , E - > getResultInit ( ) , std : : move ( resultInitArgs ) , Type ( ) , C ) ; <nl> + E , E - > getInitializer ( ) , std : : move ( resultInitArgs ) , Type ( ) , C ) ; <nl> } <nl> <nl> RValue RValueEmitter : : <nl> mmm a / lib / Sema / CSApply . cpp <nl> ppp b / lib / Sema / CSApply . cpp <nl> namespace { <nl> / / / protocol is broken . <nl> / / / <nl> / / / \ returns the converted literal expression . <nl> - Expr * convertLiteralInPlace ( Expr * literal , <nl> - Type type , <nl> - ProtocolDecl * protocol , <nl> - Identifier literalType , <nl> + Expr * convertLiteralInPlace ( LiteralExpr * literal , Type type , <nl> + ProtocolDecl * protocol , Identifier literalType , <nl> DeclName literalFuncName , <nl> ProtocolDecl * builtinProtocol , <nl> DeclName builtinLiteralFuncName , <nl> namespace { <nl> KnownProtocolKind : : ExpressibleByStringInterpolation , type , <nl> { ctx . Id_stringInterpolation } ) ; <nl> if ( ! resultInit ) return nullptr ; <nl> - expr - > setResultInit ( resultInit ) ; <nl> + expr - > setInitializer ( resultInit ) ; <nl> <nl> / / Make the integer literals for the parameters . <nl> auto buildExprFromUnsigned = [ & ] ( unsigned value ) { <nl> ExprRewriter : : coerceSelfArgumentToType ( Expr * expr , <nl> / * isImplicit * / true ) ) ; <nl> } <nl> <nl> - Expr * ExprRewriter : : convertLiteralInPlace ( Expr * literal , <nl> - Type type , <nl> - ProtocolDecl * protocol , <nl> - Identifier literalType , <nl> - DeclName literalFuncName , <nl> - ProtocolDecl * builtinProtocol , <nl> - DeclName builtinLiteralFuncName , <nl> - Diag < > brokenProtocolDiag , <nl> - Diag < > brokenBuiltinProtocolDiag ) { <nl> + Expr * ExprRewriter : : convertLiteralInPlace ( <nl> + LiteralExpr * literal , Type type , ProtocolDecl * protocol , <nl> + Identifier literalType , DeclName literalFuncName , <nl> + ProtocolDecl * builtinProtocol , DeclName builtinLiteralFuncName , <nl> + Diag < > brokenProtocolDiag , Diag < > brokenBuiltinProtocolDiag ) { <nl> / / If coercing a literal to an unresolved type , we don ' t try to look up the <nl> / / witness members , just do it . <nl> if ( type - > is < UnresolvedType > ( ) ) { <nl> Expr * ExprRewriter : : convertLiteralInPlace ( Expr * literal , <nl> / / Form a reference to the builtin conversion function . <nl> <nl> / / Set the builtin initializer . <nl> - if ( auto stringLiteral = dyn_cast < StringLiteralExpr > ( literal ) ) <nl> - stringLiteral - > setBuiltinInitializer ( witness ) ; <nl> - else if ( auto booleanLiteral = dyn_cast < BooleanLiteralExpr > ( literal ) ) <nl> - booleanLiteral - > setBuiltinInitializer ( witness ) ; <nl> - else if ( auto numberLiteral = dyn_cast < NumberLiteralExpr > ( literal ) ) <nl> - numberLiteral - > setBuiltinInitializer ( witness ) ; <nl> - else { <nl> - cast < MagicIdentifierLiteralExpr > ( literal ) - > setBuiltinInitializer ( <nl> - witness ) ; <nl> - } <nl> + dyn_cast < BuiltinLiteralExpr > ( literal ) - > setBuiltinInitializer ( witness ) ; <nl> <nl> / / The literal expression has this type . <nl> cs . setType ( literal , type ) ; <nl> Expr * ExprRewriter : : convertLiteralInPlace ( Expr * literal , <nl> return nullptr ; <nl> <nl> / / Set the initializer . <nl> - if ( auto nilLiteral = dyn_cast < NilLiteralExpr > ( literal ) ) <nl> - nilLiteral - > setInitializer ( witness ) ; <nl> - else if ( auto stringLiteral = dyn_cast < StringLiteralExpr > ( literal ) ) <nl> - stringLiteral - > setInitializer ( witness ) ; <nl> - else if ( auto booleanLiteral = dyn_cast < BooleanLiteralExpr > ( literal ) ) <nl> - booleanLiteral - > setInitializer ( witness ) ; <nl> - else if ( auto numberLiteral = dyn_cast < NumberLiteralExpr > ( literal ) ) <nl> - numberLiteral - > setInitializer ( witness ) ; <nl> - else <nl> - cast < MagicIdentifierLiteralExpr > ( literal ) - > setInitializer ( witness ) ; <nl> + literal - > setInitializer ( witness ) ; <nl> <nl> / / The literal expression has this type . <nl> cs . setType ( literal , type ) ; <nl>
|
Merge pull request from Interfere / SR - 12022 - LiteralExpr - refactoring
|
apple/swift
|
64d446582b7b49ef8180bb292d324eef74bbb16d
|
2020-10-12T19:10:40Z
|
mmm a / ChangeLog <nl> ppp b / ChangeLog <nl> <nl> + 2011 - 06 - 22 : Version 1 . 3 <nl> + <nl> + * Optional typed arrays with single shared buffer ( TA2 ) <nl> + * Optional support for nonportable optimizations with TA2 <nl> + * Relooper optimizations <nl> + * Reading from stdin on the web opens window . prompt <nl> + * Various bug fixes <nl> + <nl> 2011 - 05 - 29 : Version 1 . 2 <nl> <nl> * Doom demo <nl>
|
version 1 . 3
|
emscripten-core/emscripten
|
68b06527633437767bbeaeb7cdf6a122db78ef56
|
2011-06-23T02:49:55Z
|
mmm a / src / builtins / wasm . tq <nl> ppp b / src / builtins / wasm . tq <nl> builtin WasmAllocateRtt ( implicit context : Context ) ( <nl> tail runtime : : WasmAllocateRtt ( context , typeIndex , parent ) ; <nl> } <nl> <nl> + builtin WasmAllocateStructWithRtt ( implicit context : Context ) ( rtt : Map ) : <nl> + HeapObject { <nl> + const instanceSize : intptr = <nl> + unsafe : : TimesTaggedSize ( Convert < intptr > ( rtt . instance_size_in_words ) ) ; <nl> + const result : HeapObject = unsafe : : Allocate ( instanceSize ) ; <nl> + * UnsafeConstCast ( & result . map ) = rtt ; <nl> + return result ; <nl> + } <nl> + <nl> builtin WasmInt32ToNumber ( value : int32 ) : Number { <nl> return ChangeInt32ToTagged ( value ) ; <nl> } <nl> mmm a / src / compiler / wasm - compiler . cc <nl> ppp b / src / compiler / wasm - compiler . cc <nl> Node * WasmGraphBuilder : : StructNew ( uint32_t struct_index , <nl> return s ; <nl> } <nl> <nl> + Node * WasmGraphBuilder : : StructNewWithRtt ( uint32_t struct_index , <nl> + const wasm : : StructType * type , <nl> + Node * rtt , Vector < Node * > fields ) { <nl> + Node * s = CALL_BUILTIN ( <nl> + WasmAllocateStructWithRtt , rtt , <nl> + LOAD_INSTANCE_FIELD ( NativeContext , MachineType : : TaggedPointer ( ) ) ) ; <nl> + for ( uint32_t i = 0 ; i < type - > field_count ( ) ; i + + ) { <nl> + StoreStructFieldUnchecked ( mcgraph ( ) , gasm_ . get ( ) , s , type , i , fields [ i ] ) ; <nl> + } <nl> + return s ; <nl> + } <nl> + <nl> Node * WasmGraphBuilder : : ArrayNew ( uint32_t array_index , <nl> const wasm : : ArrayType * type , Node * length , <nl> Node * initial_value ) { <nl> mmm a / src / compiler / wasm - compiler . h <nl> ppp b / src / compiler / wasm - compiler . h <nl> class WasmGraphBuilder { <nl> <nl> Node * StructNew ( uint32_t struct_index , const wasm : : StructType * type , <nl> Vector < Node * > fields ) ; <nl> + Node * StructNewWithRtt ( uint32_t struct_index , const wasm : : StructType * type , <nl> + Node * rtt , Vector < Node * > fields ) ; <nl> Node * StructGet ( Node * struct_object , const wasm : : StructType * struct_type , <nl> uint32_t field_index , CheckForNull null_check , bool is_signed , <nl> wasm : : WasmCodePosition position ) ; <nl> mmm a / src / wasm / baseline / liftoff - compiler . cc <nl> ppp b / src / wasm / baseline / liftoff - compiler . cc <nl> class LiftoffCompiler { <nl> / / TODO ( 7748 ) : Implement . <nl> unsupported ( decoder , kGC , " struct . new " ) ; <nl> } <nl> + void StructNewWithRtt ( FullDecoder * decoder , <nl> + const StructIndexImmediate < validate > & imm , <nl> + const Value & rtt , const Value args [ ] , Value * result ) { <nl> + / / TODO ( 7748 ) : Implement . <nl> + unsupported ( decoder , kGC , " struct . new_with_rtt " ) ; <nl> + } <nl> void StructGet ( FullDecoder * decoder , const Value & struct_obj , <nl> const FieldIndexImmediate < validate > & field , bool is_signed , <nl> Value * result ) { <nl> mmm a / src / wasm / function - body - decoder - impl . h <nl> ppp b / src / wasm / function - body - decoder - impl . h <nl> struct ControlBase { <nl> const Value & value , const Value & count ) \ <nl> F ( StructNew , const StructIndexImmediate < validate > & imm , const Value args [ ] , \ <nl> Value * result ) \ <nl> + F ( StructNewWithRtt , const StructIndexImmediate < validate > & imm , \ <nl> + const Value & rtt , const Value args [ ] , Value * result ) \ <nl> F ( StructGet , const Value & struct_object , \ <nl> const FieldIndexImmediate < validate > & field , bool is_signed , Value * result ) \ <nl> F ( StructSet , const Value & struct_object , \ <nl> class WasmDecoder : public Decoder { <nl> WasmOpcode opcode = static_cast < WasmOpcode > ( kGCPrefix < < 8 | gc_index ) ; <nl> switch ( opcode ) { <nl> case kExprStructNew : <nl> - case kExprStructNewSub : <nl> + case kExprStructNewWithRtt : <nl> case kExprStructNewDefault : { <nl> StructIndexImmediate < validate > imm ( decoder , pc + 2 ) ; <nl> return 2 + imm . length ; <nl> class WasmFullDecoder : public WasmDecoder < validate > { <nl> CALL_INTERFACE_IF_REACHABLE ( StructNew , imm , args . begin ( ) , value ) ; <nl> break ; <nl> } <nl> + case kExprStructNewWithRtt : { <nl> + StructIndexImmediate < validate > imm ( this , this - > pc_ + len ) ; <nl> + len + = imm . length ; <nl> + if ( ! this - > Validate ( this - > pc_ , imm ) ) break ; <nl> + Value rtt = Pop ( ) ; <nl> + if ( ! VALIDATE ( rtt . type . kind ( ) = = ValueType : : kRtt ) ) { <nl> + this - > errorf ( <nl> + this - > pc_ + len , <nl> + " struct . new_with_rtt expected type rtt , found % s of type % s " , <nl> + SafeOpcodeNameAt ( rtt . pc ) , rtt . type . type_name ( ) . c_str ( ) ) ; <nl> + break ; <nl> + } <nl> + / / TODO ( 7748 ) : Drop this check if { imm } is dropped from the proposal <nl> + / / à la https : / / github . com / WebAssembly / function - references / pull / 31 . <nl> + if ( ! VALIDATE ( rtt . type . heap ( ) = = imm . index ) ) { <nl> + this - > errorf ( this - > pc_ + len , <nl> + " struct . new_with_rtt expected rtt for type % d , found " <nl> + " rtt for type % s " , <nl> + imm . index , rtt . type . heap_type ( ) . name ( ) . c_str ( ) ) ; <nl> + break ; <nl> + } <nl> + ArgVector args = PopArgs ( imm . struct_type ) ; <nl> + Value * value = Push ( ValueType : : Ref ( imm . index , kNonNullable ) ) ; <nl> + CALL_INTERFACE_IF_REACHABLE ( StructNewWithRtt , imm , rtt , args . begin ( ) , <nl> + value ) ; <nl> + break ; <nl> + } <nl> case kExprStructGet : { <nl> FieldIndexImmediate < validate > field ( this , this - > pc_ + 2 ) ; <nl> len + = field . length ; <nl> mmm a / src / wasm / graph - builder - interface . cc <nl> ppp b / src / wasm / graph - builder - interface . cc <nl> class WasmGraphBuildingInterface { <nl> BUILD ( StructNew , imm . index , imm . struct_type , VectorOf ( arg_nodes ) ) ; <nl> } <nl> <nl> + void StructNewWithRtt ( FullDecoder * decoder , <nl> + const StructIndexImmediate < validate > & imm , <nl> + const Value & rtt , const Value args [ ] , Value * result ) { <nl> + uint32_t field_count = imm . struct_type - > field_count ( ) ; <nl> + base : : SmallVector < TFNode * , 16 > arg_nodes ( field_count ) ; <nl> + for ( uint32_t i = 0 ; i < field_count ; i + + ) { <nl> + arg_nodes [ i ] = args [ i ] . node ; <nl> + } <nl> + result - > node = BUILD ( StructNewWithRtt , imm . index , imm . struct_type , rtt . node , <nl> + VectorOf ( arg_nodes ) ) ; <nl> + } <nl> + <nl> void StructGet ( FullDecoder * decoder , const Value & struct_object , <nl> const FieldIndexImmediate < validate > & field , bool is_signed , <nl> Value * result ) { <nl> mmm a / src / wasm / wasm - opcodes - inl . h <nl> ppp b / src / wasm / wasm - opcodes - inl . h <nl> constexpr const char * WasmOpcodes : : OpcodeName ( WasmOpcode opcode ) { <nl> <nl> / / GC operations . <nl> CASE_OP ( StructNew , " struct . new " ) <nl> - CASE_OP ( StructNewSub , " struct . new_sub " ) <nl> + CASE_OP ( StructNewWithRtt , " struct . new_with_rtt " ) <nl> CASE_OP ( StructNewDefault , " struct . new_default " ) <nl> CASE_OP ( StructGet , " struct . get " ) <nl> CASE_OP ( StructGetS , " struct . get_s " ) <nl> mmm a / src / wasm / wasm - opcodes . h <nl> ppp b / src / wasm / wasm - opcodes . h <nl> bool IsJSCompatibleSignature ( const FunctionSig * sig , const WasmFeatures & ) ; <nl> <nl> # define FOREACH_GC_OPCODE ( V ) \ <nl> V ( StructNew , 0xfb00 , _ ) \ <nl> - V ( StructNewSub , 0xfb01 , _ ) \ <nl> + V ( StructNewWithRtt , 0xfb01 , _ ) \ <nl> V ( StructNewDefault , 0xfb02 , _ ) \ <nl> V ( StructGet , 0xfb03 , _ ) \ <nl> V ( StructGetS , 0xfb04 , _ ) \ <nl> mmm a / test / cctest / wasm / test - gc . cc <nl> ppp b / test / cctest / wasm / test - gc . cc <nl> TEST ( BasicRTT ) { <nl> ValueType kRttSubtypes [ ] = { <nl> ValueType : : Rtt ( static_cast < HeapType > ( subtype_index ) , 2 ) } ; <nl> FunctionSig sig_t2_v ( 1 , 0 , kRttSubtypes ) ; <nl> + ValueType kRefTypes [ ] = { <nl> + ValueType : : Ref ( static_cast < HeapType > ( type_index ) , kNonNullable ) } ; <nl> + FunctionSig sig_q_v ( 1 , 0 , kRefTypes ) ; <nl> <nl> tester . DefineFunction ( " f " , & sig_t_v , { } , <nl> { WASM_RTT_CANON ( type_index ) , kExprEnd } ) ; <nl> tester . DefineFunction ( <nl> " g " , & sig_t2_v , { } , <nl> { WASM_RTT_CANON ( type_index ) , WASM_RTT_SUB ( subtype_index ) , kExprEnd } ) ; <nl> + tester . DefineFunction ( " h " , & sig_q_v , { } , <nl> + { WASM_STRUCT_NEW_WITH_RTT ( type_index , WASM_I32V ( 42 ) , <nl> + WASM_RTT_CANON ( type_index ) ) , <nl> + kExprEnd } ) ; <nl> <nl> tester . CompileModule ( ) ; <nl> <nl> TEST ( BasicRTT ) { <nl> CHECK_EQ ( reinterpret_cast < Address > ( <nl> tester . instance ( ) - > module ( ) - > struct_type ( subtype_index ) ) , <nl> submap - > wasm_type_info ( ) . foreign_address ( ) ) ; <nl> + <nl> + Handle < Object > s = tester . GetJSResult ( " h " , { } ) . ToHandleChecked ( ) ; <nl> + CHECK ( s - > IsWasmStruct ( ) ) ; <nl> + CHECK_EQ ( Handle < WasmStruct > : : cast ( s ) - > map ( ) , * map ) ; <nl> } <nl> <nl> TEST ( BasicI31 ) { <nl> mmm a / test / common / wasm / wasm - macro - gen . h <nl> ppp b / test / common / wasm / wasm - macro - gen . h <nl> inline WasmOpcode LoadStoreOpcodeOf ( MachineType type , bool store ) { <nl> # define WASM_GC_OP ( op ) kGCPrefix , static_cast < byte > ( op ) <nl> # define WASM_STRUCT_NEW ( index , . . . ) \ <nl> __VA_ARGS__ , WASM_GC_OP ( kExprStructNew ) , static_cast < byte > ( index ) <nl> + # define WASM_STRUCT_NEW_WITH_RTT ( index , . . . ) \ <nl> + __VA_ARGS__ , WASM_GC_OP ( kExprStructNewWithRtt ) , static_cast < byte > ( index ) <nl> # define WASM_STRUCT_GET ( typeidx , fieldidx , struct_obj ) \ <nl> struct_obj , WASM_GC_OP ( kExprStructGet ) , static_cast < byte > ( typeidx ) , \ <nl> static_cast < byte > ( fieldidx ) <nl>
|
[ wasm - gc ] Implement struct . new_with_rtt
|
v8/v8
|
26626f8731697ec98bc71b73164945c6cd3263a0
|
2020-06-30T18:59:55Z
|
new file mode 100644 <nl> index 000000000000 . . b8bf3849ee72 <nl> mmm / dev / null <nl> ppp b / docs / ExternalResources . md <nl> <nl> + # External Resources <nl> + <nl> + The official [ Swift blog ] ( https : / / swift . org / blog / ) has a lot of useful <nl> + information , such as [ how runtime reflection works ] [ mirror - post ] and how the <nl> + compiler ' s [ new diagnostic architecture ] [ diagnostic - arch - post ] is structured . <nl> + <nl> + [ mirror - post ] : https : / / swift . org / blog / how - mirror - works / <nl> + [ diagnostic - arch - post ] : https : / / swift . org / blog / new - diagnostic - arch - overview / <nl> + <nl> + This page lists some external resources apart from the Swift blog which may be <nl> + helpful for people interested in contributing to Swift . The resources are listed <nl> + in reverse - chronological order and organized by topic . <nl> + <nl> + < ! - - <nl> + Some resources don ' t fall cleanly into one topic bucket or another ; in such a <nl> + case we break the tie arbitrarily . <nl> + - - > <nl> + <nl> + < ! - - <nl> + The textual descriptions should be written in a way that makes it clear <nl> + which topics are discussed , and what a potential contributor to Swift <nl> + will gain from it . This is usually different from the talk ' s abstract . <nl> + - - > <nl> + <nl> + # # Contributing Guides and Tips <nl> + <nl> + - [ Steps for first PR and asking questions ] [ ] by Varun Gandhi ( Swift forum <nl> + comment , Dec 2019 ) . <nl> + - [ Contributing to Swift for the First Time ] [ ] by Robert Pieta ( talk , Jun 2019 ) : <nl> + This talk describes Robert ' s experience contributing to <nl> + ` swift - corelibs - foundation ` and later ` swift ` , providing a step - by - step guide <nl> + for new contributors to get their feet wet . <nl> + - [ Contributing to Swift compiler ] [ ] by Yusuke Kita ( lightning talk , Apr 2019 ) . <nl> + - Contributing to Swift ( [ Part 1 ] [ Contributing to Swift - Part 1 ] , <nl> + [ Part 2 ] [ Contributing to Swift - Part 2 ] ) by Suyash Srijan ( blog post series , <nl> + Dec 2018 ) . <nl> + - [ Setting up a compile - edit - test cycle ] [ ] by Robert Widmann ( Swift forum <nl> + comment , May 2018 ) <nl> + - [ Becoming an Effective Contributor to Swift ] [ ] by Harlan Haskins and Robert <nl> + Widmann ( talk , Apr 2018 ) : Covers the following topics : <nl> + - The organization of different projects part of the Swift monorepo . <nl> + - How to set up an environment for building Swift . <nl> + - Common utilities and compiler flags for debugging different stages . <nl> + - Common build configurations . <nl> + - Tips and tricks for testing : early exiting , filtering tests , <nl> + testing Swift and Objective - C together , using ` PrettyStackTrace ` . <nl> + - A live demo fixing a crash : <nl> + - Copying program arguments into Xcode for debugging . <nl> + - Using ` dump ( ) ` for print debugging . <nl> + - [ Getting Started with Swift Compiler Development ] [ ] by Brian Gesiak ( blog post <nl> + series , Aug 2017 - Jun 2018 ) <nl> + - [ Contributing to Open Source Swift ] [ ] by Jesse Squires ( talk , Mar 2016 ) : <nl> + Covers the following topics : <nl> + - The overall compiler pipeline . <nl> + - The organization of different projects part of the Swift monorepo , <nl> + including some " difficulty levels " for different projects . <nl> + - Tips for contributing effectively . <nl> + <nl> + [ Steps for first PR and asking questions ] : <nl> + https : / / forums . swift . org / t / getting - started - with - swift - compiler - development / 31502 / 2 <nl> + [ Contributing to Swift for the First Time ] : https : / / youtu . be / 51j7TrFNKiA <nl> + [ Contributing to Swift compiler ] : https : / / youtu . be / HAXJsgYniqE <nl> + [ Contributing to Swift - Part 1 ] : https : / / medium . com / kinandcartacreated / contributing - to - swift - part - 1 - ea19108a2a54 <nl> + [ Contributing to Swift - Part 2 ] : <nl> + https : / / medium . com / kinandcartacreated / contributing - to - swift - part - 2 - efebcf7b6c93 <nl> + [ Setting up a compile - edit - test cycle ] : https : / / forums . swift . org / t / need - a - workflow - advice / 12536 / 14 <nl> + [ Becoming an Effective Contributor to Swift ] : https : / / youtu . be / oGJKsp - pZPk <nl> + [ Getting Started with Swift Compiler Development ] : https : / / modocache . io / getting - started - with - swift - development <nl> + [ Contributing to Open Source Swift ] : https : / / youtu . be / Ysa2n8ZX - YY <nl> + <nl> + # # AST <nl> + <nl> + - [ The secret life of types in Swift ] [ ] by Slava Pestov ( blog post , Jul 2016 ) : <nl> + This blog post describes the representation of Swift types inside the compiler . <nl> + It covers many important concepts : ` TypeLoc ` vs ` TypeRepr ` vs ` Type ` , the <nl> + representation of generic types , substitutions and more . <nl> + < ! - - TODO : It would be great to integrate some of the descriptions <nl> + in this blog post into the compiler ' s own doc comments . - - > <nl> + <nl> + [ The secret life of types in Swift ] : https : / / medium . com / @ slavapestov / the - secret - life - of - types - in - swift - ff83c3c000a5 <nl> + <nl> + # # # libSyntax and SwiftSyntax <nl> + <nl> + - [ An overview of SwiftSyntax ] [ ] by Luciano Almeida ( blog post , Apr 2019 ) : <nl> + This post provides a quick tour of libSyntax and SwiftSyntax . <nl> + - [ Improving Swift Tools with libSyntax ] [ ] by Harlan Haskins ( talk , Sep 2017 ) : <nl> + This talk describes the design of libSyntax / SwiftSyntax and discusses some <nl> + useful APIs . It also describes how to write a simple Swift formatter using the <nl> + library . <nl> + <nl> + [ An overview of SwiftSyntax ] : https : / / medium . com / @ lucianoalmeida1 / an - overview - of - swiftsyntax - cf1ae6d53494 <nl> + [ Improving Swift Tools with libSyntax ] : https : / / youtu . be / 5ivuYGxW_3M <nl> + <nl> + # # Type checking and inference <nl> + <nl> + - [ Implementing Swift Generics ] [ ] by Slava Pestov and John McCall ( talk , Oct 2017 ) : <nl> + This talk dives into how Swift ' s compilation scheme for generics balances <nl> + ( a ) modularity and separate compilation with ( b ) the ability to pass unboxed <nl> + values and ( c ) the flexibility to optionally generate fully specialized code . <nl> + It covers the following type - checking related topics : type - checking generic <nl> + contexts , requirement paths and canonicalized generic signatures . <nl> + - [ A Type System from Scratch ] [ ] by Robert Widmann ( talk , Apr 2017 ) : <nl> + This talk covers several topics related to type - checking and inference in Swift : <nl> + - Understanding sequent notation which can be used to represent typing judgments . <nl> + - An overview of how bidirectional type - checking works . <nl> + - Examples of checking and inferring types for some Swift expressions . <nl> + - Interaction complexity of different type system features with type inference . <nl> + - Type variables and constraint graphs . <nl> + <nl> + [ Implementing Swift Generics ] : https : / / youtu . be / ctS8FzqcRug <nl> + [ A Type System from Scratch ] : https : / / youtu . be / IbjoA5xVUq0 <nl> + <nl> + # # SIL <nl> + <nl> + - [ Ownership SSA ] [ ] by Michael Gottesman ( talk , Oct 2019 ) : This talk describes <nl> + efficiency and correctness challenges with automatic reference counting and <nl> + how including ownership semantics in the compiler ' s intermediate representation <nl> + helps tackles those challenges . <nl> + - [ How to talk to your kids about SIL type use ] [ ] by Slava Pestov ( blog post , <nl> + Jul 2016 ) : This blog post describes several important SIL concepts : object <nl> + vs address types , AST - > SIL type lowering , trivial vs loadable vs <nl> + address - only SIL types , abstraction patterns and more . <nl> + - [ Swift ' s High - Level IR ] [ ] by Joe Groff and Chris Lattner ( talk , Oct 2015 ) : <nl> + This talk describes the goals and design of SIL . It covers the following : <nl> + - Some commonly used SIL instructions and how they are motivated by language <nl> + features . <nl> + - Some early passes in SIL processing , such as mandatory inlining , <nl> + box - to - stack promotion and definite initialization . <nl> + - Why SIL is useful as an intermediate representation between the AST and <nl> + LLVM IR . <nl> + <nl> + [ Ownership SSA ] : https : / / youtu . be / qy3iZPHZ88o <nl> + [ How to talk to your kids about SIL type use ] : https : / / medium . com / @ slavapestov / how - to - talk - to - your - kids - about - sil - type - use - 6b45f7595f43 <nl> + [ Swift ' s High - Level IR ] : https : / / youtu . be / Ntj8ab - 5cvE <nl> + <nl> + # # Code generation , runtime and ABI <nl> + <nl> + - [ How Swift Achieved Dynamic Linking Where Rust Couldn ' t ] [ ] by Alexis <nl> + Beingessner ( blog post , Nov 2019 ) : This blog post describes Swift ' s approach <nl> + for compiling polymorphic functions , contrasting it with the strategy used by <nl> + Rust and C + + ( monomorphization ) . It covers the following topics : ABI stability , <nl> + library evolution , resilient type layout , reabstraction , materialization , <nl> + ownership and calling conventions . <nl> + - [ arm64e : An ABI for Pointer Authentication ] [ ] by Ahmed Bougacha and John McCall <nl> + ( talk , Oct 2019 ) : This talk does not mention Swift specifically , but provides a <nl> + good background on the arm64e ABI and pointer authentication . The ABI affects <nl> + parts of IR generation , the Swift runtime , and small parts of the standard <nl> + library using unsafe code . <nl> + - [ Exploiting The Swift ABI ] [ ] by Robert Widmann ( talk , July 2019 ) : <nl> + This talk is a whirlwind tour of different aspects of the Swift ABI and runtime <nl> + touching the following topics : reflection , type layout , ABI entrypoints , <nl> + Swift ' s compilation model for generics and archetypes , witness tables , <nl> + relative references , context descriptors and more . <nl> + - [ Efficiently Implementing Runtime Metadata ] [ ] by Joe Groff and Doug Gregor <nl> + ( talk , Oct 2018 ) : This talk covers the use of relative references in Swift ' s <nl> + runtime metadata structures . After describing some important metrics impacted <nl> + by the use of dynamic libraries , it goes through the different kinds of <nl> + relative references used in the Swift runtime and the resulting tooling and <nl> + performance benefits . <nl> + - [ Coroutine Representations and ABIs in LLVM ] [ ] by John McCall ( talk , Oct 2018 ) : <nl> + This talk describes several points in the design space for coroutines , diving <nl> + into important implementation tradeoffs . It explains how different language <nl> + features can be built on top of coroutines and how they impose different <nl> + design requirements . It also contrasts C + + 20 ' s coroutines feature with <nl> + Swift ' s accessors , describing the differences between the two as implemented <nl> + in LLVM . <nl> + - [ Implementing Swift Generics ] [ ] : This talk is mentioned in the type - checking <nl> + section . It also covers the following code generation and runtime topics : <nl> + value witness tables , type metadata , abstraction patterns , reabstraction , <nl> + reabstraction thunks and protocol witness tables . <nl> + <nl> + [ How Swift Achieved Dynamic Linking Where Rust Couldn ' t ] : https : / / gankra . github . io / blah / swift - abi / <nl> + [ arm64e : An ABI for Pointer Authentication ] : https : / / youtu . be / C1nZvpEBfYA <nl> + [ Exploiting The Swift ABI ] : https : / / youtu . be / 0rHG_Pa86oA <nl> + [ Efficiently Implementing Runtime Metadata ] : https : / / youtu . be / G3bpj - 4tWVU <nl> + [ Coroutine Representations and ABIs in LLVM ] : https : / / youtu . be / wyAbV8AM9PM <nl> mmm a / docs / README . md <nl> ppp b / docs / README . md <nl> They are preserved mostly for historical interest . <nl> <nl> # # External Resources <nl> <nl> - The official [ Swift blog ] ( https : / / swift . org / blog / ) contains a lot of useful <nl> - information , such as how library evolution works and how the compiler ' s new <nl> - diagnostic architecture is structured , helping us provide more precise <nl> - diagnostics . <nl> - <nl> - TODO : Add a new document ExternalResources . md . <nl> + External resources are listed in [ docs / ExternalResources . md ] ( ExternalResources . md ) . <nl> + These cover a variety of topics , <nl> + such as the design of different aspects of the Swift compiler and runtime <nl> + and contributing to the project more effectively . <nl> <nl> # # Uncategorized <nl> <nl>
|
Merge remote - tracking branch ' origin / master ' into master - next
|
apple/swift
|
f89cd08c93044a4a80fb304dbcef8767d0f8a867
|
2020-06-29T22:39:09Z
|
mmm a / tensorflow / contrib / tensorrt / convert / convert_nodes_test . cc <nl> ppp b / tensorflow / contrib / tensorrt / convert / convert_nodes_test . cc <nl> TEST_F ( OpConverterTest , ConvertExpandDims ) { <nl> TRT_TensorOrWeights output ; <nl> TF_EXPECT_OK ( GetTensorOrWeights ( " my_expanddims " , & output ) ) ; <nl> EXPECT_TRUE ( output . is_tensor ( ) ) ; <nl> - EXPECT_TRUE ( TrtDimsEqualsArray ( { 1 , 2 , 3 } , output . tensor ( ) - > getDimensions ( ) ) ) <nl> - < < output . DebugString ( ) ; <nl> + ExpectTrtDimsEqualsArray ( { 1 , 2 , 3 } , output . tensor ( ) - > getDimensions ( ) ) ; <nl> <nl> std : : vector < float > output_data ( 6 ) ; <nl> - BuildAndRun ( " input " , { 1 , 2 , 3 , 4 , 5 , 6 } , " my_expanddims " , & output_data ) ; <nl> + BuildAndRun < float > ( { { " input " , { 1 , 2 , 3 , 4 , 5 , 6 } } } , " my_expanddims " , <nl> + & output_data ) ; <nl> EXPECT_THAT ( output_data , ElementsAre ( 1 , 2 , 3 , 4 , 5 , 6 ) ) ; <nl> } <nl> { <nl> TEST_F ( OpConverterTest , ConvertExpandDims ) { <nl> TRT_TensorOrWeights output ; <nl> TF_EXPECT_OK ( GetTensorOrWeights ( " my_expanddims " , & output ) ) ; <nl> EXPECT_TRUE ( output . is_tensor ( ) ) ; <nl> - EXPECT_TRUE ( TrtDimsEqualsArray ( { 2 , 3 , 1 } , output . tensor ( ) - > getDimensions ( ) ) ) <nl> - < < output . DebugString ( ) ; <nl> + ExpectTrtDimsEqualsArray ( { 2 , 3 , 1 } , output . tensor ( ) - > getDimensions ( ) ) ; <nl> <nl> std : : vector < float > output_data ( 6 ) ; <nl> - BuildAndRun ( " input " , { 1 , 2 , 3 , 4 , 5 , 6 } , " my_expanddims " , & output_data ) ; <nl> + BuildAndRun < float > ( { { " input " , { 1 , 2 , 3 , 4 , 5 , 6 } } } , " my_expanddims " , <nl> + & output_data ) ; <nl> EXPECT_THAT ( output_data , ElementsAre ( 1 , 2 , 3 , 4 , 5 , 6 ) ) ; <nl> } <nl> { <nl> TEST_F ( OpConverterTest , ConvertExpandDims ) { <nl> TRT_TensorOrWeights output ; <nl> TF_EXPECT_OK ( GetTensorOrWeights ( " my_expanddims " , & output ) ) ; <nl> EXPECT_TRUE ( output . is_tensor ( ) ) ; <nl> - EXPECT_TRUE ( TrtDimsEqualsArray ( { 2 , 3 , 1 } , output . tensor ( ) - > getDimensions ( ) ) ) <nl> - < < output . DebugString ( ) ; <nl> + ExpectTrtDimsEqualsArray ( { 2 , 3 , 1 } , output . tensor ( ) - > getDimensions ( ) ) ; <nl> <nl> std : : vector < float > output_data ( 6 ) ; <nl> - BuildAndRun ( " input " , { 1 , 2 , 3 , 4 , 5 , 6 } , " my_expanddims " , & output_data ) ; <nl> + BuildAndRun < float > ( { { " input " , { 1 , 2 , 3 , 4 , 5 , 6 } } } , " my_expanddims " , <nl> + & output_data ) ; <nl> EXPECT_THAT ( output_data , ElementsAre ( 1 , 2 , 3 , 4 , 5 , 6 ) ) ; <nl> } <nl> } <nl> TEST_F ( OpConverterTest , ConvertSqueeze ) { <nl> auto input = ops : : Placeholder ( s . WithOpName ( " input " ) , DT_FLOAT ) ; <nl> ops : : Squeeze : : Attrs squeeze_attrs ; <nl> squeeze_attrs . axis_ = gtl : : ArraySlice < int > ( axis ) ; <nl> - auto squeeze = ops : : Squeeze ( s . WithOpName ( " my_squeeze " ) , input , squeeze_attrs ) ; <nl> + auto squeeze = ops : : Squeeze ( s . WithOpName ( " my_squeeze " ) , input , <nl> + squeeze_attrs ) ; <nl> return squeeze . operation . node ( ) - > def ( ) ; <nl> } ; <nl> <nl> TEST_F ( OpConverterTest , ConvertSqueeze ) { <nl> TRT_TensorOrWeights output ; <nl> TF_EXPECT_OK ( GetTensorOrWeights ( " my_squeeze " , & output ) ) ; <nl> EXPECT_TRUE ( output . is_tensor ( ) ) ; <nl> - EXPECT_TRUE ( TrtDimsEqualsArray ( { 2 , 3 } , output . tensor ( ) - > getDimensions ( ) ) ) <nl> - < < output . DebugString ( ) ; <nl> + ExpectTrtDimsEqualsArray ( { 2 , 3 } , output . tensor ( ) - > getDimensions ( ) ) ; <nl> <nl> std : : vector < float > output_data ( 6 ) ; <nl> - BuildAndRun ( " input " , { 1 , 2 , 3 , 4 , 5 , 6 } , " my_squeeze " , & output_data ) ; <nl> + BuildAndRun < float > ( { { " input " , { 1 , 2 , 3 , 4 , 5 , 6 } } } , " my_squeeze " , <nl> + & output_data ) ; <nl> EXPECT_THAT ( output_data , ElementsAre ( 1 , 2 , 3 , 4 , 5 , 6 ) ) ; <nl> } <nl> { <nl> TEST_F ( OpConverterTest , ConvertSqueeze ) { <nl> TRT_TensorOrWeights output ; <nl> TF_EXPECT_OK ( GetTensorOrWeights ( " my_squeeze " , & output ) ) ; <nl> EXPECT_TRUE ( output . is_tensor ( ) ) ; <nl> - EXPECT_TRUE ( TrtDimsEqualsArray ( { 2 , 3 } , output . tensor ( ) - > getDimensions ( ) ) ) <nl> - < < output . DebugString ( ) ; <nl> + ExpectTrtDimsEqualsArray ( { 2 , 3 } , output . tensor ( ) - > getDimensions ( ) ) ; <nl> <nl> std : : vector < float > output_data ( 6 ) ; <nl> - BuildAndRun ( " input " , { 1 , 2 , 3 , 4 , 5 , 6 } , " my_squeeze " , & output_data ) ; <nl> + BuildAndRun < float > ( { { " input " , { 1 , 2 , 3 , 4 , 5 , 6 } } } , " my_squeeze " , <nl> + & output_data ) ; <nl> EXPECT_THAT ( output_data , ElementsAre ( 1 , 2 , 3 , 4 , 5 , 6 ) ) ; <nl> } <nl> { <nl> TEST_F ( OpConverterTest , ConvertSqueeze ) { <nl> TRT_TensorOrWeights output ; <nl> TF_EXPECT_OK ( GetTensorOrWeights ( " my_squeeze " , & output ) ) ; <nl> EXPECT_TRUE ( output . is_tensor ( ) ) ; <nl> - EXPECT_TRUE ( TrtDimsEqualsArray ( { 2 , 3 } , output . tensor ( ) - > getDimensions ( ) ) ) <nl> - < < output . DebugString ( ) ; <nl> + ExpectTrtDimsEqualsArray ( { 2 , 3 } , output . tensor ( ) - > getDimensions ( ) ) ; <nl> <nl> std : : vector < float > output_data ( 6 ) ; <nl> - BuildAndRun ( " input " , { 1 , 2 , 3 , 4 , 5 , 6 } , " my_squeeze " , & output_data ) ; <nl> + BuildAndRun < float > ( { { " input " , { 1 , 2 , 3 , 4 , 5 , 6 } } } , " my_squeeze " , <nl> + & output_data ) ; <nl> EXPECT_THAT ( output_data , ElementsAre ( 1 , 2 , 3 , 4 , 5 , 6 ) ) ; <nl> } <nl> { <nl> TEST_F ( OpConverterTest , ConvertSqueeze ) { <nl> TRT_TensorOrWeights output ; <nl> TF_EXPECT_OK ( GetTensorOrWeights ( " my_squeeze " , & output ) ) ; <nl> EXPECT_TRUE ( output . is_tensor ( ) ) ; <nl> - EXPECT_TRUE ( TrtDimsEqualsArray ( { 2 , 3 } , output . tensor ( ) - > getDimensions ( ) ) ) <nl> - < < output . DebugString ( ) ; <nl> + ExpectTrtDimsEqualsArray ( { 2 , 3 } , output . tensor ( ) - > getDimensions ( ) ) ; <nl> <nl> std : : vector < float > output_data ( 6 ) ; <nl> - BuildAndRun ( " input " , { 1 , 2 , 3 , 4 , 5 , 6 } , " my_squeeze " , & output_data ) ; <nl> + BuildAndRun < float > ( { { " input " , { 1 , 2 , 3 , 4 , 5 , 6 } } } , " my_squeeze " , <nl> + & output_data ) ; <nl> EXPECT_THAT ( output_data , ElementsAre ( 1 , 2 , 3 , 4 , 5 , 6 ) ) ; <nl> } <nl> } <nl>
|
Fix compilation error with BuildAndRun , Use ExpectTrtDimsEqualsArray , Fix formatting
|
tensorflow/tensorflow
|
dbe1a6bd852b8d03fccc6b6df7ee0b6f65ad7ca8
|
2018-12-05T19:33:41Z
|
mmm a / src / wasm / wasm - module - builder . cc <nl> ppp b / src / wasm / wasm - module - builder . cc <nl> WasmModuleBuilder : : WasmModuleBuilder ( Zone * zone ) <nl> function_exports_ ( zone ) , <nl> global_imports_ ( zone ) , <nl> global_exports_ ( zone ) , <nl> + memory_exports_ ( zone ) , <nl> functions_ ( zone ) , <nl> data_segments_ ( zone ) , <nl> indirect_functions_ ( zone ) , <nl> void WasmModuleBuilder : : SetMaxMemorySize ( uint32_t value ) { <nl> max_memory_size_ = value ; <nl> } <nl> <nl> + void WasmModuleBuilder : : AddExportedMemory ( Vector < const char > name , <nl> + uint32_t index ) { <nl> + memory_exports_ . push_back ( { name , index } ) ; <nl> + } <nl> + <nl> void WasmModuleBuilder : : SetHasSharedMemory ( ) { has_shared_memory_ = true ; } <nl> <nl> void WasmModuleBuilder : : WriteTo ( ZoneBuffer * buffer ) const { <nl> void WasmModuleBuilder : : WriteTo ( ZoneBuffer * buffer ) const { <nl> } <nl> <nl> / / = = emit exports = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - if ( global_exports_ . size ( ) + function_exports_ . size ( ) > 0 ) { <nl> + size_t num_exports = global_exports_ . size ( ) + function_exports_ . size ( ) + <nl> + memory_exports_ . size ( ) ; <nl> + if ( num_exports > 0 ) { <nl> size_t start = EmitSection ( kExportSectionCode , buffer ) ; <nl> - buffer - > write_size ( global_exports_ . size ( ) + function_exports_ . size ( ) ) ; <nl> + buffer - > write_size ( num_exports ) ; <nl> for ( auto global_export : global_exports_ ) { <nl> buffer - > write_string ( global_export . name ) ; <nl> buffer - > write_u8 ( kExternalGlobal ) ; <nl> void WasmModuleBuilder : : WriteTo ( ZoneBuffer * buffer ) const { <nl> buffer - > write_size ( function_export . function_index + <nl> function_imports_ . size ( ) ) ; <nl> } <nl> + for ( auto memory_export : memory_exports_ ) { <nl> + buffer - > write_string ( memory_export . name ) ; <nl> + buffer - > write_u8 ( kExternalMemory ) ; <nl> + buffer - > write_size ( memory_export . memory_index ) ; <nl> + } <nl> FixupSection ( buffer , start ) ; <nl> } <nl> <nl> mmm a / src / wasm / wasm - module - builder . h <nl> ppp b / src / wasm / wasm - module - builder . h <nl> class V8_EXPORT_PRIVATE WasmModuleBuilder : public ZoneObject { <nl> uint32_t AddExportedGlobal ( ValueType type , bool mutability , <nl> const WasmInitExpr & init , Vector < const char > name ) ; <nl> void AddExportedImport ( Vector < const char > name , int import_index ) ; <nl> + void AddExportedMemory ( Vector < const char > name , uint32_t memory_index ) ; <nl> void SetMinMemorySize ( uint32_t value ) ; <nl> void SetMaxMemorySize ( uint32_t value ) ; <nl> void SetHasSharedMemory ( ) ; <nl> class V8_EXPORT_PRIVATE WasmModuleBuilder : public ZoneObject { <nl> WasmInitExpr init ; <nl> } ; <nl> <nl> + struct WasmMemoryExport { <nl> + Vector < const char > name ; <nl> + uint32_t memory_index ; <nl> + } ; <nl> + <nl> struct WasmDataSegment { <nl> ZoneVector < byte > data ; <nl> uint32_t dest ; <nl> class V8_EXPORT_PRIVATE WasmModuleBuilder : public ZoneObject { <nl> ZoneVector < WasmFunctionExport > function_exports_ ; <nl> ZoneVector < WasmGlobalImport > global_imports_ ; <nl> ZoneVector < WasmGlobalExport > global_exports_ ; <nl> + ZoneVector < WasmMemoryExport > memory_exports_ ; <nl> ZoneVector < WasmFunctionBuilder * > functions_ ; <nl> ZoneVector < WasmDataSegment > data_segments_ ; <nl> ZoneVector < uint32_t > indirect_functions_ ; <nl> mmm a / test / wasm - api - tests / BUILD . gn <nl> ppp b / test / wasm - api - tests / BUILD . gn <nl> v8_executable ( " wasm_api_tests " ) { <nl> " callbacks . cc " , <nl> " finalize . cc " , <nl> " globals . cc " , <nl> + " memory . cc " , <nl> " run - all - wasm - api - tests . cc " , <nl> " wasm - api - test . h " , <nl> ] <nl> new file mode 100644 <nl> index 00000000000 . . 074fe8bec60 <nl> mmm / dev / null <nl> ppp b / test / wasm - api - tests / memory . cc <nl> <nl> + / / Copyright 2019 the V8 project authors . All rights reserved . <nl> + / / Use of this source code is governed by a BSD - style license that can be <nl> + / / found in the LICENSE file . <nl> + <nl> + # include " test / wasm - api - tests / wasm - api - test . h " <nl> + <nl> + namespace v8 { <nl> + namespace internal { <nl> + namespace wasm { <nl> + <nl> + using : : wasm : : Limits ; <nl> + using : : wasm : : MemoryType ; <nl> + <nl> + TEST_F ( WasmCapiTest , Memory ) { <nl> + builder ( ) - > SetMinMemorySize ( 2 ) ; <nl> + builder ( ) - > SetMaxMemorySize ( 3 ) ; <nl> + builder ( ) - > AddExportedMemory ( CStrVector ( " memory " ) , 0 ) ; <nl> + <nl> + ValueType i32_type [ ] = { kWasmI32 , kWasmI32 } ; <nl> + FunctionSig return_i32 ( 1 , 0 , i32_type ) ; <nl> + FunctionSig param_i32_return_i32 ( 1 , 1 , i32_type ) ; <nl> + FunctionSig param_i32_i32 ( 0 , 2 , i32_type ) ; <nl> + byte size_code [ ] = { WASM_MEMORY_SIZE } ; <nl> + AddExportedFunction ( CStrVector ( " size " ) , size_code , sizeof ( size_code ) , <nl> + & return_i32 ) ; <nl> + byte load_code [ ] = { WASM_LOAD_MEM ( MachineType : : Int8 ( ) , WASM_GET_LOCAL ( 0 ) ) } ; <nl> + AddExportedFunction ( CStrVector ( " load " ) , load_code , sizeof ( load_code ) , <nl> + & param_i32_return_i32 ) ; <nl> + byte store_code [ ] = { WASM_STORE_MEM ( MachineType : : Int8 ( ) , WASM_GET_LOCAL ( 0 ) , <nl> + WASM_GET_LOCAL ( 1 ) ) } ; <nl> + AddExportedFunction ( CStrVector ( " store " ) , store_code , sizeof ( store_code ) , <nl> + & param_i32_i32 ) ; <nl> + <nl> + byte data [ ] = { 0x1 , 0x2 , 0x3 , 0x4 } ; <nl> + builder ( ) - > AddDataSegment ( data , sizeof ( data ) , 0x1000 ) ; <nl> + <nl> + Instantiate ( nullptr ) ; <nl> + <nl> + / / TODO ( jkummerow ) : Getting exports by index leaks implementation details <nl> + / / of the module builder . It would be nicer to get exports by name instead . <nl> + Func * size_func = GetExportedFunction ( 0 ) ; <nl> + Func * load_func = GetExportedFunction ( 1 ) ; <nl> + Func * store_func = GetExportedFunction ( 2 ) ; <nl> + Memory * memory = GetExportedMemory ( 3 ) ; <nl> + <nl> + / / Check initial state . <nl> + EXPECT_EQ ( 2u , memory - > size ( ) ) ; <nl> + EXPECT_EQ ( 0x20000u , memory - > data_size ( ) ) ; <nl> + EXPECT_EQ ( 0 , memory - > data ( ) [ 0 ] ) ; <nl> + EXPECT_EQ ( 1 , memory - > data ( ) [ 0x1000 ] ) ; <nl> + EXPECT_EQ ( 4 , memory - > data ( ) [ 0x1003 ] ) ; <nl> + Val args [ 2 ] ; <nl> + Val result [ 1 ] ; <nl> + / / size = = 2 <nl> + size_func - > call ( nullptr , result ) ; <nl> + EXPECT_EQ ( 2 , result [ 0 ] . i32 ( ) ) ; <nl> + / / load ( 0 ) = = 0 <nl> + args [ 0 ] = Val : : i32 ( 0x0 ) ; <nl> + load_func - > call ( args , result ) ; <nl> + EXPECT_EQ ( 0 , result [ 0 ] . i32 ( ) ) ; <nl> + / / load ( 0x1000 ) = = 1 <nl> + args [ 0 ] = Val : : i32 ( 0x1000 ) ; <nl> + load_func - > call ( args , result ) ; <nl> + EXPECT_EQ ( 1 , result [ 0 ] . i32 ( ) ) ; <nl> + / / load ( 0x1003 ) = = 4 <nl> + args [ 0 ] = Val : : i32 ( 0x1003 ) ; <nl> + load_func - > call ( args , result ) ; <nl> + EXPECT_EQ ( 4 , result [ 0 ] . i32 ( ) ) ; <nl> + / / load ( 0x1FFFF ) = = 0 <nl> + args [ 0 ] = Val : : i32 ( 0x1FFFF ) ; <nl> + load_func - > call ( args , result ) ; <nl> + EXPECT_EQ ( 0 , result [ 0 ] . i32 ( ) ) ; <nl> + / / load ( 0x20000 ) - > trap <nl> + args [ 0 ] = Val : : i32 ( 0x20000 ) ; <nl> + own < Trap * > trap = load_func - > call ( args , result ) ; <nl> + EXPECT_NE ( nullptr , trap . get ( ) ) ; <nl> + <nl> + / / Mutate memory . <nl> + memory - > data ( ) [ 0x1003 ] = 5 ; <nl> + args [ 0 ] = Val : : i32 ( 0x1002 ) ; <nl> + args [ 1 ] = Val : : i32 ( 6 ) ; <nl> + trap = store_func - > call ( args , nullptr ) ; <nl> + EXPECT_EQ ( nullptr , trap . get ( ) ) ; <nl> + args [ 0 ] = Val : : i32 ( 0x20000 ) ; <nl> + trap = store_func - > call ( args , nullptr ) ; <nl> + EXPECT_NE ( nullptr , trap . get ( ) ) ; <nl> + EXPECT_EQ ( 6 , memory - > data ( ) [ 0x1002 ] ) ; <nl> + EXPECT_EQ ( 5 , memory - > data ( ) [ 0x1003 ] ) ; <nl> + args [ 0 ] = Val : : i32 ( 0x1002 ) ; <nl> + load_func - > call ( args , result ) ; <nl> + EXPECT_EQ ( 6 , result [ 0 ] . i32 ( ) ) ; <nl> + args [ 0 ] = Val : : i32 ( 0x1003 ) ; <nl> + load_func - > call ( args , result ) ; <nl> + EXPECT_EQ ( 5 , result [ 0 ] . i32 ( ) ) ; <nl> + <nl> + / / Grow memory . <nl> + EXPECT_EQ ( true , memory - > grow ( 1 ) ) ; <nl> + EXPECT_EQ ( 3u , memory - > size ( ) ) ; <nl> + EXPECT_EQ ( 0x30000u , memory - > data_size ( ) ) ; <nl> + args [ 0 ] = Val : : i32 ( 0x20000 ) ; <nl> + trap = load_func - > call ( args , result ) ; <nl> + EXPECT_EQ ( nullptr , trap . get ( ) ) ; <nl> + EXPECT_EQ ( 0 , result [ 0 ] . i32 ( ) ) ; <nl> + trap = store_func - > call ( args , nullptr ) ; <nl> + EXPECT_EQ ( nullptr , trap . get ( ) ) ; <nl> + args [ 0 ] = Val : : i32 ( 0x30000 ) ; <nl> + trap = load_func - > call ( args , result ) ; <nl> + EXPECT_NE ( nullptr , trap . get ( ) ) ; <nl> + trap = store_func - > call ( args , nullptr ) ; <nl> + EXPECT_NE ( nullptr , trap . get ( ) ) ; <nl> + EXPECT_EQ ( false , memory - > grow ( 1 ) ) ; <nl> + EXPECT_EQ ( true , memory - > grow ( 0 ) ) ; <nl> + <nl> + / / Create standalone memory . <nl> + / / TODO ( wasm ) : Once Wasm allows multiple memories , turn this into an import . <nl> + own < MemoryType * > mem_type = MemoryType : : make ( Limits ( 5 , 5 ) ) ; <nl> + own < Memory * > memory2 = Memory : : make ( store ( ) , mem_type . get ( ) ) ; <nl> + EXPECT_EQ ( 5u , memory2 - > size ( ) ) ; <nl> + EXPECT_EQ ( false , memory2 - > grow ( 1 ) ) ; <nl> + EXPECT_EQ ( true , memory2 - > grow ( 0 ) ) ; <nl> + } <nl> + <nl> + } / / namespace wasm <nl> + } / / namespace internal <nl> + } / / namespace v8 <nl> mmm a / test / wasm - api - tests / wasm - api - test . h <nl> ppp b / test / wasm - api - tests / wasm - api - test . h <nl> using : : wasm : : Func ; <nl> using : : wasm : : FuncType ; <nl> using : : wasm : : Global ; <nl> using : : wasm : : Instance ; <nl> + using : : wasm : : Memory ; <nl> using : : wasm : : Module ; <nl> using : : wasm : : own ; <nl> using : : wasm : : Ref ; <nl> class WasmCapiTest : public : : testing : : Test { <nl> return global ; <nl> } <nl> <nl> + Memory * GetExportedMemory ( size_t index ) { <nl> + DCHECK_GT ( exports_ . size ( ) , index ) ; <nl> + Extern * exported = exports_ [ index ] ; <nl> + DCHECK_EQ ( exported - > kind ( ) , : : wasm : : EXTERN_MEMORY ) ; <nl> + Memory * memory = exported - > memory ( ) ; <nl> + DCHECK_NE ( memory , nullptr ) ; <nl> + return memory ; <nl> + } <nl> + <nl> void Shutdown ( ) { <nl> instance_ . reset ( ) ; <nl> module_ . reset ( ) ; <nl>
|
[ wasm - c - api ] Add test for Memory
|
v8/v8
|
a0da3d5465a89e935a51b027b26f919cd656443a
|
2019-07-09T12:49:18Z
|
mmm a / samples / TestJavascript / proj . ios / TestJavascript . xcodeproj / project . pbxproj . REMOVED . git - id <nl> ppp b / samples / TestJavascript / proj . ios / TestJavascript . xcodeproj / project . pbxproj . REMOVED . git - id <nl> @ @ - 1 + 1 @ @ <nl> - 50ef6ba405247a2cf5b6e3bfc310660b3b821881 <nl> \ No newline at end of file <nl> + dd6ce183e44bbfded697536a7c0893c253d16b29 <nl> \ No newline at end of file <nl>
|
Updated project configuration for TestJavascript , added UnitTest . js .
|
cocos2d/cocos2d-x
|
d8580f77a2deaec6a4d91f7ca3a973b8a9da8bc8
|
2012-11-02T07:20:42Z
|
mmm a / src / flag - definitions . h <nl> ppp b / src / flag - definitions . h <nl> DEFINE_bool ( use_range , true , " use hydrogen range analysis " ) <nl> DEFINE_bool ( use_gvn , true , " use hydrogen global value numbering " ) <nl> DEFINE_bool ( use_canonicalizing , true , " use hydrogen instruction canonicalizing " ) <nl> DEFINE_bool ( use_inlining , true , " use function inlining " ) <nl> + DEFINE_bool ( use_escape_analysis , false , " use hydrogen escape analysis " ) <nl> DEFINE_int ( max_inlined_source_size , 600 , <nl> " maximum source size in bytes considered for a single inlining " ) <nl> DEFINE_int ( max_inlined_nodes , 196 , <nl> DEFINE_bool ( trace_all_uses , false , " trace all use positions " ) <nl> DEFINE_bool ( trace_range , false , " trace range analysis " ) <nl> DEFINE_bool ( trace_gvn , false , " trace global value numbering " ) <nl> DEFINE_bool ( trace_representation , false , " trace representation types " ) <nl> + DEFINE_bool ( trace_escape_analysis , false , " trace hydrogen escape analysis " ) <nl> DEFINE_bool ( trace_track_allocation_sites , false , <nl> " trace the tracking of allocation sites " ) <nl> DEFINE_bool ( trace_migration , false , " trace object migration " ) <nl> new file mode 100644 <nl> index 00000000000 . . 59151ad1019 <nl> mmm / dev / null <nl> ppp b / src / hydrogen - escape - analysis . cc <nl> <nl> + / / Copyright 2013 the V8 project authors . All rights reserved . <nl> + / / Redistribution and use in source and binary forms , with or without <nl> + / / modification , are permitted provided that the following conditions are <nl> + / / met : <nl> + / / <nl> + / / * Redistributions of source code must retain the above copyright <nl> + / / notice , this list of conditions and the following disclaimer . <nl> + / / * Redistributions in binary form must reproduce the above <nl> + / / copyright notice , this list of conditions and the following <nl> + / / disclaimer in the documentation and / or other materials provided <nl> + / / with the distribution . <nl> + / / * Neither the name of Google Inc . nor the names of its <nl> + / / contributors may be used to endorse or promote products derived <nl> + / / from this software without specific prior written permission . <nl> + / / <nl> + / / THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS <nl> + / / " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT <nl> + / / LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR <nl> + / / A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT <nl> + / / OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , <nl> + / / SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT <nl> + / / LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , <nl> + / / DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY <nl> + / / THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT <nl> + / / ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE <nl> + / / OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . <nl> + <nl> + # include " hydrogen - escape - analysis . h " <nl> + <nl> + namespace v8 { <nl> + namespace internal { <nl> + <nl> + <nl> + void HEscapeAnalysis : : CollectIfNoEscapingUses ( HInstruction * instr ) { <nl> + for ( HUseIterator it ( instr - > uses ( ) ) ; ! it . Done ( ) ; it . Advance ( ) ) { <nl> + HValue * use = it . value ( ) ; <nl> + if ( use - > HasEscapingOperandAt ( it . index ( ) ) ) { <nl> + if ( FLAG_trace_escape_analysis ) { <nl> + PrintF ( " # % d ( % s ) escapes through # % d ( % s ) @ % d \ n " , instr - > id ( ) , <nl> + instr - > Mnemonic ( ) , use - > id ( ) , use - > Mnemonic ( ) , it . index ( ) ) ; <nl> + } <nl> + return ; <nl> + } <nl> + } <nl> + if ( FLAG_trace_escape_analysis ) { <nl> + PrintF ( " # % d ( % s ) is being captured \ n " , instr - > id ( ) , instr - > Mnemonic ( ) ) ; <nl> + } <nl> + captured_ . Add ( instr , zone_ ) ; <nl> + } <nl> + <nl> + <nl> + void HEscapeAnalysis : : CollectCapturedValues ( ) { <nl> + int block_count = graph_ - > blocks ( ) - > length ( ) ; <nl> + for ( int i = 0 ; i < block_count ; + + i ) { <nl> + HBasicBlock * block = graph_ - > blocks ( ) - > at ( i ) ; <nl> + for ( HInstructionIterator it ( block ) ; ! it . Done ( ) ; it . Advance ( ) ) { <nl> + HInstruction * instr = it . Current ( ) ; <nl> + if ( instr - > IsAllocate ( ) | | instr - > IsAllocateObject ( ) ) { <nl> + CollectIfNoEscapingUses ( instr ) ; <nl> + } <nl> + } <nl> + } <nl> + } <nl> + <nl> + <nl> + void HEscapeAnalysis : : Analyze ( ) { <nl> + HPhase phase ( " H_Escape analysis " , graph_ ) ; <nl> + CollectCapturedValues ( ) ; <nl> + } <nl> + <nl> + <nl> + } } / / namespace v8 : : internal <nl> new file mode 100644 <nl> index 00000000000 . . 1d31f3dce7e <nl> mmm / dev / null <nl> ppp b / src / hydrogen - escape - analysis . h <nl> <nl> + / / Copyright 2013 the V8 project authors . All rights reserved . <nl> + / / Redistribution and use in source and binary forms , with or without <nl> + / / modification , are permitted provided that the following conditions are <nl> + / / met : <nl> + / / <nl> + / / * Redistributions of source code must retain the above copyright <nl> + / / notice , this list of conditions and the following disclaimer . <nl> + / / * Redistributions in binary form must reproduce the above <nl> + / / copyright notice , this list of conditions and the following <nl> + / / disclaimer in the documentation and / or other materials provided <nl> + / / with the distribution . <nl> + / / * Neither the name of Google Inc . nor the names of its <nl> + / / contributors may be used to endorse or promote products derived <nl> + / / from this software without specific prior written permission . <nl> + / / <nl> + / / THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS <nl> + / / " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT <nl> + / / LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR <nl> + / / A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT <nl> + / / OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , <nl> + / / SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT <nl> + / / LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , <nl> + / / DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY <nl> + / / THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT <nl> + / / ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE <nl> + / / OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . <nl> + <nl> + # ifndef V8_HYDROGEN_ESCAPE_ANALYSIS_H_ <nl> + # define V8_HYDROGEN_ESCAPE_ANALYSIS_H_ <nl> + <nl> + # include " allocation . h " <nl> + # include " hydrogen . h " <nl> + <nl> + namespace v8 { <nl> + namespace internal { <nl> + <nl> + <nl> + class HEscapeAnalysis BASE_EMBEDDED { <nl> + public : <nl> + explicit HEscapeAnalysis ( HGraph * graph ) <nl> + : graph_ ( graph ) , zone_ ( graph - > zone ( ) ) , captured_ ( 0 , zone_ ) { } <nl> + <nl> + void Analyze ( ) ; <nl> + <nl> + private : <nl> + void CollectCapturedValues ( ) ; <nl> + void CollectIfNoEscapingUses ( HInstruction * instr ) ; <nl> + <nl> + HGraph * graph_ ; <nl> + Zone * zone_ ; <nl> + ZoneList < HValue * > captured_ ; <nl> + } ; <nl> + <nl> + <nl> + } } / / namespace v8 : : internal <nl> + <nl> + # endif / / V8_HYDROGEN_ESCAPE_ANALYSIS_H_ <nl> mmm a / src / hydrogen - instructions . h <nl> ppp b / src / hydrogen - instructions . h <nl> class HValue : public ZoneObject { <nl> void RemoveLastAddedRange ( ) ; <nl> void ComputeInitialRange ( Zone * zone ) ; <nl> <nl> + / / Escape analysis helpers . <nl> + virtual bool HasEscapingOperandAt ( int index ) { return true ; } <nl> + <nl> / / Representation helpers . <nl> virtual Representation observed_input_representation ( int index ) { <nl> return Representation : : None ( ) ; <nl> class HDummyUse : public HTemplateInstruction < 1 > { <nl> <nl> HValue * value ( ) { return OperandAt ( 0 ) ; } <nl> <nl> + virtual bool HasEscapingOperandAt ( int index ) { return false ; } <nl> virtual Representation RequiredInputRepresentation ( int index ) { <nl> return Representation : : None ( ) ; <nl> } <nl> class HSimulate : public HInstruction { <nl> virtual int OperandCount ( ) { return values_ . length ( ) ; } <nl> virtual HValue * OperandAt ( int index ) const { return values_ [ index ] ; } <nl> <nl> + virtual bool HasEscapingOperandAt ( int index ) { return false ; } <nl> virtual Representation RequiredInputRepresentation ( int index ) { <nl> return Representation : : None ( ) ; <nl> } <nl> class HCheckMaps : public HTemplateInstruction < 2 > { <nl> return check_map ; <nl> } <nl> <nl> + virtual bool HasEscapingOperandAt ( int index ) { return false ; } <nl> virtual Representation RequiredInputRepresentation ( int index ) { <nl> return Representation : : Tagged ( ) ; <nl> } <nl> class HArgumentsObject : public HTemplateInstruction < 0 > { <nl> virtual int OperandCount ( ) { return values_ . length ( ) ; } <nl> virtual HValue * OperandAt ( int index ) const { return values_ [ index ] ; } <nl> <nl> + virtual bool HasEscapingOperandAt ( int index ) { return false ; } <nl> virtual Representation RequiredInputRepresentation ( int index ) { <nl> return Representation : : None ( ) ; <nl> } <nl> class HLoadNamedField : public HTemplateInstruction < 2 > { <nl> HObjectAccess access ( ) const { return access_ ; } <nl> Representation field_representation ( ) const { return representation_ ; } <nl> <nl> + virtual bool HasEscapingOperandAt ( int index ) { return false ; } <nl> virtual Representation RequiredInputRepresentation ( int index ) { <nl> return Representation : : Tagged ( ) ; <nl> } <nl> class HStoreNamedField : public HTemplateInstruction < 2 > { <nl> <nl> DECLARE_CONCRETE_INSTRUCTION ( StoreNamedField ) <nl> <nl> + virtual bool HasEscapingOperandAt ( int index ) { return index = = 1 ; } <nl> virtual Representation RequiredInputRepresentation ( int index ) { <nl> if ( FLAG_track_double_fields & & <nl> index = = 1 & & field_representation_ . IsDouble ( ) ) { <nl> class HStoreKeyed <nl> } <nl> } <nl> <nl> + virtual bool HasEscapingOperandAt ( int index ) { return index ! = 0 ; } <nl> virtual Representation RequiredInputRepresentation ( int index ) { <nl> / / kind_fast : tagged [ int32 ] = tagged <nl> / / kind_double : tagged [ int32 ] = double <nl> mmm a / src / hydrogen . cc <nl> ppp b / src / hydrogen . cc <nl> <nl> / / OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . <nl> <nl> # include " hydrogen . h " <nl> - # include " hydrogen - gvn . h " <nl> <nl> # include < algorithm > <nl> <nl> <nl> # include " full - codegen . h " <nl> # include " hashmap . h " <nl> # include " hydrogen - environment - liveness . h " <nl> + # include " hydrogen - escape - analysis . h " <nl> # include " hydrogen - infer - representation . h " <nl> + # include " hydrogen - gvn . h " <nl> # include " lithium - allocator . h " <nl> # include " parser . h " <nl> # include " scopeinfo . h " <nl> bool HGraph : : Optimize ( SmartArrayPointer < char > * bailout_reason ) { <nl> <nl> if ( FLAG_use_canonicalizing ) Canonicalize ( ) ; <nl> <nl> + if ( FLAG_use_escape_analysis ) { <nl> + HEscapeAnalysis escape_analysis ( this ) ; <nl> + escape_analysis . Analyze ( ) ; <nl> + } <nl> + <nl> if ( FLAG_use_gvn ) Run < HGlobalValueNumberingPhase > ( ) ; <nl> <nl> if ( FLAG_use_range ) { <nl> - HRangeAnalysis rangeAnalysis ( this ) ; <nl> - rangeAnalysis . Analyze ( ) ; <nl> + HRangeAnalysis range_analysis ( this ) ; <nl> + range_analysis . Analyze ( ) ; <nl> } <nl> ComputeMinusZeroChecks ( ) ; <nl> <nl> mmm a / src / hydrogen . h <nl> ppp b / src / hydrogen . h <nl> class HPredecessorIterator BASE_EMBEDDED { <nl> } ; <nl> <nl> <nl> + class HInstructionIterator BASE_EMBEDDED { <nl> + public : <nl> + explicit HInstructionIterator ( HBasicBlock * block ) <nl> + : block_ ( block ) , instr_ ( block - > first ( ) ) { } <nl> + <nl> + bool Done ( ) { return instr_ = = block_ - > last ( ) ; } <nl> + HInstruction * Current ( ) { return instr_ ; } <nl> + void Advance ( ) { instr_ = instr_ - > next ( ) ; } <nl> + <nl> + private : <nl> + HBasicBlock * block_ ; <nl> + HInstruction * instr_ ; <nl> + } ; <nl> + <nl> + <nl> class HLoopInformation : public ZoneObject { <nl> public : <nl> HLoopInformation ( HBasicBlock * loop_header , Zone * zone ) <nl> mmm a / tools / gyp / v8 . gyp <nl> ppp b / tools / gyp / v8 . gyp <nl> <nl> ' . . / . . / src / heap . h ' , <nl> ' . . / . . / src / hydrogen - environment - liveness . cc ' , <nl> ' . . / . . / src / hydrogen - environment - liveness . h ' , <nl> + ' . . / . . / src / hydrogen - escape - analysis . cc ' , <nl> + ' . . / . . / src / hydrogen - escape - analysis . h ' , <nl> ' . . / . . / src / hydrogen - instructions . cc ' , <nl> ' . . / . . / src / hydrogen - instructions . h ' , <nl> ' . . / . . / src / hydrogen . cc ' , <nl>
|
First simplistic implementation of escape analysis .
|
v8/v8
|
8b976da60e24ef608107357a704a8896d73aa2c0
|
2013-06-28T16:09:54Z
|
mmm a / modules / ml / doc / normal_bayes_classifier . rst <nl> ppp b / modules / ml / doc / normal_bayes_classifier . rst <nl> CvNormalBayesClassifier : : predict <nl> mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> Predicts the response for sample ( s ) . <nl> <nl> - . . ocv : function : : float CvNormalBayesClassifier : : predict ( const Mat & samples , Mat * results = 0 ) const <nl> + . . ocv : function : : float CvNormalBayesClassifier : : predict ( const Mat & samples , Mat * results = 0 , Mat * results_prob = 0 ) const <nl> <nl> - . . ocv : function : : float CvNormalBayesClassifier : : predict ( const CvMat * samples , CvMat * results = 0 ) const <nl> + . . ocv : function : : float CvNormalBayesClassifier : : predict ( const CvMat * samples , CvMat * results = 0 , CvMat * results_prob = 0 ) const <nl> <nl> . . ocv : pyfunction : : cv2 . NormalBayesClassifier . predict ( samples ) - > retval , results <nl> <nl> - The method estimates the most probable classes for input vectors . Input vectors ( one or more ) are stored as rows of the matrix ` ` samples ` ` . In case of multiple input vectors , there should be one output vector ` ` results ` ` . The predicted class for a single input vector is returned by the method . <nl> + The method estimates the most probable classes for input vectors . Input vectors ( one or more ) are stored as rows of the matrix ` ` samples ` ` . In case of multiple input vectors , there should be one output vector ` ` results ` ` . The predicted class for a single input vector is returned by the method . The vector ` ` results_prob ` ` contains the output probabilities coresponding to each element of ` ` result ` ` . <nl> <nl> The function is parallelized with the TBB library . <nl> mmm a / modules / ml / include / opencv2 / ml . hpp <nl> ppp b / modules / ml / include / opencv2 / ml . hpp <nl> class CV_EXPORTS_W CvNormalBayesClassifier : public CvStatModel <nl> virtual bool train ( const CvMat * trainData , const CvMat * responses , <nl> const CvMat * varIdx = 0 , const CvMat * sampleIdx = 0 , bool update = false ) ; <nl> <nl> - virtual float predict ( const CvMat * samples , CV_OUT CvMat * results = 0 ) const ; <nl> + virtual float predict ( const CvMat * samples , CV_OUT CvMat * results = 0 , CV_OUT CvMat * results_prob = 0 ) const ; <nl> CV_WRAP virtual void clear ( ) ; <nl> <nl> CV_WRAP CvNormalBayesClassifier ( const cv : : Mat & trainData , const cv : : Mat & responses , <nl> class CV_EXPORTS_W CvNormalBayesClassifier : public CvStatModel <nl> CV_WRAP virtual bool train ( const cv : : Mat & trainData , const cv : : Mat & responses , <nl> const cv : : Mat & varIdx = cv : : Mat ( ) , const cv : : Mat & sampleIdx = cv : : Mat ( ) , <nl> bool update = false ) ; <nl> - CV_WRAP virtual float predict ( const cv : : Mat & samples , CV_OUT cv : : Mat * results = 0 ) const ; <nl> + CV_WRAP virtual float predict ( const cv : : Mat & samples , CV_OUT cv : : Mat * results = 0 , CV_OUT cv : : Mat * results_prob = 0 ) const ; <nl> <nl> virtual void write ( CvFileStorage * storage , const char * name ) const ; <nl> virtual void read ( CvFileStorage * storage , CvFileNode * node ) ; <nl> mmm a / modules / ml / src / nbayes . cpp <nl> ppp b / modules / ml / src / nbayes . cpp <nl> bool CvNormalBayesClassifier : : train ( const CvMat * _train_data , const CvMat * _res <nl> struct predict_body : cv : : ParallelLoopBody { <nl> predict_body ( CvMat * _c , CvMat * * _cov_rotate_mats , CvMat * * _inv_eigen_values , CvMat * * _avg , <nl> const CvMat * _samples , const int * _vidx , CvMat * _cls_labels , <nl> - CvMat * _results , float * _value , int _var_count1 <nl> + CvMat * _results , float * _value , int _var_count1 , CvMat * _results_prob <nl> ) <nl> { <nl> c = _c ; <nl> struct predict_body : cv : : ParallelLoopBody { <nl> results = _results ; <nl> value = _value ; <nl> var_count1 = _var_count1 ; <nl> + results_prob = _results_prob ; <nl> } <nl> <nl> CvMat * c ; <nl> struct predict_body : cv : : ParallelLoopBody { <nl> const int * vidx ; <nl> CvMat * cls_labels ; <nl> <nl> + CvMat * results_prob ; <nl> CvMat * results ; <nl> float * value ; <nl> int var_count1 ; <nl> struct predict_body : cv : : ParallelLoopBody { <nl> { <nl> <nl> int cls = - 1 ; <nl> - int rtype = 0 , rstep = 0 ; <nl> + int rtype = 0 , rstep = 0 , rptype = 0 , rpstep = 0 ; <nl> int nclasses = cls_labels - > cols ; <nl> int _var_count = avg [ 0 ] - > cols ; <nl> + double probability = 0 ; <nl> <nl> if ( results ) <nl> { <nl> rtype = CV_MAT_TYPE ( results - > type ) ; <nl> rstep = CV_IS_MAT_CONT ( results - > type ) ? 1 : results - > step / CV_ELEM_SIZE ( rtype ) ; <nl> } <nl> + if ( results_prob ) <nl> + { <nl> + rptype = CV_MAT_TYPE ( results_prob - > type ) ; <nl> + rpstep = CV_IS_MAT_CONT ( results_prob - > type ) ? 1 : results_prob - > step / CV_ELEM_SIZE ( rptype ) ; <nl> + } <nl> / / allocate memory and initializing headers for calculating <nl> cv : : AutoBuffer < double > buffer ( nclasses + var_count1 ) ; <nl> CvMat diff = cvMat ( 1 , var_count1 , CV_64FC1 , & buffer [ 0 ] ) ; <nl> struct predict_body : cv : : ParallelLoopBody { <nl> <nl> for ( int i = 0 ; i < nclasses ; i + + ) <nl> { <nl> - <nl> double cur = c - > data . db [ i ] ; <nl> CvMat * u = cov_rotate_mats [ i ] ; <nl> CvMat * w = inv_eigen_values [ i ] ; <nl> struct predict_body : cv : : ParallelLoopBody { <nl> opt = cur ; <nl> } <nl> / * probability = exp ( - 0 . 5 * cur ) * / <nl> + probability = exp ( - 0 . 5 * cur ) ; <nl> } <nl> <nl> ival = cls_labels - > data . i [ cls ] ; <nl> struct predict_body : cv : : ParallelLoopBody { <nl> else <nl> results - > data . fl [ k * rstep ] = ( float ) ival ; <nl> } <nl> + if ( results_prob ) <nl> + { <nl> + if ( rptype = = CV_32FC1 ) <nl> + results_prob - > data . fl [ k * rpstep ] = ( float ) probability ; <nl> + else <nl> + results_prob - > data . db [ k * rpstep ] = probability ; <nl> + } <nl> if ( k = = 0 ) <nl> * value = ( float ) ival ; <nl> } <nl> struct predict_body : cv : : ParallelLoopBody { <nl> } ; <nl> <nl> <nl> - float CvNormalBayesClassifier : : predict ( const CvMat * samples , CvMat * results ) const <nl> + float CvNormalBayesClassifier : : predict ( const CvMat * samples , CvMat * results , CvMat * results_prob ) const <nl> { <nl> float value = 0 ; <nl> <nl> float CvNormalBayesClassifier : : predict ( const CvMat * samples , CvMat * results ) c <nl> " with the number of elements = number of rows in the input matrix " ) ; <nl> } <nl> <nl> + if ( results_prob ) <nl> + { <nl> + if ( ! CV_IS_MAT ( results_prob ) | | ( CV_MAT_TYPE ( results_prob - > type ) ! = CV_32FC1 & & <nl> + CV_MAT_TYPE ( results_prob - > type ) ! = CV_64FC1 ) | | <nl> + ( results_prob - > cols ! = 1 & & results_prob - > rows ! = 1 ) | | <nl> + results_prob - > cols + results_prob - > rows - 1 ! = samples - > rows ) <nl> + CV_Error ( CV_StsBadArg , " The output array must be double or float vector " <nl> + " with the number of elements = number of rows in the input matrix " ) ; <nl> + } <nl> + <nl> const int * vidx = var_idx ? var_idx - > data . i : 0 ; <nl> <nl> cv : : parallel_for_ ( cv : : Range ( 0 , samples - > rows ) , <nl> predict_body ( c , cov_rotate_mats , inv_eigen_values , avg , samples , <nl> - vidx , cls_labels , results , & value , var_count ) ) ; <nl> + vidx , cls_labels , results , & value , var_count , results_prob ) ) ; <nl> <nl> return value ; <nl> } <nl> bool CvNormalBayesClassifier : : train ( const Mat & _train_data , const Mat & _respons <nl> sidx . data . ptr ? & sidx : 0 , update ) ; <nl> } <nl> <nl> - float CvNormalBayesClassifier : : predict ( const Mat & _samples , Mat * _results ) const <nl> + float CvNormalBayesClassifier : : predict ( const Mat & _samples , Mat * _results , Mat * _results_prob ) const <nl> { <nl> - CvMat samples = _samples , results , * presults = 0 ; <nl> + CvMat samples = _samples , results , * presults = 0 , results_prob , * presults_prob = 0 ; <nl> <nl> if ( _results ) <nl> { <nl> float CvNormalBayesClassifier : : predict ( const Mat & _samples , Mat * _results ) con <nl> presults = & ( results = * _results ) ; <nl> } <nl> <nl> - return predict ( & samples , presults ) ; <nl> + if ( _results_prob ) <nl> + { <nl> + if ( ! ( _results_prob - > data & & _results_prob - > type ( ) = = CV_64F & & <nl> + ( _results_prob - > cols = = 1 | | _results_prob - > rows = = 1 ) & & <nl> + _results_prob - > cols + _results_prob - > rows - 1 = = _samples . rows ) ) <nl> + _results_prob - > create ( _samples . rows , 1 , CV_64F ) ; <nl> + presults_prob = & ( results_prob = * _results_prob ) ; <nl> + } <nl> + <nl> + return predict ( & samples , presults , presults_prob ) ; <nl> } <nl> <nl> / * End of file . * / <nl>
|
Added result_probabilities parameter to CvNormalBayesClassifier : : predict method . Issue
|
opencv/opencv
|
97092e31bc326f8fb8ac8a7f72a104a19e6cecd7
|
2014-01-29T11:57:51Z
|
mmm a / lib / SILGen / SILGenPattern . cpp <nl> ppp b / lib / SILGen / SILGenPattern . cpp <nl> emitBoolDispatch ( ArrayRef < RowToSpecialize > rows , ConsumableManagedValue src , <nl> SILBasicBlock * caseBB = caseBBs [ i ] . second ; <nl> SGF . B . setInsertionPoint ( caseBB ) ; <nl> <nl> + / / We ' re in conditionally - executed code ; enter a scope . <nl> + Scope scope ( SGF . Cleanups , CleanupLocation : : get ( loc ) ) ; <nl> + <nl> SILValue result <nl> = SILUndef : : get ( SGF . SGM . Types . getEmptyTupleType ( ) , SGF . SGM . M ) ; <nl> ConsumableManagedValue CMV = <nl> new file mode 100644 <nl> index 000000000000 . . b059b8684c5b <nl> mmm / dev / null <nl> ppp b / test / SILGen / Inputs / switch_bool . h <nl> <nl> + <nl> + @ import Foundation ; <nl> + <nl> + typedef NSString * MyStringEnum NS_EXTENSIBLE_STRING_ENUM ; <nl> + extern MyStringEnum const MyStringEnumCase1 ; <nl> + extern MyStringEnum const MyStringEnumCase2 ; <nl> + extern MyStringEnum const MyStringEnumCase3 ; <nl> + extern MyStringEnum const MyStringEnumCase4 ; <nl> new file mode 100644 <nl> index 000000000000 . . 28d6a9d1968a <nl> mmm / dev / null <nl> ppp b / test / SILGen / switch_bool . swift <nl> <nl> + / / RUN : % target - swift - emit - silgen - module - name switch_bool - import - objc - header % S / Inputs / switch_bool . h % s <nl> + <nl> + / / REQUIRES : objc_interop <nl> + <nl> + / / For now this test just makes sure that we do not crash on this pattern by <nl> + / / running into dominance problems due to not - scoping the subcases of the <nl> + / / SwitchValue . So performing a FileCheck test is not really needed . Feel free <nl> + / / to add the FileCheck invocation if additional tests require FileCheck though . <nl> + <nl> + func properlyScopeSubcasesOfEmitBoolDispatch ( ) { <nl> + let e = Optional < MyStringEnum > . none <nl> + switch ( e , false ) { <nl> + case ( MyStringEnum . case1 ? , false ) : <nl> + break <nl> + case ( let e ? , _ ) : <nl> + let y = { <nl> + return e <nl> + } <nl> + default : <nl> + break <nl> + } <nl> + } <nl>
|
Merge remote - tracking branch ' origin / master ' into master - next
|
apple/swift
|
38a0268881ae6b073e91ef827237c792813d84b2
|
2018-11-01T18:29:56Z
|
mmm a / hphp / hack / src / utils / exit_status . ml <nl> ppp b / hphp / hack / src / utils / exit_status . ml <nl> type t = <nl> exception Exit_with of t <nl> <nl> let exit_code = function <nl> - | No_error - > 0 <nl> - | Build_error - > 2 <nl> - | Build_terminated - > 1 <nl> - | Checkpoint_error - > 8 <nl> - | Input_error - > 10 <nl> - | Kill_error - > 1 <nl> - | No_server_running - > 6 <nl> - | Out_of_time - > 7 <nl> - | Out_of_retries - > 7 <nl> - | Server_already_exists - > 77 <nl> - | Server_initializing - > 1 <nl> - | Server_shutting_down - > 1 <nl> - | Type_error - > 2 <nl> - | Build_id_mismatch - > 9 <nl> - | Monitor_connection_failure - > 9 <nl> - | Unused_server - > 5 <nl> - | Lock_stolen - > 11 <nl> - | Lost_parent_monitor - > 12 <nl> + | Interrupted - > - 6 <nl> + | No_error - > 0 <nl> + | Build_terminated - > 1 <nl> + | Kill_error - > 1 <nl> + | Server_initializing - > 1 <nl> + | Server_shutting_down - > 1 <nl> + | Build_error - > 2 <nl> + | Type_error - > 2 <nl> + | Hhconfig_changed - > 4 <nl> + | Unused_server - > 5 <nl> + | No_server_running - > 6 <nl> + | Out_of_time - > 7 <nl> + | Out_of_retries - > 7 <nl> + | Checkpoint_error - > 8 <nl> + | Build_id_mismatch - > 9 <nl> + | Monitor_connection_failure - > 9 <nl> + | Input_error - > 10 <nl> + | Lock_stolen - > 11 <nl> + | Lost_parent_monitor - > 12 <nl> | Shared_mem_assertion_failure - > 14 <nl> - | Out_of_shared_memory - > 15 <nl> - | Hash_table_full - > 16 <nl> - | Heap_full - > 17 <nl> - | Interrupted - > - 6 <nl> - | Worker_oomed - > 30 <nl> - | Worker_busy - > 31 <nl> - | Worker_not_found_exception - > 32 <nl> - | Worker_failed_to_send_job - > 33 <nl> - | Missing_hhi - > 97 <nl> - | Socket_error - > 98 <nl> - | Dfind_died - > 99 <nl> - | Dfind_unresponsive - > 100 <nl> - | EventLogger_Timeout - > 101 <nl> + | Out_of_shared_memory - > 15 <nl> + | Hash_table_full - > 16 <nl> + | Heap_full - > 17 <nl> + | Worker_oomed - > 30 <nl> + | Worker_busy - > 31 <nl> + | Worker_not_found_exception - > 32 <nl> + | Worker_failed_to_send_job - > 33 <nl> + | Server_already_exists - > 77 <nl> + | Missing_hhi - > 97 <nl> + | Socket_error - > 98 <nl> + | Dfind_died - > 99 <nl> + | Dfind_unresponsive - > 100 <nl> + | EventLogger_Timeout - > 101 <nl> + | CantRunAI - > 102 <nl> + | Watchman_failed - > 103 <nl> + | Hhconfig_deleted - > 104 <nl> + | Server_name_not_found - > 105 <nl> + | EventLogger_broken_pipe - > 106 <nl> + | Redecl_heap_overflow - > 107 <nl> | EventLogger_restart_out_of_retries - > 108 <nl> - | CantRunAI - > 102 <nl> - | Watchman_failed - > 103 <nl> - | Watchman_fresh_instance - > 109 <nl> - | Hhconfig_deleted - > 104 <nl> - | Hhconfig_changed - > 4 <nl> - | Server_name_not_found - > 105 <nl> - | EventLogger_broken_pipe - > 106 <nl> - | Redecl_heap_overflow - > 107 <nl> - | IDE_malformed_request - > 201 <nl> - | IDE_no_server - > 202 <nl> - | IDE_out_of_retries - > 203 <nl> - | Nfs_root - > 204 <nl> - | IDE_init_failure - > 205 <nl> - | IDE_typechecker_died - > 206 <nl> + | Watchman_fresh_instance - > 109 <nl> + | IDE_malformed_request - > 201 <nl> + | IDE_no_server - > 202 <nl> + | IDE_out_of_retries - > 203 <nl> + | Nfs_root - > 204 <nl> + | IDE_init_failure - > 205 <nl> + | IDE_typechecker_died - > 206 <nl> | IDE_persistent_client_already_exists - > 207 <nl> - | Lazy_decl_bug - > 208 <nl> - | Decl_heap_elems_bug - > 209 <nl> - | Parser_heap_build_error - > 210 <nl> - | File_heap_stale - > 211 <nl> - | Sql_assertion_failure - > 212 <nl> + | Lazy_decl_bug - > 208 <nl> + | Decl_heap_elems_bug - > 209 <nl> + | Parser_heap_build_error - > 210 <nl> + | File_heap_stale - > 211 <nl> + | Sql_assertion_failure - > 212 <nl> <nl> <nl> let exit t = <nl>
|
Sort out the error list
|
facebook/hhvm
|
202f80897d78aa8247c14a4fec3129754614a04f
|
2016-12-02T17:58:59Z
|
mmm a / hphp / hack / hhi / stdlib / builtins_mcrouter . hhi <nl> ppp b / hphp / hack / hhi / stdlib / builtins_mcrouter . hhi <nl> class MCRouter { <nl> const int mc_op_gets = 0 ; <nl> const int mc_op_get_service_info = 0 ; <nl> <nl> - / / From mcrouter / lib / mc / msg . h enum mc_res_e : <nl> + / / From mcrouter / lib / carbon / Result . h enum carbon : : Result : <nl> const int mc_res_unknown = 0 ; <nl> const int mc_res_deleted = 0 ; <nl> const int mc_res_found = 0 ; <nl> mmm a / hphp / runtime / ext / mcrouter / ext_mcrouter . cpp <nl> ppp b / hphp / runtime / ext / mcrouter / ext_mcrouter . cpp <nl> <nl> # include " mcrouter / McrouterClient . h " / / @ nolint <nl> # include " mcrouter / McrouterInstance . h " / / @ nolint <nl> # include " mcrouter / lib / McResUtil . h " / / @ nolint <nl> + # include " mcrouter / lib / carbon / Result . h " / / @ nolint <nl> # include " mcrouter / lib / network / CarbonMessageList . h " / / @ nolint <nl> # include " mcrouter / lib / network / gen / Memcache . h " / / @ nolint <nl> # include " mcrouter / options . h " / / @ nolint <nl> const StaticString <nl> <nl> static Class * c_MCRouterException = nullptr ; <nl> <nl> + / * * <nl> + * Below are to maintain the compatibility during the migration <nl> + * from mc_res_t to enum class carbon : : Result <nl> + * / <nl> + namespace compatibility { <nl> + # ifdef CARBON_RESULT_ENUM_CLASS <nl> + const carbon : : Result mc_res_unknown = carbon : : Result : : UNKNOWN ; <nl> + const carbon : : Result mc_res_deleted = carbon : : Result : : DELETED ; <nl> + const carbon : : Result mc_res_ok = carbon : : Result : : OK ; <nl> + const carbon : : Result mc_nres = carbon : : Result : : NUM_RESULTS ; <nl> + <nl> + const char * carbonResultToString ( const carbon : : Result result ) { <nl> + return carbon : : resultToString ( result ) ; <nl> + } <nl> + # else <nl> + const carbon : : Result mc_res_unknown = : : mc_res_unknown ; <nl> + const carbon : : Result mc_res_deleted = : : mc_res_deleted ; <nl> + const carbon : : Result mc_res_ok = : : mc_res_ok ; <nl> + const carbon : : Result mc_nres = : : mc_nres ; <nl> + <nl> + const char * carbonResultToString ( const carbon : : Result result ) { <nl> + return mc_res_to_string ( result ) ; <nl> + } <nl> + # endif <nl> + } / / namespace compatibility <nl> + <nl> [ [ noreturn ] ] <nl> static void mcr_throwException ( const std : : string & message , <nl> mc_op_t op = mc_op_unknown , <nl> - mc_res_t result = mc_res_unknown , <nl> + carbon : : Result result = compatibility : : mc_res_unknown , <nl> const std : : string & key = " " ) { <nl> if ( ! c_MCRouterException ) { <nl> c_MCRouterException = Unit : : lookupClass ( s_MCRouterException . get ( ) ) ; <nl> struct MCRouterResult : AsioExternalThreadEvent { <nl> if ( mc : : isErrorResult ( reply . result ( ) ) ) { <nl> setResultException ( request , reply ) ; <nl> } else { <nl> - const auto mc_op = <nl> + const auto mc_op = <nl> mc : : OpFromType < Request , mc : : RequestOpMapping > : : value ; <nl> switch ( mc_op ) { <nl> case mc_op_add : <nl> struct MCRouterResult : AsioExternalThreadEvent { <nl> break ; <nl> <nl> case mc_op_flushall : <nl> - if ( reply . result ( ) ! = mc_res_ok ) { <nl> + if ( reply . result ( ) ! = compatibility : : mc_res_ok ) { <nl> setResultException ( request , reply ) ; <nl> break ; <nl> } <nl> break ; <nl> <nl> case mc_op_delete : <nl> - if ( reply . result ( ) ! = mc_res_deleted ) { <nl> + if ( reply . result ( ) ! = compatibility : : mc_res_deleted ) { <nl> setResultException ( request , reply ) ; <nl> break ; <nl> } <nl> struct MCRouterResult : AsioExternalThreadEvent { <nl> m_replyCode = reply . result ( ) ; <nl> m_exception = mc_op_to_string ( m_op ) ; <nl> m_exception + = " failed with result " ; <nl> - m_exception + = mc_res_to_string ( m_replyCode ) ; <nl> + m_exception + = compatibility : : carbonResultToString ( m_replyCode ) ; <nl> if ( ! reply . message ( ) . empty ( ) ) { <nl> m_exception + = " : " ; <nl> m_exception + = reply . message ( ) ; <nl> struct MCRouterResult : AsioExternalThreadEvent { <nl> <nl> / / Deferred exception data <nl> mc_op_t m_op ; <nl> - mc_res_t m_replyCode ; <nl> + carbon : : Result m_replyCode ; <nl> std : : string m_exception , m_key ; <nl> } ; <nl> <nl> void MCRouter : : send ( std : : unique_ptr < const Request > request , <nl> * requestPtr , <nl> [ res , request = std : : move ( request ) ] ( const Request & req , <nl> mc : : ReplyT < Request > & & reply ) { <nl> - if ( reply . result ( ) = = mc_res_unknown ) { <nl> + if ( reply . result ( ) = = compatibility : : mc_res_unknown ) { <nl> / / McrouterClient has signaled this request is cancelled <nl> res - > cancel ( ) ; <nl> } else { <nl> static String HHVM_STATIC_METHOD ( MCRouter , getOpName , int64_t op ) { <nl> } <nl> <nl> static String HHVM_STATIC_METHOD ( MCRouter , getResultName , int64_t res ) { <nl> - auto name = mc_res_to_string ( ( mc_res_t ) res ) ; <nl> + auto name = compatibility : : carbonResultToString ( ( carbon : : Result ) res ) ; <nl> if ( ! name ) { <nl> std : : string msg = " Unknown mc_res_ * value : " ; <nl> msg + = res ; <nl> - mcr_throwException ( msg , mc_op_unknown , ( mc_res_t ) res ) ; <nl> + mcr_throwException ( msg , mc_op_unknown , ( carbon : : Result ) res ) ; <nl> } <nl> return name ; <nl> } <nl> struct MCRouterExtension : Extension { <nl> makeStaticString ( name ) , <nl> i ) ; <nl> } <nl> - for ( int i = 0 ; i < mc_nres ; + + i ) { <nl> + for ( size_t i = 0 ; i < static_cast < size_t > ( compatibility : : mc_nres ) ; + + i ) { <nl> Native : : registerClassConstant < KindOfInt64 > ( <nl> s_MCRouter . get ( ) , <nl> - makeStaticString ( mc_res_to_string ( ( mc_res_t ) i ) ) , <nl> + makeStaticString ( <nl> + compatibility : : carbonResultToString ( static_cast < carbon : : Result > ( i ) ) ) , <nl> i ) ; <nl> } <nl> <nl> mmm a / hphp / test / slow / mcrouter / mcrouter - cas . php . expect <nl> ppp b / hphp / test / slow / mcrouter / mcrouter - cas . php . expect <nl> <nl> string ( 7 ) " Success " <nl> - string ( 44 ) " Failed : cas failed with result mc_res_exists " <nl> + string ( 44 ) " Failed : cas failed with result carbon : : Result : : EXISTS " <nl> mmm a / hphp / test / slow / mcrouter / mcrouter - constants . php <nl> ppp b / hphp / test / slow / mcrouter / mcrouter - constants . php <nl> <nl> < ? hh <nl> <nl> var_dump ( MCRouter : : mc_op_get ) ; <nl> - var_dump ( MCRouter : : mc_res_stored ) ; <nl> + var_dump ( MCRouter : : carbon : : Result : : STORED ) ; <nl>
|
Replace old C - style mc_res_t with enum class carbon : : Result
|
facebook/hhvm
|
9586bd59968546266604f8eb025dfa34a5f86c2f
|
2019-02-21T21:34:16Z
|
mmm a / emscripten - version . txt <nl> ppp b / emscripten - version . txt <nl> @ @ - 1 + 1 @ @ <nl> - " 1 . 37 . 3 " <nl> + " 1 . 37 . 4 " <nl>
|
1 . 37 . 4
|
emscripten-core/emscripten
|
bda1131f8ce73fd67e761f2d772b16a9dc2eed3c
|
2017-03-13T15:54:36Z
|
mmm a / test / cctest / wasm / test - run - wasm - simd . cc <nl> ppp b / test / cctest / wasm / test - run - wasm - simd . cc <nl> using Int8ShiftOp = int8_t ( * ) ( int8_t , int ) ; <nl> EXPERIMENTAL_FLAG_SCOPE ( simd ) ; \ <nl> RunWasm_ # # name # # _Impl ( kNoLowerSimd , ExecutionTier : : kLiftoff ) ; \ <nl> } \ <nl> + TEST ( RunWasm_ # # name # # _interpreter ) { \ <nl> + EXPERIMENTAL_FLAG_SCOPE ( simd ) ; \ <nl> + RunWasm_ # # name # # _Impl ( kNoLowerSimd , ExecutionTier : : kInterpreter ) ; \ <nl> + } \ <nl> TEST ( RunWasm_ # # name # # _simd_lowered ) { \ <nl> EXPERIMENTAL_FLAG_SCOPE ( simd ) ; \ <nl> RunWasm_ # # name # # _Impl ( kLowerSimd , ExecutionTier : : kTurbofan ) ; \ <nl> bool ExpectFused ( ExecutionTier tier ) { <nl> EXPERIMENTAL_FLAG_SCOPE ( simd ) ; \ <nl> RunWasm_ # # name # # _Impl ( kNoLowerSimd , ExecutionTier : : kLiftoff ) ; \ <nl> } \ <nl> + TEST ( RunWasm_ # # name # # _interpreter ) { \ <nl> + EXPERIMENTAL_FLAG_SCOPE ( simd ) ; \ <nl> + RunWasm_ # # name # # _Impl ( kNoLowerSimd , ExecutionTier : : kInterpreter ) ; \ <nl> + } \ <nl> void RunWasm_ # # name # # _Impl ( LowerSimd lower_simd , ExecutionTier execution_tier ) <nl> <nl> / / Returns true if the platform can represent the result . <nl>
|
Revert " [ wasm - simd ] Remove interpreter tier of SIMD tests "
|
v8/v8
|
12263212c17c5a98a694d9f72b80add95d388d2b
|
2020-05-04T17:09:51Z
|
mmm a / . gitignore <nl> ppp b / . gitignore <nl> node_modules / <nl> / vendor / node / deps / node - inspect / . npmrc <nl> / vendor / npm / <nl> / vendor / python_26 / <nl> + . gclient_done <nl> mmm a / docs / development / build - instructions - linux . md <nl> ppp b / docs / development / build - instructions - linux . md <nl> To avoid using the prebuilt binaries of ` libchromiumcontent ` , you can build ` lib <nl> ` ` ` bash <nl> $ git submodule update - - init - - recursive <nl> ` ` ` <nl> - 4 . Copy the . gclient config file <nl> + 4 . Pass the ` - - build_release_libcc ` switch to ` bootstrap . py ` script : <nl> <nl> ` ` ` bash <nl> - $ cp vendor / libchromiumcontent / . gclient . <nl> - ` ` ` <nl> - 5 . Pass the ` - - build_libchromiumcontent ` switch to ` bootstrap . py ` script : <nl> - <nl> - ` ` ` bash <nl> - $ . / script / bootstrap . py - v - - build_libchromiumcontent <nl> + $ . / script / bootstrap . py - v - - build_release_libcc <nl> ` ` ` <nl> <nl> Note that by default the ` shared_library ` configuration is not built , so you can <nl> in ` < path > / bin / ` . <nl> For example if you installed ` clang ` under ` / user / local / bin / clang ` : <nl> <nl> ` ` ` bash <nl> - $ . / script / bootstrap . py - v - - build_libchromiumcontent - - clang_dir / usr / local <nl> + $ . / script / bootstrap . py - v - - build_release_libcc - - clang_dir / usr / local <nl> $ . / script / build . py - c R <nl> ` ` ` <nl> <nl> variables to the ones you want . <nl> For example building with GCC toolchain : <nl> <nl> ` ` ` bash <nl> - $ env CC = gcc CXX = g + + . / script / bootstrap . py - v - - build_libchromiumcontent - - disable_clang <nl> + $ env CC = gcc CXX = g + + . / script / bootstrap . py - v - - build_release_libcc - - disable_clang <nl> $ . / script / build . py - c R <nl> ` ` ` <nl> <nl> custom the building configurations : <nl> * ` LDFLAGS ` <nl> <nl> The environment variables have to be set when executing the ` bootstrap . py ` <nl> - script , it won ' t work in the ` build . py ` script . <nl> \ No newline at end of file <nl> + script , it won ' t work in the ` build . py ` script . <nl> mmm a / docs / development / chromium - development . md <nl> ppp b / docs / development / chromium - development . md <nl> <nl> - [ Discussion Groups ] ( http : / / www . chromium . org / developers / discussion - groups ) <nl> <nl> See also [ V8 Development ] ( v8 - development . md ) <nl> + <nl> + # Chromium development with Electron <nl> + <nl> + It is possible to debug Chromium with Electron by passing <nl> + ` - - build_debug_libcc ` to the bootstrap script : <nl> + <nl> + $ . / script / bootstrap . py - d - - build_debug_libcc <nl> + <nl> + This will download and build libchromiumcontent locally , similarly to the <nl> + ` - - build_release_libcc ` , but it will create a shared library build of <nl> + libchromiumcontent and won ' t strip any symbols , making it ideal for debugging . <nl> + <nl> + When built like this , you can make changes to files in <nl> + ` vendor / libchromiumcontent / src ` and rebuild quickly with : <nl> + <nl> + $ . / script / build . py - c D - - libcc <nl> + <nl> + When developing on linux with gdb , it is recommended to add a gdb index to speed <nl> + up loading symbols . This doesn ' t need to be executed on every build , but it is <nl> + recommended to do it at least once to index most shared libraries : <nl> + <nl> + $ . / vendor / libchromiumcontent / src / build / gdb - add - index . / out / D / electron <nl> + <nl> + Building libchromiumcontent requires a powerful machine and takes a long time <nl> + ( though incremental rebuilding the shared library component is fast ) . With an <nl> + 8 - core / 16 - thread Ryzen 1700 CPU clocked at 3ghz , fast SSD and 32GB of RAM , it <nl> + should take about 40 minutes . It is not recommended to build with less than 16GB <nl> + of RAM . <nl> + <nl> + # # Chromium git cache <nl> + <nl> + ` depot_tools ` has an undocumented option that allows the developer to set a <nl> + global cache for all git objects of Chromium + dependencies . This option uses <nl> + ` git clone - - shared ` to save bandwidth / space on multiple clones of the same <nl> + repositories . <nl> + <nl> + On electron / libchromiumcontent , this option is exposed through the <nl> + ` LIBCHROMIUMCONTENT_GIT_CACHE ` environment variable . If you intend to have <nl> + several libchromiumcontent build trees on the same machine ( to work on different <nl> + branches for example ) , it is recommended to set the variable to speed up the <nl> + download of Chromium source . For example : <nl> + <nl> + $ mkdir ~ / . chromium - git - cache <nl> + $ LIBCHROMIUMCONTENT_GIT_CACHE = ~ / . chromium - git - cache . / script / bootstrap . py - d - - build_debug_libcc <nl> + <nl> + If the bootstrap script is interrupted while using the git cache , it will leave <nl> + the cache locked . To remove the lock , delete the files ending in ` . lock ` : <nl> + <nl> + $ find ~ / . chromium - git - cache / - type f - name ' * . lock ' - delete <nl> + <nl> + It is possible to share this directory with other machines by exporting it as <nl> + SMB share on linux , but only one process / machine can be using the cache at a <nl> + time . The locks created by git - cache script will try to prevent this , but it may <nl> + not work perfectly in a network . <nl> + <nl> + On Windows , SMBv2 has a directory cache that will cause problems with the git <nl> + cache script , so it is necessary to disable it by setting the registry key <nl> + <nl> + HKEY_LOCAL_MACHINE \ System \ CurrentControlSet \ Services \ Lanmanworkstation \ Parameters \ DirectoryCacheLifetime <nl> + <nl> + to 0 . More information : https : / / stackoverflow . com / a / 9935126 <nl> mmm a / script / bootstrap . py <nl> ppp b / script / bootstrap . py <nl> def main ( ) : <nl> libcc_static_library_path = args . libcc_static_library_path <nl> <nl> # Redirect to use local libchromiumcontent build . <nl> - if args . build_libchromiumcontent : <nl> - build_libchromiumcontent ( args . verbose , args . target_arch , defines ) <nl> + if args . build_release_libcc or args . build_debug_libcc : <nl> + build_libchromiumcontent ( args . verbose , args . target_arch , defines , <nl> + args . build_debug_libcc , args . update_libcc ) <nl> dist_dir = os . path . join ( VENDOR_DIR , ' libchromiumcontent ' , ' dist ' , ' main ' ) <nl> libcc_source_path = os . path . join ( dist_dir , ' src ' ) <nl> libcc_shared_library_path = os . path . join ( dist_dir , ' shared_library ' ) <nl> def parse_args ( ) : <nl> parser . add_argument ( ' - - clang_dir ' , default = ' ' , help = ' Path to clang binaries ' ) <nl> parser . add_argument ( ' - - disable_clang ' , action = ' store_true ' , <nl> help = ' Use compilers other than clang for building ' ) <nl> - parser . add_argument ( ' - - build_libchromiumcontent ' , action = ' store_true ' , <nl> - help = ' Build local version of libchromiumcontent ' ) <nl> + build_libcc = parser . add_mutually_exclusive_group ( ) <nl> + build_libcc . add_argument ( ' - - build_release_libcc ' , action = ' store_true ' , <nl> + help = ' Build release version of libchromiumcontent ' ) <nl> + build_libcc . add_argument ( ' - - build_debug_libcc ' , action = ' store_true ' , <nl> + help = ' Build debug version of libchromiumcontent ' ) <nl> + parser . add_argument ( ' - - update_libcc ' , default = False , <nl> + action = ' store_true ' , help = ( ' force gclient invocation to ' <nl> + ' update libchromiumcontent ' ) ) <nl> parser . add_argument ( ' - - libcc_source_path ' , required = False , <nl> help = ' The source path of libchromiumcontent . ' \ <nl> ' NOTE : All options of libchromiumcontent are ' \ <nl> def update_win32_python ( ) : <nl> execute_stdout ( [ ' git ' , ' clone ' , PYTHON_26_URL ] ) <nl> <nl> <nl> - def build_libchromiumcontent ( verbose , target_arch , defines ) : <nl> + def build_libchromiumcontent ( verbose , target_arch , defines , debug , <nl> + force_update ) : <nl> args = [ sys . executable , <nl> os . path . join ( SOURCE_ROOT , ' script ' , ' build - libchromiumcontent . py ' ) ] <nl> + if debug : <nl> + args + = [ ' - d ' ] <nl> + if force_update : <nl> + args + = [ ' - - force - update ' ] <nl> if verbose : <nl> args + = [ ' - v ' ] <nl> if defines : <nl> mmm a / script / build - libchromiumcontent . py <nl> ppp b / script / build - libchromiumcontent . py <nl> <nl> <nl> from lib . config import enable_verbose_mode , get_target_arch <nl> from lib . util import execute_stdout <nl> + from bootstrap import get_libchromiumcontent_commit <nl> <nl> <nl> SOURCE_ROOT = os . path . abspath ( os . path . dirname ( os . path . dirname ( __file__ ) ) ) <nl> + LIBCC_DIR = os . path . join ( SOURCE_ROOT , ' vendor ' , ' libchromiumcontent ' ) <nl> + GCLIENT_DONE_MARKER = os . path . join ( SOURCE_ROOT , ' . gclient_done ' ) <nl> + LIBCC_COMMIT = get_libchromiumcontent_commit ( ) <nl> + <nl> + <nl> + def update_gclient_done_marker ( ) : <nl> + with open ( GCLIENT_DONE_MARKER , ' wb ' ) as f : <nl> + f . write ( LIBCC_COMMIT ) <nl> + <nl> + <nl> + def libchromiumcontent_outdated ( ) : <nl> + if not os . path . exists ( GCLIENT_DONE_MARKER ) : <nl> + return True <nl> + with open ( GCLIENT_DONE_MARKER , ' rb ' ) as f : <nl> + return f . read ( ) ! = LIBCC_COMMIT <nl> <nl> <nl> def main ( ) : <nl> - os . chdir ( SOURCE_ROOT ) <nl> + os . chdir ( LIBCC_DIR ) <nl> <nl> args = parse_args ( ) <nl> if args . verbose : <nl> def main ( ) : <nl> # . / script / update - t x64 - - defines = ' ' <nl> # . / script / build - - no_shared_library - t x64 <nl> # . / script / create - dist - c static_library - t x64 - - no_zip <nl> - script_dir = os . path . join ( SOURCE_ROOT , ' vendor ' , ' libchromiumcontent ' , <nl> - ' script ' ) <nl> + script_dir = os . path . join ( LIBCC_DIR , ' script ' ) <nl> bootstrap = os . path . join ( script_dir , ' bootstrap ' ) <nl> update = os . path . join ( script_dir , ' update ' ) <nl> build = os . path . join ( script_dir , ' build ' ) <nl> create_dist = os . path . join ( script_dir , ' create - dist ' ) <nl> - execute_stdout ( [ sys . executable , bootstrap ] ) <nl> - execute_stdout ( [ sys . executable , update , ' - t ' , args . target_arch , <nl> - ' - - defines ' , args . defines ] ) <nl> - execute_stdout ( [ sys . executable , build , ' - R ' , ' - t ' , args . target_arch ] ) <nl> - execute_stdout ( [ sys . executable , create_dist , ' - c ' , ' static_library ' , <nl> - ' - - no_zip ' , ' - t ' , args . target_arch ] ) <nl> + if args . force_update or libchromiumcontent_outdated ( ) : <nl> + execute_stdout ( [ sys . executable , bootstrap ] ) <nl> + execute_stdout ( [ sys . executable , update , ' - t ' , args . target_arch , <nl> + ' - - defines ' , args . defines ] ) <nl> + update_gclient_done_marker ( ) <nl> + if args . debug : <nl> + execute_stdout ( [ sys . executable , build , ' - D ' , ' - t ' , args . target_arch ] ) <nl> + execute_stdout ( [ sys . executable , create_dist , ' - c ' , ' shared_library ' , <nl> + ' - - no_zip ' , ' - - keep - debug - symbols ' , <nl> + ' - t ' , args . target_arch ] ) <nl> + else : <nl> + execute_stdout ( [ sys . executable , build , ' - R ' , ' - t ' , args . target_arch ] ) <nl> + execute_stdout ( [ sys . executable , create_dist , ' - c ' , ' static_library ' , <nl> + ' - - no_zip ' , ' - t ' , args . target_arch ] ) <nl> <nl> <nl> def parse_args ( ) : <nl> def parse_args ( ) : <nl> help = ' The definetions passed to gyp ' ) <nl> parser . add_argument ( ' - v ' , ' - - verbose ' , action = ' store_true ' , <nl> help = ' Prints the output of the subprocesses ' ) <nl> + parser . add_argument ( ' - d ' , ' - - debug ' , action = ' store_true ' , <nl> + help = ' Build libchromiumcontent for debugging ' ) <nl> + parser . add_argument ( ' - - force - update ' , default = False , action = ' store_true ' , <nl> + help = ' Force gclient to update libchromiumcontent ' ) <nl> return parser . parse_args ( ) <nl> <nl> <nl> mmm a / script / build . py <nl> ppp b / script / build . py <nl> <nl> <nl> CONFIGURATIONS = [ ' Release ' , ' Debug ' ] <nl> SOURCE_ROOT = os . path . abspath ( os . path . dirname ( os . path . dirname ( __file__ ) ) ) <nl> + LIBCC_SOURCE_ROOT = os . path . join ( SOURCE_ROOT , ' vendor ' , ' libchromiumcontent ' ) <nl> + LIBCC_DIST_MAIN = os . path . join ( LIBCC_SOURCE_ROOT , ' dist ' , ' main ' ) <nl> + GCLIENT_DONE = os . path . join ( SOURCE_ROOT , ' . gclient_done ' ) <nl> <nl> <nl> def main ( ) : <nl> def main ( ) : <nl> ninja + = ' . exe ' <nl> <nl> args = parse_args ( ) <nl> + if args . libcc : <nl> + if ( ' D ' not in args . configuration <nl> + or not os . path . exists ( GCLIENT_DONE ) <nl> + or not os . path . exists ( os . path . join ( LIBCC_DIST_MAIN , ' build . ninja ' ) ) ) : <nl> + sys . stderr . write ( ' - - libcc should only be used when ' <nl> + ' libchromiumcontent was built with bootstrap . py - d ' <nl> + ' - - debug_libchromiumcontent ' + os . linesep ) <nl> + sys . exit ( 1 ) <nl> + script = os . path . join ( LIBCC_SOURCE_ROOT , ' script ' , ' build ' ) <nl> + subprocess . check_call ( [ sys . executable , script , ' - D ' , ' - t ' , <nl> + get_target_arch ( ) ] ) <nl> + subprocess . check_call ( [ ninja , ' - C ' , LIBCC_DIST_MAIN ] ) <nl> + <nl> for config in args . configuration : <nl> build_path = os . path . join ( ' out ' , config [ 0 ] ) <nl> ret = subprocess . call ( [ ninja , ' - C ' , build_path , args . target ] ) <nl> def parse_args ( ) : <nl> help = ' Build specified target ' , <nl> default = electron_gyp ( ) [ ' project_name % ' ] , <nl> required = False ) <nl> + parser . add_argument ( ' - - libcc ' , <nl> + help = ( <nl> + ' Build libchromiumcontent first . Should be used only ' <nl> + ' when libchromiumcontent as built with boostrap . py ' <nl> + ' - d - - debug_libchromiumcontent . ' <nl> + ) , <nl> + action = ' store_true ' , default = False ) <nl> return parser . parse_args ( ) <nl> <nl> <nl> mmm a / vendor / libchromiumcontent <nl> ppp b / vendor / libchromiumcontent <nl> @ @ - 1 + 1 @ @ <nl> - Subproject commit 92e2d6a9657444dfbdcb89f986c8705bdda3dccf <nl> + Subproject commit 8915338e8cca8679e884efcd6aa5c046b1de57a4 <nl>
|
Merge pull request from electron / improvements - for - libcc - development
|
electron/electron
|
a419fe75ca76c8edcbd80692038749001ac9fe63
|
2017-08-15T10:40:06Z
|
mmm a / tensorflow / BUILD <nl> ppp b / tensorflow / BUILD <nl> package_group ( <nl> " / / learning / meta_rank / . . . " , <nl> " / / tensorflow / . . . " , <nl> " / / tensorflow_fold / llgtm / . . . " , <nl> + " / / third_party / py / tensor2tensor / . . . " , <nl> ] , <nl> ) <nl> <nl> mmm a / tensorflow / contrib / eager / python / examples / mnist / mnist . py <nl> ppp b / tensorflow / contrib / eager / python / examples / mnist / mnist . py <nl> <nl> from __future__ import print_function <nl> <nl> import argparse <nl> - import functools <nl> import os <nl> import sys <nl> import time <nl> def train_one_epoch ( model , optimizer , dataset , log_interval = None ) : <nl> <nl> tf . train . get_or_create_global_step ( ) <nl> <nl> - def model_loss ( labels , images ) : <nl> - prediction = model ( images , training = True ) <nl> - loss_value = loss ( prediction , labels ) <nl> - tf . contrib . summary . scalar ( ' loss ' , loss_value ) <nl> - tf . contrib . summary . scalar ( ' accuracy ' , <nl> - compute_accuracy ( prediction , labels ) ) <nl> - return loss_value <nl> - <nl> for ( batch , ( images , labels ) ) in enumerate ( tfe . Iterator ( dataset ) ) : <nl> with tf . contrib . summary . record_summaries_every_n_global_steps ( 10 ) : <nl> - batch_model_loss = functools . partial ( model_loss , labels , images ) <nl> - optimizer . minimize ( <nl> - batch_model_loss , global_step = tf . train . get_global_step ( ) ) <nl> + with tfe . GradientTape ( ) as tape : <nl> + prediction = model ( images , training = True ) <nl> + loss_value = loss ( prediction , labels ) <nl> + tf . contrib . summary . scalar ( ' loss ' , loss_value ) <nl> + tf . contrib . summary . scalar ( ' accuracy ' , <nl> + compute_accuracy ( prediction , labels ) ) <nl> + grads = tape . gradient ( loss_value , model . variables ) <nl> + optimizer . apply_gradients ( zip ( grads , model . variables ) ) <nl> if log_interval and batch % log_interval = = 0 : <nl> - print ( ' Batch # % d \ tLoss : % . 6f ' % ( batch , batch_model_loss ( ) ) ) <nl> + print ( ' Batch # % d \ tLoss : % . 6f ' % ( batch , loss_value ) ) <nl> <nl> <nl> def test ( model , dataset ) : <nl> mmm a / tensorflow / contrib / eager / python / examples / resnet50 / resnet50_test . py <nl> ppp b / tensorflow / contrib / eager / python / examples / resnet50 / resnet50_test . py <nl> def random_batch ( batch_size ) : <nl> <nl> def train_one_step ( model , images , labels , optimizer ) : <nl> <nl> - def model_loss ( ) : <nl> + with tfe . GradientTape ( ) as tape : <nl> logits = model ( images , training = True ) <nl> loss = tf . losses . softmax_cross_entropy ( <nl> logits = logits , onehot_labels = labels ) <nl> tf . contrib . summary . scalar ( name = ' loss ' , tensor = loss ) <nl> - return loss <nl> - <nl> - optimizer . minimize ( model_loss ) <nl> + grads = tape . gradient ( loss , model . variables ) <nl> + optimizer . apply_gradients ( zip ( grads , model . variables ) ) <nl> <nl> <nl> class ResNet50Test ( tf . test . TestCase ) : <nl> mmm a / tensorflow / contrib / lite / kernels / conv . cc <nl> ppp b / tensorflow / contrib / lite / kernels / conv . cc <nl> void EvalFloat ( TfLiteContext * context , TfLiteNode * node , <nl> CalculateActivationRangeFloat ( params - > activation , & output_activation_min , <nl> & output_activation_max ) ; <nl> <nl> - const float * filter_data ; <nl> - if ( data - > need_hwcn_weights ) { <nl> - filter_data = GetTensorData < float > ( hwcn_weights ) ; <nl> - } else { <nl> - filter_data = GetTensorData < float > ( filter ) ; <nl> - } <nl> - <nl> if ( kernel_type = = kReference ) { <nl> - reference_ops : : Conv ( <nl> - GetTensorData < float > ( input ) , GetTensorDims ( input ) , filter_data , <nl> - GetTensorDims ( filter ) , GetTensorData < float > ( bias ) , GetTensorDims ( bias ) , <nl> - params - > stride_width , params - > stride_height , data - > padding . width , <nl> - data - > padding . height , output_activation_min , output_activation_max , <nl> - GetTensorData < float > ( output ) , GetTensorDims ( output ) , <nl> - GetTensorData < float > ( im2col ) , GetTensorDims ( im2col ) ) ; <nl> + reference_ops : : Conv ( GetTensorData < float > ( input ) , GetTensorDims ( input ) , <nl> + GetTensorData < float > ( filter ) , GetTensorDims ( filter ) , <nl> + GetTensorData < float > ( bias ) , GetTensorDims ( bias ) , <nl> + params - > stride_width , params - > stride_height , <nl> + data - > padding . width , data - > padding . height , <nl> + output_activation_min , output_activation_max , <nl> + GetTensorData < float > ( output ) , GetTensorDims ( output ) , <nl> + GetTensorData < float > ( im2col ) , GetTensorDims ( im2col ) ) ; <nl> } else { <nl> + const float * filter_data ; <nl> + if ( data - > need_hwcn_weights ) { <nl> + filter_data = GetTensorData < float > ( hwcn_weights ) ; <nl> + } else { <nl> + filter_data = GetTensorData < float > ( filter ) ; <nl> + } <nl> + <nl> multithreaded_ops : : Conv ( <nl> GetTensorData < float > ( input ) , GetTensorDims ( input ) , filter_data , <nl> GetTensorDims ( filter ) , GetTensorData < float > ( bias ) , GetTensorDims ( bias ) , <nl> mmm a / tensorflow / contrib / training / python / training / hparam . py <nl> ppp b / tensorflow / contrib / training / python / training / hparam . py <nl> <nl> ( ( ? P < val > [ ^ , \ [ ] * ) # single value : " a " or None <nl> | <nl> \ [ ( ? P < vals > [ ^ \ ] ] * ) \ ] ) # list of values : None or " 1 , 2 , 3 " <nl> - ( $ | , ) " " " , re . VERBOSE ) <nl> + ( $ | , \ s * ) " " " , re . VERBOSE ) <nl> <nl> <nl> def _parse_fail ( name , var_type , value , values ) : <nl> mmm a / tensorflow / contrib / training / python / training / hparam_test . py <nl> ppp b / tensorflow / contrib / training / python / training / hparam_test . py <nl> def testSomeValues ( self ) : <nl> self . assertEqual ( 12 , hparams . aaa ) <nl> self . assertEqual ( 2 . 0 , hparams . b ) <nl> self . assertEqual ( ' relu6 ' , hparams . c_c ) <nl> - hparams . parse ( ' c_c = relu4 , b = - 2 . 0e10 ' ) <nl> + hparams . parse ( ' c_c = relu4 , b = - 2 . 0e10 ' ) <nl> self . assertDictEqual ( { <nl> ' aaa ' : 12 , <nl> ' b ' : - 2 . 0e10 , <nl> mmm a / tensorflow / python / eager / BUILD <nl> ppp b / tensorflow / python / eager / BUILD <nl> <nl> licenses ( [ " notice " ] ) # Apache 2 . 0 <nl> <nl> - load ( " / / tensorflow : tensorflow . bzl " , " py_test " ) <nl> + load ( " / / tensorflow : tensorflow . bzl " , " py_test " , " tf_cc_binary " ) <nl> load ( " / / tensorflow : tensorflow . bzl " , " cuda_py_test " ) <nl> - load ( " / / tensorflow : tensorflow . bzl " , " tf_cc_binary " ) <nl> load ( <nl> " / / tensorflow / tools / test : performance . bzl " , <nl> " tf_py_logged_benchmark " , <nl> cuda_py_test ( <nl> ] , <nl> ) <nl> <nl> + py_test ( <nl> + name = " pywrap_tfe_test " , <nl> + srcs = [ " pywrap_tfe_test . py " ] , <nl> + srcs_version = " PY2AND3 " , <nl> + deps = [ <nl> + " : backprop " , <nl> + " : context " , <nl> + " : test " , <nl> + " / / tensorflow / python : framework_test_lib " , <nl> + " / / tensorflow / python : math_ops " , <nl> + " / / tensorflow / python : pywrap_tensorflow " , <nl> + " / / tensorflow / python : random_ops " , <nl> + " / / third_party / py / numpy " , <nl> + ] , <nl> + ) <nl> + <nl> # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> # Google - internal targets . <nl> <nl> mmm a / tensorflow / python / eager / benchmarks_test . py <nl> ppp b / tensorflow / python / eager / benchmarks_test . py <nl> <nl> from tensorflow . python . ops import math_ops <nl> from tensorflow . python . ops import random_ops <nl> <nl> - <nl> CPU = " / device : CPU : 0 " <nl> GPU = " / device : GPU : 0 " <nl> <nl> <nl> + def record_gradient_callback ( inputs , attrs , results ) : <nl> + return backprop . _record_gradient ( " MatMul " , inputs , attrs , results , None ) <nl> + <nl> + <nl> + def c_tfe_py_fastpath_execute ( a , b , transpose_a = False , transpose_b = False ) : <nl> + ctx = context . context ( ) <nl> + assert not ctx . in_graph_mode ( <nl> + ) , " The prototype doesn ' t contain C code for graph construction " <nl> + ctx_handle = ctx . _handle # pylint : disable = protected - access <nl> + <nl> + return pywrap_tensorflow . TFE_Py_FastPathExecute ( <nl> + ctx_handle , None , " MatMul " , record_gradient_callback , a , b , <nl> + " transpose_a " , transpose_a , " transpose_b " , transpose_b ) [ 0 ] <nl> + <nl> + <nl> class MicroBenchmarks ( test . Benchmark ) : <nl> <nl> def __init__ ( self ) : <nl> def func ( ) : <nl> gen_math_ops . _mat_mul ( m , m , transpose_b = transpose_b ) <nl> self . _run ( func , num_iters ) <nl> <nl> + def _benchmark_tfe_py_fastpath_execute_matmul ( self , m , transpose_b , <nl> + num_iters ) : <nl> + <nl> + def func ( ) : <nl> + c_tfe_py_fastpath_execute ( m , m , transpose_b = transpose_b ) <nl> + <nl> + self . _run ( func , num_iters ) <nl> + <nl> def _benchmark_tfe_py_execute_matmul ( self , m , transpose_b , num_iters ) : <nl> inputs = [ m , m ] <nl> # pylint : disable = protected - access <nl> def benchmark_gen_math_ops_matmul_2_by_2_CPU ( self ) : <nl> self . _benchmark_gen_math_ops_matmul ( <nl> m , transpose_b = False , num_iters = self . _num_iters_2_by_2 ) <nl> <nl> + def benchmark_tfe_py_fastpath_execute_matmul_2_by_2_CPU ( self ) : <nl> + with context . device ( CPU ) : <nl> + m = self . _m_2_by_2 . cpu ( ) <nl> + self . _benchmark_tfe_py_fastpath_execute_matmul ( <nl> + m , transpose_b = False , num_iters = self . _num_iters_2_by_2 ) <nl> + <nl> def benchmark_tfe_py_execute_matmul_2_by_2_CPU ( self ) : <nl> with context . device ( CPU ) : <nl> m = self . _m_2_by_2 . cpu ( ) <nl> def benchmark_gen_math_ops_matmul_100_by_784_CPU ( self ) : <nl> self . _benchmark_gen_math_ops_matmul ( <nl> m , transpose_b = True , num_iters = self . _num_iters_100_by_784 ) <nl> <nl> + def benchmark_tfe_py_fastpath_execute_matmul_100_by_784_CPU ( self ) : <nl> + with context . device ( CPU ) : <nl> + m = self . _m_100_by_784 . cpu ( ) <nl> + self . _benchmark_tfe_py_fastpath_execute_matmul ( <nl> + m , transpose_b = True , num_iters = self . _num_iters_100_by_784 ) <nl> + <nl> def benchmark_tfe_py_execute_matmul_100_by_784_CPU ( self ) : <nl> with context . device ( CPU ) : <nl> m = self . _m_100_by_784 . cpu ( ) <nl> mmm a / tensorflow / python / eager / pywrap_tfe . h <nl> ppp b / tensorflow / python / eager / pywrap_tfe . h <nl> PyObject * TFE_Py_TapeGradient ( PyObject * tape , PyObject * vspace , <nl> PyObject * target , PyObject * sources , <nl> PyObject * output_gradients , TF_Status * status ) ; <nl> <nl> + / / Execute a tensorflow operation assuming that all provided inputs are <nl> + / / correctly formatted ( i . e . EagerTensors ) . If it doesn ' t find EagerTensors , <nl> + / / it will simply fail with a NotImplementedError . <nl> + / / <nl> + / / The first PyObject * is unused . <nl> + / / The " args " PyObject * is meant to be a tuple with the following structure : <nl> + / / Item 1 : The TFE Context <nl> + / / Item 2 : device_name : Name of the device on which to execute the operation , <nl> + / / or NULL for automatic selection . <nl> + / / Item 3 : op_name : Name of the TensorFlow op to execute . <nl> + / / Item 4 : record_gradient_callback : Callback that records the gradient of the <nl> + / / result . <nl> + / / The callback takes ( inputs , attrs , result ) - all sequences and <nl> + / / records the gradient . <nl> + / / Item 5 onwards : inputs - This is a list of inputs followed by a list of <nl> + / / attrs . It is not necessary for type attrs to be present . <nl> + / / <nl> + / / This is named _C since there doesn ' t seem to be any way to make it visible <nl> + / / in the SWIG interface without renaming due to the use of the % native <nl> + / / directive . <nl> + PyObject * TFE_Py_FastPathExecute_C ( PyObject * , PyObject * args ) ; <nl> + <nl> / / Returns the set of variables watched by the given tape . <nl> PyObject * TFE_Py_TapeWatchedVariables ( PyObject * tape ) ; <nl> <nl> mmm a / tensorflow / python / eager / pywrap_tfe_src . cc <nl> ppp b / tensorflow / python / eager / pywrap_tfe_src . cc <nl> limitations under the License . <nl> # include " tensorflow / c / c_api_internal . h " <nl> # include " tensorflow / c / eager / c_api_internal . h " <nl> # include " tensorflow / c / eager / tape . h " <nl> + # include " tensorflow / core / lib / gtl / cleanup . h " <nl> # include " tensorflow / core / lib / strings / strcat . h " <nl> + # include " tensorflow / core / lib / strings / stringprintf . h " <nl> # include " tensorflow / core / platform / mutex . h " <nl> # include " tensorflow / core / platform / types . h " <nl> # include " tensorflow / python / eager / pywrap_tensor . h " <nl> <nl> using tensorflow : : string ; <nl> + using tensorflow : : strings : : Printf ; <nl> <nl> namespace { <nl> <nl> bool SetOpAttrScalar ( TFE_Context * ctx , TFE_Op * op , const char * key , <nl> return true ; <nl> } <nl> <nl> - void SetOpAttrs ( TFE_Context * ctx , TFE_Op * op , PyObject * attrs , <nl> + / / start_index is the index at which the Tuple / List attrs will start getting <nl> + / / processed . <nl> + void SetOpAttrs ( TFE_Context * ctx , TFE_Op * op , PyObject * attrs , int start_index , <nl> TF_Status * out_status ) { <nl> if ( attrs = = Py_None ) return ; <nl> - if ( ! PyTuple_Check ( attrs ) ) { <nl> - TF_SetStatus ( out_status , TF_INVALID_ARGUMENT , " Expecting an attrs tuple . " ) ; <nl> - return ; <nl> - } <nl> - Py_ssize_t len = PyTuple_GET_SIZE ( attrs ) ; <nl> + Py_ssize_t len = PyTuple_GET_SIZE ( attrs ) - start_index ; <nl> if ( ( len & 1 ) ! = 0 ) { <nl> TF_SetStatus ( out_status , TF_INVALID_ARGUMENT , <nl> " Expecting attrs tuple to have even length . " ) ; <nl> void SetOpAttrs ( TFE_Context * ctx , TFE_Op * op , PyObject * attrs , <nl> } <nl> / / Parse attrs <nl> for ( Py_ssize_t i = 0 ; i < len ; i + = 2 ) { <nl> - PyObject * py_key = PyTuple_GET_ITEM ( attrs , i ) ; <nl> - PyObject * py_value = PyTuple_GET_ITEM ( attrs , i + 1 ) ; <nl> + PyObject * py_key = PyTuple_GET_ITEM ( attrs , start_index + i ) ; <nl> + PyObject * py_value = PyTuple_GET_ITEM ( attrs , start_index + i + 1 ) ; <nl> # if PY_MAJOR_VERSION > = 3 <nl> const char * key = PyBytes_Check ( py_key ) ? PyBytes_AsString ( py_key ) <nl> : PyUnicode_AsUTF8 ( py_key ) ; <nl> PyObject * exception_class GUARDED_BY ( exception_class_mutex ) = nullptr ; <nl> <nl> static tensorflow : : mutex _uid_mutex ( tensorflow : : LINKER_INITIALIZED ) ; <nl> static tensorflow : : int64 _uid GUARDED_BY ( _uid_mutex ) = 0 ; <nl> - <nl> } / / namespace <nl> <nl> void TFE_Py_Execute ( TFE_Context * ctx , const char * device_name , <nl> void TFE_Py_Execute ( TFE_Context * ctx , const char * device_name , <nl> } <nl> } <nl> if ( TF_GetCode ( out_status ) = = TF_OK ) { <nl> - SetOpAttrs ( ctx , op , attrs , out_status ) ; <nl> + SetOpAttrs ( ctx , op , attrs , 0 , out_status ) ; <nl> } <nl> Py_BEGIN_ALLOW_THREADS ; <nl> if ( TF_GetCode ( out_status ) = = TF_OK ) { <nl> std : : vector < PyObject * > MakeTensorList ( PyObject * tensors ) { <nl> return list ; <nl> } <nl> <nl> - <nl> PyObject * TFE_Py_TapeGradient ( PyObject * tape , PyObject * vspace , <nl> PyObject * target , PyObject * sources , <nl> PyObject * output_gradients , TF_Status * status ) { <nl> PyObject * TFE_Py_TapeGradient ( PyObject * tape , PyObject * vspace , <nl> Py_INCREF ( Py_None ) ; <nl> return Py_None ; <nl> } <nl> + <nl> + namespace { <nl> + static const int kFastPathExecuteInputStartIndex = 4 ; <nl> + <nl> + bool CheckEagerTensors ( PyObject * seq , int start_index , int num_to_check ) { <nl> + for ( int i = start_index ; i < start_index + num_to_check ; i + + ) { <nl> + PyObject * item = PyTuple_GET_ITEM ( seq , i ) ; <nl> + if ( ! EagerTensor_CheckExact ( item ) ) return false ; <nl> + } <nl> + <nl> + return true ; <nl> + } <nl> + <nl> + const tensorflow : : OpDef * GetOpDef ( PyObject * py_op_name ) { <nl> + const char * op_name = TFE_GetPythonString ( py_op_name ) ; <nl> + if ( op_name = = nullptr ) { <nl> + PyErr_SetString ( PyExc_TypeError , <nl> + Printf ( " expected a string for op_name , got % s instead " , <nl> + py_op_name - > ob_type - > tp_name ) <nl> + . c_str ( ) ) ; <nl> + return nullptr ; <nl> + } <nl> + <nl> + const tensorflow : : OpRegistrationData * op_reg_data = nullptr ; <nl> + const tensorflow : : Status lookup_status = <nl> + tensorflow : : OpRegistry : : Global ( ) - > LookUp ( op_name , & op_reg_data ) ; <nl> + if ( MaybeRaiseExceptionFromStatus ( lookup_status , nullptr ) ) { <nl> + return nullptr ; <nl> + } <nl> + return & op_reg_data - > op_def ; <nl> + } <nl> + <nl> + const char * GetDeviceName ( PyObject * py_device_name ) { <nl> + if ( py_device_name ! = Py_None ) { <nl> + return TFE_GetPythonString ( py_device_name ) ; <nl> + } <nl> + return nullptr ; <nl> + } <nl> + <nl> + bool MaybeRunRecordGradientCallback ( const tensorflow : : OpDef * op_def , <nl> + PyObject * args , PyObject * result , <nl> + PyObject * record_gradient_callback ) { <nl> + if ( * ThreadTapeIsStopped ( ) | | GetTapeSet ( ) - > empty ( ) | | <nl> + record_gradient_callback = = Py_None ) { <nl> + return true ; <nl> + } <nl> + if ( ! PyCallable_Check ( record_gradient_callback ) ) { <nl> + PyErr_SetString ( <nl> + PyExc_TypeError , <nl> + Printf ( <nl> + " expected a function for record_gradient_callback , got % s instead " , <nl> + record_gradient_callback - > ob_type - > tp_name ) <nl> + . c_str ( ) ) ; <nl> + return false ; <nl> + } <nl> + <nl> + PyObject * inputs = PyTuple_New ( op_def - > input_arg_size ( ) ) ; <nl> + for ( int i = 0 ; i < op_def - > input_arg_size ( ) ; i + + ) { <nl> + PyTuple_SET_ITEM ( <nl> + inputs , i , PyTuple_GET_ITEM ( args , kFastPathExecuteInputStartIndex + i ) ) ; <nl> + } <nl> + <nl> + int args_size = PyTuple_GET_SIZE ( args ) ; <nl> + int num_attrs = <nl> + args_size - op_def - > input_arg_size ( ) - kFastPathExecuteInputStartIndex ; <nl> + PyObject * attrs = PyTuple_New ( num_attrs ) ; <nl> + for ( int i = 0 ; i < num_attrs ; i + + ) { <nl> + PyTuple_SET_ITEM ( attrs , i , <nl> + PyTuple_GET_ITEM ( args , kFastPathExecuteInputStartIndex + <nl> + op_def - > input_arg_size ( ) + i ) ) ; <nl> + } <nl> + <nl> + PyObject * callback_args = Py_BuildValue ( " OOO " , inputs , attrs , result ) ; <nl> + PyObject_CallObject ( record_gradient_callback , callback_args ) ; <nl> + <nl> + Py_DECREF ( inputs ) ; <nl> + Py_DECREF ( callback_args ) ; <nl> + Py_DECREF ( attrs ) ; <nl> + return true ; <nl> + } <nl> + } / / namespace <nl> + <nl> + PyObject * TFE_Py_FastPathExecute_C ( PyObject * , PyObject * args ) { <nl> + TFE_Context * ctx = reinterpret_cast < TFE_Context * > ( <nl> + PyCapsule_GetPointer ( PyTuple_GET_ITEM ( args , 0 ) , nullptr ) ) ; <nl> + const tensorflow : : OpDef * op_def = GetOpDef ( PyTuple_GET_ITEM ( args , 2 ) ) ; <nl> + if ( op_def = = nullptr ) return nullptr ; <nl> + const char * device_name = GetDeviceName ( PyTuple_GET_ITEM ( args , 1 ) ) ; <nl> + PyObject * record_gradient_callback = PyTuple_GET_ITEM ( args , 3 ) ; <nl> + <nl> + Py_ssize_t args_size = PyTuple_GET_SIZE ( args ) ; <nl> + if ( args_size < kFastPathExecuteInputStartIndex ) { <nl> + PyErr_SetString ( <nl> + PyExc_ValueError , <nl> + Printf ( " There must be at least % d items in the input tuple . " , <nl> + kFastPathExecuteInputStartIndex ) <nl> + . c_str ( ) ) ; <nl> + return nullptr ; <nl> + } <nl> + <nl> + if ( args_size < kFastPathExecuteInputStartIndex + op_def - > input_arg_size ( ) ) { <nl> + PyErr_SetString ( <nl> + PyExc_ValueError , <nl> + Printf ( " Tuple size smaller than intended . Expected to be at least % d , " <nl> + " was % ld " , <nl> + kFastPathExecuteInputStartIndex + op_def - > input_arg_size ( ) , <nl> + args_size ) <nl> + . c_str ( ) ) ; <nl> + return nullptr ; <nl> + } <nl> + <nl> + if ( ! CheckEagerTensors ( args , kFastPathExecuteInputStartIndex , <nl> + op_def - > input_arg_size ( ) ) ) { <nl> + / / TODO ( nareshmodi ) : Maybe some other way of signalling that this should <nl> + / / fall back ? <nl> + PyErr_SetString ( PyExc_NotImplementedError , <nl> + " This function does not handle the case of the path where " <nl> + " all inputs are not already EagerTensors . " ) ; <nl> + return nullptr ; <nl> + } <nl> + <nl> + TF_Status * status = TF_NewStatus ( ) ; <nl> + TFE_Op * op = TFE_NewOp ( ctx , op_def - > name ( ) . c_str ( ) , status ) ; <nl> + auto cleaner = tensorflow : : gtl : : MakeCleanup ( [ status , op ] { <nl> + TF_DeleteStatus ( status ) ; <nl> + TFE_DeleteOp ( op ) ; <nl> + } ) ; <nl> + if ( MaybeRaiseExceptionFromTFStatus ( status , nullptr ) ) { <nl> + return nullptr ; <nl> + } <nl> + <nl> + TFE_OpSetDevice ( op , device_name , status ) ; <nl> + if ( MaybeRaiseExceptionFromTFStatus ( status , nullptr ) ) { <nl> + return nullptr ; <nl> + } <nl> + <nl> + / / Add non - type attrs . <nl> + SetOpAttrs ( ctx , op , args , <nl> + kFastPathExecuteInputStartIndex + op_def - > input_arg_size ( ) , <nl> + status ) ; <nl> + if ( MaybeRaiseExceptionFromTFStatus ( status , nullptr ) ) { <nl> + return nullptr ; <nl> + } <nl> + <nl> + / / Add type attrs and inputs . <nl> + for ( int i = 0 ; i < op_def - > input_arg_size ( ) ; i + + ) { <nl> + const auto & input_arg = op_def - > input_arg ( i ) ; <nl> + <nl> + PyObject * input = <nl> + PyTuple_GET_ITEM ( args , kFastPathExecuteInputStartIndex + i ) ; <nl> + TFE_TensorHandle * input_handle = EagerTensor_Handle ( input ) ; <nl> + <nl> + / / The following code might set duplicate type attrs . This will result in <nl> + / / the CacheKey for the generated AttrBuilder possibly differing from those <nl> + / / where the type attrs are correctly set . Inconsistent CacheKeys for ops <nl> + / / means that there might be unnecessarily duplicated kernels . <nl> + / / TODO ( nareshmodi ) : Fix this . <nl> + if ( ! input_arg . type_attr ( ) . empty ( ) ) { <nl> + TFE_OpSetAttrType ( op , input_arg . type_attr ( ) . data ( ) , <nl> + TFE_TensorHandleDataType ( input_handle ) ) ; <nl> + } <nl> + <nl> + TFE_OpAddInput ( op , input_handle , status ) ; <nl> + if ( MaybeRaiseExceptionFromTFStatus ( status , nullptr ) ) { <nl> + return nullptr ; <nl> + } <nl> + } <nl> + <nl> + int num_retvals = op_def - > output_arg_size ( ) ; <nl> + tensorflow : : gtl : : InlinedVector < TFE_TensorHandle * , 2 > retvals ( num_retvals ) ; <nl> + <nl> + Py_BEGIN_ALLOW_THREADS ; <nl> + TFE_Execute ( op , retvals . data ( ) , & num_retvals , status ) ; <nl> + Py_END_ALLOW_THREADS ; <nl> + if ( MaybeRaiseExceptionFromTFStatus ( status , nullptr ) ) { <nl> + return nullptr ; <nl> + } <nl> + <nl> + PyObject * result = PyTuple_New ( num_retvals ) ; <nl> + for ( int i = 0 ; i < num_retvals ; + + i ) { <nl> + PyTuple_SET_ITEM ( result , i , EagerTensorFromHandle ( retvals [ i ] ) ) ; <nl> + } <nl> + <nl> + if ( ! MaybeRunRecordGradientCallback ( op_def , args , result , <nl> + record_gradient_callback ) ) { <nl> + return nullptr ; <nl> + } <nl> + <nl> + return result ; <nl> + } <nl> new file mode 100644 <nl> index 0000000000000 . . d4f4ed592fb99 <nl> mmm / dev / null <nl> ppp b / tensorflow / python / eager / pywrap_tfe_test . py <nl> <nl> + # Copyright 2018 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> + " " " Tests for low - level eager execution primitives . " " " <nl> + <nl> + from __future__ import absolute_import <nl> + from __future__ import division <nl> + from __future__ import print_function <nl> + <nl> + from tensorflow . python import pywrap_tensorflow <nl> + from tensorflow . python . eager import backprop <nl> + from tensorflow . python . eager import context <nl> + from tensorflow . python . eager import test <nl> + from tensorflow . python . framework import constant_op <nl> + from tensorflow . python . framework import test_util <nl> + from tensorflow . python . ops import math_ops <nl> + from tensorflow . python . ops import random_ops <nl> + <nl> + <nl> + def record_gradient_callback ( inputs , attrs , results ) : <nl> + return backprop . _record_gradient ( " MatMul " , inputs , attrs , results , None ) <nl> + <nl> + <nl> + def c_tfe_py_fastpath_execute ( a , b , transpose_a = False , transpose_b = False ) : <nl> + ctx = context . context ( ) <nl> + assert not ctx . in_graph_mode ( <nl> + ) , " The prototype doesn ' t contain C code for graph construction " <nl> + ctx_handle = ctx . _handle # pylint : disable = protected - access <nl> + <nl> + return pywrap_tensorflow . TFE_Py_FastPathExecute ( <nl> + ctx_handle , ctx . device_name , " MatMul " , record_gradient_callback , a , b , <nl> + " transpose_a " , transpose_a , " transpose_b " , transpose_b ) [ 0 ] <nl> + <nl> + <nl> + class Tests ( test . TestCase ) : <nl> + <nl> + @ test_util . assert_no_new_tensors <nl> + @ test_util . assert_no_garbage_created <nl> + def testFastpathExecute_MatMulCorrectResponse ( self ) : <nl> + a_2_by_2 = random_ops . random_uniform ( ( 2 , 2 ) ) <nl> + b_2_by_2 = random_ops . random_uniform ( ( 2 , 2 ) ) <nl> + <nl> + a_100_by_784 = random_ops . random_uniform ( ( 100 , 784 ) ) <nl> + b_100_by_784 = random_ops . random_uniform ( ( 100 , 784 ) ) <nl> + <nl> + self . assertAllClose ( <nl> + math_ops . matmul ( a_2_by_2 , b_2_by_2 ) , <nl> + c_tfe_py_fastpath_execute ( a_2_by_2 , b_2_by_2 ) ) <nl> + self . assertAllClose ( <nl> + math_ops . matmul ( a_100_by_784 , b_100_by_784 , transpose_b = True ) , <nl> + c_tfe_py_fastpath_execute ( a_100_by_784 , b_100_by_784 , transpose_b = True ) ) <nl> + <nl> + @ test_util . assert_no_new_tensors <nl> + @ test_util . assert_no_garbage_created <nl> + def testFastpathExecute_TapeWrite ( self ) : <nl> + with backprop . GradientTape ( persistent = True ) as tape : <nl> + a_2_by_2 = constant_op . constant ( 1 . 0 , shape = [ 2 , 2 ] ) <nl> + tape . watch ( a_2_by_2 ) <nl> + z = c_tfe_py_fastpath_execute ( a_2_by_2 , a_2_by_2 ) <nl> + dz_dy = tape . gradient ( z , [ a_2_by_2 ] ) [ 0 ] <nl> + self . assertAllEqual ( dz_dy . numpy ( ) , <nl> + constant_op . constant ( 4 . 0 , shape = [ 2 , 2 ] ) . numpy ( ) ) <nl> + <nl> + @ test_util . assert_no_new_tensors <nl> + @ test_util . assert_no_garbage_created <nl> + def testFastpathExecute_MatMulSlowPath ( self ) : <nl> + a_2_by_2 = random_ops . random_uniform ( ( 2 , 2 ) ) . cpu ( ) . numpy ( ) <nl> + <nl> + with self . assertRaises ( NotImplementedError ) : <nl> + c_tfe_py_fastpath_execute ( a_2_by_2 , a_2_by_2 ) <nl> + <nl> + @ test_util . assert_no_new_tensors <nl> + @ test_util . assert_no_garbage_created <nl> + def testFastpathExecute_InvalidInputs ( self ) : <nl> + a_2_by_2 = random_ops . random_uniform ( ( 2 , 2 ) ) <nl> + ctx = context . context ( ) <nl> + assert not ctx . in_graph_mode ( <nl> + ) , " The prototype doesn ' t contain C code for graph construction " <nl> + ctx_handle = ctx . _handle # pylint : disable = protected - access <nl> + <nl> + with self . assertRaisesRegexp ( ValueError , <nl> + " at least 4 items in the input tuple " ) : <nl> + pywrap_tensorflow . TFE_Py_FastPathExecute ( ctx_handle , ctx . device_name , <nl> + " Identity " ) <nl> + <nl> + with self . assertRaisesRegexp ( ValueError , <nl> + " Expected to be at least 5 , was 4 " ) : <nl> + pywrap_tensorflow . TFE_Py_FastPathExecute ( <nl> + ctx_handle , ctx_handle , " Identity " , record_gradient_callback ) <nl> + <nl> + with self . assertRaisesRegexp ( TypeError , " expected a string for op_name " ) : <nl> + pywrap_tensorflow . TFE_Py_FastPathExecute ( <nl> + ctx_handle , ctx . device_name , ctx_handle , record_gradient_callback , <nl> + a_2_by_2 ) <nl> + <nl> + <nl> + if __name__ = = " __main__ " : <nl> + test . main ( ) <nl> mmm a / tensorflow / python / pywrap_tfe . i <nl> ppp b / tensorflow / python / pywrap_tfe . i <nl> limitations under the License . <nl> % rename ( " % s " ) TFE_Py_InitEagerTensor ; <nl> % rename ( " % s " ) TFE_Py_RegisterExceptionClass ; <nl> % rename ( " % s " ) TFE_Py_Execute ; <nl> + % rename ( " % s " ) TFE_Py_FastPathExecute ; <nl> % rename ( " % s " ) TFE_Py_UID ; <nl> % rename ( " % s " ) TFE_Py_TapeSetNew ; <nl> % rename ( " % s " ) TFE_Py_TapeSetRemove ; <nl> limitations under the License . <nl> } <nl> $ 1 = & temp ; <nl> $ 1 - > resize ( PyInt_AsLong ( $ input ) , nullptr ) ; <nl> - } <nl> + } <nl> <nl> / / Create new Status object . <nl> % typemap ( in , numinputs = 0 ) TF_Status * out_status { <nl> limitations under the License . <nl> } <nl> } <nl> <nl> + / / SWIG usually unwraps the tuple that the native Python / C interface generates . <nl> + / / Since we wanted to have a function with a variable length of arguments , we <nl> + / / used the native Python / C interface directly ( which by default supports <nl> + / / passing all arguments as a tuple ) . <nl> + % native ( TFE_Py_FastPathExecute ) TFE_Py_FastPathExecute_C ; <nl> <nl> % include " tensorflow / python / eager / pywrap_tfe . h " <nl> <nl> - <nl> / / Clear all typemaps . <nl> % typemap ( out ) TF_DataType ; <nl> % typemap ( out ) int64_t ; <nl>
|
Merge commit for internal changes
|
tensorflow/tensorflow
|
5d417470fce017783e0e1ff37330701906ad5a19
|
2018-01-22T18:56:06Z
|
mmm a / benchmark / utils / DriverUtils . swift <nl> ppp b / benchmark / utils / DriverUtils . swift <nl> enum TestAction { <nl> <nl> struct TestConfig { <nl> / / / The delimiter to use when printing output . <nl> - var delim : String = " , " <nl> + let delim : String <nl> <nl> / / / The filters applied to our test names . <nl> - var filters = [ String ] ( ) <nl> + let filters : [ String ] <nl> <nl> / / / The tags that we want to run <nl> - var tags = Set < BenchmarkCategory > ( ) <nl> + let tags : Set < BenchmarkCategory > <nl> <nl> / / / Tests tagged with any of these will not be executed <nl> - var skipTags : Set < BenchmarkCategory > = [ . unstable , . skip ] <nl> + let skipTags : Set < BenchmarkCategory > <nl> <nl> / / / The scalar multiple of the amount of times a test should be run . This <nl> / / / enables one to cause tests to run for N iterations longer than they <nl> / / / normally would . This is useful when one wishes for a test to run for a <nl> / / / longer amount of time to perform performance analysis on the test in <nl> / / / instruments . <nl> - var iterationScale : Int = 1 <nl> + let iterationScale : Int <nl> <nl> / / / If we are asked to have a fixed number of iterations , the number of fixed <nl> / / / iterations . <nl> - var fixedNumIters : UInt = 0 <nl> + let fixedNumIters : UInt <nl> <nl> / / / The number of samples we should take of each test . <nl> - var numSamples : Int = 1 <nl> + let numSamples : Int <nl> <nl> / / / Is verbose output enabled ? <nl> - var verbose : Bool = false <nl> + let verbose : Bool <nl> <nl> / / / After we run the tests , should the harness sleep to allow for utilities <nl> / / / like leaks that require a PID to run on the test harness . <nl> - var afterRunSleep : Int ? <nl> + let afterRunSleep : Int ? <nl> <nl> / / / The list of tests to run . <nl> var tests = [ ( index : String , info : BenchmarkInfo ) ] ( ) <nl> <nl> - var action : TestAction = . run <nl> + let action : TestAction <nl> <nl> init ( ) throws { <nl> + <nl> + struct PartialTestConfig { <nl> + var delim : String ? <nl> + var filters : [ String ] ? <nl> + var tags , skipTags : Set < BenchmarkCategory > ? <nl> + var iterationScale , numSamples , afterRunSleep : Int ? <nl> + var fixedNumIters : UInt ? <nl> + var verbose : Bool ? <nl> + var action : TestAction ? <nl> + } <nl> + var c = PartialTestConfig ( ) <nl> + <nl> let validOptions = [ <nl> " - - iter - scale " , " - - num - samples " , " - - num - iters " , <nl> " - - verbose " , " - - delim " , " - - list " , " - - sleep " , <nl> struct TestConfig { <nl> argument : String ? = nil <nl> ) throws - > T { <nl> if let t = try parse ( value ) { return t } <nl> + var type = " \ ( T . self ) " <nl> + if type . starts ( with : " Optional < " ) { <nl> + let s = type . index ( after : type . index ( of : " < " ) ! ) <nl> + let e = type . index ( before : type . endIndex ) / / " > " <nl> + type = String ( type [ s . . < e ] ) / / strip Optional < > <nl> + } <nl> throw ArgumentError . invalidType ( <nl> - value : value , type : " \ ( T . self ) " , argument : argument ) <nl> + value : value , type : type , argument : argument ) <nl> } <nl> <nl> func optionalArg < T > ( <nl> _ name : String , <nl> - _ property : WritableKeyPath < TestConfig , T > , <nl> + _ property : WritableKeyPath < PartialTestConfig , T > , <nl> defaultValue : T ? = nil , <nl> parser parse : ( String ) throws - > T ? = { _ in nil } <nl> ) throws { <nl> struct TestConfig { <nl> guard ! value . isEmpty | | defaultValue ! = nil <nl> else { throw ArgumentError . missingValue ( name ) } <nl> <nl> - self [ keyPath : property ] = ( value . isEmpty ) <nl> + c [ keyPath : property ] = ( value . isEmpty ) <nl> ? defaultValue ! <nl> : try checked ( parse , value , argument : name ) <nl> } <nl> struct TestConfig { <nl> try optionalArg ( " - - num - samples " , \ . numSamples ) { Int ( $ 0 ) } <nl> try optionalArg ( " - - verbose " , \ . verbose , defaultValue : true ) <nl> try optionalArg ( " - - delim " , \ . delim ) { $ 0 } <nl> - try optionalArg ( " - - tags " , \ . tags , parser : tags ) <nl> - try optionalArg ( " - - skip - tags " , \ . skipTags , defaultValue : [ ] , parser : tags ) <nl> + try optionalArg ( " - - tags " , \ PartialTestConfig . tags , parser : tags ) <nl> + try optionalArg ( " - - skip - tags " , \ PartialTestConfig . skipTags , <nl> + defaultValue : [ ] , parser : tags ) <nl> try optionalArg ( " - - sleep " , \ . afterRunSleep ) { Int ( $ 0 ) } <nl> try optionalArg ( " - - list " , \ . action , defaultValue : . listTests ) <nl> try optionalArg ( " - - help " , \ . action , defaultValue : . help ( validOptions ) ) <nl> <nl> + / / Configure from the command line arguments , filling in the defaults . <nl> + delim = c . delim ? ? " , " <nl> + self . tags = c . tags ? ? [ ] <nl> + skipTags = c . skipTags ? ? [ . unstable , . skip ] <nl> + iterationScale = c . iterationScale ? ? 1 <nl> + fixedNumIters = c . fixedNumIters ? ? 0 <nl> + numSamples = c . numSamples ? ? 1 <nl> + verbose = c . verbose ? ? false <nl> + afterRunSleep = c . afterRunSleep <nl> + action = c . action ? ? . run <nl> + / / TODO : filters , tests <nl> } <nl> <nl> mutating func findTestsToRun ( ) { <nl>
|
[ benchmark ] [ Gardening ] Introduce PartialTestConfig
|
apple/swift
|
50575b1cff85a76d09a00465bfb1e2cfc74d1c09
|
2018-07-20T23:32:40Z
|
mmm a / imgui . cpp <nl> ppp b / imgui . cpp <nl> void ImGui : : ColorTooltip ( const char * text , const float col [ 4 ] , ImGuiColorEditFla <nl> } <nl> <nl> ImVec2 sz ( g . FontSize * 3 , g . FontSize * 3 ) ; <nl> - RenderColorRectWithAlphaGrid ( window - > DC . CursorPos , window - > DC . CursorPos + sz , IM_COL32 ( cr , cg , cb , ca ) , g . FontSize , g . Style . FrameRounding ) ; <nl> + RenderColorRectWithAlphaCheckerboard ( window - > DC . CursorPos , window - > DC . CursorPos + sz , IM_COL32 ( cr , cg , cb , ca ) , g . FontSize , g . Style . FrameRounding ) ; <nl> Dummy ( sz ) ; <nl> SameLine ( ) ; <nl> if ( flags & ImGuiColorEditFlags_NoAlpha ) <nl> static inline float ColorSquareSize ( ) <nl> return g . FontSize + g . Style . FramePadding . y * 2 . 0f ; <nl> } <nl> <nl> - void ImGui : : RenderColorRectWithAlphaGrid ( ImVec2 p_min , ImVec2 p_max , ImU32 col , float grid_step , float rounding ) <nl> + void ImGui : : RenderColorRectWithAlphaCheckerboard ( ImVec2 p_min , ImVec2 p_max , ImU32 col , float grid_step , float rounding , int rounding_corners_flags_parent ) <nl> { <nl> ImGuiWindow * window = GetCurrentWindow ( ) ; <nl> if ( ( ( col & IM_COL32_A_MASK ) > > IM_COL32_A_SHIFT ) < 0xFF ) <nl> { <nl> + / / We use rounding + 1 here which is counterintuitive but it inhibit mosts of the edge artifacts with overlayed rounded shapes <nl> ImU32 col_bg1 = GetColorU32 ( IM_COL32 ( 204 , 204 , 204 , 255 ) ) ; <nl> ImU32 col_bg2 = GetColorU32 ( IM_COL32 ( 128 , 128 , 128 , 255 ) ) ; <nl> - window - > DrawList - > AddRectFilled ( p_min , p_max , col_bg1 , rounding ) ; <nl> - int yi = 0 ; <nl> - for ( float y = p_min . y ; y < p_max . y ; y + = grid_step , yi + + ) <nl> - for ( float x = p_min . x + ( ( yi & 1 ) ? grid_step : 0 . 0f ) ; x < p_max . x ; x + = grid_step * 2 ) <nl> + window - > DrawList - > AddRectFilled ( p_min , p_max , col_bg1 , rounding + 1 , rounding_corners_flags_parent ) ; <nl> + int x_count = ( int ) ( ( p_max . x - p_min . x ) / grid_step + 0 . 99f ) ; <nl> + int y_count = ( int ) ( ( p_max . y - p_min . y ) / grid_step + 0 . 99f ) ; <nl> + for ( int y_i = 0 ; y_i < y_count ; y_i + + ) <nl> { <nl> - window - > DrawList - > AddRectFilled ( ImVec2 ( x , y ) , ImMin ( ImVec2 ( x + grid_step , y + grid_step ) , p_max ) , col_bg2 , 0 . 0f ) ; <nl> + for ( int x_i = ( y_i & 1 ) ^ 1 ; x_i < x_count ; x_i + = 2 ) <nl> + { <nl> + int rounding_corners_flags = 0 ; <nl> + if ( y_i = = 0 ) rounding_corners_flags | = ( x_i = = 0 ) ? ImGuiCorner_TopLeft : ( x_i = = x_count - 1 ) ? ImGuiCorner_TopRight : 0 ; <nl> + if ( y_i = = y_count - 1 ) rounding_corners_flags | = ( x_i = = 0 ) ? ImGuiCorner_BottomLeft : ( x_i = = x_count - 1 ) ? ImGuiCorner_BottomRight : 0 ; <nl> + rounding_corners_flags & = rounding_corners_flags_parent ; <nl> + ImVec2 p1 ( p_min . x + x_i * grid_step , p_min . y + y_i * grid_step ) ; <nl> + ImVec2 p2 ( ImMin ( p1 . x + grid_step , p_max . x ) , ImMin ( p1 . y + grid_step , p_max . y ) ) ; <nl> + window - > DrawList - > AddRectFilled ( p1 , p2 , col_bg2 , rounding_corners_flags ? rounding + 1 : 0 . 0f , rounding_corners_flags ) ; <nl> + } <nl> } <nl> } <nl> - window - > DrawList - > AddRectFilled ( p_min , p_max , col , rounding ) ; <nl> + window - > DrawList - > AddRectFilled ( p_min , p_max , col , rounding , rounding_corners_flags_parent ) ; <nl> } <nl> <nl> / / A little colored square . Return true when clicked . <nl> bool ImGui : : ColorButton ( const char * desc_id , const ImVec4 & col , ImGuiColorEditFl <nl> bool hovered , held ; <nl> bool pressed = ButtonBehavior ( bb , id , & hovered , & held ) ; <nl> float grid_step = ImMin ( g . FontSize , ImMin ( size . x , size . y ) * 0 . 5f ) ; <nl> - RenderColorRectWithAlphaGrid ( bb . Min , bb . Max , GetColorU32 ( ( flags & ( ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoAlphaPreview ) ) ? ImVec4 ( col . x , col . y , col . z , 1 . 0f ) : col ) , grid_step , style . FrameRounding ) ; <nl> + RenderColorRectWithAlphaCheckerboard ( bb . Min , bb . Max , GetColorU32 ( ( flags & ( ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoAlphaPreview ) ) ? ImVec4 ( col . x , col . y , col . z , 1 . 0f ) : col ) , grid_step , style . FrameRounding ) ; <nl> RenderFrameBorder ( bb . Min , bb . Max , style . FrameRounding ) ; <nl> <nl> if ( hovered & & ! ( flags & ImGuiColorEditFlags_NoTooltip ) ) <nl> bool ImGui : : ColorPicker3 ( const char * label , float col [ 3 ] , ImGuiColorEditFlags fl <nl> return true ; <nl> } <nl> <nl> - / / ColorPicker v2 . 60 WIP <nl> - / / see https : / / github . com / ocornut / imgui / issues / 346 <nl> - / / TODO : English strings in context menu ( see FIXME - LOCALIZATION ) <nl> - / / Note : we adjust item height based on item widget , which may cause a flickering feedback loop ( if automatic height makes a vertical scrollbar appears , affecting automatic width . . ) <nl> + / / ColorPicker <nl> / / Note : only access 3 floats if ImGuiColorEditFlags_NoAlpha flag is set . <nl> + / / FIXME : we adjust the big color square height based on item width , which may cause a flickering feedback loop ( if automatic height makes a vertical scrollbar appears , affecting automatic width . . ) <nl> bool ImGui : : ColorPicker4 ( const char * label , float col [ 4 ] , ImGuiColorEditFlags flags ) <nl> { <nl> ImGuiContext & g = * GImGui ; <nl> mmm a / imgui_internal . h <nl> ppp b / imgui_internal . h <nl> namespace ImGui <nl> IMGUI_API void RenderTextClipped ( const ImVec2 & pos_min , const ImVec2 & pos_max , const char * text , const char * text_end , const ImVec2 * text_size_if_known , const ImVec2 & align = ImVec2 ( 0 , 0 ) , const ImRect * clip_rect = NULL ) ; <nl> IMGUI_API void RenderFrame ( ImVec2 p_min , ImVec2 p_max , ImU32 fill_col , bool border = true , float rounding = 0 . 0f ) ; <nl> IMGUI_API void RenderFrameBorder ( ImVec2 p_min , ImVec2 p_max , float rounding = 0 . 0f ) ; <nl> - IMGUI_API void RenderColorRectWithAlphaGrid ( ImVec2 p_min , ImVec2 p_max , ImU32 fill_col , float grid_step , float rounding = 0 . 0f ) ; <nl> + IMGUI_API void RenderColorRectWithAlphaCheckerboard ( ImVec2 p_min , ImVec2 p_max , ImU32 fill_col , float grid_step , float rounding = 0 . 0f , int rounding_corners_flags = ~ 0 ) ; <nl> IMGUI_API void RenderCollapseTriangle ( ImVec2 pos , bool is_open , float scale = 1 . 0f ) ; <nl> IMGUI_API void RenderBullet ( ImVec2 pos ) ; <nl> IMGUI_API void RenderCheckMark ( ImVec2 pos , ImU32 col ) ; <nl>
|
ColorButton , ColorPicker : painfully made RenderColorRectWithAlphaCheckerboard more friendly to using Rounding and Border in style , still not perfect : ( ( ) + comments
|
ocornut/imgui
|
19c6a9c0e02423b9721e0a913babd0db6db9d243
|
2017-07-26T09:38:33Z
|
mmm a / caffe2 / core / blob_test . cc <nl> ppp b / caffe2 / core / blob_test . cc <nl> TEST ( TensorNonTypedTest , TensorChangeType ) { <nl> EXPECT_TRUE ( tensor . meta ( ) . Match < int > ( ) ) ; <nl> <nl> / / int and float are same size , so should retain the pointer <nl> + / / NB : this is only true when the use_count of the underlying Storage is 1 , if <nl> + / / the underlying Storage is shared between multiple Tensors We ' ll create a <nl> + / / new Storage when the data type changes <nl> EXPECT_TRUE ( tensor . mutable_data < float > ( ) = = ( float * ) ptr ) ; <nl> EXPECT_TRUE ( tensor . data < float > ( ) = = ( const float * ) ptr ) ; <nl> EXPECT_TRUE ( tensor . meta ( ) . Match < float > ( ) ) ; <nl> mmm a / caffe2 / core / storage . h <nl> ppp b / caffe2 / core / storage . h <nl> <nl> namespace caffe2 { <nl> <nl> using DataType = TypeMeta ; <nl> + / / TODO : changed to DataPtr in Aten when shared folder <nl> + / / is ready <nl> + using DataPtr = std : : shared_ptr < void > ; <nl> <nl> class StorageImpl ; <nl> using Storage = std : : shared_ptr < StorageImpl > ; <nl> class StorageImpl { <nl> explicit StorageImpl ( DeviceType device_type ) : device_type_ ( device_type ) { } <nl> StorageImpl ( DeviceType device_type , TypeMeta data_type ) <nl> : data_type_ ( data_type ) , device_type_ ( device_type ) { } <nl> + template < typename Deleter = MemoryDeleter > <nl> + StorageImpl ( <nl> + DeviceType device_type , <nl> + TypeMeta data_type , <nl> + void * src , <nl> + size_t capacity , <nl> + Deleter d = nullptr ) <nl> + : data_type_ ( data_type ) , device_type_ ( device_type ) { <nl> + CAFFE_ENFORCE_WITH_CALLER ( <nl> + data_type_ . id ( ) ! = TypeIdentifier : : uninitialized ( ) , <nl> + " To create storage with a raw external pointer you need to pass in an " <nl> + " initialized data_type ( TypeMeta ) . " ) ; <nl> + / / Check if the deleter is a MemoryDeleter and is a simple nullptr . <nl> + if ( std : : is_same < MemoryDeleter , Deleter > : : value & & <nl> + reinterpret_cast < MemoryDeleter * > ( static_cast < void * > ( & d ) ) [ 0 ] = = <nl> + nullptr ) { <nl> + / / Use aliasing constructor trick to avoid calling the destructor . <nl> + data_ptr_ = std : : shared_ptr < void > ( std : : shared_ptr < void > ( ) , src ) ; <nl> + } else { <nl> + data_ptr_ . reset ( src , d ) ; <nl> + } <nl> + capacity_ = capacity ; <nl> + } <nl> <nl> void reset ( ) { <nl> data_ptr_ . reset ( ) ; <nl> class StorageImpl { <nl> return data_type_ . Match < T > ( ) ; <nl> } <nl> <nl> - const void * data_ptr ( ) const { <nl> + const void * data ( ) const { <nl> return data_ptr_ . get ( ) ; <nl> } <nl> <nl> - void * data_ptr ( ) { <nl> + void * data ( ) { <nl> return data_ptr_ . get ( ) ; <nl> } <nl> <nl> + DataPtr & data_ptr ( ) { <nl> + return data_ptr_ ; <nl> + } <nl> + <nl> + const DataPtr & data_ptr ( ) const { <nl> + return data_ptr_ ; <nl> + } <nl> + <nl> + void set_dtype ( const DataType & data_type ) { <nl> + data_type_ = data_type ; <nl> + } <nl> + <nl> const DataType & dtype ( ) const { <nl> return data_type_ ; <nl> } <nl> class StorageImpl { <nl> return capacity_ / itemsize ( ) ; <nl> } <nl> <nl> - inline void set_device_type ( DeviceType device_type ) { <nl> - device_type_ = device_type ; <nl> + / / TODO : remove later <nl> + void set_numel ( int64_t numel ) { <nl> + capacity_ = numel * itemsize ( ) ; <nl> } <nl> <nl> inline DeviceType device_type ( ) const { <nl> class StorageImpl { <nl> ~ StorageImpl ( ) = default ; <nl> StorageImpl & operator = ( StorageImpl & & ) = default ; <nl> <nl> - protected : <nl> + / * * <nl> + * Can only be called when use_count is 1 <nl> + * / <nl> template < typename Deleter = MemoryDeleter > <nl> - void ShareExternalPointer ( <nl> + void SingleUseStorageShareExternalPointer ( <nl> void * src , <nl> const DataType & data_type , <nl> - size_t capacity = 0 , <nl> + size_t capacity , <nl> Deleter d = nullptr ) { <nl> + / / TODO : this will be added in the intrusive_ptr diff <nl> + / / CAFFE_ENFORCE_WITH_CALLER ( <nl> + / / use_count ( ) = = 1 , <nl> + / / " SingleUseStorageShareExternalPointer can only be called when <nl> + / / use_count = = 1 " ) ; <nl> + data_type_ = data_type ; <nl> + CAFFE_ENFORCE_WITH_CALLER ( <nl> + data_type_ . id ( ) ! = TypeIdentifier : : uninitialized ( ) , <nl> + " To share with a raw external pointer you need to have meta " <nl> + " already set . " ) ; <nl> + CAFFE_ENFORCE_WITH_CALLER ( <nl> + capacity > = 0 , " capacity must be valid for ShareExternalPointer " ) ; <nl> / / Check if the deleter is a MemoryDeleter and is a simple nullptr . <nl> if ( std : : is_same < MemoryDeleter , Deleter > : : value & & <nl> reinterpret_cast < MemoryDeleter * > ( & d ) [ 0 ] = = nullptr ) { <nl> class StorageImpl { <nl> } else { <nl> data_ptr_ . reset ( src , d ) ; <nl> } <nl> - / / Sets capacity . If not specified , we will implicitly assume that <nl> - / / the capacity is the current size . <nl> - if ( capacity ) { <nl> - capacity_ = capacity ; <nl> - } <nl> + capacity_ = capacity ; <nl> } <nl> <nl> - / / TODO : changed to DataPtr in Aten when shared folder <nl> - / / is ready <nl> - using DataPtr = std : : shared_ptr < void > ; <nl> + private : <nl> int64_t capacity_ = 0 ; <nl> DataType data_type_ ; <nl> DataPtr data_ptr_ ; <nl> class StorageImpl { <nl> / / Allocator * allocator_ ; <nl> DeviceType device_type_ = CPU ; <nl> <nl> - friend class TensorImpl ; <nl> } ; <nl> <nl> + / * * <nl> + * Create a Storage given an external pointer ` src ` . <nl> + * ` device_type ` : the device type of the storage <nl> + * ` capacity ` : the capacity of the Tensor <nl> + * / <nl> + template < typename T , typename Deleter = MemoryDeleter > <nl> + Storage CreateStorage ( <nl> + T * src , <nl> + DeviceType device_type , <nl> + size_t capacity = 0 , <nl> + Deleter d = nullptr ) { <nl> + return CreateStorage ( src , device_type , TypeMeta : : Make < T > ( ) , capacity , d ) ; <nl> + } <nl> + <nl> + template < typename Deleter = MemoryDeleter > <nl> + Storage CreateStorage ( <nl> + void * src , <nl> + DeviceType device_type , <nl> + const TypeMeta & meta , <nl> + size_t capacity , / * need to specify capacity of the storage * / <nl> + Deleter d = nullptr ) { <nl> + / / We include capacity here because this will be a public function . <nl> + return std : : make_shared < StorageImpl > ( device_type , meta , src , capacity , d ) ; <nl> + } <nl> + <nl> } / / namespace caffe2 <nl> <nl> # endif / / CAFFE2_CORE_STORAGE_H_ <nl> mmm a / caffe2 / core / tensor . h <nl> ppp b / caffe2 / core / tensor . h <nl> class CAFFE2_API TensorImpl : public c10 : : intrusive_ptr_target { <nl> if ( ( void * ) & src = = ( void * ) this ) { <nl> return ; <nl> } <nl> - storage_ - > data_type_ = src . storage ( ) - > dtype ( ) ; <nl> + if ( storage_ - > dtype ( ) ! = src . meta ( ) ) { <nl> + storage_ = std : : make_shared < StorageImpl > ( GetDeviceType ( ) , src . meta ( ) ) ; <nl> + } <nl> if ( src . size ( ) = = - 1 ) { <nl> dims_ . clear ( ) ; <nl> size_ = - 1 ; <nl> class CAFFE2_API TensorImpl : public c10 : : intrusive_ptr_target { <nl> " Can ' t call Extend on shared storage , please call Resize instead " ) ; <nl> auto newDims = dims_ ; <nl> newDims [ 0 ] + = num ; <nl> - if ( ! storage_ - > data_ptr ( ) ) { <nl> + if ( ! storage_ - > data ( ) ) { <nl> Resize ( newDims ) ; <nl> return ; <nl> } <nl> class CAFFE2_API TensorImpl : public c10 : : intrusive_ptr_target { <nl> auto newCapacity = dims_ ; <nl> newCapacity [ 0 ] = std : : max < size_t > ( <nl> newDims [ 0 ] , std : : ceil ( dims_ [ 0 ] * ( growthPct + 100 ) / 100 ) ) ; <nl> - auto oldData = std : : move ( storage_ - > data_ptr_ ) ; <nl> + auto oldData = std : : move ( storage_ - > data_ptr ( ) ) ; <nl> auto oldSize = size_ ; <nl> auto oldDims = dims_ ; <nl> Resize ( newCapacity ) ; <nl> class CAFFE2_API TensorImpl : public c10 : : intrusive_ptr_target { <nl> return ; <nl> } <nl> / / Old data is discarded <nl> - storage_ - > data_ptr_ . reset ( ) ; <nl> + storage_ - > data_ptr ( ) . reset ( ) ; <nl> auto oldSize = size_ ; <nl> auto oldDims = dims_ ; <nl> Resize ( newCapacity ) ; <nl> class CAFFE2_API TensorImpl : public c10 : : intrusive_ptr_target { <nl> * The source tensor should already have its data allocated . <nl> * / <nl> void ShareData ( const TensorImpl & src ) { <nl> - CAFFE_ENFORCE ( <nl> - storage_ . use_count ( ) = = 1 , <nl> - " Can ' t share data if underlying storage used by more than one tensor " ) ; <nl> - storage_ - > data_type_ = src . storage ( ) - > data_type_ ; <nl> + / / Right now , we are assuming the device_type are the same , since it is <nl> + / / inherently the same in the non - templatized code . We should probably add <nl> + / / an ENFORCE here which might affect perf a little bit . <nl> CAFFE_ENFORCE_EQ_WITH_CALLER ( <nl> src . size_ , <nl> size_ , <nl> class CAFFE2_API TensorImpl : public c10 : : intrusive_ptr_target { <nl> / / in which case ShareData ( ) doesn ' t make much sense since we don ' t really <nl> / / know what to share yet . <nl> CAFFE_ENFORCE_WITH_CALLER ( <nl> - src . storage ( ) - > data_ptr ( ) | | src . size_ = = 0 , <nl> + src . storage ( ) - > data ( ) | | src . size_ = = 0 , <nl> " Source tensor has no content and has size > 0 " ) ; <nl> / / Finally , do sharing . <nl> - storage_ - > data_ptr_ = src . storage ( ) - > data_ptr_ ; <nl> - storage_ - > capacity_ = src . storage ( ) - > capacity_ ; <nl> + / * Since we create new Storage whenever we need to change data_type / capacity <nl> + * this still keeps the original semantics <nl> + * / <nl> + storage_ = src . storage ( ) ; <nl> } <nl> <nl> / * * <nl> class CAFFE2_API TensorImpl : public c10 : : intrusive_ptr_target { <nl> * using it . If a Deleter object is passed in , when this tensor is reallocated <nl> * or freed , the deleter function is going to be called . <nl> * / <nl> - / / TODO : Change to ShareExternalStorage <nl> template < typename T , typename Deleter = MemoryDeleter > <nl> void ShareExternalPointer ( T * src , size_t capacity = 0 , Deleter d = nullptr ) { <nl> ShareExternalPointer ( src , TypeMeta : : Make < T > ( ) , capacity , d ) ; <nl> - / / Sets capacity . If not specified , we will implicitly assume that <nl> - / / the capacity is the current size . <nl> - if ( ! capacity ) { <nl> - capacity = size_ * storage_ - > itemsize ( ) ; <nl> - } <nl> - storage_ - > capacity_ = capacity ; <nl> } <nl> <nl> template < typename Deleter = MemoryDeleter > <nl> class CAFFE2_API TensorImpl : public c10 : : intrusive_ptr_target { <nl> const TypeMeta & data_type , <nl> size_t capacity = 0 , <nl> Deleter d = nullptr ) { <nl> - CAFFE_ENFORCE ( <nl> - storage_ . use_count ( ) = = 1 , <nl> - " Can ' t share external pointer if underlying storage used by more than one tensor " ) ; <nl> - storage_ - > data_type_ = data_type ; <nl> CAFFE_ENFORCE_WITH_CALLER ( <nl> - storage_ - > data_type_ . id ( ) ! = TypeIdentifier : : uninitialized ( ) , <nl> - " To share with a raw external pointer you need to have meta " <nl> - " already set . " ) ; <nl> - CAFFE_ENFORCE_WITH_CALLER ( <nl> - size_ > = 0 , <nl> - " To share data with a raw pointer , you need to set shape first . " ) ; <nl> - storage_ - > ShareExternalPointer ( src , data_type , capacity , d ) ; <nl> + data_type . id ( ) ! = TypeIdentifier : : uninitialized ( ) , <nl> + " To share with a raw external pointer you need to pass in an " <nl> + " initialized data_type ( TypeMeta ) . " ) ; <nl> + if ( ! capacity ) { <nl> + capacity = size_ * data_type . itemsize ( ) ; <nl> + } <nl> + if ( storage_ . use_count ( ) = = 1 ) { <nl> + CAFFE_ENFORCE_WITH_CALLER ( <nl> + size_ > = 0 , <nl> + " To share data with a raw pointer , you need to set shape first . " ) ; <nl> + storage_ - > SingleUseStorageShareExternalPointer ( <nl> + src , data_type , capacity , d ) ; <nl> + } else { <nl> + / / Create a new Storage <nl> + storage_ = CreateStorage ( src , GetDeviceType ( ) , data_type , capacity , d ) ; <nl> + } <nl> } <nl> <nl> / * * <nl> class CAFFE2_API TensorImpl : public c10 : : intrusive_ptr_target { <nl> * or raw_mutable_data ( ) must have been called prior to this function call . <nl> * / <nl> inline const void * raw_data ( ) const { <nl> - CAFFE_ENFORCE_WITH_CALLER ( storage_ - > data_ptr ( ) | | size_ = = 0 ) ; <nl> - return storage_ - > data_ptr ( ) ; <nl> + CAFFE_ENFORCE_WITH_CALLER ( storage_ - > data ( ) | | size_ = = 0 ) ; <nl> + return storage_ - > data ( ) ; <nl> } <nl> <nl> / * * <nl> class CAFFE2_API TensorImpl : public c10 : : intrusive_ptr_target { <nl> template < typename T > <nl> inline const T * data ( ) const { <nl> CAFFE_ENFORCE_WITH_CALLER ( <nl> - storage_ - > data_ptr ( ) | | size_ = = 0 , <nl> + storage_ - > data ( ) | | size_ = = 0 , <nl> " The tensor is of non - zero shape , but its data is not allocated yet . " <nl> " Caffe2 uses a lazy allocation , so you will need to call " <nl> " mutable_data ( ) or raw_mutable_data ( ) to actually allocate memory . " ) ; <nl> class CAFFE2_API TensorImpl : public c10 : : intrusive_ptr_target { <nl> TypeMeta : : TypeName < T > ( ) , <nl> " while tensor contains " , <nl> storage_ - > dtype ( ) . name ( ) ) ; <nl> - return static_cast < T * > ( storage_ - > data_ptr ( ) ) ; <nl> + return static_cast < T * > ( storage_ - > data ( ) ) ; <nl> } <nl> <nl> / * * <nl> class CAFFE2_API TensorImpl : public c10 : : intrusive_ptr_target { <nl> * / <nl> inline void * raw_mutable_data ( const TypeMeta & meta ) { <nl> / / For 0 - size tensors it ' s fine to return any pointer ( including nullptr ) <nl> - if ( storage_ - > dtype ( ) = = meta & & ( storage_ - > data_ptr ( ) | | size_ = = 0 ) ) { <nl> - return storage_ - > data_ptr ( ) ; <nl> + if ( storage_ - > dtype ( ) = = meta & & ( storage_ - > data ( ) | | size_ = = 0 ) ) { <nl> + return storage_ - > data ( ) ; <nl> } else { <nl> bool had_special_dtor = storage_ - > dtype ( ) . dtor ( ) ! = nullptr ; <nl> - / / TODO : we should create a new Storage here . <nl> - storage_ - > data_type_ = meta ; <nl> + if ( storage_ . use_count ( ) = = 1 ) { <nl> + storage_ - > set_dtype ( meta ) ; <nl> + / / TODO : recalcuate numel when we store numel instead of capacity in <nl> + / / Storage <nl> + } else { <nl> + if ( storage_ - > dtype ( ) ! = meta ) { <nl> + storage_ = <nl> + std : : make_shared < StorageImpl > ( storage_ - > device_type ( ) , meta ) ; <nl> + } <nl> + } <nl> CAFFE_ENFORCE_WITH_CALLER ( <nl> size_ > = 0 , <nl> " Tensor is not initialized . You probably need to call Resize ( ) " <nl> class CAFFE2_API TensorImpl : public c10 : : intrusive_ptr_target { <nl> if ( size_ = = 0 | | <nl> ( meta . ctor ( ) = = nullptr & & ! had_special_dtor & & <nl> storage_ - > capacity ( ) > = size_ * storage_ - > itemsize ( ) ) ) { <nl> - return storage_ - > data_ptr ( ) ; <nl> + return storage_ - > data ( ) ; <nl> } <nl> if ( meta . ctor ( ) ) { <nl> / / For types that need placement new , we will call it , as well as <nl> class CAFFE2_API TensorImpl : public c10 : : intrusive_ptr_target { <nl> auto ptr_and_deleter = <nl> GetStaticContext ( ) - > New ( size_ * storage_ - > itemsize ( ) ) ; <nl> auto deleter = ptr_and_deleter . second ; <nl> - storage_ - > data_ptr_ . reset ( <nl> + storage_ - > data_ptr ( ) . reset ( <nl> ptr_and_deleter . first , [ size , dtor , deleter ] ( void * ptr ) - > void { <nl> dtor ( ptr , size ) ; <nl> deleter ( ptr ) ; <nl> } ) ; <nl> - storage_ - > dtype ( ) . ctor ( ) ( storage_ - > data_ptr ( ) , size_ ) ; <nl> + storage_ - > dtype ( ) . ctor ( ) ( storage_ - > data ( ) , size_ ) ; <nl> } else { <nl> / / For fundamental type , new and delete is easier . <nl> auto ptr_and_deleter = <nl> GetStaticContext ( ) - > New ( size_ * storage_ - > itemsize ( ) ) ; <nl> - storage_ - > data_ptr_ . reset ( <nl> + storage_ - > data_ptr ( ) . reset ( <nl> ptr_and_deleter . first , ptr_and_deleter . second ) ; <nl> } <nl> - storage_ - > capacity_ = size_ * storage_ - > itemsize ( ) ; <nl> - return storage_ - > data_ptr ( ) ; <nl> + storage_ - > set_numel ( size_ ) ; <nl> + return storage_ - > data ( ) ; <nl> } <nl> } <nl> <nl> class CAFFE2_API TensorImpl : public c10 : : intrusive_ptr_target { <nl> * / <nl> template < typename T > <nl> inline T * mutable_data ( ) { <nl> - if ( ( size_ = = 0 | | storage_ - > data_ptr ( ) ) & & IsType < T > ( ) ) { <nl> - return static_cast < T * > ( storage_ - > data_ptr ( ) ) ; <nl> + if ( ( size_ = = 0 | | storage_ - > data ( ) ) & & IsType < T > ( ) ) { <nl> + return static_cast < T * > ( storage_ - > data ( ) ) ; <nl> } <nl> / / Check it here statically - otherwise TypeMeta would throw the runtime <nl> / / error in attempt to invoke TypeMeta : : ctor ( ) <nl>
|
proper sharing in ShareExternalPointer ( )
|
pytorch/pytorch
|
7de830b879d556d73d499519d32e01e8f4d66646
|
2018-08-28T17:52:26Z
|
mmm a / src / core / ext / filters / client_channel / xds / xds_client . cc <nl> ppp b / src / core / ext / filters / client_channel / xds / xds_client . cc <nl> void XdsClient : : ChannelState : : LrsCallState : : MaybeStartReportingLocked ( ) { <nl> / / Don ' t start if the ADS call hasn ' t received any valid response . Note that <nl> / / this must be the first channel because it is the current channel but its <nl> / / ADS call hasn ' t seen any response . <nl> - AdsCallState * ads_calld = chand ( ) - > ads_calld_ - > calld ( ) ; <nl> - if ( ads_calld = = nullptr | | ! ads_calld - > seen_response ( ) ) return ; <nl> + if ( chand ( ) - > ads_calld_ = = nullptr | | <nl> + chand ( ) - > ads_calld_ - > calld ( ) = = nullptr | | <nl> + ! chand ( ) - > ads_calld_ - > calld ( ) - > seen_response ( ) ) { <nl> + return ; <nl> + } <nl> / / Start reporting . <nl> reporter_ = MakeOrphanable < Reporter > ( <nl> Ref ( DEBUG_LOCATION , " LRS + load_report + start " ) , load_reporting_interval_ ) ; <nl> mmm a / src / core / lib / gprpp / sync . h <nl> ppp b / src / core / lib / gprpp / sync . h <nl> class CondVar { <nl> } <nl> } <nl> <nl> + / / Returns true iff we timed - out <nl> + template < typename Predicate > <nl> + bool WaitUntil ( Mutex * mu , Predicate pred , const gpr_timespec & deadline ) { <nl> + while ( ! pred ( ) ) { <nl> + if ( Wait ( mu , deadline ) ) return true ; <nl> + } <nl> + return false ; <nl> + } <nl> + <nl> private : <nl> gpr_cv cv_ ; <nl> } ; <nl> mmm a / test / cpp / end2end / xds_end2end_test . cc <nl> ppp b / test / cpp / end2end / xds_end2end_test . cc <nl> <nl> * <nl> * / <nl> <nl> + # include < deque > <nl> # include < memory > <nl> # include < mutex > <nl> # include < numeric > <nl> <nl> # include < grpcpp / server . h > <nl> # include < grpcpp / server_builder . h > <nl> <nl> + # include " absl / strings / str_cat . h " <nl> + # include " absl / types / optional . h " <nl> + <nl> # include " src / core / ext / filters / client_channel / backup_poller . h " <nl> # include " src / core / ext / filters / client_channel / parse_address . h " <nl> # include " src / core / ext / filters / client_channel / resolver / fake / fake_resolver . h " <nl> constexpr char kDefaultLocalityRegion [ ] = " xds_default_locality_region " ; <nl> constexpr char kDefaultLocalityZone [ ] = " xds_default_locality_zone " ; <nl> constexpr char kLbDropType [ ] = " lb " ; <nl> constexpr char kThrottleDropType [ ] = " throttle " ; <nl> + constexpr char kDefaultResourceName [ ] = " application_target_name " ; <nl> constexpr int kDefaultLocalityWeight = 3 ; <nl> constexpr int kDefaultLocalityPriority = 0 ; <nl> <nl> class CountedService : public ServiceType { <nl> } ; <nl> <nl> using BackendService = CountedService < TestServiceImpl > ; <nl> - using AdsService = CountedService < AggregatedDiscoveryService : : Service > ; <nl> using LrsService = CountedService < LoadReportingService : : Service > ; <nl> <nl> const char g_kCallCredsMdKey [ ] = " Balancer should not . . . " ; <nl> class ClientStats { <nl> } ; <nl> <nl> / / TODO ( roth ) : Change this service to a real fake . <nl> - class AdsServiceImpl : public AdsService { <nl> + class AdsServiceImpl : public AggregatedDiscoveryService : : Service , <nl> + public std : : enable_shared_from_this < AdsServiceImpl > { <nl> public : <nl> enum ResponseState { <nl> NOT_SENT , <nl> class AdsServiceImpl : public AdsService { <nl> NACKED , <nl> } ; <nl> <nl> - struct ResponseArgs { <nl> + struct EdsResourceArgs { <nl> struct Locality { <nl> Locality ( const grpc : : string & sub_zone , std : : vector < int > ports , <nl> int lb_weight = kDefaultLocalityWeight , <nl> class AdsServiceImpl : public AdsService { <nl> std : : vector < envoy : : api : : v2 : : HealthStatus > health_statuses ; <nl> } ; <nl> <nl> - ResponseArgs ( ) = default ; <nl> - explicit ResponseArgs ( std : : vector < Locality > locality_list ) <nl> + EdsResourceArgs ( ) = default ; <nl> + explicit EdsResourceArgs ( std : : vector < Locality > locality_list ) <nl> : locality_list ( std : : move ( locality_list ) ) { } <nl> <nl> std : : vector < Locality > locality_list ; <nl> class AdsServiceImpl : public AdsService { <nl> using Stream = ServerReaderWriter < DiscoveryResponse , DiscoveryRequest > ; <nl> using ResponseDelayPair = std : : pair < DiscoveryResponse , int > ; <nl> <nl> + / / A queue of resource type / name pairs that have changed since the client <nl> + / / subscribed to them . <nl> + using UpdateQueue = std : : deque < <nl> + std : : pair < std : : string / * type url * / , std : : string / * resource name * / > > ; <nl> + <nl> + / / A struct representing a client ' s subscription to a particular resource . <nl> + struct SubscriberState { <nl> + / / Version that the client currently knows about . <nl> + int current_version = 0 ; <nl> + / / The queue upon which to place updates when the resource is updated . <nl> + UpdateQueue * update_queue ; <nl> + } ; <nl> + <nl> + / / A struct representing the a client ' s subscription to all the resources . <nl> + using SubscriptionMap = <nl> + std : : map < std : : string / * type_url * / , <nl> + std : : map < std : : string / * resource_name * / , SubscriberState > > ; <nl> + <nl> + / / A struct representing the current state for a resource : <nl> + / / - the version of the resource that is set by the SetResource ( ) methods . <nl> + / / - a list of subscribers interested in this resource . <nl> + struct ResourceState { <nl> + int version = 0 ; <nl> + absl : : optional < google : : protobuf : : Any > resource ; <nl> + std : : set < SubscriberState * > subscribers ; <nl> + } ; <nl> + <nl> + / / A struct representing the current state for all resources : <nl> + / / LDS , CDS , EDS , and RDS for the class as a whole . <nl> + using ResourcesMap = <nl> + std : : map < std : : string , std : : map < std : : string , ResourceState > > ; <nl> + <nl> AdsServiceImpl ( bool enable_load_reporting ) { <nl> / / Construct RDS response data . <nl> - default_route_config_ . set_name ( " application_target_name " ) ; <nl> + default_route_config_ . set_name ( kDefaultResourceName ) ; <nl> auto * virtual_host = default_route_config_ . add_virtual_hosts ( ) ; <nl> virtual_host - > add_domains ( " * " ) ; <nl> auto * route = virtual_host - > add_routes ( ) ; <nl> route - > mutable_match ( ) - > set_prefix ( " " ) ; <nl> - route - > mutable_route ( ) - > set_cluster ( " application_target_name " ) ; <nl> - rds_response_data_ = { <nl> - { " application_target_name " , default_route_config_ } , <nl> - } ; <nl> + route - > mutable_route ( ) - > set_cluster ( kDefaultResourceName ) ; <nl> + SetRdsResource ( default_route_config_ , kDefaultResourceName ) ; <nl> / / Construct LDS response data ( with inlined RDS result ) . <nl> default_listener_ = BuildListener ( default_route_config_ ) ; <nl> - lds_response_data_ = { <nl> - { " application_target_name " , default_listener_ } , <nl> - } ; <nl> + SetLdsResource ( default_listener_ , kDefaultResourceName ) ; <nl> / / Construct CDS response data . <nl> - default_cluster_ . set_name ( " application_target_name " ) ; <nl> + default_cluster_ . set_name ( kDefaultResourceName ) ; <nl> default_cluster_ . set_type ( envoy : : api : : v2 : : Cluster : : EDS ) ; <nl> default_cluster_ . mutable_eds_cluster_config ( ) <nl> - > mutable_eds_config ( ) <nl> class AdsServiceImpl : public AdsService { <nl> if ( enable_load_reporting ) { <nl> default_cluster_ . mutable_lrs_server ( ) - > mutable_self ( ) ; <nl> } <nl> - cds_response_data_ = { <nl> - { " application_target_name " , default_cluster_ } , <nl> - } ; <nl> - } <nl> - <nl> - void HandleLdsRequest ( DiscoveryRequest * request , Stream * stream ) { <nl> - gpr_log ( GPR_INFO , " ADS [ % p ] : received LDS request ' % s ' " , this , <nl> - request - > DebugString ( ) . c_str ( ) ) ; <nl> - const std : : string version_str = " version_1 " ; <nl> - const std : : string nonce_str = " nonce_1 " ; <nl> - grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> - if ( lds_ignore_ ) return ; <nl> - if ( lds_response_state_ = = NOT_SENT ) { <nl> - DiscoveryResponse response ; <nl> - response . set_type_url ( kLdsTypeUrl ) ; <nl> - response . set_version_info ( version_str ) ; <nl> - response . set_nonce ( nonce_str ) ; <nl> - for ( const auto & server_name : request - > resource_names ( ) ) { <nl> - auto iter = lds_response_data_ . find ( server_name ) ; <nl> - if ( iter = = lds_response_data_ . end ( ) ) continue ; <nl> - response . add_resources ( ) - > PackFrom ( iter - > second ) ; <nl> + SetCdsResource ( default_cluster_ , kDefaultResourceName ) ; <nl> + } <nl> + <nl> + / / Starting a thread to do blocking read on the stream until cancel . <nl> + void BlockingRead ( Stream * stream , std : : deque < DiscoveryRequest > * requests , <nl> + bool * stream_closed ) { <nl> + DiscoveryRequest request ; <nl> + bool seen_first_request = false ; <nl> + while ( stream - > Read ( & request ) ) { <nl> + if ( ! seen_first_request ) { <nl> + EXPECT_TRUE ( request . has_node ( ) ) ; <nl> + ASSERT_FALSE ( request . node ( ) . client_features ( ) . empty ( ) ) ; <nl> + EXPECT_EQ ( request . node ( ) . client_features ( 0 ) , <nl> + " envoy . lb . does_not_support_overprovisioning " ) ; <nl> + seen_first_request = true ; <nl> } <nl> - stream - > Write ( response ) ; <nl> - lds_response_state_ = SENT ; <nl> - } else if ( lds_response_state_ = = SENT ) { <nl> - GPR_ASSERT ( ! request - > response_nonce ( ) . empty ( ) ) ; <nl> - lds_response_state_ = <nl> - request - > version_info ( ) = = version_str ? ACKED : NACKED ; <nl> - } <nl> - } <nl> - <nl> - void HandleRdsRequest ( DiscoveryRequest * request , Stream * stream ) { <nl> - gpr_log ( GPR_INFO , " ADS [ % p ] : received RDS request ' % s ' " , this , <nl> - request - > DebugString ( ) . c_str ( ) ) ; <nl> - const std : : string version_str = " version_1 " ; <nl> - const std : : string nonce_str = " nonce_1 " ; <nl> - grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> - if ( rds_ignore_ ) return ; <nl> - if ( rds_response_state_ = = NOT_SENT ) { <nl> - DiscoveryResponse response ; <nl> - response . set_type_url ( kRdsTypeUrl ) ; <nl> - response . set_version_info ( version_str ) ; <nl> - response . set_nonce ( nonce_str ) ; <nl> - for ( const auto & route_config_name : request - > resource_names ( ) ) { <nl> - auto iter = rds_response_data_ . find ( route_config_name ) ; <nl> - if ( iter = = rds_response_data_ . end ( ) ) continue ; <nl> - response . add_resources ( ) - > PackFrom ( iter - > second ) ; <nl> + { <nl> + grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> + requests - > emplace_back ( std : : move ( request ) ) ; <nl> } <nl> - stream - > Write ( response ) ; <nl> - rds_response_state_ = SENT ; <nl> - } else if ( rds_response_state_ = = SENT ) { <nl> - GPR_ASSERT ( ! request - > response_nonce ( ) . empty ( ) ) ; <nl> - rds_response_state_ = <nl> - request - > version_info ( ) = = version_str ? ACKED : NACKED ; <nl> } <nl> - } <nl> - <nl> - void HandleCdsRequest ( DiscoveryRequest * request , Stream * stream ) { <nl> - gpr_log ( GPR_INFO , " ADS [ % p ] : received CDS request ' % s ' " , this , <nl> - request - > DebugString ( ) . c_str ( ) ) ; <nl> - const std : : string version_str = " version_1 " ; <nl> - const std : : string nonce_str = " nonce_1 " ; <nl> + gpr_log ( GPR_INFO , " ADS [ % p ] : Null read , stream closed " , this ) ; <nl> grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> - if ( cds_ignore_ ) return ; <nl> - if ( cds_response_state_ = = NOT_SENT ) { <nl> - DiscoveryResponse response ; <nl> - response . set_type_url ( kCdsTypeUrl ) ; <nl> - response . set_version_info ( version_str ) ; <nl> - response . set_nonce ( nonce_str ) ; <nl> - for ( const auto & cluster_name : request - > resource_names ( ) ) { <nl> - auto iter = cds_response_data_ . find ( cluster_name ) ; <nl> - if ( iter = = cds_response_data_ . end ( ) ) continue ; <nl> - response . add_resources ( ) - > PackFrom ( iter - > second ) ; <nl> - } <nl> - stream - > Write ( response ) ; <nl> - cds_response_state_ = SENT ; <nl> - } else if ( cds_response_state_ = = SENT ) { <nl> - GPR_ASSERT ( ! request - > response_nonce ( ) . empty ( ) ) ; <nl> - cds_response_state_ = <nl> - request - > version_info ( ) = = version_str ? ACKED : NACKED ; <nl> + * stream_closed = true ; <nl> + } <nl> + <nl> + / / Checks whether the client needs to receive a newer version of <nl> + / / the resource . <nl> + bool ClientNeedsResourceUpdate ( const string & resource_type , <nl> + const string & name , <nl> + SubscriptionMap * subscription_map ) { <nl> + auto subscriber_it = ( * subscription_map ) [ resource_type ] . find ( name ) ; <nl> + if ( subscriber_it = = ( * subscription_map ) [ resource_type ] . end ( ) ) { <nl> + gpr_log ( GPR_INFO , <nl> + " ADS [ % p ] : Skipping an unsubscribed update for resource % s and " <nl> + " name % s " , <nl> + this , resource_type . c_str ( ) , name . c_str ( ) ) ; <nl> + return false ; <nl> + } <nl> + const auto & resource_state = resources_map_ [ resource_type ] [ name ] ; <nl> + if ( subscriber_it - > second . current_version < resource_state . version ) { <nl> + subscriber_it - > second . current_version = resource_state . version ; <nl> + gpr_log ( GPR_INFO , <nl> + " ADS [ % p ] : Need to process new % s update % s , bring current to % d " , <nl> + this , resource_type . c_str ( ) , name . c_str ( ) , <nl> + subscriber_it - > second . current_version ) ; <nl> + return true ; <nl> + } else { <nl> + gpr_log ( GPR_INFO , <nl> + " ADS [ % p ] : Skipping an old % s update % s , current is at % d " , this , <nl> + resource_type . c_str ( ) , name . c_str ( ) , <nl> + subscriber_it - > second . current_version ) ; <nl> + return false ; <nl> + } <nl> + return false ; <nl> + } <nl> + <nl> + / / Resource subscription : <nl> + / / 1 . inserting an entry into the subscription map indexed by resource <nl> + / / type / name pair . <nl> + / / 2 . inserting or updating an entry into the resources map indexed <nl> + / / by resource type / name pair about this subscription . <nl> + void ResourceSubscribe ( const std : : string & resource_type , <nl> + const std : : string & name , UpdateQueue * update_queue , <nl> + SubscriptionMap * subscription_map ) { <nl> + SubscriberState & subscriber_state = <nl> + ( * subscription_map ) [ resource_type ] [ name ] ; <nl> + subscriber_state . update_queue = update_queue ; <nl> + ResourceState & resource_state = resources_map_ [ resource_type ] [ name ] ; <nl> + resource_state . subscribers . emplace ( & subscriber_state ) ; <nl> + gpr_log ( <nl> + GPR_INFO , <nl> + " ADS [ % p ] : subscribe to resource type % s name % s version % d state % p " , <nl> + this , resource_type . c_str ( ) , name . c_str ( ) , resource_state . version , <nl> + & subscriber_state ) ; <nl> + } <nl> + <nl> + / / Resource unsubscription : <nl> + / / 1 . update the entry in the resources map indexed <nl> + / / by resource type / name pair to remove this subscription <nl> + / / 2 . remove this entry from the subscription map . <nl> + / / 3 . remove this resource type from the subscription map if there are no more <nl> + / / resources subscribed for the resource type . <nl> + void ResourceUnsubscribe ( const std : : string & resource_type , <nl> + const std : : string & name , <nl> + SubscriptionMap * subscription_map ) { <nl> + auto subscription_by_type_it = subscription_map - > find ( resource_type ) ; <nl> + if ( subscription_by_type_it = = subscription_map - > end ( ) ) { <nl> + gpr_log ( GPR_INFO , " ADS [ % p ] : resource type % s not subscribed " , this , <nl> + resource_type . c_str ( ) ) ; <nl> + return ; <nl> + } <nl> + auto & subscription_by_type_map = subscription_by_type_it - > second ; <nl> + auto subscription_it = subscription_by_type_map . find ( name ) ; <nl> + if ( subscription_it = = subscription_by_type_map . end ( ) ) { <nl> + gpr_log ( GPR_INFO , " ADS [ % p ] : resource name % s of type % s not subscribed " , <nl> + this , name . c_str ( ) , resource_type . c_str ( ) ) ; <nl> + return ; <nl> + } <nl> + gpr_log ( GPR_INFO , <nl> + " ADS [ % p ] : Unsubscribe to resource type % s name % s state % p " , this , <nl> + resource_type . c_str ( ) , name . c_str ( ) , & subscription_it - > second ) ; <nl> + auto resource_by_type_it = resources_map_ . find ( resource_type ) ; <nl> + GPR_ASSERT ( resource_by_type_it ! = resources_map_ . end ( ) ) ; <nl> + auto & resource_by_type_map = resource_by_type_it - > second ; <nl> + auto resource_it = resource_by_type_map . find ( name ) ; <nl> + GPR_ASSERT ( resource_it ! = resource_by_type_map . end ( ) ) ; <nl> + resource_it - > second . subscribers . erase ( & subscription_it - > second ) ; <nl> + if ( resource_it - > second . subscribers . empty ( ) & & <nl> + ! resource_it - > second . resource . has_value ( ) ) { <nl> + gpr_log ( GPR_INFO , <nl> + " ADS [ % p ] : Erasing resource type % s name % s from resource map " <nl> + " since there are no more subscribers for this unset resource " , <nl> + this , resource_type . c_str ( ) , name . c_str ( ) ) ; <nl> + resource_by_type_map . erase ( resource_it ) ; <nl> + } <nl> + subscription_by_type_map . erase ( subscription_it ) ; <nl> + if ( subscription_by_type_map . empty ( ) ) { <nl> + gpr_log ( GPR_INFO , <nl> + " ADS [ % p ] : Erasing resource type % s from subscription_map " , this , <nl> + resource_type . c_str ( ) ) ; <nl> + subscription_map - > erase ( subscription_by_type_it ) ; <nl> } <nl> } <nl> <nl> - void HandleEdsRequest ( DiscoveryRequest * request , Stream * stream ) { <nl> - gpr_log ( GPR_INFO , " ADS [ % p ] : received EDS request ' % s ' " , this , <nl> - request - > DebugString ( ) . c_str ( ) ) ; <nl> - IncreaseRequestCount ( ) ; <nl> - std : : vector < ResponseDelayPair > responses_and_delays ; <nl> - { <nl> - grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> - if ( eds_ignore_ ) return ; <nl> - responses_and_delays = eds_responses_and_delays_ ; <nl> - } <nl> - / / Send response . <nl> - for ( const auto & p : responses_and_delays ) { <nl> - const DiscoveryResponse & response = p . first ; <nl> - const int delay_ms = p . second ; <nl> - gpr_log ( GPR_INFO , " ADS [ % p ] : sleeping for % d ms . . . " , this , delay_ms ) ; <nl> - if ( delay_ms > 0 ) { <nl> - gpr_sleep_until ( grpc_timeout_milliseconds_to_deadline ( delay_ms ) ) ; <nl> + / / Completing the building a DiscoveryResponse by adding common information <nl> + / / for all resources and by adding all subscribed resources for LDS and CDS . <nl> + void CompleteBuildingDiscoveryResponse ( <nl> + const std : : string & resource_type , const int version , <nl> + const SubscriptionMap & subscription_map , <nl> + const std : : set < std : : string > & resources_added_to_response , <nl> + DiscoveryResponse * response ) { <nl> + resource_type_response_state_ [ resource_type ] = SENT ; <nl> + response - > set_type_url ( resource_type ) ; <nl> + response - > set_version_info ( absl : : StrCat ( version ) ) ; <nl> + response - > set_nonce ( absl : : StrCat ( version ) ) ; <nl> + if ( resource_type = = kLdsTypeUrl | | resource_type = = kCdsTypeUrl ) { <nl> + / / For LDS and CDS we must send back all subscribed resources <nl> + / / ( even the unchanged ones ) <nl> + auto subscription_map_by_type_it = subscription_map . find ( resource_type ) ; <nl> + GPR_ASSERT ( subscription_map_by_type_it ! = subscription_map . end ( ) ) ; <nl> + for ( const auto & subscription : subscription_map_by_type_it - > second ) { <nl> + if ( resources_added_to_response . find ( subscription . first ) = = <nl> + resources_added_to_response . end ( ) ) { <nl> + absl : : optional < google : : protobuf : : Any > & resource = <nl> + resources_map_ [ resource_type ] [ subscription . first ] . resource ; <nl> + if ( resource . has_value ( ) ) { <nl> + response - > add_resources ( ) - > CopyFrom ( resource . value ( ) ) ; <nl> + } else { <nl> + gpr_log ( GPR_INFO , " ADS [ % p ] : Unknown resource type % s and name % s " , <nl> + this , resource_type . c_str ( ) , subscription . first . c_str ( ) ) ; <nl> + } <nl> + } <nl> } <nl> - gpr_log ( GPR_INFO , " ADS [ % p ] : Woke up ! Sending response ' % s ' " , this , <nl> - response . DebugString ( ) . c_str ( ) ) ; <nl> - IncreaseResponseCount ( ) ; <nl> - stream - > Write ( response ) ; <nl> } <nl> } <nl> <nl> class AdsServiceImpl : public AdsService { <nl> / / Balancer shouldn ' t receive the call credentials metadata . <nl> EXPECT_EQ ( context - > client_metadata ( ) . find ( g_kCallCredsMdKey ) , <nl> context - > client_metadata ( ) . end ( ) ) ; <nl> - / / Keep servicing requests until the EDS response has been sent back . <nl> - DiscoveryRequest request ; <nl> - / / TODO ( roth ) : For each supported type , we currently only handle one <nl> - / / request without replying to any new requests ( for ACK / NACK or new <nl> - / / resource names ) . It ' s not causing a big problem now but should be <nl> - / / fixed . <nl> - bool eds_sent = false ; <nl> - bool seen_first_request = false ; <nl> - while ( ! eds_sent | | cds_response_state_ = = SENT ) { <nl> - if ( ! stream - > Read ( & request ) ) return ; <nl> - if ( ! seen_first_request ) { <nl> - EXPECT_TRUE ( request . has_node ( ) ) ; <nl> - ASSERT_FALSE ( request . node ( ) . client_features ( ) . empty ( ) ) ; <nl> - EXPECT_EQ ( request . node ( ) . client_features ( 0 ) , <nl> - " envoy . lb . does_not_support_overprovisioning " ) ; <nl> - seen_first_request = true ; <nl> + / / Resources ( type / name pairs ) that have changed since the client <nl> + / / subscribed to them . <nl> + UpdateQueue update_queue ; <nl> + / / Resources that the client will be subscribed to keyed by resource type <nl> + / / url . <nl> + SubscriptionMap subscription_map ; <nl> + std : : map < std : : string , SubscriberState > subscriber_map ; <nl> + / / Current Version map keyed by resource type url . <nl> + std : : map < std : : string , int > resource_type_version ; <nl> + / / Creating blocking thread to read from stream . <nl> + std : : deque < DiscoveryRequest > requests ; <nl> + bool stream_closed = false ; <nl> + / / Take a reference of the AdsServiceImpl object , reference will go <nl> + / / out of scope after the reader thread is joined . <nl> + std : : shared_ptr < AdsServiceImpl > ads_service_impl = shared_from_this ( ) ; <nl> + std : : thread reader ( std : : bind ( & AdsServiceImpl : : BlockingRead , this , stream , <nl> + & requests , & stream_closed ) ) ; <nl> + / / Main loop to look for requests and updates . <nl> + while ( true ) { <nl> + / / Look for new requests and and decide what to handle . <nl> + DiscoveryResponse response ; <nl> + / / Boolean to keep track if the loop received any work to do : a request <nl> + / / or an update ; regardless whether a response was actually sent out . <nl> + bool did_work = false ; <nl> + { <nl> + grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> + if ( stream_closed ) break ; <nl> + if ( ! requests . empty ( ) ) { <nl> + DiscoveryRequest request = std : : move ( requests . front ( ) ) ; <nl> + requests . pop_front ( ) ; <nl> + did_work = true ; <nl> + gpr_log ( GPR_INFO , " ADS [ % p ] : Handling request % s with content % s " , <nl> + this , request . type_url ( ) . c_str ( ) , <nl> + request . DebugString ( ) . c_str ( ) ) ; <nl> + / / Identify ACK and NACK by looking for version information and <nl> + / / comparing it to nonce ( this server ensures they are always set to <nl> + / / the same in a response . ) <nl> + if ( ! request . response_nonce ( ) . empty ( ) ) { <nl> + resource_type_response_state_ [ request . type_url ( ) ] = <nl> + ( ! request . version_info ( ) . empty ( ) & & <nl> + request . version_info ( ) = = request . response_nonce ( ) ) <nl> + ? ACKED <nl> + : NACKED ; <nl> + } <nl> + / / As long as the test did not tell us to ignore this type of <nl> + / / request , we will loop through all resources to : <nl> + / / 1 . subscribe if necessary <nl> + / / 2 . update if necessary <nl> + / / 3 . unsubscribe if necessary <nl> + if ( resource_types_to_ignore_ . find ( request . type_url ( ) ) = = <nl> + resource_types_to_ignore_ . end ( ) ) { <nl> + std : : set < std : : string > resources_in_current_request ; <nl> + std : : set < std : : string > resources_added_to_response ; <nl> + for ( const std : : string & resource_name : <nl> + request . resource_names ( ) ) { <nl> + resources_in_current_request . emplace ( resource_name ) ; <nl> + auto subscriber_it = <nl> + subscription_map [ request . type_url ( ) ] . find ( resource_name ) ; <nl> + if ( subscriber_it = = <nl> + subscription_map [ request . type_url ( ) ] . end ( ) ) { <nl> + ResourceSubscribe ( request . type_url ( ) , resource_name , <nl> + & update_queue , & subscription_map ) ; <nl> + } <nl> + if ( ClientNeedsResourceUpdate ( request . type_url ( ) , resource_name , <nl> + & subscription_map ) ) { <nl> + resources_added_to_response . emplace ( resource_name ) ; <nl> + gpr_log ( GPR_INFO , <nl> + " ADS [ % p ] : Handling resource type % s and name % s " , <nl> + this , request . type_url ( ) . c_str ( ) , <nl> + resource_name . c_str ( ) ) ; <nl> + auto resource = <nl> + resources_map_ [ request . type_url ( ) ] [ resource_name ] ; <nl> + GPR_ASSERT ( resource . resource . has_value ( ) ) ; <nl> + response . add_resources ( ) - > CopyFrom ( resource . resource . value ( ) ) ; <nl> + } <nl> + } <nl> + / / Remove subscriptions no longer requested : build a list of <nl> + / / unsubscriber names first while iterating the subscription_map <nl> + / / and then erase from the subscription_map in <nl> + / / ResourceUnsubscribe . <nl> + std : : set < std : : string > unsubscriber_list ; <nl> + for ( const auto & subscription : <nl> + subscription_map [ request . type_url ( ) ] ) { <nl> + if ( resources_in_current_request . find ( subscription . first ) = = <nl> + resources_in_current_request . end ( ) ) { <nl> + unsubscriber_list . emplace ( subscription . first ) ; <nl> + } <nl> + } <nl> + for ( const auto & name : unsubscriber_list ) { <nl> + ResourceUnsubscribe ( request . type_url ( ) , name , <nl> + & subscription_map ) ; <nl> + } <nl> + if ( ! response . resources ( ) . empty ( ) ) { <nl> + CompleteBuildingDiscoveryResponse ( <nl> + request . type_url ( ) , <nl> + + + resource_type_version [ request . type_url ( ) ] , <nl> + subscription_map , resources_added_to_response , & response ) ; <nl> + } <nl> + } <nl> + } <nl> + } <nl> + if ( ! response . resources ( ) . empty ( ) ) { <nl> + gpr_log ( GPR_INFO , " ADS [ % p ] : sending request response ' % s ' " , this , <nl> + response . DebugString ( ) . c_str ( ) ) ; <nl> + stream - > Write ( response ) ; <nl> + } <nl> + response . Clear ( ) ; <nl> + / / Look for updates and decide what to handle . <nl> + { <nl> + grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> + if ( ! update_queue . empty ( ) ) { <nl> + std : : pair < std : : string , std : : string > update = <nl> + std : : move ( update_queue . front ( ) ) ; <nl> + update_queue . pop_front ( ) ; <nl> + did_work = true ; <nl> + gpr_log ( GPR_INFO , " ADS [ % p ] : Handling update type % s name % s " , this , <nl> + update . first . c_str ( ) , update . second . c_str ( ) ) ; <nl> + auto subscriber_it = <nl> + subscription_map [ update . first ] . find ( update . second ) ; <nl> + if ( subscriber_it ! = subscription_map [ update . first ] . end ( ) ) { <nl> + if ( ClientNeedsResourceUpdate ( update . first , update . second , <nl> + & subscription_map ) ) { <nl> + gpr_log ( GPR_INFO , <nl> + " ADS [ % p ] : Updating resource type % s and name % s " , this , <nl> + update . first . c_str ( ) , update . second . c_str ( ) ) ; <nl> + auto resource = resources_map_ [ update . first ] [ update . second ] ; <nl> + GPR_ASSERT ( resource . resource . has_value ( ) ) ; <nl> + response . add_resources ( ) - > CopyFrom ( resource . resource . value ( ) ) ; <nl> + CompleteBuildingDiscoveryResponse ( <nl> + update . first , + + resource_type_version [ update . first ] , <nl> + subscription_map , { update . second } , & response ) ; <nl> + } <nl> + } <nl> + } <nl> } <nl> - if ( request . type_url ( ) = = kLdsTypeUrl ) { <nl> - HandleLdsRequest ( & request , stream ) ; <nl> - } else if ( request . type_url ( ) = = kRdsTypeUrl ) { <nl> - HandleRdsRequest ( & request , stream ) ; <nl> - } else if ( request . type_url ( ) = = kCdsTypeUrl ) { <nl> - HandleCdsRequest ( & request , stream ) ; <nl> - } else if ( request . type_url ( ) = = kEdsTypeUrl ) { <nl> - HandleEdsRequest ( & request , stream ) ; <nl> - eds_sent = true ; <nl> + if ( ! response . resources ( ) . empty ( ) ) { <nl> + gpr_log ( GPR_INFO , " ADS [ % p ] : sending update response ' % s ' " , this , <nl> + response . DebugString ( ) . c_str ( ) ) ; <nl> + stream - > Write ( response ) ; <nl> + } <nl> + / / If we didn ' t find anything to do , delay before the next loop <nl> + / / iteration ; otherwise , check whether we should exit and then <nl> + / / immediately continue . <nl> + gpr_timespec deadline = <nl> + grpc_timeout_milliseconds_to_deadline ( did_work ? 0 : 10 ) ; <nl> + { <nl> + grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> + if ( ! ads_cond_ . WaitUntil ( & ads_mu_ , [ this ] { return ads_done_ ; } , <nl> + deadline ) ) <nl> + break ; <nl> } <nl> } <nl> - / / Wait until notified done . <nl> - grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> - ads_cond_ . WaitUntil ( & ads_mu_ , [ this ] { return ads_done_ ; } ) ; <nl> + reader . join ( ) ; <nl> } ( ) ; <nl> gpr_log ( GPR_INFO , " ADS [ % p ] : StreamAggregatedResources done " , this ) ; <nl> return Status : : OK ; <nl> class AdsServiceImpl : public AdsService { <nl> <nl> ResponseState lds_response_state ( ) { <nl> grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> - return lds_response_state_ ; <nl> + return resource_type_response_state_ [ kLdsTypeUrl ] ; <nl> } <nl> <nl> ResponseState rds_response_state ( ) { <nl> grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> - return rds_response_state_ ; <nl> + return resource_type_response_state_ [ kRdsTypeUrl ] ; <nl> } <nl> <nl> ResponseState cds_response_state ( ) { <nl> grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> - return cds_response_state_ ; <nl> + return resource_type_response_state_ [ kCdsTypeUrl ] ; <nl> } <nl> <nl> - void SetLdsResponse ( <nl> - std : : map < std : : string / * server_name * / , Listener > lds_response_data ) { <nl> - lds_response_data_ = std : : move ( lds_response_data ) ; <nl> + ResponseState eds_response_state ( ) { <nl> + grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> + return resource_type_response_state_ [ kEdsTypeUrl ] ; <nl> } <nl> <nl> - void set_lds_ignore ( ) { lds_ignore_ = true ; } <nl> - <nl> - void SetRdsResponse ( <nl> - std : : map < std : : string / * route_config_name * / , RouteConfiguration > <nl> - rds_response_data ) { <nl> - rds_response_data_ = std : : move ( rds_response_data ) ; <nl> + void SetResourceIgnore ( const std : : string & type_url ) { <nl> + grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> + resource_types_to_ignore_ . emplace ( type_url ) ; <nl> } <nl> <nl> - void set_rds_ignore ( ) { rds_ignore_ = true ; } <nl> + void SetResource ( const google : : protobuf : : Any resource , <nl> + const std : : string & type_url , const std : : string & name ) { <nl> + grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> + ResourceState & state = resources_map_ [ type_url ] [ name ] ; <nl> + + + state . version ; <nl> + state . resource = std : : move ( resource ) ; <nl> + gpr_log ( GPR_INFO , " ADS [ % p ] : Updating % s resource % s to version % u " , this , <nl> + type_url . c_str ( ) , name . c_str ( ) , state . version ) ; <nl> + for ( SubscriberState * subscriber : state . subscribers ) { <nl> + subscriber - > update_queue - > emplace_back ( type_url , name ) ; <nl> + } <nl> + } <nl> <nl> - void SetCdsResponse ( <nl> - std : : map < std : : string / * cluster_name * / , Cluster > cds_response_data ) { <nl> - cds_response_data_ = std : : move ( cds_response_data ) ; <nl> + void SetLdsResource ( const Listener & listener , const std : : string & name ) { <nl> + google : : protobuf : : Any resource ; <nl> + resource . PackFrom ( listener ) ; <nl> + SetResource ( std : : move ( resource ) , kLdsTypeUrl , name ) ; <nl> } <nl> <nl> - void set_cds_ignore ( ) { cds_ignore_ = true ; } <nl> + void SetRdsResource ( const RouteConfiguration & route , <nl> + const std : : string & name ) { <nl> + google : : protobuf : : Any resource ; <nl> + resource . PackFrom ( route ) ; <nl> + SetResource ( std : : move ( resource ) , kRdsTypeUrl , name ) ; <nl> + } <nl> <nl> - void AddEdsResponse ( const DiscoveryResponse & response , int send_after_ms ) { <nl> - grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> - eds_responses_and_delays_ . push_back ( <nl> - std : : make_pair ( response , send_after_ms ) ) ; <nl> + void SetCdsResource ( const Cluster & cluster , const std : : string & name ) { <nl> + google : : protobuf : : Any resource ; <nl> + resource . PackFrom ( cluster ) ; <nl> + SetResource ( std : : move ( resource ) , kCdsTypeUrl , name ) ; <nl> } <nl> <nl> - void set_eds_ignore ( ) { eds_ignore_ = true ; } <nl> + void SetEdsResource ( const ClusterLoadAssignment & assignment , <nl> + const std : : string & name ) { <nl> + google : : protobuf : : Any resource ; <nl> + resource . PackFrom ( assignment ) ; <nl> + SetResource ( std : : move ( resource ) , kEdsTypeUrl , name ) ; <nl> + } <nl> <nl> void SetLdsToUseDynamicRds ( ) { <nl> auto listener = default_listener_ ; <nl> HttpConnectionManager http_connection_manager ; <nl> http_connection_manager . mutable_rds ( ) - > set_route_config_name ( <nl> - " application_target_name " ) ; <nl> + kDefaultResourceName ) ; <nl> listener . mutable_api_listener ( ) - > mutable_api_listener ( ) - > PackFrom ( <nl> http_connection_manager ) ; <nl> - SetLdsResponse ( { { " application_target_name " , std : : move ( listener ) } } ) ; <nl> + SetLdsResource ( std : : move ( listener ) , kDefaultResourceName ) ; <nl> } <nl> <nl> static Listener BuildListener ( const RouteConfiguration & route_config ) { <nl> HttpConnectionManager http_connection_manager ; <nl> * ( http_connection_manager . mutable_route_config ( ) ) = route_config ; <nl> Listener listener ; <nl> - listener . set_name ( " application_target_name " ) ; <nl> + listener . set_name ( kDefaultResourceName ) ; <nl> listener . mutable_api_listener ( ) - > mutable_api_listener ( ) - > PackFrom ( <nl> http_connection_manager ) ; <nl> return listener ; <nl> class AdsServiceImpl : public AdsService { <nl> void Start ( ) { <nl> grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> ads_done_ = false ; <nl> - eds_responses_and_delays_ . clear ( ) ; <nl> } <nl> <nl> void Shutdown ( ) { <nl> { <nl> grpc_core : : MutexLock lock ( & ads_mu_ ) ; <nl> NotifyDoneWithAdsCallLocked ( ) ; <nl> - eds_responses_and_delays_ . clear ( ) ; <nl> + resources_map_ . clear ( ) ; <nl> + resource_type_response_state_ . clear ( ) ; <nl> } <nl> gpr_log ( GPR_INFO , " ADS [ % p ] : shut down " , this ) ; <nl> } <nl> <nl> - static DiscoveryResponse BuildResponse ( const ResponseArgs & args ) { <nl> + static ClusterLoadAssignment BuildEdsResource ( const EdsResourceArgs & args ) { <nl> ClusterLoadAssignment assignment ; <nl> - assignment . set_cluster_name ( " application_target_name " ) ; <nl> + assignment . set_cluster_name ( kDefaultResourceName ) ; <nl> for ( const auto & locality : args . locality_list ) { <nl> auto * endpoints = assignment . add_endpoints ( ) ; <nl> endpoints - > mutable_load_balancing_weight ( ) - > set_value ( locality . lb_weight ) ; <nl> class AdsServiceImpl : public AdsService { <nl> drop_percentage - > set_denominator ( args . drop_denominator ) ; <nl> } <nl> } <nl> - DiscoveryResponse response ; <nl> - response . set_type_url ( kEdsTypeUrl ) ; <nl> - response . add_resources ( ) - > PackFrom ( assignment ) ; <nl> - return response ; <nl> + return assignment ; <nl> } <nl> <nl> void NotifyDoneWithAdsCall ( ) { <nl> class AdsServiceImpl : public AdsService { <nl> / / Protect the members below . <nl> grpc_core : : Mutex ads_mu_ ; <nl> bool ads_done_ = false ; <nl> - / / LDS response data . <nl> Listener default_listener_ ; <nl> - std : : map < std : : string / * server_name * / , Listener > lds_response_data_ ; <nl> - ResponseState lds_response_state_ = NOT_SENT ; <nl> - bool lds_ignore_ = false ; <nl> - / / RDS response data . <nl> RouteConfiguration default_route_config_ ; <nl> - std : : map < std : : string / * route_config_name * / , RouteConfiguration > <nl> - rds_response_data_ ; <nl> - ResponseState rds_response_state_ = NOT_SENT ; <nl> - bool rds_ignore_ = false ; <nl> - / / CDS response data . <nl> Cluster default_cluster_ ; <nl> - std : : map < std : : string / * cluster_name * / , Cluster > cds_response_data_ ; <nl> - ResponseState cds_response_state_ = NOT_SENT ; <nl> - bool cds_ignore_ = false ; <nl> - / / EDS response data . <nl> - std : : vector < ResponseDelayPair > eds_responses_and_delays_ ; <nl> - bool eds_ignore_ = false ; <nl> + std : : map < std : : string / * resource type * / , ResponseState > <nl> + resource_type_response_state_ ; <nl> + std : : set < std : : string / * resource_type * / > resource_types_to_ignore_ ; <nl> + / / An instance data member containing the current state of all resources . <nl> + / / Note that an entry will exist whenever either of the following is true : <nl> + / / - The resource exists ( i . e . , has been created by SetResource ( ) and has not <nl> + / / yet been destroyed by UnsetResource ( ) ) . <nl> + / / - There is at least one subscriber for the resource . <nl> + ResourcesMap resources_map_ ; <nl> } ; <nl> <nl> - class LrsServiceImpl : public LrsService { <nl> + class LrsServiceImpl : public LrsService , <nl> + public std : : enable_shared_from_this < LrsServiceImpl > { <nl> public : <nl> using Stream = ServerReaderWriter < LoadStatsResponse , LoadStatsRequest > ; <nl> <nl> class LrsServiceImpl : public LrsService { <nl> <nl> Status StreamLoadStats ( ServerContext * / * context * / , Stream * stream ) override { <nl> gpr_log ( GPR_INFO , " LRS [ % p ] : StreamLoadStats starts " , this ) ; <nl> + / / Take a reference of the LrsServiceImpl object , reference will go <nl> + / / out of scope after this method exits . <nl> + std : : shared_ptr < LrsServiceImpl > lrs_service_impl = shared_from_this ( ) ; <nl> / / Read request . <nl> LoadStatsRequest request ; <nl> if ( stream - > Read ( & request ) ) { <nl> class XdsEnd2endTest : public : : testing : : TestWithParam < TestType > { <nl> return backend_ports ; <nl> } <nl> <nl> - void ScheduleResponseForBalancer ( size_t i , const DiscoveryResponse & response , <nl> - int delay_ms ) { <nl> - balancers_ [ i ] - > ads_service ( ) - > AddEdsResponse ( response , delay_ms ) ; <nl> - } <nl> - <nl> Status SendRpc ( EchoResponse * response = nullptr , int timeout_ms = 1000 , <nl> bool wait_for_ready = false ) { <nl> const bool local_response = ( response = = nullptr ) ; <nl> class XdsEnd2endTest : public : : testing : : TestWithParam < TestType > { <nl> EXPECT_FALSE ( status . ok ( ) ) ; <nl> } <nl> <nl> + public : <nl> + / / This method could benefit test subclasses ; to make it accessible <nl> + / / via bind with a qualified name , it needs to be public . <nl> + void SetEdsResourceWithDelay ( size_t i , <nl> + const ClusterLoadAssignment & assignment , <nl> + int delay_ms , const std : : string & name ) { <nl> + GPR_ASSERT ( delay_ms > 0 ) ; <nl> + gpr_sleep_until ( grpc_timeout_milliseconds_to_deadline ( delay_ms ) ) ; <nl> + balancers_ [ i ] - > ads_service ( ) - > SetEdsResource ( assignment , name ) ; <nl> + } <nl> + <nl> + protected : <nl> class ServerThread { <nl> public : <nl> ServerThread ( ) : port_ ( g_port_saver - > GetPort ( ) ) { } <nl> class XdsEnd2endTest : public : : testing : : TestWithParam < TestType > { <nl> class BalancerServerThread : public ServerThread { <nl> public : <nl> explicit BalancerServerThread ( int client_load_reporting_interval = 0 ) <nl> - : ads_service_ ( client_load_reporting_interval > 0 ) , <nl> - lrs_service_ ( client_load_reporting_interval ) { } <nl> + : ads_service_ ( new AdsServiceImpl ( client_load_reporting_interval > 0 ) ) , <nl> + lrs_service_ ( new LrsServiceImpl ( client_load_reporting_interval ) ) { } <nl> <nl> - AdsServiceImpl * ads_service ( ) { return & ads_service_ ; } <nl> - LrsServiceImpl * lrs_service ( ) { return & lrs_service_ ; } <nl> + std : : shared_ptr < AdsServiceImpl > ads_service ( ) { return ads_service_ ; } <nl> + std : : shared_ptr < LrsServiceImpl > lrs_service ( ) { return lrs_service_ ; } <nl> <nl> private : <nl> void RegisterAllServices ( ServerBuilder * builder ) override { <nl> - builder - > RegisterService ( & ads_service_ ) ; <nl> - builder - > RegisterService ( & lrs_service_ ) ; <nl> + builder - > RegisterService ( ads_service_ . get ( ) ) ; <nl> + builder - > RegisterService ( lrs_service_ . get ( ) ) ; <nl> } <nl> <nl> void StartAllServices ( ) override { <nl> - ads_service_ . Start ( ) ; <nl> - lrs_service_ . Start ( ) ; <nl> + ads_service_ - > Start ( ) ; <nl> + lrs_service_ - > Start ( ) ; <nl> } <nl> <nl> void ShutdownAllServices ( ) override { <nl> - ads_service_ . Shutdown ( ) ; <nl> - lrs_service_ . Shutdown ( ) ; <nl> + ads_service_ - > Shutdown ( ) ; <nl> + lrs_service_ - > Shutdown ( ) ; <nl> } <nl> <nl> const char * Type ( ) override { return " Balancer " ; } <nl> <nl> - AdsServiceImpl ads_service_ ; <nl> - LrsServiceImpl lrs_service_ ; <nl> + std : : shared_ptr < AdsServiceImpl > ads_service_ ; <nl> + std : : shared_ptr < LrsServiceImpl > lrs_service_ ; <nl> } ; <nl> <nl> const grpc : : string server_host_ ; <nl> class XdsEnd2endTest : public : : testing : : TestWithParam < TestType > { <nl> grpc_core : : RefCountedPtr < grpc_core : : FakeResolverResponseGenerator > <nl> lb_channel_response_generator_ ; <nl> const grpc : : string kRequestMessage_ = " Live long and prosper . " ; <nl> - const grpc : : string kApplicationTargetName_ = " application_target_name " ; <nl> + const grpc : : string kApplicationTargetName_ = kDefaultResourceName ; <nl> const char * kDefaultServiceConfig_ = <nl> " { \ n " <nl> " \ " loadBalancingConfig \ " : [ \ n " <nl> TEST_P ( BasicTest , Vanilla ) { <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> const size_t kNumRpcsPerAddress = 100 ; <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( ) } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> / / Make sure that trying to connect works without a call . <nl> channel_ - > GetState ( true / * try_to_connect * / ) ; <nl> / / We need to wait for all backends to come online . <nl> TEST_P ( BasicTest , Vanilla ) { <nl> EXPECT_EQ ( kNumRpcsPerAddress , <nl> backends_ [ i ] - > backend_service ( ) - > request_count ( ) ) ; <nl> } <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> / / Check LB policy name for the channel . <nl> EXPECT_EQ ( <nl> ( GetParam ( ) . use_xds_resolver ( ) ? " cds_experimental " : " xds_experimental " ) , <nl> TEST_P ( BasicTest , IgnoresUnhealthyEndpoints ) { <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> const size_t kNumRpcsPerAddress = 100 ; <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , <nl> GetBackendPorts ( ) , <nl> kDefaultLocalityWeight , <nl> kDefaultLocalityPriority , <nl> { envoy : : api : : v2 : : HealthStatus : : DRAINING } } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> / / Make sure that trying to connect works without a call . <nl> channel_ - > GetState ( true / * try_to_connect * / ) ; <nl> / / We need to wait for all backends to come online . <nl> TEST_P ( BasicTest , IgnoresUnhealthyEndpoints ) { <nl> EXPECT_EQ ( kNumRpcsPerAddress , <nl> backends_ [ i ] - > backend_service ( ) - > request_count ( ) ) ; <nl> } <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> } <nl> <nl> / / Tests that subchannel sharing works when the same backend is listed multiple <nl> TEST_P ( BasicTest , SameBackendListedMultipleTimes ) { <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> / / Same backend listed twice . <nl> std : : vector < int > ports ( 2 , backends_ [ 0 ] - > port ( ) ) ; <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , ports } , <nl> } ) ; <nl> const size_t kNumRpcsPerAddress = 10 ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> / / We need to wait for the backend to come online . <nl> WaitForBackend ( 0 ) ; <nl> / / Send kNumRpcsPerAddress RPCs per server . <nl> TEST_P ( BasicTest , InitiallyEmptyServerlist ) { <nl> const int kServerlistDelayMs = 500 * grpc_test_slowdown_factor ( ) ; <nl> const int kCallDeadlineMs = kServerlistDelayMs * 2 ; <nl> / / First response is an empty serverlist , sent right away . <nl> - AdsServiceImpl : : ResponseArgs : : Locality empty_locality ( " locality0 " , { } ) ; <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs : : Locality empty_locality ( " locality0 " , { } ) ; <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> empty_locality , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> / / Send non - empty serverlist only after kServerlistDelayMs . <nl> - args = AdsServiceImpl : : ResponseArgs ( { <nl> + args = AdsServiceImpl : : EdsResourceArgs ( { <nl> { " locality0 " , GetBackendPorts ( ) } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , <nl> - kServerlistDelayMs ) ; <nl> + std : : thread delayed_resource_setter ( <nl> + std : : bind ( & BasicTest : : SetEdsResourceWithDelay , this , 0 , <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kServerlistDelayMs , <nl> + kDefaultResourceName ) ) ; <nl> const auto t0 = system_clock : : now ( ) ; <nl> / / Client will block : LB will initially send empty serverlist . <nl> CheckRpcSendOk ( 1 , kCallDeadlineMs , true / * wait_for_ready * / ) ; <nl> TEST_P ( BasicTest , InitiallyEmptyServerlist ) { <nl> / / populated serverlist but under the call ' s deadline ( which is enforced by <nl> / / the call ' s deadline ) . <nl> EXPECT_GT ( ellapsed_ms . count ( ) , kServerlistDelayMs ) ; <nl> - / / The ADS service got a single request . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - / / and sent two responses . <nl> - EXPECT_EQ ( 2U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> + delayed_resource_setter . join ( ) ; <nl> } <nl> <nl> / / Tests that RPCs will fail with UNAVAILABLE instead of DEADLINE_EXCEEDED if <nl> TEST_P ( BasicTest , AllServersUnreachableFailFast ) { <nl> for ( size_t i = 0 ; i < kNumUnreachableServers ; + + i ) { <nl> ports . push_back ( g_port_saver - > GetPort ( ) ) ; <nl> } <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , ports } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> const Status status = SendRpc ( ) ; <nl> / / The error shouldn ' t be DEADLINE_EXCEEDED . <nl> EXPECT_EQ ( StatusCode : : UNAVAILABLE , status . error_code ( ) ) ; <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> } <nl> <nl> / / Tests that RPCs fail when the backends are down , and will succeed again after <nl> TEST_P ( BasicTest , AllServersUnreachableFailFast ) { <nl> TEST_P ( BasicTest , BackendsRestart ) { <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( ) } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> WaitForAllBackends ( ) ; <nl> / / Stop backends . RPCs should fail . <nl> ShutdownAllBackends ( ) ; <nl> TEST_P ( SecureNamingTest , TargetNameIsExpected ) { <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannel ( { balancers_ [ 0 ] - > port ( ) } ) ; <nl> const size_t kNumRpcsPerAddress = 100 ; <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( ) } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> / / Make sure that trying to connect works without a call . <nl> channel_ - > GetState ( true / * try_to_connect * / ) ; <nl> / / We need to wait for all backends to come online . <nl> TEST_P ( SecureNamingTest , TargetNameIsExpected ) { <nl> EXPECT_EQ ( kNumRpcsPerAddress , <nl> backends_ [ i ] - > backend_service ( ) - > request_count ( ) ) ; <nl> } <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> } <nl> <nl> / / Tests that secure naming check fails if target name is unexpected . <nl> TEST_P ( LdsTest , Vanilla ) { <nl> TEST_P ( LdsTest , NoApiListener ) { <nl> auto listener = balancers_ [ 0 ] - > ads_service ( ) - > default_listener ( ) ; <nl> listener . clear_api_listener ( ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetLdsResponse ( <nl> - { { " application_target_name " , listener } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetLdsResource ( listener , kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> TEST_P ( LdsTest , WrongRouteSpecifier ) { <nl> http_connection_manager . mutable_scoped_routes ( ) ; <nl> listener . mutable_api_listener ( ) - > mutable_api_listener ( ) - > PackFrom ( <nl> http_connection_manager ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetLdsResponse ( <nl> - { { " application_target_name " , std : : move ( listener ) } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetLdsResource ( listener , kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> TEST_P ( LdsTest , NoMatchedDomain ) { <nl> balancers_ [ 0 ] - > ads_service ( ) - > default_route_config ( ) ; <nl> route_config . mutable_virtual_hosts ( 0 ) - > clear_domains ( ) ; <nl> route_config . mutable_virtual_hosts ( 0 ) - > add_domains ( " unmatched_domain " ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetLdsResponse ( <nl> - { { " application_target_name " , <nl> - AdsServiceImpl : : BuildListener ( route_config ) } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetLdsResource ( <nl> + AdsServiceImpl : : BuildListener ( route_config ) , kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> TEST_P ( LdsTest , ChooseMatchedDomain ) { <nl> - > mutable_routes ( 0 ) <nl> - > mutable_route ( ) <nl> - > mutable_cluster_header ( ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetLdsResponse ( <nl> - { { " application_target_name " , <nl> - AdsServiceImpl : : BuildListener ( route_config ) } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetLdsResource ( <nl> + AdsServiceImpl : : BuildListener ( route_config ) , kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> ( void ) SendRpc ( ) ; <nl> TEST_P ( LdsTest , ChooseLastRoute ) { <nl> - > mutable_routes ( 0 ) <nl> - > mutable_route ( ) <nl> - > mutable_cluster_header ( ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetLdsResponse ( <nl> - { { " application_target_name " , <nl> - AdsServiceImpl : : BuildListener ( route_config ) } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetLdsResource ( <nl> + AdsServiceImpl : : BuildListener ( route_config ) , kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> ( void ) SendRpc ( ) ; <nl> TEST_P ( LdsTest , RouteMatchHasNonemptyPrefix ) { <nl> - > mutable_routes ( 0 ) <nl> - > mutable_match ( ) <nl> - > set_prefix ( " nonempty_prefix " ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetLdsResponse ( <nl> - { { " application_target_name " , <nl> - AdsServiceImpl : : BuildListener ( route_config ) } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetLdsResource ( <nl> + AdsServiceImpl : : BuildListener ( route_config ) , kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> TEST_P ( LdsTest , RouteHasNoRouteAction ) { <nl> RouteConfiguration route_config = <nl> balancers_ [ 0 ] - > ads_service ( ) - > default_route_config ( ) ; <nl> route_config . mutable_virtual_hosts ( 0 ) - > mutable_routes ( 0 ) - > mutable_redirect ( ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetLdsResponse ( <nl> - { { " application_target_name " , <nl> - AdsServiceImpl : : BuildListener ( route_config ) } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetLdsResource ( <nl> + AdsServiceImpl : : BuildListener ( route_config ) , kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> TEST_P ( LdsTest , RouteActionHasNoCluster ) { <nl> - > mutable_routes ( 0 ) <nl> - > mutable_route ( ) <nl> - > mutable_cluster_header ( ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetLdsResponse ( <nl> - { { " application_target_name " , <nl> - AdsServiceImpl : : BuildListener ( route_config ) } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetLdsResource ( <nl> + AdsServiceImpl : : BuildListener ( route_config ) , kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> TEST_P ( LdsTest , RouteActionHasNoCluster ) { <nl> / / Tests that LDS client times out when no response received . <nl> TEST_P ( LdsTest , Timeout ) { <nl> ResetStub ( 0 , 0 , " " , 500 ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > set_lds_ignore ( ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetResourceIgnore ( kLdsTypeUrl ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> TEST_P ( RdsTest , NoMatchedDomain ) { <nl> balancers_ [ 0 ] - > ads_service ( ) - > default_route_config ( ) ; <nl> route_config . mutable_virtual_hosts ( 0 ) - > clear_domains ( ) ; <nl> route_config . mutable_virtual_hosts ( 0 ) - > add_domains ( " unmatched_domain " ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetRdsResponse ( <nl> - { { " application_target_name " , std : : move ( route_config ) } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetRdsResource ( std : : move ( route_config ) , <nl> + kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> TEST_P ( RdsTest , ChooseMatchedDomain ) { <nl> - > mutable_routes ( 0 ) <nl> - > mutable_route ( ) <nl> - > mutable_cluster_header ( ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetRdsResponse ( <nl> - { { " application_target_name " , std : : move ( route_config ) } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetRdsResource ( std : : move ( route_config ) , <nl> + kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> ( void ) SendRpc ( ) ; <nl> TEST_P ( RdsTest , ChooseLastRoute ) { <nl> - > mutable_routes ( 0 ) <nl> - > mutable_route ( ) <nl> - > mutable_cluster_header ( ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetRdsResponse ( <nl> - { { " application_target_name " , std : : move ( route_config ) } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetRdsResource ( std : : move ( route_config ) , <nl> + kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> ( void ) SendRpc ( ) ; <nl> TEST_P ( RdsTest , RouteMatchHasNonemptyPrefix ) { <nl> - > mutable_routes ( 0 ) <nl> - > mutable_match ( ) <nl> - > set_prefix ( " nonempty_prefix " ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetRdsResponse ( <nl> - { { " application_target_name " , std : : move ( route_config ) } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetRdsResource ( std : : move ( route_config ) , <nl> + kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> TEST_P ( RdsTest , RouteHasNoRouteAction ) { <nl> RouteConfiguration route_config = <nl> balancers_ [ 0 ] - > ads_service ( ) - > default_route_config ( ) ; <nl> route_config . mutable_virtual_hosts ( 0 ) - > mutable_routes ( 0 ) - > mutable_redirect ( ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetRdsResponse ( <nl> - { { " application_target_name " , std : : move ( route_config ) } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetRdsResource ( std : : move ( route_config ) , <nl> + kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> TEST_P ( RdsTest , RouteActionHasNoCluster ) { <nl> - > mutable_routes ( 0 ) <nl> - > mutable_route ( ) <nl> - > mutable_cluster_header ( ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetRdsResponse ( <nl> - { { " application_target_name " , std : : move ( route_config ) } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetRdsResource ( std : : move ( route_config ) , <nl> + kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> TEST_P ( RdsTest , RouteActionHasNoCluster ) { <nl> / / Tests that RDS client times out when no response received . <nl> TEST_P ( RdsTest , Timeout ) { <nl> ResetStub ( 0 , 0 , " " , 500 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetResourceIgnore ( kRdsTypeUrl ) ; <nl> balancers_ [ 0 ] - > ads_service ( ) - > SetLdsToUseDynamicRds ( ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > set_rds_ignore ( ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> TEST_P ( CdsTest , Vanilla ) { <nl> TEST_P ( CdsTest , WrongClusterType ) { <nl> auto cluster = balancers_ [ 0 ] - > ads_service ( ) - > default_cluster ( ) ; <nl> cluster . set_type ( envoy : : api : : v2 : : Cluster : : STATIC ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetCdsResponse ( <nl> - { { " application_target_name " , std : : move ( cluster ) } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetCdsResource ( std : : move ( cluster ) , <nl> + kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> TEST_P ( CdsTest , WrongClusterType ) { <nl> TEST_P ( CdsTest , WrongEdsConfig ) { <nl> auto cluster = balancers_ [ 0 ] - > ads_service ( ) - > default_cluster ( ) ; <nl> cluster . mutable_eds_cluster_config ( ) - > mutable_eds_config ( ) - > mutable_self ( ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetCdsResponse ( <nl> - { { " application_target_name " , std : : move ( cluster ) } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetCdsResource ( std : : move ( cluster ) , <nl> + kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> TEST_P ( CdsTest , WrongEdsConfig ) { <nl> TEST_P ( CdsTest , WrongLbPolicy ) { <nl> auto cluster = balancers_ [ 0 ] - > ads_service ( ) - > default_cluster ( ) ; <nl> cluster . set_lb_policy ( envoy : : api : : v2 : : Cluster : : LEAST_REQUEST ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetCdsResponse ( <nl> - { { " application_target_name " , std : : move ( cluster ) } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetCdsResource ( std : : move ( cluster ) , <nl> + kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> TEST_P ( CdsTest , WrongLbPolicy ) { <nl> TEST_P ( CdsTest , WrongLrsServer ) { <nl> auto cluster = balancers_ [ 0 ] - > ads_service ( ) - > default_cluster ( ) ; <nl> cluster . mutable_lrs_server ( ) - > mutable_ads ( ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > SetCdsResponse ( <nl> - { { " application_target_name " , std : : move ( cluster ) } } ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetCdsResource ( std : : move ( cluster ) , <nl> + kDefaultResourceName ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> TEST_P ( CdsTest , WrongLrsServer ) { <nl> / / Tests that CDS client times out when no response received . <nl> TEST_P ( CdsTest , Timeout ) { <nl> ResetStub ( 0 , 0 , " " , 500 ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > set_cds_ignore ( ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetResourceIgnore ( kCdsTypeUrl ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> using EdsTest = BasicTest ; <nl> <nl> TEST_P ( EdsTest , Timeout ) { <nl> ResetStub ( 0 , 0 , " " , 500 ) ; <nl> - balancers_ [ 0 ] - > ads_service ( ) - > set_eds_ignore ( ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetResourceIgnore ( kEdsTypeUrl ) ; <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> CheckRpcSendFailure ( ) ; <nl> TEST_P ( LocalityMapTest , WeightedRoundRobin ) { <nl> const double kLocalityWeightRate1 = <nl> static_cast < double > ( kLocalityWeight1 ) / kTotalLocalityWeight ; <nl> / / ADS response contains 2 localities , each of which contains 1 backend . <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( 0 , 1 ) , kLocalityWeight0 } , <nl> { " locality1 " , GetBackendPorts ( 1 , 2 ) , kLocalityWeight1 } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> / / Wait for both backends to be ready . <nl> WaitForAllBackends ( 0 , 2 ) ; <nl> / / Send kNumRpcs RPCs . <nl> TEST_P ( LocalityMapTest , WeightedRoundRobin ) { <nl> : : testing : : AllOf ( <nl> : : testing : : Ge ( kLocalityWeightRate1 * ( 1 - kErrorTolerance ) ) , <nl> : : testing : : Le ( kLocalityWeightRate1 * ( 1 + kErrorTolerance ) ) ) ) ; <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> } <nl> <nl> / / Tests that the locality map can work properly even when it contains a large <nl> TEST_P ( LocalityMapTest , StressTest ) { <nl> const size_t kNumLocalities = 100 ; <nl> / / The first ADS response contains kNumLocalities localities , each of which <nl> / / contains backend 0 . <nl> - AdsServiceImpl : : ResponseArgs args ; <nl> + AdsServiceImpl : : EdsResourceArgs args ; <nl> for ( size_t i = 0 ; i < kNumLocalities ; + + i ) { <nl> - grpc : : string name = " locality " + std : : to_string ( i ) ; <nl> - AdsServiceImpl : : ResponseArgs : : Locality locality ( name , <nl> - { backends_ [ 0 ] - > port ( ) } ) ; <nl> + std : : string name = absl : : StrCat ( " locality " , i ) ; <nl> + AdsServiceImpl : : EdsResourceArgs : : Locality locality ( name , <nl> + { backends_ [ 0 ] - > port ( ) } ) ; <nl> args . locality_list . emplace_back ( std : : move ( locality ) ) ; <nl> } <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> / / The second ADS response contains 1 locality , which contains backend 1 . <nl> - args = AdsServiceImpl : : ResponseArgs ( { <nl> + args = AdsServiceImpl : : EdsResourceArgs ( { <nl> { " locality0 " , GetBackendPorts ( 1 , 2 ) } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , <nl> - 60 * 1000 ) ; <nl> + std : : thread delayed_resource_setter ( std : : bind ( <nl> + & BasicTest : : SetEdsResourceWithDelay , this , 0 , <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , 60 * 1000 , kDefaultResourceName ) ) ; <nl> / / Wait until backend 0 is ready , before which kNumLocalities localities are <nl> / / received and handled by the xds policy . <nl> WaitForBackend ( 0 , / * reset_counters = * / false ) ; <nl> TEST_P ( LocalityMapTest , StressTest ) { <nl> / / Wait until backend 1 is ready , before which kNumLocalities localities are <nl> / / removed by the xds policy . <nl> WaitForBackend ( 1 ) ; <nl> - / / The ADS service got a single request . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - / / and sent two responses . <nl> - EXPECT_EQ ( 2U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> + delayed_resource_setter . join ( ) ; <nl> } <nl> <nl> / / Tests that the localities in a locality map are picked correctly after update <nl> TEST_P ( LocalityMapTest , UpdateMap ) { <nl> for ( int weight : kLocalityWeights1 ) { <nl> locality_weight_rate_1 . push_back ( weight / kTotalLocalityWeight1 ) ; <nl> } <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( 0 , 1 ) , 2 } , <nl> { " locality1 " , GetBackendPorts ( 1 , 2 ) , 3 } , <nl> { " locality2 " , GetBackendPorts ( 2 , 3 ) , 4 } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> - args = AdsServiceImpl : : ResponseArgs ( { <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> + args = AdsServiceImpl : : EdsResourceArgs ( { <nl> { " locality1 " , GetBackendPorts ( 1 , 2 ) , 3 } , <nl> { " locality2 " , GetBackendPorts ( 2 , 3 ) , 2 } , <nl> { " locality3 " , GetBackendPorts ( 3 , 4 ) , 6 } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 5000 ) ; <nl> + std : : thread delayed_resource_setter ( std : : bind ( <nl> + & BasicTest : : SetEdsResourceWithDelay , this , 0 , <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , 5000 , kDefaultResourceName ) ) ; <nl> / / Wait for the first 3 backends to be ready . <nl> WaitForAllBackends ( 0 , 3 ) ; <nl> gpr_log ( GPR_INFO , " = = = = = = = = = BEFORE FIRST BATCH = = = = = = = = = = " ) ; <nl> TEST_P ( LocalityMapTest , UpdateMap ) { <nl> } <nl> / / Backend 3 hasn ' t received any request . <nl> EXPECT_EQ ( 0U , backends_ [ 3 ] - > backend_service ( ) - > request_count ( ) ) ; <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> / / Wait until the locality update has been processed , as signaled by backend 3 <nl> / / receiving a request . <nl> WaitForBackend ( 3 ) ; <nl> TEST_P ( LocalityMapTest , UpdateMap ) { <nl> : : testing : : Ge ( locality_weight_rate_1 [ i ] * ( 1 - kErrorTolerance ) ) , <nl> : : testing : : Le ( locality_weight_rate_1 [ i ] * ( 1 + kErrorTolerance ) ) ) ) ; <nl> } <nl> - / / The ADS service got a single request . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - / / and sent two responses . <nl> - EXPECT_EQ ( 2U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> + delayed_resource_setter . join ( ) ; <nl> } <nl> <nl> class FailoverTest : public BasicTest { <nl> class FailoverTest : public BasicTest { <nl> TEST_P ( FailoverTest , ChooseHighestPriority ) { <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( 0 , 1 ) , kDefaultLocalityWeight , 1 } , <nl> { " locality1 " , GetBackendPorts ( 1 , 2 ) , kDefaultLocalityWeight , 2 } , <nl> { " locality2 " , GetBackendPorts ( 2 , 3 ) , kDefaultLocalityWeight , 3 } , <nl> { " locality3 " , GetBackendPorts ( 3 , 4 ) , kDefaultLocalityWeight , 0 } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> WaitForBackend ( 3 , false ) ; <nl> for ( size_t i = 0 ; i < 3 ; + + i ) { <nl> EXPECT_EQ ( 0U , backends_ [ i ] - > backend_service ( ) - > request_count ( ) ) ; <nl> } <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> } <nl> <nl> / / If the higher priority localities are not reachable , failover to the highest <nl> TEST_P ( FailoverTest , ChooseHighestPriority ) { <nl> TEST_P ( FailoverTest , Failover ) { <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( 0 , 1 ) , kDefaultLocalityWeight , 1 } , <nl> { " locality1 " , GetBackendPorts ( 1 , 2 ) , kDefaultLocalityWeight , 2 } , <nl> { " locality2 " , GetBackendPorts ( 2 , 3 ) , kDefaultLocalityWeight , 3 } , <nl> TEST_P ( FailoverTest , Failover ) { <nl> } ) ; <nl> ShutdownBackend ( 3 ) ; <nl> ShutdownBackend ( 0 ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> WaitForBackend ( 1 , false ) ; <nl> for ( size_t i = 0 ; i < 4 ; + + i ) { <nl> if ( i = = 1 ) continue ; <nl> EXPECT_EQ ( 0U , backends_ [ i ] - > backend_service ( ) - > request_count ( ) ) ; <nl> } <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> } <nl> <nl> / / If a locality with higher priority than the current one becomes ready , <nl> TEST_P ( FailoverTest , SwitchBackToHigherPriority ) { <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> const size_t kNumRpcs = 100 ; <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( 0 , 1 ) , kDefaultLocalityWeight , 1 } , <nl> { " locality1 " , GetBackendPorts ( 1 , 2 ) , kDefaultLocalityWeight , 2 } , <nl> { " locality2 " , GetBackendPorts ( 2 , 3 ) , kDefaultLocalityWeight , 3 } , <nl> TEST_P ( FailoverTest , SwitchBackToHigherPriority ) { <nl> } ) ; <nl> ShutdownBackend ( 3 ) ; <nl> ShutdownBackend ( 0 ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> WaitForBackend ( 1 , false ) ; <nl> for ( size_t i = 0 ; i < 4 ; + + i ) { <nl> if ( i = = 1 ) continue ; <nl> TEST_P ( FailoverTest , SwitchBackToHigherPriority ) { <nl> WaitForBackend ( 0 ) ; <nl> CheckRpcSendOk ( kNumRpcs ) ; <nl> EXPECT_EQ ( kNumRpcs , backends_ [ 0 ] - > backend_service ( ) - > request_count ( ) ) ; <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> } <nl> <nl> / / The first update only contains unavailable priorities . The second update <nl> TEST_P ( FailoverTest , SwitchBackToHigherPriority ) { <nl> TEST_P ( FailoverTest , UpdateInitialUnavailable ) { <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( 0 , 1 ) , kDefaultLocalityWeight , 0 } , <nl> { " locality1 " , GetBackendPorts ( 1 , 2 ) , kDefaultLocalityWeight , 1 } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> - args = AdsServiceImpl : : ResponseArgs ( { <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> + args = AdsServiceImpl : : EdsResourceArgs ( { <nl> { " locality0 " , GetBackendPorts ( 0 , 1 ) , kDefaultLocalityWeight , 0 } , <nl> { " locality1 " , GetBackendPorts ( 1 , 2 ) , kDefaultLocalityWeight , 1 } , <nl> { " locality2 " , GetBackendPorts ( 2 , 3 ) , kDefaultLocalityWeight , 2 } , <nl> TEST_P ( FailoverTest , UpdateInitialUnavailable ) { <nl> } ) ; <nl> ShutdownBackend ( 0 ) ; <nl> ShutdownBackend ( 1 ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 1000 ) ; <nl> + std : : thread delayed_resource_setter ( std : : bind ( <nl> + & BasicTest : : SetEdsResourceWithDelay , this , 0 , <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , 1000 , kDefaultResourceName ) ) ; <nl> gpr_timespec deadline = gpr_time_add ( gpr_now ( GPR_CLOCK_REALTIME ) , <nl> gpr_time_from_millis ( 500 , GPR_TIMESPAN ) ) ; <nl> / / Send 0 . 5 second worth of RPCs . <nl> TEST_P ( FailoverTest , UpdateInitialUnavailable ) { <nl> if ( i = = 2 ) continue ; <nl> EXPECT_EQ ( 0U , backends_ [ i ] - > backend_service ( ) - > request_count ( ) ) ; <nl> } <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 2U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> + delayed_resource_setter . join ( ) ; <nl> } <nl> <nl> / / Tests that after the localities ' priorities are updated , we still choose the <nl> TEST_P ( FailoverTest , UpdatePriority ) { <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> const size_t kNumRpcs = 100 ; <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( 0 , 1 ) , kDefaultLocalityWeight , 1 } , <nl> { " locality1 " , GetBackendPorts ( 1 , 2 ) , kDefaultLocalityWeight , 2 } , <nl> { " locality2 " , GetBackendPorts ( 2 , 3 ) , kDefaultLocalityWeight , 3 } , <nl> { " locality3 " , GetBackendPorts ( 3 , 4 ) , kDefaultLocalityWeight , 0 } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> - args = AdsServiceImpl : : ResponseArgs ( { <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> + args = AdsServiceImpl : : EdsResourceArgs ( { <nl> { " locality0 " , GetBackendPorts ( 0 , 1 ) , kDefaultLocalityWeight , 2 } , <nl> { " locality1 " , GetBackendPorts ( 1 , 2 ) , kDefaultLocalityWeight , 0 } , <nl> { " locality2 " , GetBackendPorts ( 2 , 3 ) , kDefaultLocalityWeight , 1 } , <nl> { " locality3 " , GetBackendPorts ( 3 , 4 ) , kDefaultLocalityWeight , 3 } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 1000 ) ; <nl> + std : : thread delayed_resource_setter ( std : : bind ( <nl> + & BasicTest : : SetEdsResourceWithDelay , this , 0 , <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , 1000 , kDefaultResourceName ) ) ; <nl> WaitForBackend ( 3 , false ) ; <nl> for ( size_t i = 0 ; i < 3 ; + + i ) { <nl> EXPECT_EQ ( 0U , backends_ [ i ] - > backend_service ( ) - > request_count ( ) ) ; <nl> TEST_P ( FailoverTest , UpdatePriority ) { <nl> WaitForBackend ( 1 ) ; <nl> CheckRpcSendOk ( kNumRpcs ) ; <nl> EXPECT_EQ ( kNumRpcs , backends_ [ 1 ] - > backend_service ( ) - > request_count ( ) ) ; <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 2U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> + delayed_resource_setter . join ( ) ; <nl> } <nl> <nl> / / Moves all localities in the current priority to a higher priority . <nl> TEST_P ( FailoverTest , MoveAllLocalitiesInCurrentPriorityToHigherPriority ) { <nl> / / - Priority 0 is locality 0 , containing backend 0 , which is down . <nl> / / - Priority 1 is locality 1 , containing backends 1 and 2 , which are up . <nl> ShutdownBackend ( 0 ) ; <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( 0 , 1 ) , kDefaultLocalityWeight , 0 } , <nl> { " locality1 " , GetBackendPorts ( 1 , 3 ) , kDefaultLocalityWeight , 1 } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> / / Second update : <nl> / / - Priority 0 contains both localities 0 and 1 . <nl> / / - Priority 1 is not present . <nl> / / - We add backend 3 to locality 1 , just so we have a way to know <nl> / / when the update has been seen by the client . <nl> - args = AdsServiceImpl : : ResponseArgs ( { <nl> + args = AdsServiceImpl : : EdsResourceArgs ( { <nl> { " locality0 " , GetBackendPorts ( 0 , 1 ) , kDefaultLocalityWeight , 0 } , <nl> { " locality1 " , GetBackendPorts ( 1 , 4 ) , kDefaultLocalityWeight , 0 } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 1000 ) ; <nl> + std : : thread delayed_resource_setter ( std : : bind ( <nl> + & BasicTest : : SetEdsResourceWithDelay , this , 0 , <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , 1000 , kDefaultResourceName ) ) ; <nl> / / When we get the first update , all backends in priority 0 are down , <nl> / / so we will create priority 1 . Backends 1 and 2 should have traffic , <nl> / / but backend 3 should not . <nl> TEST_P ( FailoverTest , MoveAllLocalitiesInCurrentPriorityToHigherPriority ) { <nl> EXPECT_EQ ( 0UL , backends_ [ 3 ] - > backend_service ( ) - > request_count ( ) ) ; <nl> / / When backend 3 gets traffic , we know the second update has been seen . <nl> WaitForBackend ( 3 ) ; <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 2U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> + / / The ADS service of balancer 0 got at least 1 response . <nl> + EXPECT_GT ( balancers_ [ 0 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> + delayed_resource_setter . join ( ) ; <nl> } <nl> <nl> using DropTest = BasicTest ; <nl> TEST_P ( DropTest , Vanilla ) { <nl> const double KDropRateForLbAndThrottle = <nl> kDropRateForLb + ( 1 - kDropRateForLb ) * kDropRateForThrottle ; <nl> / / The ADS response contains two drop categories . <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( ) } , <nl> } ) ; <nl> args . drop_categories = { { kLbDropType , kDropPerMillionForLb } , <nl> { kThrottleDropType , kDropPerMillionForThrottle } } ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> WaitForAllBackends ( ) ; <nl> / / Send kNumRpcs RPCs and count the drops . <nl> size_t num_drops = 0 ; <nl> TEST_P ( DropTest , Vanilla ) { <nl> : : testing : : AllOf ( <nl> : : testing : : Ge ( KDropRateForLbAndThrottle * ( 1 - kErrorTolerance ) ) , <nl> : : testing : : Le ( KDropRateForLbAndThrottle * ( 1 + kErrorTolerance ) ) ) ) ; <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> } <nl> <nl> / / Tests that drop config is converted correctly from per hundred . <nl> TEST_P ( DropTest , DropPerHundred ) { <nl> const uint32_t kDropPerHundredForLb = 10 ; <nl> const double kDropRateForLb = kDropPerHundredForLb / 100 . 0 ; <nl> / / The ADS response contains one drop category . <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( ) } , <nl> } ) ; <nl> args . drop_categories = { { kLbDropType , kDropPerHundredForLb } } ; <nl> args . drop_denominator = FractionalPercent : : HUNDRED ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> WaitForAllBackends ( ) ; <nl> / / Send kNumRpcs RPCs and count the drops . <nl> size_t num_drops = 0 ; <nl> TEST_P ( DropTest , DropPerHundred ) { <nl> seen_drop_rate , <nl> : : testing : : AllOf ( : : testing : : Ge ( kDropRateForLb * ( 1 - kErrorTolerance ) ) , <nl> : : testing : : Le ( kDropRateForLb * ( 1 + kErrorTolerance ) ) ) ) ; <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> } <nl> <nl> / / Tests that drop config is converted correctly from per ten thousand . <nl> TEST_P ( DropTest , DropPerTenThousand ) { <nl> const uint32_t kDropPerTenThousandForLb = 1000 ; <nl> const double kDropRateForLb = kDropPerTenThousandForLb / 10000 . 0 ; <nl> / / The ADS response contains one drop category . <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( ) } , <nl> } ) ; <nl> args . drop_categories = { { kLbDropType , kDropPerTenThousandForLb } } ; <nl> args . drop_denominator = FractionalPercent : : TEN_THOUSAND ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> WaitForAllBackends ( ) ; <nl> / / Send kNumRpcs RPCs and count the drops . <nl> size_t num_drops = 0 ; <nl> TEST_P ( DropTest , DropPerTenThousand ) { <nl> seen_drop_rate , <nl> : : testing : : AllOf ( : : testing : : Ge ( kDropRateForLb * ( 1 - kErrorTolerance ) ) , <nl> : : testing : : Le ( kDropRateForLb * ( 1 + kErrorTolerance ) ) ) ) ; <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> } <nl> <nl> / / Tests that drop is working correctly after update . <nl> TEST_P ( DropTest , Update ) { <nl> const double KDropRateForLbAndThrottle = <nl> kDropRateForLb + ( 1 - kDropRateForLb ) * kDropRateForThrottle ; <nl> / / The first ADS response contains one drop category . <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( ) } , <nl> } ) ; <nl> args . drop_categories = { { kLbDropType , kDropPerMillionForLb } } ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> - / / The second ADS response contains two drop categories . <nl> - / / TODO ( juanlishen ) : Change the ADS response sending to deterministic style <nl> - / / ( e . g . , by using condition variable ) so that we can shorten the test <nl> - / / duration . <nl> - args . drop_categories = { { kLbDropType , kDropPerMillionForLb } , <nl> - { kThrottleDropType , kDropPerMillionForThrottle } } ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 10000 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> WaitForAllBackends ( ) ; <nl> / / Send kNumRpcs RPCs and count the drops . <nl> size_t num_drops = 0 ; <nl> TEST_P ( DropTest , Update ) { <nl> seen_drop_rate , <nl> : : testing : : AllOf ( : : testing : : Ge ( kDropRateForLb * ( 1 - kErrorTolerance ) ) , <nl> : : testing : : Le ( kDropRateForLb * ( 1 + kErrorTolerance ) ) ) ) ; <nl> + / / The second ADS response contains two drop categories , send an update EDS <nl> + / / response . <nl> + args . drop_categories = { { kLbDropType , kDropPerMillionForLb } , <nl> + { kThrottleDropType , kDropPerMillionForThrottle } } ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> / / Wait until the drop rate increases to the middle of the two configs , which <nl> / / implies that the update has been in effect . <nl> const double kDropRateThreshold = <nl> TEST_P ( DropTest , Update ) { <nl> : : testing : : AllOf ( <nl> : : testing : : Ge ( KDropRateForLbAndThrottle * ( 1 - kErrorTolerance ) ) , <nl> : : testing : : Le ( KDropRateForLbAndThrottle * ( 1 + kErrorTolerance ) ) ) ) ; <nl> - / / The ADS service got a single request , <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - / / and sent two responses <nl> - EXPECT_EQ ( 2U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> } <nl> <nl> / / Tests that all the RPCs are dropped if any drop category drops 100 % . <nl> TEST_P ( DropTest , DropAll ) { <nl> const uint32_t kDropPerMillionForLb = 100000 ; <nl> const uint32_t kDropPerMillionForThrottle = 1000000 ; <nl> / / The ADS response contains two drop categories . <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( ) } , <nl> } ) ; <nl> args . drop_categories = { { kLbDropType , kDropPerMillionForLb } , <nl> { kThrottleDropType , kDropPerMillionForThrottle } } ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> / / Send kNumRpcs RPCs and all of them are dropped . <nl> for ( size_t i = 0 ; i < kNumRpcs ; + + i ) { <nl> EchoResponse response ; <nl> TEST_P ( DropTest , DropAll ) { <nl> EXPECT_TRUE ( ! status . ok ( ) & & status . error_message ( ) = = <nl> " Call dropped by load balancing policy " ) ; <nl> } <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> } <nl> <nl> using FallbackTest = BasicTest ; <nl> TEST_P ( FallbackTest , Vanilla ) { <nl> SetNextResolution ( GetBackendPorts ( 0 , kNumBackendsInResolution ) ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> / / Send non - empty serverlist only after kServerlistDelayMs . <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( kNumBackendsInResolution ) } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , <nl> - kServerlistDelayMs ) ; <nl> + std : : thread delayed_resource_setter ( <nl> + std : : bind ( & BasicTest : : SetEdsResourceWithDelay , this , 0 , <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kServerlistDelayMs , <nl> + kDefaultResourceName ) ) ; <nl> / / Wait until all the fallback backends are reachable . <nl> WaitForAllBackends ( 0 / * start_index * / , <nl> kNumBackendsInResolution / * stop_index * / ) ; <nl> TEST_P ( FallbackTest , Vanilla ) { <nl> for ( size_t i = kNumBackendsInResolution ; i < backends_ . size ( ) ; + + i ) { <nl> EXPECT_EQ ( 1U , backends_ [ i ] - > backend_service ( ) - > request_count ( ) ) ; <nl> } <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> + delayed_resource_setter . join ( ) ; <nl> } <nl> <nl> / / Tests that RPCs are handled by the updated fallback backends before <nl> TEST_P ( FallbackTest , Update ) { <nl> SetNextResolution ( GetBackendPorts ( 0 , kNumBackendsInResolution ) ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> / / Send non - empty serverlist only after kServerlistDelayMs . <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( kNumBackendsInResolution + <nl> kNumBackendsInResolutionUpdate ) } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , <nl> - kServerlistDelayMs ) ; <nl> + std : : thread delayed_resource_setter ( <nl> + std : : bind ( & BasicTest : : SetEdsResourceWithDelay , this , 0 , <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kServerlistDelayMs , <nl> + kDefaultResourceName ) ) ; <nl> / / Wait until all the fallback backends are reachable . <nl> WaitForAllBackends ( 0 / * start_index * / , <nl> kNumBackendsInResolution / * stop_index * / ) ; <nl> TEST_P ( FallbackTest , Update ) { <nl> i < backends_ . size ( ) ; + + i ) { <nl> EXPECT_EQ ( 1U , backends_ [ i ] - > backend_service ( ) - > request_count ( ) ) ; <nl> } <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> + delayed_resource_setter . join ( ) ; <nl> } <nl> <nl> / / Tests that fallback will kick in immediately if the balancer channel fails . <nl> TEST_P ( FallbackTest , FallbackIfResponseReceivedButChildNotReady ) { <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> / / Send a serverlist that only contains an unreachable backend before fallback <nl> / / timeout . <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , { g_port_saver - > GetPort ( ) } } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> / / Because no child policy is ready before fallback timeout , we enter fallback <nl> / / mode . <nl> WaitForBackend ( 0 ) ; <nl> TEST_P ( FallbackTest , FallbackModeIsExitedWhenBalancerSaysToDropAllCalls ) { <nl> / / Enter fallback mode because the LB channel fails to connect . <nl> WaitForBackend ( 0 ) ; <nl> / / Return a new balancer that sends a response to drop all calls . <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( ) } , <nl> } ) ; <nl> args . drop_categories = { { kLbDropType , 1000000 } } ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> / / Send RPCs until failure . <nl> gpr_timespec deadline = gpr_time_add ( <nl> TEST_P ( FallbackTest , FallbackModeIsExitedAfterChildRready ) { <nl> WaitForBackend ( 0 ) ; <nl> / / Return a new balancer that sends a dead backend . <nl> ShutdownBackend ( 1 ) ; <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , { backends_ [ 1 ] - > port ( ) } } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> / / The state ( TRANSIENT_FAILURE ) update from the child policy will be ignored <nl> / / because we are still in fallback mode . <nl> class BalancerUpdateTest : public XdsEnd2endTest { <nl> TEST_P ( BalancerUpdateTest , UpdateBalancersButKeepUsingOriginalBalancer ) { <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , { backends_ [ 0 ] - > port ( ) } } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> - args = AdsServiceImpl : : ResponseArgs ( { <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> + args = AdsServiceImpl : : EdsResourceArgs ( { <nl> { " locality0 " , { backends_ [ 1 ] - > port ( ) } } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 1 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 1 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> / / Wait until the first backend is ready . <nl> WaitForBackend ( 0 ) ; <nl> / / Send 10 requests . <nl> TEST_P ( BalancerUpdateTest , UpdateBalancersButKeepUsingOriginalBalancer ) { <nl> gpr_log ( GPR_INFO , " = = = = = = = = = DONE WITH FIRST BATCH = = = = = = = = = = " ) ; <nl> / / All 10 requests should have gone to the first backend . <nl> EXPECT_EQ ( 10U , backends_ [ 0 ] - > backend_service ( ) - > request_count ( ) ) ; <nl> - / / The ADS service of balancer 0 got a single request , and sent a single <nl> - / / response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 1 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 1 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 2 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 2 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> + / / The ADS service of balancer 0 sent at least 1 response . <nl> + EXPECT_GT ( balancers_ [ 0 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> + EXPECT_EQ ( balancers_ [ 1 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> + EXPECT_EQ ( balancers_ [ 2 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> gpr_log ( GPR_INFO , " = = = = = = = = = ABOUT TO UPDATE 1 = = = = = = = = = = " ) ; <nl> SetNextResolutionForLbChannel ( { balancers_ [ 1 ] - > port ( ) } ) ; <nl> gpr_log ( GPR_INFO , " = = = = = = = = = UPDATE 1 DONE = = = = = = = = = = " ) ; <nl> TEST_P ( BalancerUpdateTest , UpdateBalancersButKeepUsingOriginalBalancer ) { <nl> / / The current LB call is still working , so xds continued using it to the <nl> / / first balancer , which doesn ' t assign the second backend . <nl> EXPECT_EQ ( 0U , backends_ [ 1 ] - > backend_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 1 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 1 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 2 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 2 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> + / / The ADS service of balancer 0 sent at least 1 response . <nl> + EXPECT_GT ( balancers_ [ 0 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> + EXPECT_EQ ( balancers_ [ 1 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> + EXPECT_EQ ( balancers_ [ 2 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> } <nl> <nl> / / Tests that the old LB call is still used after multiple balancer address <nl> TEST_P ( BalancerUpdateTest , UpdateBalancersButKeepUsingOriginalBalancer ) { <nl> TEST_P ( BalancerUpdateTest , Repeated ) { <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannelAllBalancers ( ) ; <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , { backends_ [ 0 ] - > port ( ) } } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> - args = AdsServiceImpl : : ResponseArgs ( { <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> + args = AdsServiceImpl : : EdsResourceArgs ( { <nl> { " locality0 " , { backends_ [ 1 ] - > port ( ) } } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 1 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 1 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> / / Wait until the first backend is ready . <nl> WaitForBackend ( 0 ) ; <nl> / / Send 10 requests . <nl> TEST_P ( BalancerUpdateTest , Repeated ) { <nl> gpr_log ( GPR_INFO , " = = = = = = = = = DONE WITH FIRST BATCH = = = = = = = = = = " ) ; <nl> / / All 10 requests should have gone to the first backend . <nl> EXPECT_EQ ( 10U , backends_ [ 0 ] - > backend_service ( ) - > request_count ( ) ) ; <nl> - / / The ADS service of balancer 0 got a single request , and sent a single <nl> - / / response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 1 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 1 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 2 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 2 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> + / / The ADS service of balancer 0 sent at least 1 response . <nl> + EXPECT_GT ( balancers_ [ 0 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> + EXPECT_EQ ( balancers_ [ 1 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> + EXPECT_EQ ( balancers_ [ 2 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> std : : vector < int > ports ; <nl> ports . emplace_back ( balancers_ [ 0 ] - > port ( ) ) ; <nl> ports . emplace_back ( balancers_ [ 1 ] - > port ( ) ) ; <nl> TEST_P ( BalancerUpdateTest , Repeated ) { <nl> TEST_P ( BalancerUpdateTest , DeadUpdate ) { <nl> SetNextResolution ( { } ) ; <nl> SetNextResolutionForLbChannel ( { balancers_ [ 0 ] - > port ( ) } ) ; <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , { backends_ [ 0 ] - > port ( ) } } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> - args = AdsServiceImpl : : ResponseArgs ( { <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> + args = AdsServiceImpl : : EdsResourceArgs ( { <nl> { " locality0 " , { backends_ [ 1 ] - > port ( ) } } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 1 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 1 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> / / Start servers and send 10 RPCs per server . <nl> gpr_log ( GPR_INFO , " = = = = = = = = = BEFORE FIRST BATCH = = = = = = = = = = " ) ; <nl> CheckRpcSendOk ( 10 ) ; <nl> gpr_log ( GPR_INFO , " = = = = = = = = = DONE WITH FIRST BATCH = = = = = = = = = = " ) ; <nl> / / All 10 requests should have gone to the first backend . <nl> EXPECT_EQ ( 10U , backends_ [ 0 ] - > backend_service ( ) - > request_count ( ) ) ; <nl> + / / The ADS service of balancer 0 sent at least 1 response . <nl> + EXPECT_GT ( balancers_ [ 0 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> + EXPECT_EQ ( balancers_ [ 1 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> + EXPECT_EQ ( balancers_ [ 2 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> / / Kill balancer 0 <nl> gpr_log ( GPR_INFO , " * * * * * * * * * * ABOUT TO KILL BALANCER 0 * * * * * * * * * * * * * " ) ; <nl> balancers_ [ 0 ] - > Shutdown ( ) ; <nl> TEST_P ( BalancerUpdateTest , DeadUpdate ) { <nl> / / All 10 requests should again have gone to the first backend . <nl> EXPECT_EQ ( 20U , backends_ [ 0 ] - > backend_service ( ) - > request_count ( ) ) ; <nl> EXPECT_EQ ( 0U , backends_ [ 1 ] - > backend_service ( ) - > request_count ( ) ) ; <nl> - / / The ADS service of balancer 0 got a single request , and sent a single <nl> - / / response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 1 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 1 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 2 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 2 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> + / / The ADS service of no balancers sent anything <nl> + EXPECT_EQ ( balancers_ [ 0 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> + EXPECT_EQ ( balancers_ [ 1 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> + EXPECT_EQ ( balancers_ [ 2 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> gpr_log ( GPR_INFO , " = = = = = = = = = ABOUT TO UPDATE 1 = = = = = = = = = = " ) ; <nl> SetNextResolutionForLbChannel ( { balancers_ [ 1 ] - > port ( ) } ) ; <nl> gpr_log ( GPR_INFO , " = = = = = = = = = UPDATE 1 DONE = = = = = = = = = = " ) ; <nl> TEST_P ( BalancerUpdateTest , DeadUpdate ) { <nl> gpr_log ( GPR_INFO , " = = = = = = = = = DONE WITH THIRD BATCH = = = = = = = = = = " ) ; <nl> / / All 10 requests should have gone to the second backend . <nl> EXPECT_EQ ( 10U , backends_ [ 1 ] - > backend_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> - / / The second balancer , published as part of the first update , may end up <nl> - / / getting two requests ( that is , 1 < = # req < = 2 ) if the LB call retry timer <nl> - / / firing races with the arrival of the update containing the second <nl> - / / balancer . <nl> - EXPECT_GE ( balancers_ [ 1 ] - > ads_service ( ) - > request_count ( ) , 1U ) ; <nl> - EXPECT_GE ( balancers_ [ 1 ] - > ads_service ( ) - > response_count ( ) , 1U ) ; <nl> - EXPECT_LE ( balancers_ [ 1 ] - > ads_service ( ) - > request_count ( ) , 2U ) ; <nl> - EXPECT_LE ( balancers_ [ 1 ] - > ads_service ( ) - > response_count ( ) , 2U ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 2 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 0U , balancers_ [ 2 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> + / / The ADS service of balancer 1 sent at least 1 response . <nl> + EXPECT_EQ ( balancers_ [ 0 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> + EXPECT_GT ( balancers_ [ 1 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> + EXPECT_EQ ( balancers_ [ 2 ] - > ads_service ( ) - > eds_response_state ( ) , <nl> + AdsServiceImpl : : NOT_SENT ) ; <nl> } <nl> <nl> / / The re - resolution tests are deferred because they rely on the fallback mode , <nl> TEST_P ( ClientLoadReportingTest , Vanilla ) { <nl> const size_t kNumRpcsPerAddress = 100 ; <nl> / / TODO ( juanlishen ) : Partition the backends after multiple localities is <nl> / / tested . <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( ) } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> / / Wait until all backends are ready . <nl> int num_ok = 0 ; <nl> int num_failure = 0 ; <nl> TEST_P ( ClientLoadReportingTest , Vanilla ) { <nl> EXPECT_EQ ( kNumRpcsPerAddress , <nl> backends_ [ i ] - > backend_service ( ) - > request_count ( ) ) ; <nl> } <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> / / The LRS service got a single request , and sent a single response . <nl> EXPECT_EQ ( 1U , balancers_ [ 0 ] - > lrs_service ( ) - > request_count ( ) ) ; <nl> EXPECT_EQ ( 1U , balancers_ [ 0 ] - > lrs_service ( ) - > response_count ( ) ) ; <nl> TEST_P ( ClientLoadReportingTest , BalancerRestart ) { <nl> const size_t kNumBackendsFirstPass = backends_ . size ( ) / 2 ; <nl> const size_t kNumBackendsSecondPass = <nl> backends_ . size ( ) - kNumBackendsFirstPass ; <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( 0 , kNumBackendsFirstPass ) } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> / / Wait until all backends returned by the balancer are ready . <nl> int num_ok = 0 ; <nl> int num_failure = 0 ; <nl> TEST_P ( ClientLoadReportingTest , BalancerRestart ) { <nl> / * start_index * / 0 , / * stop_index * / kNumBackendsFirstPass ) ) ; <nl> / / Now restart the balancer , this time pointing to the new backends . <nl> balancers_ [ 0 ] - > Start ( server_host_ ) ; <nl> - args = AdsServiceImpl : : ResponseArgs ( { <nl> + args = AdsServiceImpl : : EdsResourceArgs ( { <nl> { " locality0 " , GetBackendPorts ( kNumBackendsFirstPass ) } , <nl> } ) ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> / / Wait for queries to start going to one of the new backends . <nl> / / This tells us that we ' re now using the new serverlist . <nl> std : : tie ( num_ok , num_failure , num_drops ) = <nl> TEST_P ( ClientLoadReportingWithDropTest , Vanilla ) { <nl> const double KDropRateForLbAndThrottle = <nl> kDropRateForLb + ( 1 - kDropRateForLb ) * kDropRateForThrottle ; <nl> / / The ADS response contains two drop categories . <nl> - AdsServiceImpl : : ResponseArgs args ( { <nl> + AdsServiceImpl : : EdsResourceArgs args ( { <nl> { " locality0 " , GetBackendPorts ( ) } , <nl> } ) ; <nl> args . drop_categories = { { kLbDropType , kDropPerMillionForLb } , <nl> { kThrottleDropType , kDropPerMillionForThrottle } } ; <nl> - ScheduleResponseForBalancer ( 0 , AdsServiceImpl : : BuildResponse ( args ) , 0 ) ; <nl> + balancers_ [ 0 ] - > ads_service ( ) - > SetEdsResource ( <nl> + AdsServiceImpl : : BuildEdsResource ( args ) , kDefaultResourceName ) ; <nl> int num_ok = 0 ; <nl> int num_failure = 0 ; <nl> int num_drops = 0 ; <nl> TEST_P ( ClientLoadReportingWithDropTest , Vanilla ) { <nl> kDropRateForThrottle * ( 1 - kErrorTolerance ) ) , <nl> : : testing : : Le ( total_rpc * ( 1 - kDropRateForLb ) * <nl> kDropRateForThrottle * ( 1 + kErrorTolerance ) ) ) ) ; <nl> - / / The ADS service got a single request , and sent a single response . <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > request_count ( ) ) ; <nl> - EXPECT_EQ ( 1U , balancers_ [ 0 ] - > ads_service ( ) - > response_count ( ) ) ; <nl> } <nl> <nl> grpc : : string TestTypeName ( const : : testing : : TestParamInfo < TestType > & info ) { <nl>
|
Converting AdsServiceImpl to a Fake
|
grpc/grpc
|
d5689c37ed0cefccec895a6a031d8f92af92ec49
|
2020-03-03T17:10:53Z
|
mmm a / contrib / tvmop / __init__ . py <nl> ppp b / contrib / tvmop / __init__ . py <nl> <nl> # coding : utf - 8 <nl> from . opdef import defop <nl> from . utils import AllTypes , RealTypes <nl> + from . utils import assign_by_req , reduce_axes <nl> <nl> from . import basic <nl> mmm a / contrib / tvmop / basic / ufunc . py <nl> ppp b / contrib / tvmop / basic / ufunc . py <nl> <nl> # coding : utf - 8 <nl> import tvm <nl> from . . import defop , AllTypes <nl> + from . . import assign_by_req , reduce_axes <nl> <nl> def compute_add ( dtype , ndim ) : <nl> A = tvm . placeholder ( [ tvm . var ( ) for _ in range ( ndim ) ] , name = ' A ' , dtype = dtype ) <nl> def compute_add ( dtype , ndim ) : <nl> s = tvm . create_schedule ( C . op ) <nl> return s , A , B , C <nl> <nl> + <nl> @ defop ( name = " vadd " , target = " cpu " , auto_broadcast = True , <nl> - dtype = AllTypes , ndim = list ( range ( 1 , 6 ) ) ) <nl> + dtype = AllTypes , ndim = [ 5 ] ) <nl> def vadd ( dtype , ndim ) : <nl> s , A , B , C = compute_add ( dtype , ndim ) <nl> axes = [ axis for axis in C . op . axis ] <nl> def vadd ( dtype , ndim ) : <nl> <nl> return s , [ A , B , C ] <nl> <nl> + <nl> @ defop ( name = " cuda_vadd " , target = " cuda " , auto_broadcast = True , <nl> - dtype = [ " float32 " , " float64 " ] , ndim = list ( range ( 1 , 6 ) ) ) <nl> + dtype = [ " float32 " , " float64 " ] , ndim = [ 5 ] ) <nl> def vadd_gpu ( dtype , ndim ) : <nl> s , A , B , C = compute_add ( dtype , ndim ) <nl> s = tvm . create_schedule ( C . op ) <nl> def vadd_gpu ( dtype , ndim ) : <nl> s [ C ] . bind ( bx , tvm . thread_axis ( " blockIdx . x " ) ) <nl> s [ C ] . bind ( tx , tvm . thread_axis ( " threadIdx . x " ) ) <nl> return s , [ A , B , C ] <nl> + <nl> + <nl> + def compute_backward_vadd ( dtype , ndim , reduce1st , req ) : <nl> + # The backward of broadcast op is basically a reduction on broadcast axes . <nl> + # We label the reduce axes as 1 and other axes as 0 , and they form a bit string . <nl> + # Each bit string correponds to a kernel , so the number of kernels is as many as ` 2 ^ n ` <nl> + # To reduce it , the bit string is compressed by combining consecutive 0s or 1s . <nl> + # In this way , the number of bit string ( the number of kernels ) is reduced to ` 2 * n ` <nl> + # They compressed bit string is stored in ` axes ` . And ` reduce1st ` represents the first bit <nl> + # of the compressed bit string . Credit to @ junrushao1994 and @ yzhliu . <nl> + axes = ( [ reduce1st , 1 - reduce1st ] * ndim ) [ : ndim ] <nl> + X = tvm . placeholder ( [ tvm . var ( ) for _ in range ( ndim ) ] , name = ' X ' , dtype = dtype ) <nl> + reducer = tvm . comm_reducer ( lambda x , y : x + y , <nl> + lambda t : tvm . const ( 0 , dtype = t ) , name = " sum " ) <nl> + ret = reduce_axes ( X , axes , reducer ) <nl> + in_grad_a , in_grad = assign_by_req ( ret , req ) <nl> + s = tvm . create_schedule ( in_grad . op ) <nl> + return s , X , in_grad_a , in_grad , [ ret , in_grad ] <nl> + <nl> + <nl> + @ defop ( name = " backward_vadd " , target = " cpu " , dtype = AllTypes , <nl> + ndim = [ 5 ] , reduce1st = [ 0 , 1 ] , <nl> + req = [ " kWriteTo " , " kAddTo " ] , attrs = [ " reduce1st " , " req " ] ) <nl> + def backward_vadd ( dtype , ndim , reduce1st , req ) : <nl> + s , X , in_grad_a , in_grad , c_list = compute_backward_vadd ( dtype , ndim , reduce1st , req ) <nl> + for t in c_list : <nl> + axes = [ axis for axis in t . op . axis ] <nl> + fused = s [ t ] . fuse ( * axes ) <nl> + s [ t ] . parallel ( fused ) <nl> + return s , [ X , in_grad_a , in_grad ] <nl> + <nl> + <nl> + @ defop ( name = " cuda_backward_vadd " , target = " gpu " , dtype = [ " float32 " , " float64 " ] , <nl> + ndim = [ 5 ] , reduce1st = [ 0 , 1 ] , <nl> + req = [ " kWriteTo " , " kAddTo " ] , attrs = [ " reduce1st " , " req " ] ) <nl> + def backward_vadd_gpu ( dtype , ndim , reduce1st , req ) : <nl> + s , X , in_grad_a , in_grad , c_list = compute_backward_vadd ( dtype , ndim , reduce1st , req ) <nl> + num_thread = 64 <nl> + for t in c_list : <nl> + block_x = tvm . thread_axis ( " blockIdx . x " ) <nl> + thread_x = tvm . thread_axis ( " threadIdx . x " ) <nl> + axes = [ axis for axis in t . op . axis ] <nl> + fused = s [ t ] . fuse ( * axes ) <nl> + bx , tx = s [ t ] . split ( fused , factor = num_thread ) <nl> + s [ t ] . bind ( bx , block_x ) <nl> + s [ t ] . bind ( tx , thread_x ) <nl> + return s , [ X , in_grad_a , in_grad ] <nl> mmm a / contrib / tvmop / utils . py <nl> ppp b / contrib / tvmop / utils . py <nl> <nl> # under the License . <nl> <nl> # coding : utf - 8 <nl> + import tvm <nl> + <nl> AllTypes = [ " float32 " , " float64 " , " float16 " , " uint8 " , " int8 " , " int32 " , " int64 " ] <nl> RealTypes = [ " float32 " , " float64 " , " float16 " ] <nl> + <nl> + def assign_by_req ( a , req ) : <nl> + b = tvm . placeholder ( a . shape , name = ' assign_by_req_b ' , dtype = a . dtype ) <nl> + if ( req = = " kAddTo " ) : <nl> + c = tvm . compute ( a . shape , lambda * idx : a [ idx ] + b [ idx ] ) <nl> + else : <nl> + c = tvm . compute ( a . shape , lambda * idx : a [ idx ] ) <nl> + return b , c <nl> + <nl> + <nl> + def reduce_axes ( X , axes , reducer ) : <nl> + def get_index ( idx , ridx ) : <nl> + j = 0 <nl> + k = 0 <nl> + ret = [ ] <nl> + for val in axes : <nl> + ret . append ( idx [ j ] if val = = 0 else ridx [ k ] ) <nl> + j + = ( val = = 0 ) <nl> + k + = ( val ! = 0 ) <nl> + return tuple ( ret ) <nl> + <nl> + ishape = X . shape <nl> + odim = ( len ( ishape ) + 1 - axes [ 0 ] ) / / 2 <nl> + oshape = [ tvm . var ( ) for _ in range ( odim ) ] <nl> + ridx = [ tvm . reduce_axis ( ( 0 , ishape [ i ] ) ) for ( i , val ) in enumerate ( axes ) if val = = 1 ] <nl> + ret = tvm . compute ( oshape , lambda * idx : reducer ( X [ get_index ( idx , ridx ) ] , axis = ridx ) , name = ' ret ' ) <nl> + return ret <nl> mmm a / src / operator / contrib / tvmop / ufunc . cc <nl> ppp b / src / operator / contrib / tvmop / ufunc . cc <nl> <nl> # include < tvm / runtime / registry . h > <nl> # include < tvm / runtime / c_runtime_api . h > <nl> # include < mxnet / base . h > <nl> + # include < string > <nl> # include " . . / . . / tensor / elemwise_binary_broadcast_op . h " <nl> # include " . . / . . / tvmop / op_module . h " <nl> # include " . . / . . / tensor / elemwise_binary_op . h " <nl> namespace op { <nl> <nl> static constexpr char func_vadd_cpu [ ] = " vadd " ; <nl> static constexpr char func_vadd_gpu [ ] = " cuda_vadd " ; <nl> + static constexpr char func_bakcward_vadd_cpu [ ] = " backward_vadd " ; <nl> + static constexpr char func_bakcward_vadd_gpu [ ] = " cuda_backward_vadd " ; <nl> + static constexpr int max_dim = 5 ; <nl> + <nl> + TBlob padding ( const TBlob & tblob , const int max_dim ) { <nl> + TShape tshape ( max_dim , 1 ) ; <nl> + int ndim = tblob . shape_ . ndim ( ) ; <nl> + for ( int i = max_dim - ndim ; i < max_dim ; + + i ) { <nl> + tshape [ i ] = tblob . size ( i - max_dim + ndim ) ; <nl> + } <nl> + return tblob . reshape ( tshape ) ; <nl> + } <nl> <nl> template < const char * func > <nl> - void TVMBroadcastCompute ( const nnvm : : NodeAttrs & attrs , <nl> - const mxnet : : OpContext & ctx , <nl> - const std : : vector < TBlob > & inputs , <nl> - const std : : vector < OpReqType > & req , <nl> - const std : : vector < TBlob > & outputs ) { <nl> + void TVMBinaryCompute ( const nnvm : : NodeAttrs & attrs , <nl> + const mxnet : : OpContext & ctx , <nl> + const std : : vector < TBlob > & inputs , <nl> + const std : : vector < OpReqType > & req , <nl> + const std : : vector < TBlob > & outputs ) { <nl> CHECK_EQ ( inputs . size ( ) , 2U ) ; <nl> CHECK_EQ ( outputs . size ( ) , 1U ) ; <nl> - tvm : : runtime : : TVMOpModule : : Get ( ) - > Call ( func , ctx , { inputs [ 0 ] , inputs [ 1 ] , outputs [ 0 ] } ) ; <nl> + TBlob idata [ 2 ] , odata ; <nl> + for ( int k = 0 ; k < 2 ; + + k ) { <nl> + idata [ k ] = padding ( inputs [ k ] , max_dim ) ; <nl> + } <nl> + odata = padding ( outputs [ 0 ] , max_dim ) ; <nl> + tvm : : runtime : : TVMOpModule : : Get ( ) - > Call ( func , ctx , { idata [ 0 ] , idata [ 1 ] , odata } ) ; <nl> + } <nl> + <nl> + template < const char * func > <nl> + void TVMBinaryBackwardComputeUseNone ( const nnvm : : NodeAttrs & attrs , <nl> + const mxnet : : OpContext & ctx , <nl> + const std : : vector < TBlob > & inputs , <nl> + const std : : vector < OpReqType > & req , <nl> + const std : : vector < TBlob > & outputs ) { <nl> + CHECK_EQ ( inputs . size ( ) , 1U ) ; <nl> + CHECK_EQ ( outputs . size ( ) , 2U ) ; <nl> + int ndim = inputs [ 0 ] . shape_ . ndim ( ) ; <nl> + for ( int k = 0 ; k < 2 ; + + k ) { <nl> + / / dispatch by backward <nl> + std : : vector < int > ov , iv ; <nl> + TBlob ograd = padding ( inputs [ 0 ] , ndim ) , igrad = padding ( outputs [ k ] , ndim ) ; <nl> + int flag ; <nl> + if ( ograd . size ( 0 ) ! = igrad . size ( 0 ) ) { <nl> + flag = 1 ; <nl> + } else { <nl> + flag = 0 ; <nl> + } <nl> + for ( int i = 0 ; i < ndim ; + + i ) { <nl> + if ( i = = 0 | | ( ograd . size ( i ) ! = igrad . size ( i ) ) ! = ( ograd . size ( i - 1 ) ! = igrad . size ( i - 1 ) ) ) { <nl> + ov . push_back ( ograd . size ( i ) ) ; <nl> + } else { <nl> + ov . back ( ) * = ograd . size ( i ) ; <nl> + } <nl> + } <nl> + for ( int i = ov . size ( ) ; i < max_dim ; + + i ) { <nl> + ov . push_back ( 1 ) ; <nl> + } <nl> + for ( int i = flag ; i < ov . size ( ) ; i + = 2 ) { <nl> + iv . push_back ( ov [ i ] ) ; <nl> + } <nl> + TShape oshape ( ov . begin ( ) , ov . end ( ) ) , ishape ( iv . begin ( ) , iv . end ( ) ) ; <nl> + TBlob ograd_tvm ( ograd . reshape ( oshape ) ) ; <nl> + TBlob igrad_tvm ( igrad . reshape ( ishape ) ) ; <nl> + std : : string funcname = std : : string ( func ) + " reduce1st_ " + std : : to_string ( flag ) ; <nl> + / / dispatch by req <nl> + funcname + = " req_ " ; <nl> + MXNET_ASSIGN_REQ_SWITCH ( req [ k ] , req_type , { <nl> + if ( req_type = = kWriteTo ) { <nl> + funcname + = " kWriteTo " ; <nl> + } else { <nl> + funcname + = " kAddTo " ; <nl> + } <nl> + } ) <nl> + tvm : : runtime : : TVMOpModule : : Get ( ) - > Call ( funcname , ctx , { ograd_tvm , igrad_tvm , igrad_tvm } ) ; <nl> + } <nl> } <nl> <nl> NNVM_REGISTER_OP ( _contrib_tvm_vadd ) <nl> NNVM_REGISTER_OP ( _contrib_tvm_vadd ) <nl> . set_num_outputs ( 1 ) <nl> . add_argument ( " a " , " NDArray - or - Symbol " , " first input " ) <nl> . add_argument ( " b " , " NDArray - or - Symbol " , " second input " ) <nl> + . set_attr < nnvm : : FListInputNames > ( " FListInputNames " , <nl> + [ ] ( const NodeAttrs & attrs ) { <nl> + return std : : vector < std : : string > { " a " , " b " } ; <nl> + } ) <nl> . set_attr < mxnet : : FInferShape > ( " FInferShape " , BinaryBroadcastShape ) <nl> . set_attr < nnvm : : FInferType > ( " FInferType " , mxnet : : op : : ElemwiseType < 2 , 1 > ) <nl> # if MXNET_USE_CUDA <nl> - . set_attr < mxnet : : FCompute > ( " FCompute < gpu > " , mxnet : : op : : TVMBroadcastCompute < func_vadd_gpu > ) <nl> + . set_attr < mxnet : : FCompute > ( " FCompute < gpu > " , mxnet : : op : : TVMBinaryCompute < func_vadd_gpu > ) <nl> + # endif / / MXNET_USE_CUDA <nl> + . set_attr < mxnet : : FCompute > ( " FCompute < cpu > " , mxnet : : op : : TVMBinaryCompute < func_vadd_cpu > ) <nl> + . set_attr < nnvm : : FGradient > ( " FGradient " , ElemwiseGradUseNone { " _backward_contrib_tvm_vadd " } ) ; <nl> + <nl> + NNVM_REGISTER_OP ( _backward_contrib_tvm_vadd ) <nl> + . set_num_inputs ( 1 ) <nl> + . set_num_outputs ( 2 ) <nl> + . set_attr < nnvm : : TIsBackward > ( " TIsBackward " , true ) <nl> + # if MXNET_USE_CUDA <nl> + . set_attr < mxnet : : FCompute > ( " FCompute < gpu > " , <nl> + mxnet : : op : : TVMBinaryBackwardComputeUseNone < func_bakcward_vadd_gpu > ) <nl> # endif / / MXNET_USE_CUDA <nl> - . set_attr < mxnet : : FCompute > ( " FCompute < cpu > " , mxnet : : op : : TVMBroadcastCompute < func_vadd_cpu > ) ; <nl> + . set_attr < mxnet : : FCompute > ( " FCompute < cpu > " , <nl> + mxnet : : op : : TVMBinaryBackwardComputeUseNone < func_bakcward_vadd_cpu > ) ; <nl> <nl> } / / namespace op <nl> } / / namespace mxnet <nl> mmm a / tests / python / unittest / test_tvm_op . py <nl> ppp b / tests / python / unittest / test_tvm_op . py <nl> <nl> # under the License . <nl> <nl> import mxnet as mx <nl> + import numpy as _np <nl> from mxnet . test_utils import same , rand_shape_nd <nl> from mxnet . runtime import Features <nl> from common import with_seed <nl> <nl> @ with_seed ( ) <nl> def test_tvm_broadcast_add ( ) : <nl> if _features . is_enabled ( " TVM_OP " ) : <nl> - a_shape = rand_shape_nd ( 4 ) <nl> - b_shape = ( 1 , ) + a_shape [ 1 : 2 ] + ( 1 , 1 ) <nl> - a = mx . nd . normal ( shape = a_shape ) <nl> - b = mx . nd . normal ( shape = b_shape ) <nl> - c = mx . nd . contrib . tvm_vadd ( a , b ) <nl> - c_np = a . asnumpy ( ) + b . asnumpy ( ) <nl> - assert same ( c . asnumpy ( ) , c_np ) <nl> + configs = [ <nl> + [ [ 5 , 6 , 7 , 8 , 9 ] , [ 1 ] ] , <nl> + [ [ 6 , 4 , 5 , 2 , 1 ] , [ 6 , 1 , 5 , 1 , 1 ] ] , <nl> + [ [ 3 , 5 , 6 ] , [ 1 , 6 ] ] , <nl> + [ [ 3 , 5 , 6 ] , [ 5 , 1 ] ] , <nl> + [ [ 3 , 5 , 6 ] , [ 5 , 6 ] ] , <nl> + [ [ 4 , 3 , 2 , 1 ] , [ 2 , 1 ] ] , <nl> + [ [ 4 , 3 , 2 , 2 ] , [ 4 , 1 , 1 , 2 ] ] , <nl> + [ [ 6 , 6 ] , [ 6 , 6 ] ] , <nl> + ] <nl> + for config in configs : <nl> + a_shape = config [ 0 ] <nl> + b_shape = config [ 1 ] <nl> + a = mx . nd . normal ( shape = a_shape ) <nl> + b = mx . nd . normal ( shape = b_shape ) <nl> + a . attach_grad ( ) <nl> + b . attach_grad ( ) <nl> + with mx . autograd . record ( ) : <nl> + c = mx . nd . contrib . tvm_vadd ( a , b ) <nl> + c_np = a . asnumpy ( ) + b . asnumpy ( ) <nl> + assert same ( c . asnumpy ( ) , c_np ) <nl> + # test backward <nl> + c . backward ( ) <nl> + expected_grad_a = _np . ones_like ( a . asnumpy ( ) ) * c_np . size / a . asnumpy ( ) . size <nl> + expected_grad_b = _np . ones_like ( b . asnumpy ( ) ) * c_np . size / b . asnumpy ( ) . size <nl> + assert same ( a . grad . asnumpy ( ) , expected_grad_a ) <nl> + assert same ( b . grad . asnumpy ( ) , expected_grad_b ) <nl> + # test kAddTo request <nl> + a = mx . nd . normal ( shape = a_shape ) <nl> + b = mx . nd . normal ( shape = b_shape ) <nl> + a . attach_grad ( ) <nl> + b . attach_grad ( ) <nl> + with mx . autograd . record ( ) : <nl> + c = mx . nd . contrib . tvm_vadd ( a , b ) <nl> + d = mx . nd . contrib . tvm_vadd ( a , b ) <nl> + mx . autograd . backward ( [ c , d ] ) <nl> + expected_grad_a = 2 * _np . ones_like ( a . asnumpy ( ) ) * c . size / a . size <nl> + expected_grad_b = 2 * _np . ones_like ( b . asnumpy ( ) ) * c . size / b . size <nl> + assert same ( a . grad . asnumpy ( ) , expected_grad_a ) <nl> + assert same ( b . grad . asnumpy ( ) , expected_grad_b ) <nl> + <nl> <nl> if __name__ = = ' __main__ ' : <nl> import nose <nl>
|
Tvm broadcast backward ( )
|
apache/incubator-mxnet
|
9023256cca74f17d3cd81a534433925726686779
|
2019-08-22T07:38:24Z
|
similarity index 100 % <nl> rename from test / mjsunit / harmony / weakrefs / finalizationregistry - and - weakref <nl> rename to test / mjsunit / harmony / weakrefs / finalizationregistry - and - weakref . js <nl>
|
[ weakrefs ] Add missing extension to test file
|
v8/v8
|
6023de85da62c2b3d274806f1b29f5ca69ed63f5
|
2020-07-08T07:51:40Z
|
new file mode 100644 <nl> index 0000000000 . . 7611a48504 <nl> mmm / dev / null <nl> ppp b / libraries / ESP8266mDNS / library . properties <nl> <nl> + name = ESP8266mDNS <nl> + version = 1 . 1 <nl> + author = tony @ tonydicola . com <nl> + maintainer = ivan @ esp8266 . com <nl> + sentence = A port of CC3000 Multicast DNS library <nl> + paragraph = This is a simple implementation of multicast DNS query support for an Arduino running on ESP8266 chip . Only support for resolving address queries is currently implemented . <nl> + category = Communication <nl> + url = <nl> + architectures = esp8266 <nl> + dot_a_linkage = true <nl>
|
Add files via upload ( )
|
esp8266/Arduino
|
91519309d000c65c283c6721ae58d4bf708bf719
|
2018-09-11T13:36:14Z
|
mmm a / src / compiler / wasm - compiler . cc <nl> ppp b / src / compiler / wasm - compiler . cc <nl> void WasmGraphBuilder : : BuildWasmInterpreterEntry ( <nl> / / Compute size for the argument buffer . <nl> int args_size_bytes = 0 ; <nl> for ( int i = 0 ; i < wasm_count ; i + + ) { <nl> - args_size_bytes + = <nl> - RoundUpToMultipleOfPowOf2 ( 1 < < ElementSizeLog2Of ( sig - > GetParam ( i ) ) , 8 ) ; <nl> + args_size_bytes + = 1 < < ElementSizeLog2Of ( sig - > GetParam ( i ) ) ; <nl> } <nl> <nl> / / The return value is also passed via this buffer : <nl> void WasmGraphBuilder : : BuildWasmInterpreterEntry ( <nl> * effect_ = <nl> graph ( ) - > NewNode ( jsgraph ( ) - > machine ( ) - > Store ( store_rep ) , arg_buffer , <nl> Int32Constant ( offset ) , param , * effect_ , * control_ ) ; <nl> - offset + = RoundUpToMultipleOfPowOf2 ( 1 < < ElementSizeLog2Of ( param_rep ) , 8 ) ; <nl> + offset + = 1 < < ElementSizeLog2Of ( param_rep ) ; <nl> } <nl> - <nl> - DCHECK ( IsAligned ( offset , 8 ) ) ; <nl> } <nl> DCHECK_EQ ( param_count , param_index ) ; <nl> DCHECK_EQ ( args_size_bytes , offset ) ; <nl> Handle < Code > CompileWasmInterpreterEntry ( Isolate * isolate , uint32_t func_index , <nl> Zone zone ( isolate - > allocator ( ) , ZONE_NAME ) ; <nl> Graph graph ( & zone ) ; <nl> CommonOperatorBuilder common ( & zone ) ; <nl> - MachineOperatorBuilder machine ( <nl> - & zone , MachineType : : PointerRepresentation ( ) , <nl> - InstructionSelector : : SupportedMachineOperatorFlags ( ) , <nl> - InstructionSelector : : AlignmentRequirements ( ) ) ; <nl> + MachineOperatorBuilder machine ( & zone ) ; <nl> JSGraph jsgraph ( isolate , & graph , & common , nullptr , nullptr , & machine ) ; <nl> <nl> Node * control = nullptr ; <nl> mmm a / src / utils . h <nl> ppp b / src / utils . h <nl> inline bool IsAddressAligned ( Address addr , <nl> return IsAligned ( offs , alignment ) ; <nl> } <nl> <nl> - template < typename T , typename U > <nl> - inline T RoundUpToMultipleOfPowOf2 ( T value , U multiple ) { <nl> - DCHECK ( multiple & & ( ( multiple & ( multiple - 1 ) ) = = 0 ) ) ; <nl> - return ( value + multiple - 1 ) & ~ ( multiple - 1 ) ; <nl> - } <nl> <nl> / / Returns the maximum of the two parameters . <nl> template < typename T > <nl> mmm a / src / wasm / wasm - debug . cc <nl> ppp b / src / wasm / wasm - debug . cc <nl> class InterpreterHandle { <nl> ScopedVector < WasmVal > wasm_args ( num_params ) ; <nl> uint8_t * arg_buf_ptr = arg_buffer ; <nl> for ( int i = 0 ; i < num_params ; + + i ) { <nl> - int param_size = 1 < < ElementSizeLog2Of ( sig - > GetParam ( i ) ) ; <nl> + uint32_t param_size = 1 < < ElementSizeLog2Of ( sig - > GetParam ( i ) ) ; <nl> # define CASE_ARG_TYPE ( type , ctype ) \ <nl> case type : \ <nl> DCHECK_EQ ( param_size , sizeof ( ctype ) ) ; \ <nl> - wasm_args [ i ] = WasmVal ( * reinterpret_cast < ctype * > ( arg_buf_ptr ) ) ; \ <nl> + wasm_args [ i ] = WasmVal ( ReadUnalignedValue < ctype > ( arg_buf_ptr ) ) ; \ <nl> break ; <nl> switch ( sig - > GetParam ( i ) ) { <nl> CASE_ARG_TYPE ( kWasmI32 , uint32_t ) <nl> class InterpreterHandle { <nl> default : <nl> UNREACHABLE ( ) ; <nl> } <nl> - arg_buf_ptr + = RoundUpToMultipleOfPowOf2 ( param_size , 8 ) ; <nl> + arg_buf_ptr + = param_size ; <nl> } <nl> <nl> WasmInterpreter : : Thread * thread = interpreter_ . GetThread ( 0 ) ; <nl> class InterpreterHandle { <nl> # define CASE_RET_TYPE ( type , ctype ) \ <nl> case type : \ <nl> DCHECK_EQ ( 1 < < ElementSizeLog2Of ( sig - > GetReturn ( 0 ) ) , sizeof ( ctype ) ) ; \ <nl> - * reinterpret_cast < ctype * > ( arg_buffer ) = ret_val . to < ctype > ( ) ; \ <nl> + WriteUnalignedValue < ctype > ( arg_buffer , ret_val . to < ctype > ( ) ) ; \ <nl> break ; <nl> switch ( sig - > GetReturn ( 0 ) ) { <nl> CASE_RET_TYPE ( kWasmI32 , uint32_t ) <nl>
|
Revert of MIPS [ 64 ] : Fix unaligned arguments storage in Wasm - to - interpreter entry ( patchset id : 40001 of https : / / codereview . chromium . org / 2705293011 / )
|
v8/v8
|
29877f5ae0b486c8df275fd819d9505a161e320a
|
2017-03-17T12:07:31Z
|
mmm a / db / update . cpp <nl> ppp b / db / update . cpp <nl> namespace mongo { <nl> newObj = bb . obj ( ) ; <nl> } <nl> <nl> - cout < < " yo ho ho " < < endl ; <nl> if ( canApplyInPlaceAndVerify ( newObj ) ) <nl> applyModsInPlace ( newObj ) ; <nl> else <nl>
|
spam
|
mongodb/mongo
|
3e5d63dd63d4b89dbd52deb45248cd8610f7c4b1
|
2009-12-17T04:29:49Z
|
mmm a / src / caffe / test / test_concat_layer . cpp <nl> ppp b / src / caffe / test / test_concat_layer . cpp <nl> TYPED_TEST_CASE ( ConcatLayerTest , Dtypes ) ; <nl> <nl> TYPED_TEST ( ConcatLayerTest , TestSetupNum ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_concat_dim ( 0 ) ; <nl> + layer_param . mutable_concat_param ( ) - > set_concat_dim ( 0 ) ; <nl> ConcatLayer < TypeParam > layer ( layer_param ) ; <nl> layer . SetUp ( this - > blob_bottom_vec_1 , & ( this - > blob_top_vec_ ) ) ; <nl> EXPECT_EQ ( this - > blob_top_ - > num ( ) , <nl> mmm a / src / caffe / test / test_convolution_layer . cpp <nl> ppp b / src / caffe / test / test_convolution_layer . cpp <nl> TYPED_TEST_CASE ( ConvolutionLayerTest , Dtypes ) ; <nl> <nl> TYPED_TEST ( ConvolutionLayerTest , TestSetup ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> - layer_param . set_num_output ( 4 ) ; <nl> + ConvolutionParameter * convolution_param = <nl> + layer_param . mutable_convolution_param ( ) ; <nl> + convolution_param - > set_kernel_size ( 3 ) ; <nl> + convolution_param - > set_stride ( 2 ) ; <nl> + convolution_param - > set_num_output ( 4 ) ; <nl> shared_ptr < Layer < TypeParam > > layer ( <nl> new ConvolutionLayer < TypeParam > ( layer_param ) ) ; <nl> layer - > SetUp ( this - > blob_bottom_vec_ , & ( this - > blob_top_vec_ ) ) ; <nl> TYPED_TEST ( ConvolutionLayerTest , TestSetup ) { <nl> EXPECT_EQ ( this - > blob_top_ - > height ( ) , 2 ) ; <nl> EXPECT_EQ ( this - > blob_top_ - > width ( ) , 2 ) ; <nl> / / setting group should not change the shape <nl> - layer_param . set_num_output ( 3 ) ; <nl> - layer_param . set_group ( 3 ) ; <nl> + convolution_param - > set_num_output ( 3 ) ; <nl> + convolution_param - > set_group ( 3 ) ; <nl> layer . reset ( new ConvolutionLayer < TypeParam > ( layer_param ) ) ; <nl> layer - > SetUp ( this - > blob_bottom_vec_ , & ( this - > blob_top_vec_ ) ) ; <nl> EXPECT_EQ ( this - > blob_top_ - > num ( ) , 2 ) ; <nl> TYPED_TEST ( ConvolutionLayerTest , TestSimpleConvolution ) { <nl> ConstantFiller < TypeParam > filler ( filler_param ) ; <nl> filler . Fill ( this - > blob_bottom_ ) ; <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> - layer_param . set_num_output ( 4 ) ; <nl> - layer_param . mutable_weight_filler ( ) - > set_type ( " constant " ) ; <nl> - layer_param . mutable_weight_filler ( ) - > set_value ( 1 ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_type ( " constant " ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_value ( 0 . 1 ) ; <nl> + ConvolutionParameter * convolution_param = <nl> + layer_param . mutable_convolution_param ( ) ; <nl> + convolution_param - > set_kernel_size ( 3 ) ; <nl> + convolution_param - > set_stride ( 2 ) ; <nl> + convolution_param - > set_num_output ( 4 ) ; <nl> + convolution_param - > mutable_weight_filler ( ) - > set_type ( " constant " ) ; <nl> + convolution_param - > mutable_weight_filler ( ) - > set_value ( 1 ) ; <nl> + convolution_param - > mutable_bias_filler ( ) - > set_type ( " constant " ) ; <nl> + convolution_param - > mutable_bias_filler ( ) - > set_value ( 0 . 1 ) ; <nl> shared_ptr < Layer < TypeParam > > layer ( <nl> new ConvolutionLayer < TypeParam > ( layer_param ) ) ; <nl> layer - > SetUp ( this - > blob_bottom_vec_ , & ( this - > blob_top_vec_ ) ) ; <nl> TYPED_TEST ( ConvolutionLayerTest , TestSimpleConvolutionGroup ) { <nl> } <nl> } <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> - layer_param . set_num_output ( 3 ) ; <nl> - layer_param . set_group ( 3 ) ; <nl> - layer_param . mutable_weight_filler ( ) - > set_type ( " constant " ) ; <nl> - layer_param . mutable_weight_filler ( ) - > set_value ( 1 ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_type ( " constant " ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_value ( 0 . 1 ) ; <nl> + ConvolutionParameter * convolution_param = <nl> + layer_param . mutable_convolution_param ( ) ; <nl> + convolution_param - > set_kernel_size ( 3 ) ; <nl> + convolution_param - > set_stride ( 2 ) ; <nl> + convolution_param - > set_num_output ( 3 ) ; <nl> + convolution_param - > set_group ( 3 ) ; <nl> + convolution_param - > mutable_weight_filler ( ) - > set_type ( " constant " ) ; <nl> + convolution_param - > mutable_weight_filler ( ) - > set_value ( 1 ) ; <nl> + convolution_param - > mutable_bias_filler ( ) - > set_type ( " constant " ) ; <nl> + convolution_param - > mutable_bias_filler ( ) - > set_value ( 0 . 1 ) ; <nl> shared_ptr < Layer < TypeParam > > layer ( <nl> new ConvolutionLayer < TypeParam > ( layer_param ) ) ; <nl> layer - > SetUp ( this - > blob_bottom_vec_ , & ( this - > blob_top_vec_ ) ) ; <nl> TYPED_TEST ( ConvolutionLayerTest , TestSimpleConvolutionGroup ) { <nl> <nl> TYPED_TEST ( ConvolutionLayerTest , TestCPUGradient ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> - layer_param . set_num_output ( 2 ) ; <nl> - layer_param . mutable_weight_filler ( ) - > set_type ( " gaussian " ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_type ( " gaussian " ) ; <nl> + ConvolutionParameter * convolution_param = <nl> + layer_param . mutable_convolution_param ( ) ; <nl> + convolution_param - > set_kernel_size ( 3 ) ; <nl> + convolution_param - > set_stride ( 2 ) ; <nl> + convolution_param - > set_num_output ( 2 ) ; <nl> + convolution_param - > mutable_weight_filler ( ) - > set_type ( " gaussian " ) ; <nl> + convolution_param - > mutable_bias_filler ( ) - > set_type ( " gaussian " ) ; <nl> Caffe : : set_mode ( Caffe : : CPU ) ; <nl> ConvolutionLayer < TypeParam > layer ( layer_param ) ; <nl> GradientChecker < TypeParam > checker ( 1e - 2 , 1e - 3 ) ; <nl> TYPED_TEST ( ConvolutionLayerTest , TestCPUGradient ) { <nl> <nl> TYPED_TEST ( ConvolutionLayerTest , TestCPUGradientGroup ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> - layer_param . set_num_output ( 3 ) ; <nl> - layer_param . set_group ( 3 ) ; <nl> - layer_param . mutable_weight_filler ( ) - > set_type ( " gaussian " ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_type ( " gaussian " ) ; <nl> + ConvolutionParameter * convolution_param = <nl> + layer_param . mutable_convolution_param ( ) ; <nl> + convolution_param - > set_kernel_size ( 3 ) ; <nl> + convolution_param - > set_stride ( 2 ) ; <nl> + convolution_param - > set_num_output ( 3 ) ; <nl> + convolution_param - > set_group ( 3 ) ; <nl> + convolution_param - > mutable_weight_filler ( ) - > set_type ( " gaussian " ) ; <nl> + convolution_param - > mutable_bias_filler ( ) - > set_type ( " gaussian " ) ; <nl> Caffe : : set_mode ( Caffe : : CPU ) ; <nl> ConvolutionLayer < TypeParam > layer ( layer_param ) ; <nl> GradientChecker < TypeParam > checker ( 1e - 2 , 1e - 3 ) ; <nl> TYPED_TEST ( ConvolutionLayerTest , TestCPUGradientGroup ) { <nl> <nl> TYPED_TEST ( ConvolutionLayerTest , TestGPUGradient ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> - layer_param . set_num_output ( 2 ) ; <nl> - layer_param . mutable_weight_filler ( ) - > set_type ( " gaussian " ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_type ( " gaussian " ) ; <nl> + ConvolutionParameter * convolution_param = <nl> + layer_param . mutable_convolution_param ( ) ; <nl> + convolution_param - > set_kernel_size ( 3 ) ; <nl> + convolution_param - > set_stride ( 2 ) ; <nl> + convolution_param - > set_num_output ( 2 ) ; <nl> + convolution_param - > mutable_weight_filler ( ) - > set_type ( " gaussian " ) ; <nl> + convolution_param - > mutable_bias_filler ( ) - > set_type ( " gaussian " ) ; <nl> Caffe : : set_mode ( Caffe : : GPU ) ; <nl> ConvolutionLayer < TypeParam > layer ( layer_param ) ; <nl> GradientChecker < TypeParam > checker ( 1e - 2 , 1e - 3 ) ; <nl> TYPED_TEST ( ConvolutionLayerTest , TestGPUGradient ) { <nl> <nl> TYPED_TEST ( ConvolutionLayerTest , TestGPUGradientGroup ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> - layer_param . set_num_output ( 3 ) ; <nl> - layer_param . set_group ( 3 ) ; <nl> - layer_param . mutable_weight_filler ( ) - > set_type ( " gaussian " ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_type ( " gaussian " ) ; <nl> + ConvolutionParameter * convolution_param = <nl> + layer_param . mutable_convolution_param ( ) ; <nl> + convolution_param - > set_kernel_size ( 3 ) ; <nl> + convolution_param - > set_stride ( 2 ) ; <nl> + convolution_param - > set_num_output ( 3 ) ; <nl> + convolution_param - > set_group ( 3 ) ; <nl> + convolution_param - > mutable_weight_filler ( ) - > set_type ( " gaussian " ) ; <nl> + convolution_param - > mutable_bias_filler ( ) - > set_type ( " gaussian " ) ; <nl> Caffe : : set_mode ( Caffe : : GPU ) ; <nl> ConvolutionLayer < TypeParam > layer ( layer_param ) ; <nl> GradientChecker < TypeParam > checker ( 1e - 2 , 1e - 3 ) ; <nl> mmm a / src / caffe / test / test_data_layer . cpp <nl> ppp b / src / caffe / test / test_data_layer . cpp <nl> TYPED_TEST_CASE ( DataLayerTest , Dtypes ) ; <nl> <nl> TYPED_TEST ( DataLayerTest , TestRead ) { <nl> LayerParameter param ; <nl> - param . set_batchsize ( 5 ) ; <nl> - param . set_source ( this - > filename ) ; <nl> + DataParameter * data_param = param . mutable_data_param ( ) ; <nl> + data_param - > set_batch_size ( 5 ) ; <nl> + data_param - > set_source ( this - > filename ) ; <nl> DataLayer < TypeParam > layer ( param ) ; <nl> layer . SetUp ( this - > blob_bottom_vec_ , & this - > blob_top_vec_ ) ; <nl> EXPECT_EQ ( this - > blob_top_data_ - > num ( ) , 5 ) ; <nl> mmm a / src / caffe / test / test_hdf5data_layer . cpp <nl> ppp b / src / caffe / test / test_hdf5data_layer . cpp <nl> TYPED_TEST ( HDF5DataLayerTest , TestRead ) { <nl> / / The data file we are reading has 10 rows and 8 columns , <nl> / / with values from 0 to 10 * 8 reshaped in row - major order . <nl> LayerParameter param ; <nl> - int batchsize = 5 ; <nl> - param . set_batchsize ( batchsize ) ; <nl> - param . set_source ( * ( this - > filename ) ) ; <nl> + HDF5DataParameter * hdf5_data_param = param . mutable_hdf5_data_param ( ) ; <nl> + int batch_size = 5 ; <nl> + hdf5_data_param - > set_batch_size ( batch_size ) ; <nl> + hdf5_data_param - > set_source ( * ( this - > filename ) ) ; <nl> int num_rows = 10 ; <nl> int num_cols = 8 ; <nl> int height = 5 ; <nl> TYPED_TEST ( HDF5DataLayerTest , TestRead ) { <nl> / / Test that the layer setup got the correct parameters . <nl> HDF5DataLayer < TypeParam > layer ( param ) ; <nl> layer . SetUp ( this - > blob_bottom_vec_ , & this - > blob_top_vec_ ) ; <nl> - EXPECT_EQ ( this - > blob_top_data_ - > num ( ) , batchsize ) ; <nl> + EXPECT_EQ ( this - > blob_top_data_ - > num ( ) , batch_size ) ; <nl> EXPECT_EQ ( this - > blob_top_data_ - > channels ( ) , num_cols ) ; <nl> EXPECT_EQ ( this - > blob_top_data_ - > height ( ) , height ) ; <nl> EXPECT_EQ ( this - > blob_top_data_ - > width ( ) , width ) ; <nl> <nl> - EXPECT_EQ ( this - > blob_top_label_ - > num ( ) , batchsize ) ; <nl> + EXPECT_EQ ( this - > blob_top_label_ - > num ( ) , batch_size ) ; <nl> EXPECT_EQ ( this - > blob_top_label_ - > channels ( ) , 1 ) ; <nl> EXPECT_EQ ( this - > blob_top_label_ - > height ( ) , 1 ) ; <nl> EXPECT_EQ ( this - > blob_top_label_ - > width ( ) , 1 ) ; <nl> TYPED_TEST ( HDF5DataLayerTest , TestRead ) { <nl> <nl> / / On even iterations , we ' re reading the first half of the data . <nl> / / On odd iterations , we ' re reading the second half of the data . <nl> - int label_offset = ( iter % 2 = = 0 ) ? 0 : batchsize ; <nl> - int data_offset = ( iter % 2 = = 0 ) ? 0 : batchsize * data_size ; <nl> + int label_offset = ( iter % 2 = = 0 ) ? 0 : batch_size ; <nl> + int data_offset = ( iter % 2 = = 0 ) ? 0 : batch_size * data_size ; <nl> <nl> / / Every two iterations we are reading the second file , <nl> / / which has the same labels , but data is offset by total data size , <nl> / / which is 2000 ( see generate_sample_data ) . <nl> int file_offset = ( iter % 4 < 2 ) ? 0 : 2000 ; <nl> <nl> - for ( int i = 0 ; i < batchsize ; + + i ) { <nl> + for ( int i = 0 ; i < batch_size ; + + i ) { <nl> EXPECT_EQ ( <nl> label_offset + i , <nl> this - > blob_top_label_ - > cpu_data ( ) [ i ] ) ; <nl> } <nl> - for ( int i = 0 ; i < batchsize ; + + i ) { <nl> + for ( int i = 0 ; i < batch_size ; + + i ) { <nl> for ( int j = 0 ; j < num_cols ; + + j ) { <nl> for ( int h = 0 ; h < height ; + + h ) { <nl> for ( int w = 0 ; w < width ; + + w ) { <nl> mmm a / src / caffe / test / test_im2col_layer . cpp <nl> ppp b / src / caffe / test / test_im2col_layer . cpp <nl> TYPED_TEST_CASE ( Im2colLayerTest , Dtypes ) ; <nl> <nl> TYPED_TEST ( Im2colLayerTest , TestSetup ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> + ConvolutionParameter * convolution_param = <nl> + layer_param . mutable_convolution_param ( ) ; <nl> + convolution_param - > set_kernel_size ( 3 ) ; <nl> + convolution_param - > set_stride ( 2 ) ; <nl> Im2colLayer < TypeParam > layer ( layer_param ) ; <nl> layer . SetUp ( this - > blob_bottom_vec_ , & ( this - > blob_top_vec_ ) ) ; <nl> EXPECT_EQ ( this - > blob_top_ - > num ( ) , 2 ) ; <nl> TYPED_TEST ( Im2colLayerTest , TestSetup ) { <nl> <nl> TYPED_TEST ( Im2colLayerTest , TestCPU ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> + ConvolutionParameter * convolution_param = <nl> + layer_param . mutable_convolution_param ( ) ; <nl> + convolution_param - > set_kernel_size ( 3 ) ; <nl> + convolution_param - > set_stride ( 2 ) ; <nl> Im2colLayer < TypeParam > layer ( layer_param ) ; <nl> Caffe : : set_mode ( Caffe : : CPU ) ; <nl> layer . SetUp ( this - > blob_bottom_vec_ , & ( this - > blob_top_vec_ ) ) ; <nl> TYPED_TEST ( Im2colLayerTest , TestCPU ) { <nl> <nl> TYPED_TEST ( Im2colLayerTest , TestGPU ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> + ConvolutionParameter * convolution_param = <nl> + layer_param . mutable_convolution_param ( ) ; <nl> + convolution_param - > set_kernel_size ( 3 ) ; <nl> + convolution_param - > set_stride ( 2 ) ; <nl> Im2colLayer < TypeParam > layer ( layer_param ) ; <nl> Caffe : : set_mode ( Caffe : : GPU ) ; <nl> layer . SetUp ( this - > blob_bottom_vec_ , & ( this - > blob_top_vec_ ) ) ; <nl> TYPED_TEST ( Im2colLayerTest , TestGPU ) { <nl> <nl> TYPED_TEST ( Im2colLayerTest , TestCPUGradient ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> + ConvolutionParameter * convolution_param = <nl> + layer_param . mutable_convolution_param ( ) ; <nl> + convolution_param - > set_kernel_size ( 3 ) ; <nl> + convolution_param - > set_stride ( 2 ) ; <nl> Caffe : : set_mode ( Caffe : : CPU ) ; <nl> Im2colLayer < TypeParam > layer ( layer_param ) ; <nl> GradientChecker < TypeParam > checker ( 1e - 2 , 1e - 2 ) ; <nl> TYPED_TEST ( Im2colLayerTest , TestCPUGradient ) { <nl> <nl> TYPED_TEST ( Im2colLayerTest , TestGPUGradient ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> + ConvolutionParameter * convolution_param = <nl> + layer_param . mutable_convolution_param ( ) ; <nl> + convolution_param - > set_kernel_size ( 3 ) ; <nl> + convolution_param - > set_stride ( 2 ) ; <nl> Caffe : : set_mode ( Caffe : : GPU ) ; <nl> Im2colLayer < TypeParam > layer ( layer_param ) ; <nl> GradientChecker < TypeParam > checker ( 1e - 2 , 1e - 2 ) ; <nl> mmm a / src / caffe / test / test_innerproduct_layer . cpp <nl> ppp b / src / caffe / test / test_innerproduct_layer . cpp <nl> TYPED_TEST_CASE ( InnerProductLayerTest , Dtypes ) ; <nl> <nl> TYPED_TEST ( InnerProductLayerTest , TestSetUp ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_num_output ( 10 ) ; <nl> + InnerProductParameter * inner_product_param = <nl> + layer_param . mutable_inner_product_param ( ) ; <nl> + inner_product_param - > set_num_output ( 10 ) ; <nl> shared_ptr < InnerProductLayer < TypeParam > > layer ( <nl> new InnerProductLayer < TypeParam > ( layer_param ) ) ; <nl> layer - > SetUp ( this - > blob_bottom_vec_ , & ( this - > blob_top_vec_ ) ) ; <nl> TYPED_TEST ( InnerProductLayerTest , TestSetUp ) { <nl> <nl> TYPED_TEST ( InnerProductLayerTest , TestCPU ) { <nl> LayerParameter layer_param ; <nl> + InnerProductParameter * inner_product_param = <nl> + layer_param . mutable_inner_product_param ( ) ; <nl> Caffe : : set_mode ( Caffe : : CPU ) ; <nl> - layer_param . set_num_output ( 10 ) ; <nl> - layer_param . mutable_weight_filler ( ) - > set_type ( " uniform " ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_type ( " uniform " ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_min ( 1 ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_max ( 2 ) ; <nl> + inner_product_param - > set_num_output ( 10 ) ; <nl> + inner_product_param - > mutable_weight_filler ( ) - > set_type ( " uniform " ) ; <nl> + inner_product_param - > mutable_bias_filler ( ) - > set_type ( " uniform " ) ; <nl> + inner_product_param - > mutable_bias_filler ( ) - > set_min ( 1 ) ; <nl> + inner_product_param - > mutable_bias_filler ( ) - > set_max ( 2 ) ; <nl> shared_ptr < InnerProductLayer < TypeParam > > layer ( <nl> new InnerProductLayer < TypeParam > ( layer_param ) ) ; <nl> layer - > SetUp ( this - > blob_bottom_vec_ , & ( this - > blob_top_vec_ ) ) ; <nl> TYPED_TEST ( InnerProductLayerTest , TestCPU ) { <nl> TYPED_TEST ( InnerProductLayerTest , TestGPU ) { <nl> if ( sizeof ( TypeParam ) = = 4 | | CAFFE_TEST_CUDA_PROP . major > = 2 ) { <nl> LayerParameter layer_param ; <nl> + InnerProductParameter * inner_product_param = <nl> + layer_param . mutable_inner_product_param ( ) ; <nl> Caffe : : set_mode ( Caffe : : GPU ) ; <nl> - layer_param . set_num_output ( 10 ) ; <nl> - layer_param . mutable_weight_filler ( ) - > set_type ( " uniform " ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_type ( " uniform " ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_min ( 1 ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_max ( 2 ) ; <nl> + inner_product_param - > set_num_output ( 10 ) ; <nl> + inner_product_param - > mutable_weight_filler ( ) - > set_type ( " uniform " ) ; <nl> + inner_product_param - > mutable_bias_filler ( ) - > set_type ( " uniform " ) ; <nl> + inner_product_param - > mutable_bias_filler ( ) - > set_min ( 1 ) ; <nl> + inner_product_param - > mutable_bias_filler ( ) - > set_max ( 2 ) ; <nl> shared_ptr < InnerProductLayer < TypeParam > > layer ( <nl> new InnerProductLayer < TypeParam > ( layer_param ) ) ; <nl> layer - > SetUp ( this - > blob_bottom_vec_ , & ( this - > blob_top_vec_ ) ) ; <nl> TYPED_TEST ( InnerProductLayerTest , TestGPU ) { <nl> <nl> TYPED_TEST ( InnerProductLayerTest , TestCPUGradient ) { <nl> LayerParameter layer_param ; <nl> + InnerProductParameter * inner_product_param = <nl> + layer_param . mutable_inner_product_param ( ) ; <nl> Caffe : : set_mode ( Caffe : : CPU ) ; <nl> - layer_param . set_num_output ( 10 ) ; <nl> - layer_param . mutable_weight_filler ( ) - > set_type ( " gaussian " ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_type ( " gaussian " ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_min ( 1 ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_max ( 2 ) ; <nl> + inner_product_param - > set_num_output ( 10 ) ; <nl> + inner_product_param - > mutable_weight_filler ( ) - > set_type ( " gaussian " ) ; <nl> + inner_product_param - > mutable_bias_filler ( ) - > set_type ( " gaussian " ) ; <nl> + inner_product_param - > mutable_bias_filler ( ) - > set_min ( 1 ) ; <nl> + inner_product_param - > mutable_bias_filler ( ) - > set_max ( 2 ) ; <nl> InnerProductLayer < TypeParam > layer ( layer_param ) ; <nl> GradientChecker < TypeParam > checker ( 1e - 2 , 1e - 3 ) ; <nl> checker . CheckGradientExhaustive ( & layer , & ( this - > blob_bottom_vec_ ) , <nl> TYPED_TEST ( InnerProductLayerTest , TestCPUGradient ) { <nl> TYPED_TEST ( InnerProductLayerTest , TestGPUGradient ) { <nl> if ( sizeof ( TypeParam ) = = 4 | | CAFFE_TEST_CUDA_PROP . major > = 2 ) { <nl> LayerParameter layer_param ; <nl> + InnerProductParameter * inner_product_param = <nl> + layer_param . mutable_inner_product_param ( ) ; <nl> Caffe : : set_mode ( Caffe : : GPU ) ; <nl> - layer_param . set_num_output ( 10 ) ; <nl> - layer_param . mutable_weight_filler ( ) - > set_type ( " gaussian " ) ; <nl> - layer_param . mutable_bias_filler ( ) - > set_type ( " gaussian " ) ; <nl> + inner_product_param - > set_num_output ( 10 ) ; <nl> + inner_product_param - > mutable_weight_filler ( ) - > set_type ( " gaussian " ) ; <nl> + inner_product_param - > mutable_bias_filler ( ) - > set_type ( " gaussian " ) ; <nl> InnerProductLayer < TypeParam > layer ( layer_param ) ; <nl> GradientChecker < TypeParam > checker ( 1e - 2 , 1e - 2 ) ; <nl> checker . CheckGradient ( & layer , & ( this - > blob_bottom_vec_ ) , <nl> mmm a / src / caffe / test / test_lrn_layer . cpp <nl> ppp b / src / caffe / test / test_lrn_layer . cpp <nl> void LRNLayerTest < Dtype > : : ReferenceLRNForward ( <nl> blob_bottom . height ( ) , blob_bottom . width ( ) ) ; <nl> const Dtype * bottom_data = blob_bottom . cpu_data ( ) ; <nl> Dtype * top_data = blob_top - > mutable_cpu_data ( ) ; <nl> - Dtype alpha = layer_param . alpha ( ) ; <nl> - Dtype beta = layer_param . beta ( ) ; <nl> - int size = layer_param . local_size ( ) ; <nl> + LRNParameter lrn_param = layer_param . lrn_param ( ) ; <nl> + Dtype alpha = lrn_param . alpha ( ) ; <nl> + Dtype beta = lrn_param . beta ( ) ; <nl> + int size = lrn_param . local_size ( ) ; <nl> for ( int n = 0 ; n < blob_bottom . num ( ) ; + + n ) { <nl> for ( int c = 0 ; c < blob_bottom . channels ( ) ; + + c ) { <nl> for ( int h = 0 ; h < blob_bottom . height ( ) ; + + h ) { <nl> mmm a / src / caffe / test / test_neuron_layer . cpp <nl> ppp b / src / caffe / test / test_neuron_layer . cpp <nl> TYPED_TEST ( NeuronLayerTest , TestDropoutCPU ) { <nl> / / Now , check values <nl> const TypeParam * bottom_data = this - > blob_bottom_ - > cpu_data ( ) ; <nl> const TypeParam * top_data = this - > blob_top_ - > cpu_data ( ) ; <nl> - float scale = 1 . / ( 1 . - layer_param . dropout_ratio ( ) ) ; <nl> + float scale = 1 . / ( 1 . - layer_param . dropout_param ( ) . dropout_ratio ( ) ) ; <nl> for ( int i = 0 ; i < this - > blob_bottom_ - > count ( ) ; + + i ) { <nl> if ( top_data [ i ] ! = 0 ) { <nl> EXPECT_EQ ( top_data [ i ] , bottom_data [ i ] * scale ) ; <nl> TYPED_TEST ( NeuronLayerTest , TestDropoutCPUTestPhase ) { <nl> / / Now , check values <nl> const TypeParam * bottom_data = this - > blob_bottom_ - > cpu_data ( ) ; <nl> const TypeParam * top_data = this - > blob_top_ - > cpu_data ( ) ; <nl> - float scale = 1 . / ( 1 . - layer_param . dropout_ratio ( ) ) ; <nl> + float scale = 1 . / ( 1 . - layer_param . dropout_param ( ) . dropout_ratio ( ) ) ; <nl> for ( int i = 0 ; i < this - > blob_bottom_ - > count ( ) ; + + i ) { <nl> if ( top_data [ i ] ! = 0 ) { <nl> EXPECT_EQ ( top_data [ i ] , bottom_data [ i ] ) ; <nl> TYPED_TEST ( NeuronLayerTest , TestDropoutGPU ) { <nl> / / Now , check values <nl> const TypeParam * bottom_data = this - > blob_bottom_ - > cpu_data ( ) ; <nl> const TypeParam * top_data = this - > blob_top_ - > cpu_data ( ) ; <nl> - float scale = 1 . / ( 1 . - layer_param . dropout_ratio ( ) ) ; <nl> + float scale = 1 . / ( 1 . - layer_param . dropout_param ( ) . dropout_ratio ( ) ) ; <nl> for ( int i = 0 ; i < this - > blob_bottom_ - > count ( ) ; + + i ) { <nl> if ( top_data [ i ] ! = 0 ) { <nl> EXPECT_EQ ( top_data [ i ] , bottom_data [ i ] * scale ) ; <nl> TYPED_TEST ( NeuronLayerTest , TestDropoutGPUTestPhase ) { <nl> / / Now , check values <nl> const TypeParam * bottom_data = this - > blob_bottom_ - > cpu_data ( ) ; <nl> const TypeParam * top_data = this - > blob_top_ - > cpu_data ( ) ; <nl> - float scale = 1 . / ( 1 . - layer_param . dropout_ratio ( ) ) ; <nl> + float scale = 1 . / ( 1 . - layer_param . dropout_param ( ) . dropout_ratio ( ) ) ; <nl> for ( int i = 0 ; i < this - > blob_bottom_ - > count ( ) ; + + i ) { <nl> if ( top_data [ i ] ! = 0 ) { <nl> EXPECT_EQ ( top_data [ i ] , bottom_data [ i ] ) ; <nl> mmm a / src / caffe / test / test_pooling_layer . cpp <nl> ppp b / src / caffe / test / test_pooling_layer . cpp <nl> TYPED_TEST_CASE ( PoolingLayerTest , Dtypes ) ; <nl> <nl> TYPED_TEST ( PoolingLayerTest , TestSetup ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> + PoolingParameter * pooling_param = layer_param . mutable_pooling_param ( ) ; <nl> + pooling_param - > set_kernel_size ( 3 ) ; <nl> + pooling_param - > set_stride ( 2 ) ; <nl> PoolingLayer < TypeParam > layer ( layer_param ) ; <nl> layer . SetUp ( this - > blob_bottom_vec_ , & ( this - > blob_top_vec_ ) ) ; <nl> EXPECT_EQ ( this - > blob_top_ - > num ( ) , this - > blob_bottom_ - > num ( ) ) ; <nl> TYPED_TEST ( PoolingLayerTest , TestSetup ) { <nl> / * <nl> TYPED_TEST ( PoolingLayerTest , PrintGPUBackward ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> - layer_param . set_pool ( LayerParameter_PoolMethod_MAX ) ; <nl> + PoolingParameter * pooling_param = layer_param . mutable_pooling_param ( ) ; <nl> + pooling_param - > set_kernel_size ( 3 ) ; <nl> + pooling_param - > set_stride ( 2 ) ; <nl> + pooling_param - > set_pool ( PoolingParameter_PoolMethod_MAX ) ; <nl> Caffe : : set_mode ( Caffe : : GPU ) ; <nl> PoolingLayer < TypeParam > layer ( layer_param ) ; <nl> layer . SetUp ( this - > blob_bottom_vec_ , & ( this - > blob_top_vec_ ) ) ; <nl> TYPED_TEST ( PoolingLayerTest , PrintGPUBackward ) { <nl> <nl> TYPED_TEST ( PoolingLayerTest , TestCPUGradientMax ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> - layer_param . set_pool ( LayerParameter_PoolMethod_MAX ) ; <nl> + PoolingParameter * pooling_param = layer_param . mutable_pooling_param ( ) ; <nl> + pooling_param - > set_kernel_size ( 3 ) ; <nl> + pooling_param - > set_stride ( 2 ) ; <nl> + pooling_param - > set_pool ( PoolingParameter_PoolMethod_MAX ) ; <nl> Caffe : : set_mode ( Caffe : : CPU ) ; <nl> PoolingLayer < TypeParam > layer ( layer_param ) ; <nl> GradientChecker < TypeParam > checker ( 1e - 4 , 1e - 2 ) ; <nl> TYPED_TEST ( PoolingLayerTest , TestCPUGradientMax ) { <nl> <nl> TYPED_TEST ( PoolingLayerTest , TestGPUGradientMax ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> - layer_param . set_pool ( LayerParameter_PoolMethod_MAX ) ; <nl> + PoolingParameter * pooling_param = layer_param . mutable_pooling_param ( ) ; <nl> + pooling_param - > set_kernel_size ( 3 ) ; <nl> + pooling_param - > set_stride ( 2 ) ; <nl> + pooling_param - > set_pool ( PoolingParameter_PoolMethod_MAX ) ; <nl> Caffe : : set_mode ( Caffe : : GPU ) ; <nl> PoolingLayer < TypeParam > layer ( layer_param ) ; <nl> GradientChecker < TypeParam > checker ( 1e - 4 , 1e - 2 ) ; <nl> TYPED_TEST ( PoolingLayerTest , TestGPUGradientMax ) { <nl> <nl> TYPED_TEST ( PoolingLayerTest , TestCPUGradientAve ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> - layer_param . set_pool ( LayerParameter_PoolMethod_AVE ) ; <nl> + PoolingParameter * pooling_param = layer_param . mutable_pooling_param ( ) ; <nl> + pooling_param - > set_kernel_size ( 3 ) ; <nl> + pooling_param - > set_stride ( 2 ) ; <nl> + pooling_param - > set_pool ( PoolingParameter_PoolMethod_AVE ) ; <nl> Caffe : : set_mode ( Caffe : : CPU ) ; <nl> PoolingLayer < TypeParam > layer ( layer_param ) ; <nl> GradientChecker < TypeParam > checker ( 1e - 2 , 1e - 2 ) ; <nl> TYPED_TEST ( PoolingLayerTest , TestCPUGradientAve ) { <nl> <nl> TYPED_TEST ( PoolingLayerTest , TestGPUGradientAve ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> - layer_param . set_pool ( LayerParameter_PoolMethod_AVE ) ; <nl> + PoolingParameter * pooling_param = layer_param . mutable_pooling_param ( ) ; <nl> + pooling_param - > set_kernel_size ( 3 ) ; <nl> + pooling_param - > set_stride ( 2 ) ; <nl> + pooling_param - > set_pool ( PoolingParameter_PoolMethod_AVE ) ; <nl> Caffe : : set_mode ( Caffe : : GPU ) ; <nl> PoolingLayer < TypeParam > layer ( layer_param ) ; <nl> GradientChecker < TypeParam > checker ( 1e - 2 , 1e - 2 ) ; <nl> mmm a / src / caffe / test / test_stochastic_pooling . cpp <nl> ppp b / src / caffe / test / test_stochastic_pooling . cpp <nl> TYPED_TEST_CASE ( StochasticPoolingLayerTest , Dtypes ) ; <nl> <nl> TYPED_TEST ( StochasticPoolingLayerTest , TestSetup ) { <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> + PoolingParameter * pooling_param = layer_param . mutable_pooling_param ( ) ; <nl> + pooling_param - > set_kernel_size ( 3 ) ; <nl> + pooling_param - > set_stride ( 2 ) ; <nl> PoolingLayer < TypeParam > layer ( layer_param ) ; <nl> layer . SetUp ( this - > blob_bottom_vec_ , & ( this - > blob_top_vec_ ) ) ; <nl> EXPECT_EQ ( this - > blob_top_ - > num ( ) , this - > blob_bottom_ - > num ( ) ) ; <nl> TYPED_TEST ( StochasticPoolingLayerTest , TestStochasticGPU ) { <nl> Caffe : : set_mode ( Caffe : : GPU ) ; <nl> Caffe : : set_phase ( Caffe : : TRAIN ) ; <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> - <nl> - layer_param . set_pool ( LayerParameter_PoolMethod_STOCHASTIC ) ; <nl> + PoolingParameter * pooling_param = layer_param . mutable_pooling_param ( ) ; <nl> + pooling_param - > set_kernel_size ( 3 ) ; <nl> + pooling_param - > set_stride ( 2 ) ; <nl> + pooling_param - > set_pool ( PoolingParameter_PoolMethod_STOCHASTIC ) ; <nl> PoolingLayer < TypeParam > layer ( layer_param ) ; <nl> layer . SetUp ( this - > blob_bottom_vec_ , & ( this - > blob_top_vec_ ) ) ; <nl> layer . Forward ( this - > blob_bottom_vec_ , & ( this - > blob_top_vec_ ) ) ; <nl> TYPED_TEST ( StochasticPoolingLayerTest , TestStochasticGPUTestPhase ) { <nl> Caffe : : set_mode ( Caffe : : GPU ) ; <nl> Caffe : : set_phase ( Caffe : : TEST ) ; <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> - <nl> - layer_param . set_pool ( LayerParameter_PoolMethod_STOCHASTIC ) ; <nl> + PoolingParameter * pooling_param = layer_param . mutable_pooling_param ( ) ; <nl> + pooling_param - > set_kernel_size ( 3 ) ; <nl> + pooling_param - > set_stride ( 2 ) ; <nl> + pooling_param - > set_pool ( PoolingParameter_PoolMethod_STOCHASTIC ) ; <nl> PoolingLayer < TypeParam > layer ( layer_param ) ; <nl> layer . SetUp ( this - > blob_bottom_vec_ , & ( this - > blob_top_vec_ ) ) ; <nl> layer . Forward ( this - > blob_bottom_vec_ , & ( this - > blob_top_vec_ ) ) ; <nl> TYPED_TEST ( StochasticPoolingLayerTest , TestGradientGPU ) { <nl> Caffe : : set_mode ( Caffe : : GPU ) ; <nl> Caffe : : set_phase ( Caffe : : TRAIN ) ; <nl> LayerParameter layer_param ; <nl> - layer_param . set_kernelsize ( 3 ) ; <nl> - layer_param . set_stride ( 2 ) ; <nl> - <nl> - layer_param . set_pool ( LayerParameter_PoolMethod_STOCHASTIC ) ; <nl> + PoolingParameter * pooling_param = layer_param . mutable_pooling_param ( ) ; <nl> + pooling_param - > set_kernel_size ( 3 ) ; <nl> + pooling_param - > set_stride ( 2 ) ; <nl> + pooling_param - > set_pool ( PoolingParameter_PoolMethod_STOCHASTIC ) ; <nl> PoolingLayer < TypeParam > layer ( layer_param ) ; <nl> GradientChecker < TypeParam > checker ( 1e - 4 , 1e - 2 ) ; <nl> / / it is too expensive to call curand multiple times , so we don ' t do an <nl>
|
update tests for new proto format ; now they compile
|
BVLC/caffe
|
1816561936b8173f78659850de4e8e1da677bd7a
|
2014-03-28T06:42:28Z
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.